[svn-upgrade] Integrating new upstream version, libpoe-component-sslify-perl (0.15)
Antonio Radici
14 years ago
0 | # Build.PL | |
1 | use strict; use warnings; | |
0 | 2 | use Module::Build; |
3 | ||
1 | 4 | my $build = Module::Build->new( |
2 | 5 | # look up Module::Build::API for the info! |
3 | 6 | 'dynamic_config' => 0, |
12 | 15 | |
13 | 16 | 'test_files' => 't/*.t', |
14 | 17 | |
15 | 'add_to_cleanup' => [ 'META.yml', 'Makefile.PL', 'README' ], # automatically generated | |
18 | 'add_to_cleanup' => [ 'META.yml', 'Makefile.PL', 'README', 'Manifest' ], # automatically generated | |
16 | 19 | |
17 | 20 | 'requires' => { |
18 | 21 | # Networking |
19 | 22 | 'Net::SSLeay' => '1.30', |
20 | 23 | |
21 | # Test stuff | |
22 | 'Test::More' => 0, | |
24 | # minimum perl version | |
25 | 'perl' => '5.006', | |
23 | 26 | }, |
24 | ||
25 | 'recommends' => { | |
26 | # boo! | |
27 | }, | |
28 | ||
29 | # FIXME wishlist... | |
30 | # 'test_requires' => { | |
31 | # # Test stuff | |
32 | # 'Test::Compile' => 0, | |
33 | # 'Test::Perl::Critic' => 0, | |
34 | # 'Test::Dependencies' => 0, | |
35 | # 'Test::Distribution' => 0, | |
36 | # 'Test::Fixme' => 0, | |
37 | # 'Test::HasVersion' => 0, | |
38 | # 'Test::Kwalitee' => 0, | |
39 | # 'Test::CheckManifest' => 0, | |
40 | # 'Test::MinimumVersion' => 0, | |
41 | # 'Test::Pod::Coverage' => 0, | |
42 | # 'Test::Spelling' => 0, | |
43 | # 'Test::Pod' => 0, | |
44 | # 'Test::Prereq' => 0, | |
45 | # 'Test::Strict' => 0, | |
46 | # 'Test::UseAllModules' => 0, | |
47 | # }, | |
48 | 27 | ); |
49 | 28 | |
50 | 29 | # all done! |
0 | 0 | Revision history for Perl extension POE::Component::SSLify. |
1 | ||
2 | * 0.15 | |
3 | ||
4 | Added "examples/serverclient.pl" to track down same-process sslification problems, thanks LotR! | |
5 | ||
6 | Applied patch from BinGOs to support passing custom $ctx for Server_SSLify, thanks! RT#43018 | |
7 | ||
8 | Switched over to Test::Apocalypse for easy author tests | |
9 | ||
10 | Added experimental NONBLOCKING code, thanks ASCENT for the motivation! | |
1 | 11 | |
2 | 12 | * 0.14 |
3 | 13 |
0 | This software is copyright (c) 2009 by Apocalypse. | |
1 | ||
2 | This is free software; you can redistribute it and/or modify it under | |
3 | the same terms as perl itself. | |
4 | ||
5 | Terms of Perl itself | |
6 | ||
7 | a) the GNU General Public License as published by the Free | |
8 | Software Foundation; either version 1, or (at your option) any | |
9 | later version, or | |
10 | b) the "Artistic License" | |
11 | ||
12 | --- The GNU General Public License, Version 1, February 1989 --- | |
13 | ||
14 | This software is Copyright (c) 2008 by the POE authors. | |
15 | ||
16 | This is free software, licensed under: | |
17 | ||
18 | The GNU General Public License, Version 1, February 1989 | |
19 | ||
20 | GNU GENERAL PUBLIC LICENSE | |
21 | Version 1, February 1989 | |
22 | ||
23 | Copyright (C) 1989 Free Software Foundation, Inc. | |
24 | 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA | |
25 | Everyone is permitted to copy and distribute verbatim copies | |
26 | of this license document, but changing it is not allowed. | |
27 | ||
28 | Preamble | |
29 | ||
30 | The license agreements of most software companies try to keep users | |
31 | at the mercy of those companies. By contrast, our General Public | |
32 | License is intended to guarantee your freedom to share and change free | |
33 | software--to make sure the software is free for all its users. The | |
34 | General Public License applies to the Free Software Foundation's | |
35 | software and to any other program whose authors commit to using it. | |
36 | You can use it for your programs, too. | |
37 | ||
38 | When we speak of free software, we are referring to freedom, not | |
39 | price. Specifically, the General Public License is designed to make | |
40 | sure that you have the freedom to give away or sell copies of free | |
41 | software, that you receive source code or can get it if you want it, | |
42 | that you can change the software or use pieces of it in new free | |
43 | programs; and that you know you can do these things. | |
44 | ||
45 | To protect your rights, we need to make restrictions that forbid | |
46 | anyone to deny you these rights or to ask you to surrender the rights. | |
47 | These restrictions translate to certain responsibilities for you if you | |
48 | distribute copies of the software, or if you modify it. | |
49 | ||
50 | For example, if you distribute copies of a such a program, whether | |
51 | gratis or for a fee, you must give the recipients all the rights that | |
52 | you have. You must make sure that they, too, receive or can get the | |
53 | source code. And you must tell them their rights. | |
54 | ||
55 | We protect your rights with two steps: (1) copyright the software, and | |
56 | (2) offer you this license which gives you legal permission to copy, | |
57 | distribute and/or modify the software. | |
58 | ||
59 | Also, for each author's protection and ours, we want to make certain | |
60 | that everyone understands that there is no warranty for this free | |
61 | software. If the software is modified by someone else and passed on, we | |
62 | want its recipients to know that what they have is not the original, so | |
63 | that any problems introduced by others will not reflect on the original | |
64 | authors' reputations. | |
65 | ||
66 | The precise terms and conditions for copying, distribution and | |
67 | modification follow. | |
68 | ||
69 | GNU GENERAL PUBLIC LICENSE | |
70 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
71 | ||
72 | 0. This License Agreement applies to any program or other work which | |
73 | contains a notice placed by the copyright holder saying it may be | |
74 | distributed under the terms of this General Public License. The | |
75 | "Program", below, refers to any such program or work, and a "work based | |
76 | on the Program" means either the Program or any work containing the | |
77 | Program or a portion of it, either verbatim or with modifications. Each | |
78 | licensee is addressed as "you". | |
79 | ||
80 | 1. You may copy and distribute verbatim copies of the Program's source | |
81 | code as you receive it, in any medium, provided that you conspicuously and | |
82 | appropriately publish on each copy an appropriate copyright notice and | |
83 | disclaimer of warranty; keep intact all the notices that refer to this | |
84 | General Public License and to the absence of any warranty; and give any | |
85 | other recipients of the Program a copy of this General Public License | |
86 | along with the Program. You may charge a fee for the physical act of | |
87 | transferring a copy. | |
88 | ||
89 | 2. You may modify your copy or copies of the Program or any portion of | |
90 | it, and copy and distribute such modifications under the terms of Paragraph | |
91 | 1 above, provided that you also do the following: | |
92 | ||
93 | a) cause the modified files to carry prominent notices stating that | |
94 | you changed the files and the date of any change; and | |
95 | ||
96 | b) cause the whole of any work that you distribute or publish, that | |
97 | in whole or in part contains the Program or any part thereof, either | |
98 | with or without modifications, to be licensed at no charge to all | |
99 | third parties under the terms of this General Public License (except | |
100 | that you may choose to grant warranty protection to some or all | |
101 | third parties, at your option). | |
102 | ||
103 | c) If the modified program normally reads commands interactively when | |
104 | run, you must cause it, when started running for such interactive use | |
105 | in the simplest and most usual way, to print or display an | |
106 | announcement including an appropriate copyright notice and a notice | |
107 | that there is no warranty (or else, saying that you provide a | |
108 | warranty) and that users may redistribute the program under these | |
109 | conditions, and telling the user how to view a copy of this General | |
110 | Public License. | |
111 | ||
112 | d) You may charge a fee for the physical act of transferring a | |
113 | copy, and you may at your option offer warranty protection in | |
114 | exchange for a fee. | |
115 | ||
116 | Mere aggregation of another independent work with the Program (or its | |
117 | derivative) on a volume of a storage or distribution medium does not bring | |
118 | the other work under the scope of these terms. | |
119 | ||
120 | 3. You may copy and distribute the Program (or a portion or derivative of | |
121 | it, under Paragraph 2) in object code or executable form under the terms of | |
122 | Paragraphs 1 and 2 above provided that you also do one of the following: | |
123 | ||
124 | a) accompany it with the complete corresponding machine-readable | |
125 | source code, which must be distributed under the terms of | |
126 | Paragraphs 1 and 2 above; or, | |
127 | ||
128 | b) accompany it with a written offer, valid for at least three | |
129 | years, to give any third party free (except for a nominal charge | |
130 | for the cost of distribution) a complete machine-readable copy of the | |
131 | corresponding source code, to be distributed under the terms of | |
132 | Paragraphs 1 and 2 above; or, | |
133 | ||
134 | c) accompany it with the information you received as to where the | |
135 | corresponding source code may be obtained. (This alternative is | |
136 | allowed only for noncommercial distribution and only if you | |
137 | received the program in object code or executable form alone.) | |
138 | ||
139 | Source code for a work means the preferred form of the work for making | |
140 | modifications to it. For an executable file, complete source code means | |
141 | all the source code for all modules it contains; but, as a special | |
142 | exception, it need not include source code for modules which are standard | |
143 | libraries that accompany the operating system on which the executable | |
144 | file runs, or for standard header files or definitions files that | |
145 | accompany that operating system. | |
146 | ||
147 | 4. You may not copy, modify, sublicense, distribute or transfer the | |
148 | Program except as expressly provided under this General Public License. | |
149 | Any attempt otherwise to copy, modify, sublicense, distribute or transfer | |
150 | the Program is void, and will automatically terminate your rights to use | |
151 | the Program under this License. However, parties who have received | |
152 | copies, or rights to use copies, from you under this General Public | |
153 | License will not have their licenses terminated so long as such parties | |
154 | remain in full compliance. | |
155 | ||
156 | 5. By copying, distributing or modifying the Program (or any work based | |
157 | on the Program) you indicate your acceptance of this license to do so, | |
158 | and all its terms and conditions. | |
159 | ||
160 | 6. Each time you redistribute the Program (or any work based on the | |
161 | Program), the recipient automatically receives a license from the original | |
162 | licensor to copy, distribute or modify the Program subject to these | |
163 | terms and conditions. You may not impose any further restrictions on the | |
164 | recipients' exercise of the rights granted herein. | |
165 | ||
166 | 7. The Free Software Foundation may publish revised and/or new versions | |
167 | of the General Public License from time to time. Such new versions will | |
168 | be similar in spirit to the present version, but may differ in detail to | |
169 | address new problems or concerns. | |
170 | ||
171 | Each version is given a distinguishing version number. If the Program | |
172 | specifies a version number of the license which applies to it and "any | |
173 | later version", you have the option of following the terms and conditions | |
174 | either of that version or of any later version published by the Free | |
175 | Software Foundation. If the Program does not specify a version number of | |
176 | the license, you may choose any version ever published by the Free Software | |
177 | Foundation. | |
178 | ||
179 | 8. If you wish to incorporate parts of the Program into other free | |
180 | programs whose distribution conditions are different, write to the author | |
181 | to ask for permission. For software which is copyrighted by the Free | |
182 | Software Foundation, write to the Free Software Foundation; we sometimes | |
183 | make exceptions for this. Our decision will be guided by the two goals | |
184 | of preserving the free status of all derivatives of our free software and | |
185 | of promoting the sharing and reuse of software generally. | |
186 | ||
187 | NO WARRANTY | |
188 | ||
189 | 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | |
190 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | |
191 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | |
192 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | |
193 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
194 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | |
195 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | |
196 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | |
197 | REPAIR OR CORRECTION. | |
198 | ||
199 | 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | |
200 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | |
201 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | |
202 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | |
203 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | |
204 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | |
205 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | |
206 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | |
207 | POSSIBILITY OF SUCH DAMAGES. | |
208 | ||
209 | END OF TERMS AND CONDITIONS | |
210 | ||
211 | Appendix: How to Apply These Terms to Your New Programs | |
212 | ||
213 | If you develop a new program, and you want it to be of the greatest | |
214 | possible use to humanity, the best way to achieve this is to make it | |
215 | free software which everyone can redistribute and change under these | |
216 | terms. | |
217 | ||
218 | To do so, attach the following notices to the program. It is safest to | |
219 | attach them to the start of each source file to most effectively convey | |
220 | the exclusion of warranty; and each file should have at least the | |
221 | "copyright" line and a pointer to where the full notice is found. | |
222 | ||
223 | <one line to give the program's name and a brief idea of what it does.> | |
224 | Copyright (C) 19yy <name of author> | |
225 | ||
226 | This program is free software; you can redistribute it and/or modify | |
227 | it under the terms of the GNU General Public License as published by | |
228 | the Free Software Foundation; either version 1, or (at your option) | |
229 | any later version. | |
230 | ||
231 | This program is distributed in the hope that it will be useful, | |
232 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
233 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
234 | GNU General Public License for more details. | |
235 | ||
236 | You should have received a copy of the GNU General Public License | |
237 | along with this program; if not, write to the Free Software Foundation, | |
238 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. | |
239 | ||
240 | Also add information on how to contact you by electronic and paper mail. | |
241 | ||
242 | If the program is interactive, make it output a short notice like this | |
243 | when it starts in an interactive mode: | |
244 | ||
245 | Gnomovision version 69, Copyright (C) 19xx name of author | |
246 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | |
247 | This is free software, and you are welcome to redistribute it | |
248 | under certain conditions; type `show c' for details. | |
249 | ||
250 | The hypothetical commands `show w' and `show c' should show the | |
251 | appropriate parts of the General Public License. Of course, the | |
252 | commands you use may be called something other than `show w' and `show | |
253 | c'; they could even be mouse-clicks or menu items--whatever suits your | |
254 | program. | |
255 | ||
256 | You should also get your employer (if you work as a programmer) or your | |
257 | school, if any, to sign a "copyright disclaimer" for the program, if | |
258 | necessary. Here a sample; alter the names: | |
259 | ||
260 | Yoyodyne, Inc., hereby disclaims all copyright interest in the | |
261 | program `Gnomovision' (a program to direct compilers to make passes | |
262 | at assemblers) written by James Hacker. | |
263 | ||
264 | <signature of Ty Coon>, 1 April 1989 | |
265 | Ty Coon, President of Vice | |
266 | ||
267 | That's all there is to it! | |
268 | ||
269 | ||
270 | --- The Artistic License 1.0 --- | |
271 | ||
272 | This software is Copyright (c) 2008 by the POE authors. | |
273 | ||
274 | This is free software, licensed under: | |
275 | ||
276 | The Artistic License 1.0 | |
277 | ||
278 | The Artistic License | |
279 | ||
280 | Preamble | |
281 | ||
282 | The intent of this document is to state the conditions under which a Package | |
283 | may be copied, such that the Copyright Holder maintains some semblance of | |
284 | artistic control over the development of the package, while giving the users of | |
285 | the package the right to use and distribute the Package in a more-or-less | |
286 | customary fashion, plus the right to make reasonable modifications. | |
287 | ||
288 | Definitions: | |
289 | ||
290 | - "Package" refers to the collection of files distributed by the Copyright | |
291 | Holder, and derivatives of that collection of files created through | |
292 | textual modification. | |
293 | - "Standard Version" refers to such a Package if it has not been modified, | |
294 | or has been modified in accordance with the wishes of the Copyright | |
295 | Holder. | |
296 | - "Copyright Holder" is whoever is named in the copyright or copyrights for | |
297 | the package. | |
298 | - "You" is you, if you're thinking about copying or distributing this Package. | |
299 | - "Reasonable copying fee" is whatever you can justify on the basis of media | |
300 | cost, duplication charges, time of people involved, and so on. (You will | |
301 | not be required to justify it to the Copyright Holder, but only to the | |
302 | computing community at large as a market that must bear the fee.) | |
303 | - "Freely Available" means that no fee is charged for the item itself, though | |
304 | there may be fees involved in handling the item. It also means that | |
305 | recipients of the item may redistribute it under the same conditions they | |
306 | received it. | |
307 | ||
308 | 1. You may make and give away verbatim copies of the source form of the | |
309 | Standard Version of this Package without restriction, provided that you | |
310 | duplicate all of the original copyright notices and associated disclaimers. | |
311 | ||
312 | 2. You may apply bug fixes, portability fixes and other modifications derived | |
313 | from the Public Domain or from the Copyright Holder. A Package modified in such | |
314 | a way shall still be considered the Standard Version. | |
315 | ||
316 | 3. You may otherwise modify your copy of this Package in any way, provided that | |
317 | you insert a prominent notice in each changed file stating how and when you | |
318 | changed that file, and provided that you do at least ONE of the following: | |
319 | ||
320 | a) place your modifications in the Public Domain or otherwise make them | |
321 | Freely Available, such as by posting said modifications to Usenet or an | |
322 | equivalent medium, or placing the modifications on a major archive site | |
323 | such as ftp.uu.net, or by allowing the Copyright Holder to include your | |
324 | modifications in the Standard Version of the Package. | |
325 | ||
326 | b) use the modified Package only within your corporation or organization. | |
327 | ||
328 | c) rename any non-standard executables so the names do not conflict with | |
329 | standard executables, which must also be provided, and provide a separate | |
330 | manual page for each non-standard executable that clearly documents how it | |
331 | differs from the Standard Version. | |
332 | ||
333 | d) make other distribution arrangements with the Copyright Holder. | |
334 | ||
335 | 4. You may distribute the programs of this Package in object code or executable | |
336 | form, provided that you do at least ONE of the following: | |
337 | ||
338 | a) distribute a Standard Version of the executables and library files, | |
339 | together with instructions (in the manual page or equivalent) on where to | |
340 | get the Standard Version. | |
341 | ||
342 | b) accompany the distribution with the machine-readable source of the Package | |
343 | with your modifications. | |
344 | ||
345 | c) accompany any non-standard executables with their corresponding Standard | |
346 | Version executables, giving the non-standard executables non-standard | |
347 | names, and clearly documenting the differences in manual pages (or | |
348 | equivalent), together with instructions on where to get the Standard | |
349 | Version. | |
350 | ||
351 | d) make other distribution arrangements with the Copyright Holder. | |
352 | ||
353 | 5. You may charge a reasonable copying fee for any distribution of this | |
354 | Package. You may charge any fee you choose for support of this Package. You | |
355 | may not charge a fee for this Package itself. However, you may distribute this | |
356 | Package in aggregate with other (possibly commercial) programs as part of a | |
357 | larger (possibly commercial) software distribution provided that you do not | |
358 | advertise this Package as a product of your own. | |
359 | ||
360 | 6. The scripts and library files supplied as input to or produced as output | |
361 | from the programs of this Package do not automatically fall under the copyright | |
362 | of this Package, but belong to whomever generated them, and may be sold | |
363 | commercially, and may be aggregated with this Package. | |
364 | ||
365 | 7. C or perl subroutines supplied by you and linked into this Package shall not | |
366 | be considered part of this Package. | |
367 | ||
368 | 8. The name of the Copyright Holder may not be used to endorse or promote | |
369 | products derived from this software without specific prior written permission. | |
370 | ||
371 | 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED | |
372 | WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF | |
373 | MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
374 | ||
375 | The End | |
376 |
0 | 0 | Build.PL |
1 | 1 | Changes |
2 | examples/client.pl | |
3 | examples/server.pl | |
4 | lib/POE/Component/SSLify.pm | |
5 | lib/POE/Component/SSLify/ClientHandle.pm | |
6 | lib/POE/Component/SSLify/ServerHandle.pm | |
7 | 2 | Makefile.PL |
8 | 3 | MANIFEST |
9 | 4 | MANIFEST.SKIP |
10 | 5 | META.yml |
11 | 6 | README |
12 | t/load.t | |
13 | t/a_critic.t | |
14 | t/a_kwalitee.t | |
15 | t/a_pod.t | |
16 | t/a_pod_spelling.t | |
17 | t/a_pod_coverage.t | |
18 | t/a_strict.t | |
19 | t/a_hasversion.t | |
20 | t/a_minimumversion.t | |
21 | t/a_manifest.t | |
22 | t/a_distribution.t | |
23 | t/a_compile.t | |
24 | t/a_dependencies.t | |
25 | t/a_fixme.t | |
26 | t/a_prereq.t | |
27 | t/a_prereq_build.t | |
28 | t/a_dosnewline.t | |
7 | LICENSE | |
8 | ||
9 | lib/POE/Component/SSLify.pm | |
10 | lib/POE/Component/SSLify/ClientHandle.pm | |
11 | lib/POE/Component/SSLify/ServerHandle.pm | |
12 | ||
13 | examples/client.pl | |
14 | examples/server.pl | |
15 | examples/serverclient.pl | |
16 | ||
17 | t/1_load.t | |
18 | t/apocalypse.t |
4 | 4 | |
5 | 5 | # Avoid version control files. |
6 | 6 | \B\.svn\b |
7 | \B\.git\b | |
7 | 8 | |
8 | 9 | # Avoid Makemaker generated and utility files. |
9 | \bMANIFEST\.SKIP | |
10 | 10 | \bMakefile$ |
11 | 11 | \bblib/ |
12 | 12 | \bMakeMaker-\d |
0 | 0 | --- |
1 | 1 | name: POE-Component-SSLify |
2 | version: 0.14 | |
2 | version: 0.15 | |
3 | 3 | author: |
4 | 4 | - 'Apocalypse E<lt>apocal@cpan.orgE<gt>' |
5 | 5 | abstract: SSL in the world of POE made easy |
8 | 8 | license: http://dev.perl.org/licenses/ |
9 | 9 | requires: |
10 | 10 | Net::SSLeay: 1.30 |
11 | Test::More: 0 | |
11 | perl: 5.006 | |
12 | 12 | dynamic_config: 0 |
13 | 13 | provides: |
14 | 14 | POE::Component::SSLify: |
15 | 15 | file: lib/POE/Component/SSLify.pm |
16 | version: 0.14 | |
16 | version: 0.15 | |
17 | 17 | POE::Component::SSLify::ClientHandle: |
18 | 18 | file: lib/POE/Component/SSLify/ClientHandle.pm |
19 | version: 53 | |
19 | version: 0.15 | |
20 | 20 | POE::Component::SSLify::ServerHandle: |
21 | 21 | file: lib/POE/Component/SSLify/ServerHandle.pm |
22 | version: 53 | |
23 | generated_by: Module::Build version 0.2808 | |
22 | version: 0.15 | |
23 | generated_by: Module::Build version 0.280801 | |
24 | 24 | meta-spec: |
25 | 25 | url: http://module-build.sourceforge.net/META-spec-v1.2.html |
26 | 26 | version: 1.2 |
0 | # Note: this file was auto-generated by Module::Build::Compat version 0.03 | |
0 | # Note: this file was auto-generated by Module::Build::Compat version 0.2808_01 | |
1 | require 5.006; | |
1 | 2 | use ExtUtils::MakeMaker; |
2 | 3 | WriteMakefile |
3 | 4 | ( |
7 | 8 | 'EXE_FILES' => [], |
8 | 9 | 'VERSION_FROM' => 'lib/POE/Component/SSLify.pm', |
9 | 10 | 'PREREQ_PM' => { |
10 | 'Test::More' => 0, | |
11 | 11 | 'Net::SSLeay' => '1.30' |
12 | 12 | } |
13 | 13 | ) |
88 | 88 | Mixing Server/Client in the same program |
89 | 89 | Some users have reported success, others failure when they tried to utilize SSLify in both roles. This |
90 | 90 | would require more investigation, so please tread carefully if you need to use it! |
91 | ||
92 | Blocking mode | |
93 | Normally, Net::SSLeay requires the socket to be in blocking mode for the initial handshake to work. However, | |
94 | various users ( especially ASCENT, thanks! ) have reported success in setting nonblocking mode for clients. | |
95 | ||
96 | In order to enable nonblocking mode, you need to set the subroutine "NONBLOCKING" to a true value in this | |
97 | package. | |
98 | ||
99 | sub POE::Component::SSLify::NONBLOCKING { 1 } | |
100 | use POE::Component::SSLify; | |
101 | ||
102 | This is a global, and an EXPERIMENTAL feature! Please, pretty please report back to me your experience with | |
103 | this. Hopefully someday SSLify will be fully nonblocking, thanks to your help! | |
91 | 104 | |
92 | 105 | FUNCTIONS |
93 | 106 | Client_SSLify |
126 | 139 | |
127 | 140 | NOTE: SSLify_Options must be set first! |
128 | 141 | |
142 | Furthermore, you can pass in your own $ctx object if you desire. This allows you to set custom parameters | |
143 | per-connection, for example. | |
144 | my $socket = shift; # get the socket from somewhere | |
145 | my $ctx = Net::SSLeay::CTX_new(); | |
146 | # set various options on $ctx as desired | |
147 | $socket = Server_SSLify( $socket, $ctx ); | |
148 | ||
149 | NOTE: You can use SSLify_GetCTX to modify the global, and avoid doing this on every connection if the | |
150 | options are the same... | |
151 | ||
129 | 152 | SSLify_Options |
130 | 153 | Accepts the location of the SSL key + certificate files and does it's job |
131 | 154 | |
182 | 205 | EXPORT |
183 | 206 | Stuffs all of the above functions in @EXPORT_OK so you have to request them directly |
184 | 207 | |
185 | BUGS | |
186 | On Win32 platforms SSL support is pretty shaky, please help me out with | |
187 | detailed error descriptions if it happens to you! | |
208 | head1 SUPPORT | |
209 | ||
210 | You can find documentation for this module with the perldoc command. | |
211 | ||
212 | perldoc POE::Component::SSLify | |
213 | ||
214 | Websites | |
215 | * AnnoCPAN: Annotated CPAN documentation | |
216 | ||
217 | <http://annocpan.org/dist/POE-Component-SSLify> | |
218 | ||
219 | * CPAN Ratings | |
220 | ||
221 | <http://cpanratings.perl.org/d/POE-Component-SSLify> | |
222 | ||
223 | * RT: CPAN's request tracker | |
224 | ||
225 | <http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-SSLify> | |
226 | ||
227 | * Search CPAN | |
228 | ||
229 | <http://search.cpan.org/dist/POE-Component-SSLify> | |
230 | ||
231 | Bugs | |
232 | Please report any bugs or feature requests to "bug-poe-component-sslify | |
233 | at rt.cpan.org", or through the web interface at | |
234 | <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Component-SSLify>. I | |
235 | will be notified, and then you'll automatically be notified of progress | |
236 | on your bug as I make changes. | |
188 | 237 | |
189 | 238 | SEE ALSO |
190 | 239 | POE |
205 | 254 | # of places. |
206 | 255 | |
207 | 256 | COPYRIGHT AND LICENSE |
208 | Copyright 2008 by Apocalypse/Rocco Caputo | |
257 | Copyright 2009 by Apocalypse/Rocco Caputo | |
209 | 258 | |
210 | 259 | This library is free software; you can redistribute it and/or modify it |
211 | 260 | under the same terms as Perl itself. |
0 | 0 | #!/usr/bin/perl |
1 | 1 | use strict; use warnings; |
2 | ||
3 | # to use experimental nonblocking, uncomment this line | |
4 | #sub POE::Component::SSLify::NONBLOCKING { 1 } | |
2 | 5 | |
3 | 6 | use POE; |
4 | 7 | use POE::Component::SSLify qw( Client_SSLify ); |
0 | 0 | #!/usr/bin/perl |
1 | 1 | use strict; use warnings; |
2 | ||
3 | # to use experimental nonblocking, uncomment this line | |
4 | #sub POE::Component::SSLify::NONBLOCKING { 1 } | |
2 | 5 | |
3 | 6 | use POE; |
4 | 7 | use Socket qw( inet_ntoa unpack_sockaddr_in ); |
0 | #!/usr/bin/perl | |
1 | use strict; use warnings; | |
2 | ||
3 | # to use experimental nonblocking, uncomment this line | |
4 | #sub POE::Component::SSLify::NONBLOCKING { 1 } | |
5 | ||
6 | use POE; | |
7 | use Socket qw( inet_ntoa unpack_sockaddr_in ); | |
8 | use POE::Component::SSLify qw( Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_GetSocket ); | |
9 | use POE::Wheel::ReadWrite; | |
10 | use POE::Wheel::SocketFactory; | |
11 | use POE::Driver::SysRW; | |
12 | use POE::Filter::Line; | |
13 | use POE::Wheel::ReadLine; | |
14 | ||
15 | # create the server | |
16 | POE::Session->create( | |
17 | 'inline_states' => { | |
18 | '_start' => sub { | |
19 | # Okay, set the SSL options | |
20 | SSLify_Options( 'server.key', 'server.crt' ); | |
21 | ||
22 | # Set the alias | |
23 | $_[KERNEL]->alias_set( 'server' ); | |
24 | ||
25 | # Create the socketfactory wheel to listen for requests | |
26 | $_[HEAP]->{'SOCKETFACTORY'} = POE::Wheel::SocketFactory->new( | |
27 | 'BindPort' => 5432, | |
28 | 'BindAddress' => 'localhost', | |
29 | 'Reuse' => 'yes', | |
30 | 'SuccessEvent' => 'Got_Connection', | |
31 | 'FailureEvent' => 'ListenerError', | |
32 | ); | |
33 | return 1; | |
34 | }, | |
35 | 'Got_Connection' => sub { | |
36 | # ARG0 = Socket, ARG1 = Remote Address, ARG2 = Remote Port | |
37 | my $socket = $_[ ARG0 ]; | |
38 | ||
39 | # testing stuff | |
40 | warn "got connection from: " . inet_ntoa( ( unpack_sockaddr_in( getpeername( $socket ) ) )[1] ) . " - commencing Server_SSLify()"; | |
41 | ||
42 | # SSLify it! | |
43 | $socket = Server_SSLify( $socket ); | |
44 | ||
45 | # testing stuff | |
46 | warn "SSLified: " . inet_ntoa( ( unpack_sockaddr_in( getpeername( SSLify_GetSocket( $socket ) ) ) )[1] ) . " cipher type: " . SSLify_GetCipher( $socket ); | |
47 | ||
48 | # Hand it off to ReadWrite | |
49 | my $wheel = POE::Wheel::ReadWrite->new( | |
50 | 'Handle' => $socket, | |
51 | 'Driver' => POE::Driver::SysRW->new(), | |
52 | 'Filter' => POE::Filter::Line->new(), | |
53 | 'InputEvent' => 'Got_Input', | |
54 | 'ErrorEvent' => 'Got_Error', | |
55 | ); | |
56 | ||
57 | # Store it... | |
58 | $_[HEAP]->{'WHEELS'}->{ $wheel->ID } = $wheel; | |
59 | return; | |
60 | }, | |
61 | 'ListenerError' => sub { | |
62 | # ARG0 = operation, ARG1 = error number, ARG2 = error string, ARG3 = wheel ID | |
63 | my ( $operation, $errnum, $errstr, $wheel_id ) = @_[ ARG0 .. ARG3 ]; | |
64 | warn "SocketFactory Wheel $wheel_id generated $operation error $errnum: $errstr\n"; | |
65 | ||
66 | return; | |
67 | }, | |
68 | 'Got_Input' => sub { | |
69 | # ARG0: The Line, ARG1: Wheel ID | |
70 | ||
71 | # Send back to the client the line! | |
72 | $_[HEAP]->{'WHEELS'}->{ $_[ARG1] }->put( $_[ARG0] ); | |
73 | return; | |
74 | }, | |
75 | 'Got_Error' => sub { | |
76 | # ARG0 = operation, ARG1 = error number, ARG2 = error string, ARG3 = wheel ID | |
77 | my ( $operation, $errnum, $errstr, $id ) = @_[ ARG0 .. ARG3 ]; | |
78 | warn "Wheel $id generated $operation error $errnum: $errstr\n"; | |
79 | ||
80 | # Done with a wheel | |
81 | delete $_[HEAP]->{'WHEELS'}->{ $_[ARG0] }; | |
82 | return; | |
83 | }, | |
84 | }, | |
85 | ); | |
86 | ||
87 | # create the client | |
88 | POE::Session->create( | |
89 | 'inline_states' => { | |
90 | '_start' => sub { | |
91 | # Set the alias | |
92 | $_[KERNEL]->alias_set( 'client' ); | |
93 | ||
94 | # Setup our ReadLine stuff | |
95 | $_[HEAP]->{'RL'} = POE::Wheel::ReadLine->new( | |
96 | 'InputEvent' => 'Got_ReadLine', | |
97 | ); | |
98 | ||
99 | # Connect to the server! | |
100 | $_[KERNEL]->yield( 'do_connect' ); | |
101 | return; | |
102 | }, | |
103 | 'do_connect' => sub { | |
104 | # Create the socketfactory wheel to listen for requests | |
105 | $_[HEAP]->{'SOCKETFACTORY'} = POE::Wheel::SocketFactory->new( | |
106 | 'RemotePort' => 5432, | |
107 | 'RemoteAddress' => 'localhost', | |
108 | 'Reuse' => 'yes', | |
109 | 'SuccessEvent' => 'Got_Connection', | |
110 | 'FailureEvent' => 'ConnectError', | |
111 | ); | |
112 | return; | |
113 | }, | |
114 | 'Got_ReadLine' => sub { | |
115 | if ( defined $_[ARG0] ) { | |
116 | if ( exists $_[HEAP]->{'WHEEL'} ) { | |
117 | $_[HEAP]->{'WHEEL'}->put( $_[ARG0] ); | |
118 | } | |
119 | } else { | |
120 | if ( $_[ARG1] eq 'interrupt' ) { | |
121 | die 'stopped'; | |
122 | } | |
123 | } | |
124 | return; | |
125 | }, | |
126 | 'Got_Connection' => sub { | |
127 | # ARG0 = Socket, ARG1 = Remote Address, ARG2 = Remote Port | |
128 | my $socket = $_[ ARG0 ]; | |
129 | ||
130 | warn "Connected to server, commencing Client_SSLify()"; | |
131 | ||
132 | # SSLify it! | |
133 | $socket = Client_SSLify( $socket ); | |
134 | ||
135 | warn "SSLified the connection to the server"; | |
136 | ||
137 | # Hand it off to ReadWrite | |
138 | my $wheel = POE::Wheel::ReadWrite->new( | |
139 | 'Handle' => $socket, | |
140 | 'Driver' => POE::Driver::SysRW->new(), | |
141 | 'Filter' => POE::Filter::Line->new(), | |
142 | 'InputEvent' => 'Got_Input', | |
143 | 'ErrorEvent' => 'Got_Error', | |
144 | ); | |
145 | ||
146 | # Store it... | |
147 | $_[HEAP]->{'WHEEL'} = $wheel; | |
148 | $_[HEAP]->{'RL'}->put( 'Connected to SSL server' ); | |
149 | $_[HEAP]->{'RL'}->get( 'Input: ' ); | |
150 | ||
151 | return; | |
152 | }, | |
153 | 'ConnectError' => sub { | |
154 | # ARG0 = operation, ARG1 = error number, ARG2 = error string, ARG3 = wheel ID | |
155 | my ( $operation, $errnum, $errstr, $wheel_id ) = @_[ ARG0 .. ARG3 ]; | |
156 | warn "SocketFactory Wheel $wheel_id generated $operation error $errnum: $errstr\n"; | |
157 | delete $_[HEAP]->{'SOCKETFACTORY'}; | |
158 | $_[HEAP]->{'RL'}->put( 'Unable to connect to SSL server...' ); | |
159 | $_[KERNEL]->delay_set( 'do_connect', 5 ); | |
160 | return; | |
161 | }, | |
162 | 'Got_Input' => sub { | |
163 | # ARG0: The Line, ARG1: Wheel ID | |
164 | ||
165 | # Send back to the client the line! | |
166 | $_[HEAP]->{'RL'}->put( 'Got Reply: ' . $_[ARG0] ); | |
167 | $_[HEAP]->{'RL'}->get( 'Input: ' ); | |
168 | return; | |
169 | }, | |
170 | 'Got_Error' => sub { | |
171 | # ARG0 = operation, ARG1 = error number, ARG2 = error string, ARG3 = wheel ID | |
172 | my ( $operation, $errnum, $errstr, $id ) = @_[ ARG0 .. ARG3 ]; | |
173 | warn "Wheel $id generated $operation error $errnum: $errstr\n"; | |
174 | delete $_[HEAP]->{'WHEEL'}; | |
175 | $_[HEAP]->{'RL'}->put( 'Disconnected from SSL server...' ); | |
176 | $_[KERNEL]->delay_set( 'do_connect', 5 ); | |
177 | return; | |
178 | }, | |
179 | }, | |
180 | ); | |
181 | ||
182 | # Start POE! | |
183 | POE::Kernel->run(); | |
184 | exit 0; |
3 | 3 | |
4 | 4 | # Initialize our version |
5 | 5 | use vars qw( $VERSION ); |
6 | $VERSION = (qw$LastChangedRevision: 53 $)[1]; | |
6 | $VERSION = '0.15'; | |
7 | 7 | |
8 | 8 | # Import the SSL death routines |
9 | 9 | use Net::SSLeay qw( die_now die_if_ssl_error ); |
70 | 70 | |
71 | 71 | =head1 COPYRIGHT AND LICENSE |
72 | 72 | |
73 | Copyright 2008 by Apocalypse | |
73 | Copyright 2009 by Apocalypse | |
74 | 74 | |
75 | 75 | This library is free software; you can redistribute it and/or modify |
76 | 76 | it under the same terms as Perl itself. |
3 | 3 | |
4 | 4 | # Initialize our version |
5 | 5 | use vars qw( $VERSION ); |
6 | $VERSION = (qw$LastChangedRevision: 53 $)[1]; | |
6 | $VERSION = '0.15'; | |
7 | 7 | |
8 | 8 | # Import the SSL death routines |
9 | 9 | use Net::SSLeay qw( die_now die_if_ssl_error ); |
104 | 104 | } else { |
105 | 105 | binmode $self->{'socket'}; |
106 | 106 | } |
107 | ||
108 | return; | |
107 | 109 | } |
108 | 110 | |
109 | 111 | # Closes the socket |
132 | 134 | # Guess not... |
133 | 135 | $self->CLOSE(); |
134 | 136 | } |
137 | ||
138 | return; | |
135 | 139 | } |
136 | 140 | |
137 | 141 | sub FILENO { |
193 | 197 | |
194 | 198 | =head1 COPYRIGHT AND LICENSE |
195 | 199 | |
196 | Copyright 2008 by Apocalypse/Rocco Caputo | |
200 | Copyright 2009 by Apocalypse/Rocco Caputo | |
197 | 201 | |
198 | 202 | This library is free software; you can redistribute it and/or modify |
199 | 203 | it under the same terms as Perl itself. |
1 | 1 | package POE::Component::SSLify; |
2 | 2 | use strict; use warnings; |
3 | 3 | |
4 | # Initialize our version $LastChangedRevision: 53 $ | |
4 | # Initialize our version | |
5 | 5 | use vars qw( $VERSION ); |
6 | $VERSION = '0.14'; | |
6 | $VERSION = '0.15'; | |
7 | 7 | |
8 | 8 | # We need Net::SSLeay or all's a failure! |
9 | 9 | BEGIN { |
28 | 28 | Net::SSLeay::load_error_strings(); |
29 | 29 | Net::SSLeay::SSLeay_add_ssl_algorithms(); |
30 | 30 | Net::SSLeay::randomize(); |
31 | ||
32 | # set nonblocking mode? | |
33 | if ( ! defined &NONBLOCKING ) { *NONBLOCKING = sub () { 0 } } | |
31 | 34 | } |
32 | 35 | } |
33 | 36 | |
50 | 53 | # Helper sub to set blocking on a handle |
51 | 54 | sub Set_Blocking { |
52 | 55 | my $socket = shift; |
56 | ||
57 | # skip this? ( experimental ) | |
58 | return $socket if NONBLOCKING(); | |
53 | 59 | |
54 | 60 | # Net::SSLeay needs blocking for setup. |
55 | 61 | # |
115 | 121 | sub Server_SSLify { |
116 | 122 | # Get the socket! |
117 | 123 | my $socket = shift; |
124 | my $custom_ctx = shift; | |
118 | 125 | |
119 | 126 | # Validation... |
120 | 127 | if ( ! defined $socket ) { |
122 | 129 | } |
123 | 130 | |
124 | 131 | # If we don't have a ctx ready, we can't do anything... |
125 | if ( ! defined $ctx ) { | |
126 | die 'Please do SSLify_Options() first'; | |
132 | if ( ! defined $ctx and ! defined $custom_ctx ) { | |
133 | die 'Please do SSLify_Options() first ( or pass in a $ctx object )'; | |
127 | 134 | } |
128 | 135 | |
129 | 136 | # Set blocking on |
131 | 138 | |
132 | 139 | # Now, we create the new socket and bind it to our subclass of Net::SSLeay::Handle |
133 | 140 | my $newsock = gensym(); |
134 | tie( *$newsock, 'POE::Component::SSLify::ServerHandle', $socket, $ctx ) or die "Unable to tie to our subclass: $!"; | |
141 | tie( *$newsock, 'POE::Component::SSLify::ServerHandle', $socket, ( $custom_ctx || $ctx ) ) or die "Unable to tie to our subclass: $!"; | |
135 | 142 | |
136 | 143 | # All done! |
137 | 144 | return $newsock; |
151 | 158 | # sanity |
152 | 159 | if ( ! defined $key or ! defined $cert ) { |
153 | 160 | die 'no key/cert specified'; |
154 | return; | |
155 | 161 | } |
156 | 162 | |
157 | 163 | # Set the default |
185 | 191 | $context = Net::SSLeay::CTX_new(); |
186 | 192 | } else { |
187 | 193 | die "unknown SSL version: $version"; |
188 | return; | |
189 | 194 | } |
190 | 195 | } else { |
191 | 196 | $context = Net::SSLeay::CTX_new(); |
344 | 349 | Some users have reported success, others failure when they tried to utilize SSLify in both roles. This |
345 | 350 | would require more investigation, so please tread carefully if you need to use it! |
346 | 351 | |
352 | =head2 Blocking mode | |
353 | ||
354 | Normally, Net::SSLeay requires the socket to be in blocking mode for the initial handshake to work. However, | |
355 | various users ( especially ASCENT, thanks! ) have reported success in setting nonblocking mode for clients. | |
356 | ||
357 | In order to enable nonblocking mode, you need to set the subroutine "NONBLOCKING" to a true value in this | |
358 | package. | |
359 | ||
360 | sub POE::Component::SSLify::NONBLOCKING { 1 } | |
361 | use POE::Component::SSLify; | |
362 | ||
363 | This is a global, and an EXPERIMENTAL feature! Please, pretty please report back to me your experience with | |
364 | this. Hopefully someday SSLify will be fully nonblocking, thanks to your help! | |
365 | ||
347 | 366 | =head1 FUNCTIONS |
348 | 367 | |
349 | 368 | =head2 Client_SSLify |
384 | 403 | |
385 | 404 | NOTE: SSLify_Options must be set first! |
386 | 405 | |
406 | Furthermore, you can pass in your own $ctx object if you desire. This allows you to set custom parameters | |
407 | per-connection, for example. | |
408 | my $socket = shift; # get the socket from somewhere | |
409 | my $ctx = Net::SSLeay::CTX_new(); | |
410 | # set various options on $ctx as desired | |
411 | $socket = Server_SSLify( $socket, $ctx ); | |
412 | ||
413 | NOTE: You can use SSLify_GetCTX to modify the global, and avoid doing this on every connection if the | |
414 | options are the same... | |
415 | ||
387 | 416 | =head2 SSLify_Options |
388 | 417 | |
389 | 418 | Accepts the location of the SSL key + certificate files and does it's job |
446 | 475 | |
447 | 476 | Stuffs all of the above functions in @EXPORT_OK so you have to request them directly |
448 | 477 | |
449 | =head1 BUGS | |
450 | ||
451 | On Win32 platforms SSL support is pretty shaky, please help me out with detailed error descriptions if it happens to you! | |
478 | head1 SUPPORT | |
479 | ||
480 | You can find documentation for this module with the perldoc command. | |
481 | ||
482 | perldoc POE::Component::SSLify | |
483 | ||
484 | =head2 Websites | |
485 | ||
486 | =over 4 | |
487 | ||
488 | =item * AnnoCPAN: Annotated CPAN documentation | |
489 | ||
490 | L<http://annocpan.org/dist/POE-Component-SSLify> | |
491 | ||
492 | =item * CPAN Ratings | |
493 | ||
494 | L<http://cpanratings.perl.org/d/POE-Component-SSLify> | |
495 | ||
496 | =item * RT: CPAN's request tracker | |
497 | ||
498 | L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-SSLify> | |
499 | ||
500 | =item * Search CPAN | |
501 | ||
502 | L<http://search.cpan.org/dist/POE-Component-SSLify> | |
503 | ||
504 | =back | |
505 | ||
506 | =head2 Bugs | |
507 | ||
508 | Please report any bugs or feature requests to C<bug-poe-component-sslify at rt.cpan.org>, or through | |
509 | the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Component-SSLify>. I will be | |
510 | notified, and then you'll automatically be notified of progress on your bug as I make changes. | |
452 | 511 | |
453 | 512 | =head1 SEE ALSO |
454 | 513 | |
473 | 532 | |
474 | 533 | =head1 COPYRIGHT AND LICENSE |
475 | 534 | |
476 | Copyright 2008 by Apocalypse/Rocco Caputo | |
535 | Copyright 2009 by Apocalypse/Rocco Caputo | |
477 | 536 | |
478 | 537 | This library is free software; you can redistribute it and/or modify |
479 | 538 | it under the same terms as Perl itself. |
0 | #!/usr/bin/perl | |
1 | use strict; use warnings; | |
2 | ||
3 | my $numtests; | |
4 | BEGIN { | |
5 | $numtests = 3; | |
6 | ||
7 | eval "use Test::NoWarnings"; | |
8 | if ( ! $@ ) { | |
9 | # increment by one | |
10 | $numtests++; | |
11 | ||
12 | } | |
13 | } | |
14 | ||
15 | use Test::More tests => $numtests; | |
16 | ||
17 | use_ok( 'POE::Component::SSLify::ServerHandle' ); | |
18 | use_ok( 'POE::Component::SSLify::ClientHandle' ); | |
19 | use_ok( 'POE::Component::SSLify' );⏎ |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "use Test::Compile"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::Compile required for validating the perl files'; | |
11 | } else { | |
12 | all_pm_files_ok(); | |
13 | } | |
14 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | if ( not $ENV{PERL_TEST_CRITIC} ) { | |
9 | plan skip_all => 'PerlCritic test. Sent $ENV{PERL_TEST_CRITIC} to a true value to run.'; | |
10 | } else { | |
11 | # did we get a severity level? | |
12 | if ( length $ENV{PERL_TEST_CRITIC} > 1 ) { | |
13 | eval "use Test::Perl::Critic ( -severity => \"$ENV{PERL_TEST_CRITIC}\" );"; | |
14 | } else { | |
15 | eval "use Test::Perl::Critic;"; | |
16 | #eval "use Test::Perl::Critic ( -severity => 'stern' );"; | |
17 | } | |
18 | ||
19 | if ( $@ ) { | |
20 | plan skip_all => 'Test::Perl::Critic required to criticise perl files'; | |
21 | } else { | |
22 | all_critic_ok( 'lib/' ); | |
23 | } | |
24 | } | |
25 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "use Test::Dependencies exclude => [ qw/ POE::Component::SSLify / ]"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::Dependencies required to test perl module deps'; | |
11 | } else { | |
12 | ok_dependencies(); | |
13 | } | |
14 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "require Test::Distribution"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::Distribution required for validating the dist'; | |
11 | } else { | |
12 | Test::Distribution->import( not => 'podcover' ); | |
13 | } | |
14 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "use File::Find::Rule"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'File::Find::Rule required for checking for presence of DOS newlines'; | |
11 | } else { | |
12 | plan tests => 1; | |
13 | ||
14 | # generate the file list | |
15 | my $rule = File::Find::Rule->new; | |
16 | $rule->grep( qr/\r\n/ ); | |
17 | my @files = $rule->in( qw( lib t examples ) ); | |
18 | ||
19 | # FIXME read in MANIFEST.SKIP and use it! | |
20 | # for now, we skip SVN stuff | |
21 | @files = grep { $_ !~ /\/\.svn\// } @files; | |
22 | ||
23 | # do we have any? | |
24 | if ( scalar @files ) { | |
25 | fail( 'newline check' ); | |
26 | diag( 'DOS newlines found in these files:' ); | |
27 | foreach my $f ( @files ) { | |
28 | diag( ' ' . $f ); | |
29 | } | |
30 | } else { | |
31 | pass( 'newline check' ); | |
32 | } | |
33 | } | |
34 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "use Test::Fixme"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::Fixme required for checking for presence of to-do stuff!'; | |
11 | } else { | |
12 | run_tests( | |
13 | 'where' => [ 'lib', 't' ], | |
14 | 'match' => 'FIX' . 'ME', # weird work-around suggested in POD so we don't catch ourself! | |
15 | ); | |
16 | } | |
17 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "use Test::HasVersion"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::HasVersion required for testing for version numbers'; | |
11 | } else { | |
12 | all_pm_version_ok(); | |
13 | } | |
14 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "require Test::Kwalitee"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::Kwalitee required for measuring the kwalitee'; | |
11 | } else { | |
12 | Test::Kwalitee->import(); | |
13 | } | |
14 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "use Test::CheckManifest"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::CheckManifest required for validating the MANIFEST'; | |
11 | } else { | |
12 | ok_manifest( { | |
13 | 'filter' => [ qr/\.svn/, qr/\.tar\.gz$/ ], | |
14 | } ); | |
15 | } | |
16 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "use Test::MinimumVersion"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::MinimumVersion required to test minimum perl version'; | |
11 | } else { | |
12 | all_minimum_version_from_metayml_ok(); | |
13 | } | |
14 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | if ( not $ENV{PERL_TEST_POD} ) { | |
9 | plan skip_all => 'POD test. Sent $ENV{PERL_TEST_POD} to a true value to run.'; | |
10 | } else { | |
11 | eval "use Test::Pod"; | |
12 | if ( $@ ) { | |
13 | plan skip_all => 'Test::Pod required for testing POD'; | |
14 | } else { | |
15 | all_pod_files_ok(); | |
16 | } | |
17 | } | |
18 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | if ( not $ENV{PERL_TEST_POD} ) { | |
9 | plan skip_all => 'POD test. Sent $ENV{PERL_TEST_POD} to a true value to run.'; | |
10 | } else { | |
11 | eval "use Test::Pod::Coverage"; | |
12 | if ( $@ ) { | |
13 | plan skip_all => "Test::Pod::Coverage required for testing POD coverage"; | |
14 | } else { | |
15 | # FIXME not used now | |
16 | #all_pod_coverage_ok( 'lib/'); | |
17 | plan skip_all => 'not done yet'; | |
18 | } | |
19 | } | |
20 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | if ( not $ENV{PERL_TEST_POD} ) { | |
9 | plan skip_all => 'POD test. Sent $ENV{PERL_TEST_POD} to a true value to run.'; | |
10 | } else { | |
11 | eval "use Test::Spelling"; | |
12 | if ( $@ ) { | |
13 | plan skip_all => 'Test::Spelling required to test POD for spelling errors'; | |
14 | } else { | |
15 | # FIXME need to figure out how to add custom vocabulary to dictionary | |
16 | all_pod_files_spelling_ok(); | |
17 | } | |
18 | } | |
19 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "use Test::Prereq"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::Prereq required to test perl module deps'; | |
11 | } else { | |
12 | prereq_ok(); | |
13 | } | |
14 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "use Test::Prereq::Build"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::Prereq required to test perl module deps'; | |
11 | } else { | |
12 | prereq_ok(); | |
13 | } | |
14 | } |
0 | #!/usr/bin/perl | |
1 | ||
2 | use Test::More; | |
3 | ||
4 | # AUTHOR test | |
5 | if ( not $ENV{TEST_AUTHOR} ) { | |
6 | plan skip_all => 'Author test. Sent $ENV{TEST_AUTHOR} to a true value to run.'; | |
7 | } else { | |
8 | eval "use Test::Strict"; | |
9 | if ( $@ ) { | |
10 | plan skip_all => 'Test::Strict required to test strictness'; | |
11 | } else { | |
12 | all_perl_files_ok( 'lib/' ); | |
13 | } | |
14 | } |
0 | #!/usr/bin/perl | |
1 | use strict; use warnings; | |
2 | ||
3 | use Test::More; | |
4 | eval "use Test::Apocalypse"; | |
5 | if ( $@ ) { | |
6 | plan skip_all => 'Test::Apocalypse required for validating the distribution'; | |
7 | } else { | |
8 | # lousy hack for kwalitee | |
9 | require Test::NoWarnings; require Test::Pod; require Test::Pod::Coverage; | |
10 | is_apocalypse_here(); | |
11 | } |