Commit | Line | Data |
c165c82a |
1 | =for maintainers |
2 | Generated by perlmodlib.PL -- DO NOT EDIT! |
4e860d0a |
3 | |
f102b883 |
4 | =head1 NAME |
5 | |
6 | perlmodlib - constructing new Perl modules and finding existing ones |
7 | |
8 | =head1 DESCRIPTION |
9 | |
10 | =head1 THE PERL MODULE LIBRARY |
11 | |
19799a22 |
12 | Many modules are included the Perl distribution. These are described |
13 | below, and all end in F<.pm>. You may discover compiled library |
14 | file (usually ending in F<.so>) or small pieces of modules to be |
15 | autoloaded (ending in F<.al>); these were automatically generated |
16 | by the installation process. You may also discover files in the |
17 | library directory that end in either F<.pl> or F<.ph>. These are |
18 | old libraries supplied so that old programs that use them still |
19 | run. The F<.pl> files will all eventually be converted into standard |
20 | modules, and the F<.ph> files made by B<h2ph> will probably end up |
21 | as extension modules made by B<h2xs>. (Some F<.ph> values may |
22 | already be available through the POSIX, Errno, or Fcntl modules.) |
23 | The B<pl2pm> file in the distribution may help in your conversion, |
24 | but it's just a mechanical process and therefore far from bulletproof. |
f102b883 |
25 | |
26 | =head2 Pragmatic Modules |
27 | |
19799a22 |
28 | They work somewhat like compiler directives (pragmata) in that they |
29 | tend to affect the compilation of your program, and thus will usually |
30 | work well only when used within a C<use>, or C<no>. Most of these |
31 | are lexically scoped, so an inner BLOCK may countermand them |
32 | by saying: |
f102b883 |
33 | |
34 | no integer; |
35 | no strict 'refs'; |
4438c4b7 |
36 | no warnings; |
f102b883 |
37 | |
38 | which lasts until the end of that BLOCK. |
39 | |
19799a22 |
40 | Some pragmas are lexically scoped--typically those that affect the |
41 | C<$^H> hints variable. Others affect the current package instead, |
77ca0c92 |
42 | like C<use vars> and C<use subs>, which allow you to predeclare a |
19799a22 |
43 | variables or subroutines within a particular I<file> rather than |
44 | just a block. Such declarations are effective for the entire file |
45 | for which they were declared. You cannot rescind them with C<no |
46 | vars> or C<no subs>. |
f102b883 |
47 | |
48 | The following pragmas are defined (and have their own documentation). |
49 | |
50 | =over 12 |
51 | |
09bef843 |
52 | =item attributes |
53 | |
9e107c59 |
54 | Get/set subroutine or variable attributes |
09bef843 |
55 | |
19799a22 |
56 | =item attrs |
f102b883 |
57 | |
9e107c59 |
58 | Set/get attributes of a subroutine (deprecated) |
19799a22 |
59 | |
60 | =item autouse |
61 | |
9e107c59 |
62 | Postpone load of modules until a function is used |
19799a22 |
63 | |
64 | =item base |
65 | |
66 | Establish IS-A relationship with base class at compile time |
f102b883 |
67 | |
68 | =item blib |
69 | |
19799a22 |
70 | Use MakeMaker's uninstalled version of a package |
71 | |
2e1d04bc |
72 | =item bytes |
9e107c59 |
73 | |
2e1d04bc |
74 | Force byte semantics rather than character semantics |
9e107c59 |
75 | |
76 | =item charnames |
77 | |
1bb908c3 |
78 | Define character names for C<\N{named}> string literal escapes. |
9e107c59 |
79 | |
19799a22 |
80 | =item constant |
81 | |
9e107c59 |
82 | Declare constants |
f102b883 |
83 | |
84 | =item diagnostics |
85 | |
2e1d04bc |
86 | Perl compiler pragma to force verbose warning diagnostics |
19799a22 |
87 | |
1bb908c3 |
88 | =item encoding |
89 | |
90 | Pragma to control the conversion of legacy data into Unicode |
91 | |
19799a22 |
92 | =item fields |
93 | |
2e1d04bc |
94 | Compile-time class fields |
19799a22 |
95 | |
96 | =item filetest |
97 | |
2e1d04bc |
98 | Control the filetest permission operators |
f102b883 |
99 | |
100 | =item integer |
101 | |
4e860d0a |
102 | Use integer arithmetic instead of floating point |
f102b883 |
103 | |
104 | =item less |
105 | |
2e1d04bc |
106 | Request less of something from the compiler |
f102b883 |
107 | |
f102b883 |
108 | =item locale |
109 | |
2e1d04bc |
110 | Use and avoid POSIX locales for built-in operations |
111 | |
112 | =item open |
113 | |
114 | Set default disciplines for input and output |
f102b883 |
115 | |
116 | =item ops |
117 | |
9e107c59 |
118 | Restrict unsafe operations when compiling |
f102b883 |
119 | |
120 | =item overload |
121 | |
2e1d04bc |
122 | Package for overloading perl operations |
f102b883 |
123 | |
b3eb6a9b |
124 | =item re |
125 | |
2e1d04bc |
126 | Alter regular expression behaviour |
b3eb6a9b |
127 | |
f102b883 |
128 | =item sigtrap |
129 | |
9e107c59 |
130 | Enable simple signal handling |
f102b883 |
131 | |
1bb908c3 |
132 | =item sort |
133 | |
134 | Control sort() behaviour |
135 | |
f102b883 |
136 | =item strict |
137 | |
9e107c59 |
138 | Restrict unsafe constructs |
f102b883 |
139 | |
140 | =item subs |
141 | |
2e1d04bc |
142 | Predeclare sub names |
f102b883 |
143 | |
e61ecf27 |
144 | =item threads |
145 | |
146 | Perl extension allowing use of interpreter based threads from perl |
147 | |
19799a22 |
148 | =item utf8 |
f102b883 |
149 | |
1fa7ca25 |
150 | Enable/disable UTF-8 (or UTF-EBCDIC) in source code |
f102b883 |
151 | |
152 | =item vars |
153 | |
2e1d04bc |
154 | Predeclare global variable names (obsolete) |
f102b883 |
155 | |
1bb908c3 |
156 | =item vmsish |
157 | |
158 | Control VMS-specific language features |
159 | |
4438c4b7 |
160 | =item warnings |
0453d815 |
161 | |
9e107c59 |
162 | Control optional warnings |
19799a22 |
163 | |
13a2d996 |
164 | =item warnings::register |
165 | |
166 | Warnings import function |
167 | |
f102b883 |
168 | =back |
169 | |
170 | =head2 Standard Modules |
171 | |
172 | Standard, bundled modules are all expected to behave in a well-defined |
173 | manner with respect to namespace pollution because they use the |
174 | Exporter module. See their own documentation for details. |
175 | |
176 | =over 12 |
177 | |
178 | =item AnyDBM_File |
179 | |
2e1d04bc |
180 | Provide framework for multiple DBMs |
f102b883 |
181 | |
dc6b6eef |
182 | =item Attribute::Handlers |
183 | |
184 | Simpler definition of attribute handlers |
185 | |
f102b883 |
186 | =item AutoLoader |
187 | |
9e107c59 |
188 | Load subroutines only on demand |
f102b883 |
189 | |
190 | =item AutoSplit |
191 | |
9e107c59 |
192 | Split a package for autoloading |
f102b883 |
193 | |
19799a22 |
194 | =item B |
195 | |
2e1d04bc |
196 | The Perl Compiler |
19799a22 |
197 | |
198 | =item B::Asmdata |
199 | |
200 | Autogenerated data about Perl ops, used to generate bytecode |
201 | |
202 | =item B::Assembler |
203 | |
204 | Assemble Perl bytecode |
205 | |
206 | =item B::Bblock |
207 | |
208 | Walk basic blocks |
209 | |
210 | =item B::Bytecode |
211 | |
212 | Perl compiler's bytecode backend |
213 | |
214 | =item B::C |
215 | |
216 | Perl compiler's C backend |
217 | |
218 | =item B::CC |
219 | |
220 | Perl compiler's optimized C translation backend |
221 | |
4e860d0a |
222 | =item B::Concise |
223 | |
224 | Walk Perl syntax tree, printing concise info about ops |
225 | |
19799a22 |
226 | =item B::Debug |
227 | |
228 | Walk Perl syntax tree, printing debug info about ops |
229 | |
230 | =item B::Deparse |
231 | |
2e1d04bc |
232 | Perl compiler backend to produce perl code |
19799a22 |
233 | |
234 | =item B::Disassembler |
235 | |
236 | Disassemble Perl bytecode |
237 | |
238 | =item B::Lint |
239 | |
2e1d04bc |
240 | Perl lint |
19799a22 |
241 | |
242 | =item B::Showlex |
243 | |
244 | Show lexical variables used in functions or files |
245 | |
246 | =item B::Stackobj |
247 | |
248 | Helper module for CC backend |
249 | |
13a2d996 |
250 | =item B::Stash |
251 | |
252 | Show what stashes are loaded |
253 | |
19799a22 |
254 | =item B::Terse |
255 | |
256 | Walk Perl syntax tree, printing terse info about ops |
257 | |
258 | =item B::Xref |
259 | |
260 | Generates cross reference reports for Perl programs |
261 | |
f102b883 |
262 | =item Benchmark |
263 | |
2e1d04bc |
264 | Benchmark running times of Perl code |
9e107c59 |
265 | |
266 | =item ByteLoader |
267 | |
2e1d04bc |
268 | Load byte compiled perl code |
f102b883 |
269 | |
19799a22 |
270 | =item CGI |
271 | |
2e1d04bc |
272 | Simple Common Gateway Interface Class |
19799a22 |
273 | |
274 | =item CGI::Apache |
275 | |
2e1d04bc |
276 | Backward compatibility module for CGI.pm |
19799a22 |
277 | |
278 | =item CGI::Carp |
279 | |
280 | CGI routines for writing to the HTTPD (or other) error log |
281 | |
282 | =item CGI::Cookie |
283 | |
284 | Interface to Netscape Cookies |
285 | |
286 | =item CGI::Fast |
287 | |
288 | CGI Interface for Fast CGI |
289 | |
9e107c59 |
290 | =item CGI::Pretty |
291 | |
292 | Module to produce nicely formatted HTML code |
293 | |
19799a22 |
294 | =item CGI::Push |
295 | |
296 | Simple Interface to Server Push |
297 | |
298 | =item CGI::Switch |
299 | |
2e1d04bc |
300 | Backward compatibility module for defunct CGI::Switch |
19799a22 |
301 | |
4e860d0a |
302 | =item CGI::Util |
303 | |
304 | Internal utilities used by CGI module |
305 | |
f102b883 |
306 | =item CPAN |
307 | |
2e1d04bc |
308 | Query, download and build perl modules from CPAN sites |
f102b883 |
309 | |
310 | =item CPAN::FirstTime |
311 | |
2e1d04bc |
312 | Utility for CPAN::Config file Initialization |
f102b883 |
313 | |
314 | =item CPAN::Nox |
315 | |
19799a22 |
316 | Wrapper around CPAN.pm without using any XS module |
f102b883 |
317 | |
318 | =item Carp |
319 | |
2e1d04bc |
320 | Warn of errors (from perspective of caller) |
9e107c59 |
321 | |
4e860d0a |
322 | =item Carp::Heavy |
323 | |
324 | No user serviceable parts inside |
325 | |
326 | =item Class::ISA |
327 | |
328 | Report the search path for a class's ISA tree |
329 | |
f102b883 |
330 | =item Class::Struct |
331 | |
9e107c59 |
332 | Declare struct-like datatypes as Perl classes |
f102b883 |
333 | |
f102b883 |
334 | =item Cwd |
335 | |
9e107c59 |
336 | Get pathname of current working directory |
f102b883 |
337 | |
19799a22 |
338 | =item DB |
339 | |
2e1d04bc |
340 | Programmatic interface to the Perl debugging API (draft, subject to |
19799a22 |
341 | |
f102b883 |
342 | =item DB_File |
343 | |
19799a22 |
344 | Perl5 access to Berkeley DB version 1.x |
345 | |
f102b883 |
346 | =item Devel::SelfStubber |
347 | |
9e107c59 |
348 | Generate stubs for a SelfLoading module |
f102b883 |
349 | |
4e860d0a |
350 | =item Digest |
351 | |
352 | Modules that calculate message digests |
353 | |
f102b883 |
354 | =item DirHandle |
355 | |
9e107c59 |
356 | Supply object methods for directory handles |
f102b883 |
357 | |
19799a22 |
358 | =item Dumpvalue |
359 | |
2e1d04bc |
360 | Provides screen dump of Perl data. |
f102b883 |
361 | |
13a2d996 |
362 | =item Encode |
363 | |
364 | Character encodings |
365 | |
4e860d0a |
366 | =item Encode::EncodeFormat |
367 | |
368 | The format of encoding tables of the Encode extension |
369 | |
370 | =item Encode::Tcl |
371 | |
372 | Tcl encodings |
373 | |
f102b883 |
374 | =item English |
375 | |
2e1d04bc |
376 | Use nice English (or awk) names for ugly punctuation variables |
f102b883 |
377 | |
378 | =item Env |
379 | |
2e1d04bc |
380 | Perl module that imports environment variables as scalars or arrays |
f102b883 |
381 | |
382 | =item Exporter |
383 | |
2e1d04bc |
384 | Implements default import method for modules |
9e107c59 |
385 | |
386 | =item Exporter::Heavy |
387 | |
388 | Exporter guts |
19799a22 |
389 | |
390 | =item ExtUtils::Command |
391 | |
2e1d04bc |
392 | Utilities to replace common UNIX commands in Makefiles etc. |
f102b883 |
393 | |
422a9aca |
394 | =item ExtUtils::Constant |
395 | |
396 | Generate XS code to import C header constants |
397 | |
f102b883 |
398 | =item ExtUtils::Embed |
399 | |
2e1d04bc |
400 | Utilities for embedding Perl in C/C++ applications |
f102b883 |
401 | |
402 | =item ExtUtils::Install |
403 | |
9e107c59 |
404 | Install files from here to there |
f102b883 |
405 | |
19799a22 |
406 | =item ExtUtils::Installed |
407 | |
408 | Inventory management of installed modules |
409 | |
f102b883 |
410 | =item ExtUtils::Liblist |
411 | |
9e107c59 |
412 | Determine libraries to use and how to use them |
413 | |
414 | =item ExtUtils::MM_Cygwin |
415 | |
2e1d04bc |
416 | Methods to override UN*X behaviour in ExtUtils::MakeMaker |
f102b883 |
417 | |
5d80033a |
418 | =item ExtUtils::MM_NW5 |
419 | |
420 | Methods to override UN*X behaviour in ExtUtils::MakeMaker |
421 | |
f102b883 |
422 | =item ExtUtils::MM_OS2 |
423 | |
2e1d04bc |
424 | Methods to override UN*X behaviour in ExtUtils::MakeMaker |
f102b883 |
425 | |
426 | =item ExtUtils::MM_Unix |
427 | |
9e107c59 |
428 | Methods used by ExtUtils::MakeMaker |
f102b883 |
429 | |
430 | =item ExtUtils::MM_VMS |
431 | |
2e1d04bc |
432 | Methods to override UN*X behaviour in ExtUtils::MakeMaker |
19799a22 |
433 | |
434 | =item ExtUtils::MM_Win32 |
435 | |
2e1d04bc |
436 | Methods to override UN*X behaviour in ExtUtils::MakeMaker |
f102b883 |
437 | |
438 | =item ExtUtils::MakeMaker |
439 | |
9e107c59 |
440 | Create an extension Makefile |
f102b883 |
441 | |
442 | =item ExtUtils::Manifest |
443 | |
9e107c59 |
444 | Utilities to write and check a MANIFEST file |
f102b883 |
445 | |
446 | =item ExtUtils::Mkbootstrap |
447 | |
9e107c59 |
448 | Make a bootstrap file for use by DynaLoader |
f102b883 |
449 | |
450 | =item ExtUtils::Mksymlists |
451 | |
9e107c59 |
452 | Write linker options files for dynamic extension |
f102b883 |
453 | |
19799a22 |
454 | =item ExtUtils::Packlist |
455 | |
9e107c59 |
456 | Manage .packlist files |
19799a22 |
457 | |
f102b883 |
458 | =item ExtUtils::testlib |
459 | |
9e107c59 |
460 | Add blib/* directories to @INC |
f102b883 |
461 | |
b6c543e3 |
462 | =item Fatal |
463 | |
9e107c59 |
464 | Replace functions with equivalents which succeed or die |
b6c543e3 |
465 | |
f102b883 |
466 | =item Fcntl |
467 | |
2e1d04bc |
468 | Load the C Fcntl.h defines |
f102b883 |
469 | |
470 | =item File::Basename |
471 | |
9e107c59 |
472 | Split a pathname into pieces |
473 | |
474 | =item File::CheckTree |
475 | |
476 | Run many filetest checks on a tree |
f102b883 |
477 | |
f102b883 |
478 | =item File::Compare |
479 | |
19799a22 |
480 | Compare files or filehandles |
f102b883 |
481 | |
482 | =item File::Copy |
483 | |
19799a22 |
484 | Copy files or filehandles |
485 | |
486 | =item File::DosGlob |
487 | |
2e1d04bc |
488 | DOS like globbing and then some |
f102b883 |
489 | |
490 | =item File::Find |
491 | |
2e1d04bc |
492 | Traverse a file tree |
f102b883 |
493 | |
494 | =item File::Path |
495 | |
2e1d04bc |
496 | Create or remove directory trees |
f102b883 |
497 | |
f505c983 |
498 | =item File::Spec |
499 | |
9e107c59 |
500 | Portably perform operations on file names |
f505c983 |
501 | |
165c0277 |
502 | =item File::Spec::Epoc |
503 | |
504 | Methods for Epoc file specs |
505 | |
f505c983 |
506 | =item File::Spec::Functions |
507 | |
9e107c59 |
508 | Portably perform operations on file names |
19799a22 |
509 | |
510 | =item File::Spec::Mac |
511 | |
1bb908c3 |
512 | File::Spec for Mac OS (Classic) |
19799a22 |
513 | |
514 | =item File::Spec::OS2 |
515 | |
9e107c59 |
516 | Methods for OS/2 file specs |
19799a22 |
517 | |
518 | =item File::Spec::Unix |
519 | |
e61ecf27 |
520 | File::Spec for Unix, base for other File::Spec modules |
19799a22 |
521 | |
522 | =item File::Spec::VMS |
523 | |
9e107c59 |
524 | Methods for VMS file specs |
19799a22 |
525 | |
526 | =item File::Spec::Win32 |
527 | |
9e107c59 |
528 | Methods for Win32 file specs |
f505c983 |
529 | |
2e1d04bc |
530 | =item File::Temp |
531 | |
532 | Return name and handle of a temporary file safely |
533 | |
f102b883 |
534 | =item File::stat |
535 | |
9e107c59 |
536 | By-name interface to Perl's built-in stat() functions |
f102b883 |
537 | |
538 | =item FileCache |
539 | |
9e107c59 |
540 | Keep more files open than the system permits |
f102b883 |
541 | |
542 | =item FileHandle |
543 | |
9e107c59 |
544 | Supply object methods for filehandles |
f102b883 |
545 | |
165c0277 |
546 | =item Filter::Simple |
547 | |
548 | Simplified source filtering |
549 | |
f102b883 |
550 | =item FindBin |
551 | |
2e1d04bc |
552 | Locate directory of original perl script |
f102b883 |
553 | |
554 | =item Getopt::Long |
555 | |
9e107c59 |
556 | Extended processing of command line options |
f102b883 |
557 | |
558 | =item Getopt::Std |
559 | |
19799a22 |
560 | Process single-character switches with switch clustering |
f102b883 |
561 | |
562 | =item I18N::Collate |
563 | |
2e1d04bc |
564 | Compare 8-bit scalar data according to the current locale |
f102b883 |
565 | |
422a9aca |
566 | =item I18N::LangTags |
567 | |
568 | Functions for dealing with RFC3066-style language tags |
569 | |
570 | =item I18N::LangTags::List |
571 | |
4f233aa4 |
572 | Tags and names for human languages |
422a9aca |
573 | |
f102b883 |
574 | =item IO |
575 | |
2e1d04bc |
576 | Load various IO modules |
f102b883 |
577 | |
578 | =item IPC::Open2 |
579 | |
9e107c59 |
580 | Open a process for both reading and writing |
f102b883 |
581 | |
582 | =item IPC::Open3 |
583 | |
9e107c59 |
584 | Open a process for reading, writing, and error handling |
f102b883 |
585 | |
4e860d0a |
586 | =item Locale::Constants |
587 | |
588 | Constants for Locale codes |
589 | |
590 | =item Locale::Country |
591 | |
592 | ISO codes for country identification (ISO 3166) |
593 | |
594 | =item Locale::Currency |
595 | |
596 | ISO three letter codes for currency identification (ISO 4217) |
597 | |
598 | =item Locale::Language |
599 | |
600 | ISO two letter codes for language identification (ISO 639) |
601 | |
422a9aca |
602 | =item Locale::Maketext |
603 | |
604 | Framework for localization |
605 | |
606 | =item Locale::Maketext::TPJ13 |
607 | |
608 | Article about software localization |
609 | |
f102b883 |
610 | =item Math::BigFloat |
611 | |
5d80033a |
612 | Arbitrary size floating point math package |
f102b883 |
613 | |
614 | =item Math::BigInt |
615 | |
19799a22 |
616 | Arbitrary size integer math package |
f102b883 |
617 | |
d0363f02 |
618 | =item Math::BigInt::Calc |
619 | |
620 | Pure Perl module to support Math::BigInt |
621 | |
f102b883 |
622 | =item Math::Complex |
623 | |
9e107c59 |
624 | Complex numbers and associated mathematical functions |
f102b883 |
625 | |
404b15a1 |
626 | =item Math::Trig |
627 | |
9e107c59 |
628 | Trigonometric functions |
f102b883 |
629 | |
5d80033a |
630 | =item Memoize |
631 | |
632 | Make your functions faster by trading space for time |
633 | |
634 | =item Memoize::AnyDBM_File |
635 | |
636 | Glue to provide EXISTS for AnyDBM_File for Storable use |
637 | |
638 | =item Memoize::Expire |
639 | |
640 | Plug-in module for automatic expiration of memoized values |
641 | |
642 | =item Memoize::ExpireFile |
643 | |
644 | Test for Memoize expiration semantics |
645 | |
646 | =item Memoize::ExpireTest |
647 | |
648 | Test for Memoize expiration semantics |
649 | |
650 | =item Memoize::NDBM_File |
651 | |
652 | Glue to provide EXISTS for NDBM_File for Storable use |
653 | |
654 | =item Memoize::SDBM_File |
655 | |
656 | Glue to provide EXISTS for SDBM_File for Storable use |
657 | |
658 | =item Memoize::Saves |
659 | |
660 | Plug-in module to specify which return values should be memoized |
661 | |
662 | =item Memoize::Storable |
663 | |
664 | Store Memoized data in Storable database |
665 | |
2e1d04bc |
666 | =item NDBM_File |
667 | |
668 | Tied access to ndbm files |
669 | |
1fa7ca25 |
670 | =item NEXT |
671 | |
672 | Provide a pseudo-class NEXT that allows method redispatch |
673 | |
5d80033a |
674 | =item Net::Cmd |
675 | |
676 | Network Command class (as used by FTP, SMTP etc) |
677 | |
678 | =item Net::Config |
679 | |
680 | Local configuration data for libnet |
681 | |
682 | =item Net::Domain |
683 | |
684 | Attempt to evaluate the current host's internet name and domain |
685 | |
5d80033a |
686 | =item Net::FTP |
687 | |
688 | FTP Client class |
689 | |
690 | =item Net::NNTP |
691 | |
692 | NNTP Client class |
693 | |
694 | =item Net::Netrc |
695 | |
696 | OO interface to users netrc file |
697 | |
5d80033a |
698 | =item Net::POP3 |
699 | |
700 | Post Office Protocol 3 Client class (RFC1081) |
701 | |
f102b883 |
702 | =item Net::Ping |
703 | |
9e107c59 |
704 | Check a remote host for reachability |
f102b883 |
705 | |
5d80033a |
706 | =item Net::SMTP |
707 | |
708 | Simple Mail Transfer Protocol Client |
709 | |
5d80033a |
710 | =item Net::Time |
711 | |
712 | Time and daytime network client interface |
713 | |
f102b883 |
714 | =item Net::hostent |
715 | |
9e107c59 |
716 | By-name interface to Perl's built-in gethost*() functions |
f102b883 |
717 | |
5d80033a |
718 | =item Net::libnetFAQ |
719 | |
720 | Libnet Frequently Asked Questions |
721 | |
f102b883 |
722 | =item Net::netent |
723 | |
9e107c59 |
724 | By-name interface to Perl's built-in getnet*() functions |
f102b883 |
725 | |
726 | =item Net::protoent |
727 | |
9e107c59 |
728 | By-name interface to Perl's built-in getproto*() functions |
f102b883 |
729 | |
730 | =item Net::servent |
731 | |
9e107c59 |
732 | By-name interface to Perl's built-in getserv*() functions |
f102b883 |
733 | |
19799a22 |
734 | =item O |
f102b883 |
735 | |
19799a22 |
736 | Generic interface to Perl Compiler backends |
f102b883 |
737 | |
2e1d04bc |
738 | =item ODBM_File |
f102b883 |
739 | |
2e1d04bc |
740 | Tied access to odbm files |
f102b883 |
741 | |
2e1d04bc |
742 | =item Opcode |
f102b883 |
743 | |
2e1d04bc |
744 | Disable named opcodes when compiling perl code |
19799a22 |
745 | |
4e860d0a |
746 | =item POSIX |
747 | |
748 | Perl interface to IEEE Std 1003.1 |
749 | |
750 | =item PerlIO |
751 | |
752 | On demand loader for PerlIO layers and root of PerlIO::* name space |
753 | |
9e107c59 |
754 | =item Pod::Checker |
755 | |
756 | Check pod documents for syntax errors |
757 | |
2e1d04bc |
758 | =item Pod::Find |
759 | |
760 | Find POD documents in directory trees |
761 | |
19799a22 |
762 | =item Pod::Html |
763 | |
9e107c59 |
764 | Module to convert pod files to HTML |
765 | |
766 | =item Pod::InputObjects |
767 | |
2e1d04bc |
768 | Objects representing POD input paragraphs, commands, etc. |
9e107c59 |
769 | |
13a2d996 |
770 | =item Pod::LaTeX |
771 | |
772 | Convert Pod data to formatted Latex |
773 | |
9e107c59 |
774 | =item Pod::Man |
775 | |
776 | Convert POD data to formatted *roff input |
777 | |
1bb908c3 |
778 | =item Pod::ParseLink |
779 | |
248e172a |
780 | Parse an LE<lt>E<gt> formatting code in POD text |
1bb908c3 |
781 | |
2e1d04bc |
782 | =item Pod::ParseUtils |
783 | |
784 | Helpers for POD parsing and conversion |
785 | |
9e107c59 |
786 | =item Pod::Parser |
787 | |
788 | Base class for creating POD filters and translators |
789 | |
2e1d04bc |
790 | =item Pod::Plainer |
791 | |
792 | Perl extension for converting Pod to old style Pod. |
793 | |
9e107c59 |
794 | =item Pod::Select |
795 | |
796 | Extract selected sections of POD from input |
19799a22 |
797 | |
798 | =item Pod::Text |
799 | |
9e107c59 |
800 | Convert POD data to formatted ASCII text |
801 | |
802 | =item Pod::Text::Color |
803 | |
804 | Convert POD data to formatted color ASCII text |
805 | |
4e860d0a |
806 | =item Pod::Text::Overstrike |
807 | |
808 | Convert POD data to formatted overstrike text |
809 | |
2e1d04bc |
810 | =item Pod::Text::Termcap |
811 | |
812 | Convert POD data to ASCII text with format escapes |
813 | |
9e107c59 |
814 | =item Pod::Usage |
815 | |
816 | Print a usage message from embedded pod documentation |
f102b883 |
817 | |
1bb908c3 |
818 | =item Pod::t::basic |
819 | |
820 | Test of various basic POD features in translators. |
821 | |
f102b883 |
822 | =item SDBM_File |
823 | |
19799a22 |
824 | Tied access to sdbm files |
f102b883 |
825 | |
826 | =item Safe |
827 | |
19799a22 |
828 | Compile and execute code in restricted compartments |
f102b883 |
829 | |
830 | =item Search::Dict |
831 | |
9e107c59 |
832 | Search for key in dictionary file |
f102b883 |
833 | |
834 | =item SelectSaver |
835 | |
9e107c59 |
836 | Save and restore selected file handle |
f102b883 |
837 | |
838 | =item SelfLoader |
839 | |
9e107c59 |
840 | Load functions only on demand |
f102b883 |
841 | |
842 | =item Shell |
843 | |
2e1d04bc |
844 | Run shell commands transparently within perl |
f102b883 |
845 | |
846 | =item Socket |
847 | |
2e1d04bc |
848 | Load the C socket.h defines and structure manipulators |
f102b883 |
849 | |
13a2d996 |
850 | =item Storable |
851 | |
852 | Persistency for perl data structures |
853 | |
4e860d0a |
854 | =item Switch |
855 | |
856 | A switch statement for Perl |
857 | |
f102b883 |
858 | =item Symbol |
859 | |
9e107c59 |
860 | Manipulate Perl symbols and their names |
f102b883 |
861 | |
2e1d04bc |
862 | =item Term::ANSIColor |
f102b883 |
863 | |
2e1d04bc |
864 | Color screen output using ANSI escape sequences |
f102b883 |
865 | |
866 | =item Term::Cap |
867 | |
2e1d04bc |
868 | Perl termcap interface |
f102b883 |
869 | |
870 | =item Term::Complete |
871 | |
2e1d04bc |
872 | Perl word completion module |
f102b883 |
873 | |
874 | =item Term::ReadLine |
875 | |
2e1d04bc |
876 | Perl interface to various C<readline> packages. If |
19799a22 |
877 | |
878 | =item Test |
879 | |
9e107c59 |
880 | Provides a simple framework for writing test scripts |
f102b883 |
881 | |
1bb908c3 |
882 | =item Test::Builder |
883 | |
884 | Backend for building test libraries |
885 | |
f102b883 |
886 | =item Test::Harness |
887 | |
2e1d04bc |
888 | Run perl standard test scripts with statistics |
f102b883 |
889 | |
7a49b635 |
890 | =item Test::More |
891 | |
892 | Yet another framework for writing test scripts |
893 | |
894 | =item Test::Simple |
895 | |
896 | Basic utilities for writing tests. |
897 | |
e61ecf27 |
898 | =item Test::Tutorial |
899 | |
900 | A tutorial about writing really basic tests |
901 | |
f102b883 |
902 | =item Text::Abbrev |
903 | |
9e107c59 |
904 | Create an abbreviation table from a list |
f102b883 |
905 | |
4e860d0a |
906 | =item Text::Balanced |
907 | |
908 | Extract delimited text sequences from strings. |
909 | |
f102b883 |
910 | =item Text::ParseWords |
911 | |
2e1d04bc |
912 | Parse text into an array of tokens or array of arrays |
f102b883 |
913 | |
914 | =item Text::Soundex |
915 | |
2e1d04bc |
916 | Implementation of the Soundex Algorithm as Described by Knuth |
f102b883 |
917 | |
4e860d0a |
918 | =item Text::Tabs |
919 | |
920 | Expand and unexpand tabs per the unix expand(1) and unexpand(1) |
921 | |
f102b883 |
922 | =item Text::Wrap |
923 | |
9e107c59 |
924 | Line wrapping to form simple paragraphs |
19799a22 |
925 | |
1bb908c3 |
926 | =item Thread |
927 | |
928 | Manipulate threads in Perl |
929 | |
19799a22 |
930 | =item Tie::Array |
931 | |
9e107c59 |
932 | Base class for tied arrays |
19799a22 |
933 | |
934 | =item Tie::Handle |
935 | |
9e107c59 |
936 | Base class definitions for tied handles |
19799a22 |
937 | |
9e107c59 |
938 | =item Tie::Hash |
f102b883 |
939 | |
9e107c59 |
940 | Base class definitions for tied hashes |
f102b883 |
941 | |
942 | =item Tie::RefHash |
943 | |
9e107c59 |
944 | Use references as hash keys |
f102b883 |
945 | |
9e107c59 |
946 | =item Tie::Scalar |
f102b883 |
947 | |
9e107c59 |
948 | Base class definitions for tied scalars |
f102b883 |
949 | |
950 | =item Tie::SubstrHash |
951 | |
19799a22 |
952 | Fixed-table-size, fixed-key-length hashing |
f102b883 |
953 | |
954 | =item Time::Local |
955 | |
9e107c59 |
956 | Efficiently compute time from local and GMT time |
f102b883 |
957 | |
958 | =item Time::gmtime |
959 | |
9e107c59 |
960 | By-name interface to Perl's built-in gmtime() function |
f102b883 |
961 | |
962 | =item Time::localtime |
963 | |
9e107c59 |
964 | By-name interface to Perl's built-in localtime() function |
f102b883 |
965 | |
966 | =item Time::tm |
967 | |
9e107c59 |
968 | Internal object used by Time::gmtime and Time::localtime |
f102b883 |
969 | |
970 | =item UNIVERSAL |
971 | |
9e107c59 |
972 | Base class for ALL classes (blessed references) |
f102b883 |
973 | |
e61ecf27 |
974 | =item Unicode::Collate |
975 | |
976 | Use UCA (Unicode Collation Algorithm) |
977 | |
e61ecf27 |
978 | =item Unicode::UCD |
fbe3d936 |
979 | |
980 | Unicode character database |
981 | |
f102b883 |
982 | =item User::grent |
983 | |
9e107c59 |
984 | By-name interface to Perl's built-in getgr*() functions |
f102b883 |
985 | |
986 | =item User::pwent |
987 | |
9e107c59 |
988 | By-name interface to Perl's built-in getpw*() functions |
f102b883 |
989 | |
4e860d0a |
990 | =item Win32 |
991 | |
992 | Interfaces to some Win32 API Functions |
993 | |
f102b883 |
994 | =back |
995 | |
19799a22 |
996 | To find out I<all> modules installed on your system, including |
2e1d04bc |
997 | those without documentation or outside the standard release, |
b1866b2d |
998 | just do this: |
f102b883 |
999 | |
5a964f20 |
1000 | % find `perl -e 'print "@INC"'` -name '*.pm' -print |
f102b883 |
1001 | |
2e1d04bc |
1002 | They should all have their own documentation installed and accessible |
1003 | via your system man(1) command. If you do not have a B<find> |
19799a22 |
1004 | program, you can use the Perl B<find2perl> program instead, which |
1005 | generates Perl code as output you can run through perl. If you |
1006 | have a B<man> program but it doesn't find your modules, you'll have |
2e1d04bc |
1007 | to fix your manpath. See L<perl> for details. If you have no |
1008 | system B<man> command, you might try the B<perldoc> program. |
f102b883 |
1009 | |
1010 | =head2 Extension Modules |
1011 | |
19799a22 |
1012 | Extension modules are written in C (or a mix of Perl and C). They |
1013 | are usually dynamically loaded into Perl if and when you need them, |
d1be9408 |
1014 | but may also be linked in statically. Supported extension modules |
19799a22 |
1015 | include Socket, Fcntl, and POSIX. |
f102b883 |
1016 | |
1017 | Many popular C extension modules do not come bundled (at least, not |
19799a22 |
1018 | completely) due to their sizes, volatility, or simply lack of time |
1019 | for adequate testing and configuration across the multitude of |
1020 | platforms on which Perl was beta-tested. You are encouraged to |
1021 | look for them on CPAN (described below), or using web search engines |
1022 | like Alta Vista or Deja News. |
f102b883 |
1023 | |
1024 | =head1 CPAN |
1025 | |
19799a22 |
1026 | CPAN stands for Comprehensive Perl Archive Network; it's a globally |
1027 | replicated trove of Perl materials, including documentation, style |
2e1d04bc |
1028 | guides, tricks and traps, alternate ports to non-Unix systems and |
19799a22 |
1029 | occasional binary distributions for these. Search engines for |
1030 | CPAN can be found at http://cpan.perl.com/ and at |
1031 | http://theory.uwinnipeg.ca/mod_perl/cpan-search.pl . |
1032 | |
1033 | Most importantly, CPAN includes around a thousand unbundled modules, |
1034 | some of which require a C compiler to build. Major categories of |
1035 | modules are: |
f102b883 |
1036 | |
4e860d0a |
1037 | =over |
f102b883 |
1038 | |
1039 | =item * |
551e1d92 |
1040 | |
f102b883 |
1041 | Language Extensions and Documentation Tools |
1042 | |
1043 | =item * |
551e1d92 |
1044 | |
f102b883 |
1045 | Development Support |
1046 | |
1047 | =item * |
551e1d92 |
1048 | |
f102b883 |
1049 | Operating System Interfaces |
1050 | |
1051 | =item * |
551e1d92 |
1052 | |
f102b883 |
1053 | Networking, Device Control (modems) and InterProcess Communication |
1054 | |
1055 | =item * |
551e1d92 |
1056 | |
f102b883 |
1057 | Data Types and Data Type Utilities |
1058 | |
1059 | =item * |
551e1d92 |
1060 | |
f102b883 |
1061 | Database Interfaces |
1062 | |
1063 | =item * |
551e1d92 |
1064 | |
f102b883 |
1065 | User Interfaces |
1066 | |
1067 | =item * |
551e1d92 |
1068 | |
f102b883 |
1069 | Interfaces to / Emulations of Other Programming Languages |
1070 | |
1071 | =item * |
551e1d92 |
1072 | |
f102b883 |
1073 | File Names, File Systems and File Locking (see also File Handles) |
1074 | |
1075 | =item * |
551e1d92 |
1076 | |
f102b883 |
1077 | String Processing, Language Text Processing, Parsing, and Searching |
1078 | |
1079 | =item * |
551e1d92 |
1080 | |
f102b883 |
1081 | Option, Argument, Parameter, and Configuration File Processing |
1082 | |
1083 | =item * |
551e1d92 |
1084 | |
f102b883 |
1085 | Internationalization and Locale |
1086 | |
1087 | =item * |
551e1d92 |
1088 | |
f102b883 |
1089 | Authentication, Security, and Encryption |
1090 | |
1091 | =item * |
551e1d92 |
1092 | |
f102b883 |
1093 | World Wide Web, HTML, HTTP, CGI, MIME |
1094 | |
1095 | =item * |
551e1d92 |
1096 | |
f102b883 |
1097 | Server and Daemon Utilities |
1098 | |
1099 | =item * |
551e1d92 |
1100 | |
f102b883 |
1101 | Archiving and Compression |
1102 | |
1103 | =item * |
551e1d92 |
1104 | |
f102b883 |
1105 | Images, Pixmap and Bitmap Manipulation, Drawing, and Graphing |
1106 | |
1107 | =item * |
551e1d92 |
1108 | |
f102b883 |
1109 | Mail and Usenet News |
1110 | |
1111 | =item * |
551e1d92 |
1112 | |
f102b883 |
1113 | Control Flow Utilities (callbacks and exceptions etc) |
1114 | |
1115 | =item * |
551e1d92 |
1116 | |
f102b883 |
1117 | File Handle and Input/Output Stream Utilities |
1118 | |
1119 | =item * |
551e1d92 |
1120 | |
f102b883 |
1121 | Miscellaneous Modules |
1122 | |
1123 | =back |
1124 | |
19799a22 |
1125 | Registered CPAN sites as of this writing include the following. |
f102b883 |
1126 | You should try to choose one close to you: |
1127 | |
4e860d0a |
1128 | =head2 Africa |
1129 | |
cea6626f |
1130 | =over 4 |
f102b883 |
1131 | |
4e860d0a |
1132 | =item * |
1133 | |
1134 | South Africa |
1135 | |
1136 | ftp://ftp.is.co.za/programming/perl/CPAN/ |
37a78d01 |
1137 | ftp://ftp.mweb.co.za/pub/mirrors/cpan/ |
4e860d0a |
1138 | ftp://ftp.saix.net/pub/CPAN/ |
4e860d0a |
1139 | ftp://ftp.sun.ac.za/CPAN/ |
1140 | |
1141 | =back |
1142 | |
1143 | =head2 Asia |
1144 | |
1145 | =over 4 |
1146 | |
1147 | =item * |
1148 | |
1149 | China |
1150 | |
1151 | ftp://freesoft.cei.gov.cn/pub/languages/perl/CPAN/ |
1152 | http://www2.linuxforum.net/mirror/CPAN/ |
37a78d01 |
1153 | http://CPAN.pacific.net.hk/ |
1154 | ftp://ftp.pacific.net.hk/pub/mirror/CPAN/ |
4e860d0a |
1155 | http://cpan.shellhung.org/ |
1156 | ftp://ftp.shellhung.org/pub/CPAN |
1157 | |
1158 | =item * |
1159 | |
37a78d01 |
1160 | India |
4e860d0a |
1161 | |
37a78d01 |
1162 | http://cpan.in.freeos.com |
1163 | ftp://cpan.in.freeos.com/pub/CPAN/ |
4e860d0a |
1164 | |
1165 | =item * |
1166 | |
1167 | Indonesia |
1168 | |
37a78d01 |
1169 | http://cpan.itb.web.id/ |
4e860d0a |
1170 | ftp://mirrors.piksi.itb.ac.id/CPAN/ |
1171 | http://CPAN.mweb.co.id/ |
1172 | ftp://ftp.mweb.co.id/pub/languages/perl/CPAN/ |
1173 | |
1174 | =item * |
1175 | |
1176 | Israel |
1177 | |
1178 | http://www.iglu.org.il:/pub/CPAN/ |
1179 | ftp://ftp.iglu.org.il/pub/CPAN/ |
37a78d01 |
1180 | http://cpan.lerner.co.il/ |
4e860d0a |
1181 | http://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/ |
1182 | ftp://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/ |
1183 | |
1184 | =item * |
1185 | |
1186 | Japan |
1187 | |
37a78d01 |
1188 | ftp://ftp.u-aizu.ac.jp/pub/CPAN |
4e860d0a |
1189 | ftp://ftp.kddlabs.co.jp/CPAN/ |
1190 | http://mirror.nucba.ac.jp/mirror/Perl/ |
1191 | ftp://mirror.nucba.ac.jp/mirror/Perl/ |
1192 | ftp://ftp.meisei-u.ac.jp/pub/CPAN/ |
1193 | ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/ |
1194 | ftp://ftp.dti.ad.jp/pub/lang/CPAN/ |
1195 | ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/ |
1196 | |
1197 | =item * |
1198 | |
37a78d01 |
1199 | Korea |
1200 | |
1201 | http://mirror.Mazic.org/pub/CPAN |
1202 | ftp://mirror.Mazic.org/pub/CPAN |
1203 | |
1204 | =item * |
1205 | |
1206 | Philippines |
1207 | |
1208 | http://www.adzu.edu.ph/CPAN |
1209 | |
1210 | =item * |
1211 | |
1212 | Russian Federation |
1213 | |
1214 | http://cpan.tomsk.ru |
1215 | ftp://cpan.tomsk.ru/pub/CPAN |
1216 | |
1217 | =item * |
1218 | |
4e860d0a |
1219 | Saudi Arabia |
1220 | |
1221 | ftp://ftp.isu.net.sa/pub/CPAN/ |
1222 | |
1223 | =item * |
1224 | |
1225 | Singapore |
1226 | |
1227 | http://cpan.hjc.edu.sg |
4e860d0a |
1228 | |
1229 | =item * |
1230 | |
1231 | South Korea |
1232 | |
1233 | http://CPAN.bora.net/ |
1234 | ftp://ftp.bora.net/pub/CPAN/ |
37a78d01 |
1235 | http://ftp.kornet.net/pub/CPAN/ |
4e860d0a |
1236 | ftp://ftp.kornet.net/pub/CPAN/ |
1237 | ftp://ftp.nuri.net/pub/CPAN/ |
1238 | |
1239 | =item * |
1240 | |
1241 | Taiwan |
1242 | |
1243 | ftp://coda.nctu.edu.tw/UNIX/perl/CPAN |
1244 | ftp://ftp.ee.ncku.edu.tw/pub/perl/CPAN/ |
1245 | ftp://ftp1.sinica.edu.tw/pub1/perl/CPAN/ |
37a78d01 |
1246 | http://ftp.tku.edu.tw/pub/CPAN/ |
1247 | ftp://ftp.tku.edu.tw/pub/CPAN/ |
4e860d0a |
1248 | |
1249 | =item * |
1250 | |
1251 | Thailand |
1252 | |
1253 | http://download.nectec.or.th/CPAN/ |
1254 | ftp://ftp.nectec.or.th/pub/languages/CPAN/ |
1255 | ftp://ftp.cs.riubon.ac.th/pub/mirrors/CPAN/ |
1256 | |
1257 | =back |
1258 | |
1259 | =head2 Central America |
1260 | |
1261 | =over 4 |
1262 | |
1263 | =item * |
1264 | |
1265 | Costa Rica |
1266 | |
1267 | ftp://ftp.linux.co.cr/mirrors/CPAN/ |
1268 | http://ftp.ucr.ac.cr/Unix/CPAN/ |
1269 | ftp://ftp.ucr.ac.cr/pub/Unix/CPAN/ |
1270 | |
1271 | =back |
1272 | |
1273 | =head2 Europe |
1274 | |
1275 | =over 4 |
1276 | |
1277 | =item * |
1278 | |
1279 | Austria |
1280 | |
37a78d01 |
1281 | ftp://ftp.tuwien.ac.at/pub/CPAN/ |
4e860d0a |
1282 | |
1283 | =item * |
1284 | |
1285 | Belgium |
1286 | |
37a78d01 |
1287 | http://ftp.easynet.be/pub/CPAN/ |
1288 | ftp://ftp.easynet.be/pub/CPAN/ |
1289 | http://cpan.skynet.be |
1290 | ftp://ftp.skynet.be/pub/CPAN |
4e860d0a |
1291 | ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/ |
1292 | |
1293 | =item * |
1294 | |
1295 | Bulgaria |
1296 | |
1297 | ftp://ftp.ntrl.net/pub/mirrors/CPAN/ |
1298 | |
1299 | =item * |
1300 | |
1301 | Croatia |
1302 | |
1303 | ftp://ftp.linux.hr/pub/CPAN/ |
1304 | |
1305 | =item * |
1306 | |
1307 | Czech Republic |
1308 | |
37a78d01 |
1309 | http://ftp.fi.muni.cz/pub/CPAN/ |
1310 | ftp://ftp.fi.muni.cz/pub/CPAN/ |
4e860d0a |
1311 | ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.funet.fi/pub/languages/perl/CPAN/ |
1312 | |
1313 | =item * |
1314 | |
1315 | Denmark |
1316 | |
37a78d01 |
1317 | http://mirrors.sunsite.dk/cpan/ |
1318 | ftp://sunsite.dk/mirrors/cpan/ |
4e860d0a |
1319 | http://www.cpan.dk/CPAN/ |
1320 | ftp://www.cpan.dk/ftp.cpan.org/CPAN/ |
1321 | |
1322 | =item * |
1323 | |
1324 | England |
1325 | |
1326 | http://www.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN |
1327 | ftp://ftp.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN/ |
37a78d01 |
1328 | http://cpan.crazygreek.co.uk |
1329 | ftp://ftp.demon.co.uk/pub/CPAN/ |
4e860d0a |
1330 | ftp://ftp.flirble.org/pub/languages/perl/CPAN/ |
1331 | ftp://ftp.plig.org/pub/CPAN/ |
1332 | ftp://sunsite.doc.ic.ac.uk/packages/CPAN/ |
1333 | http://mirror.uklinux.net/CPAN/ |
1334 | ftp://mirror.uklinux.net/pub/CPAN/ |
1335 | ftp://usit.shef.ac.uk/pub/packages/CPAN/ |
1336 | |
1337 | =item * |
1338 | |
1339 | Estonia |
1340 | |
1341 | ftp://ftp.ut.ee/pub/languages/perl/CPAN/ |
1342 | |
1343 | =item * |
1344 | |
1345 | Finland |
1346 | |
1347 | ftp://ftp.funet.fi/pub/languages/perl/CPAN/ |
37a78d01 |
1348 | http://cpan.kpnqwest.fi/ |
4e860d0a |
1349 | |
1350 | =item * |
1351 | |
1352 | France |
1353 | |
1354 | ftp://cpan.ftp.worldonline.fr/pub/CPAN/ |
37a78d01 |
1355 | http://cpan.mirrors.easynet.fr/ |
1356 | ftp://cpan.mirrors.easynet.fr/pub/ftp.cpan.org/ |
4e860d0a |
1357 | ftp://ftp.club-internet.fr/pub/perl/CPAN/ |
37a78d01 |
1358 | http://fr.cpan.org/ |
4e860d0a |
1359 | ftp://ftp.lip6.fr/pub/perl/CPAN/ |
1360 | ftp://ftp.oleane.net/pub/mirrors/CPAN/ |
1361 | ftp://ftp.pasteur.fr/pub/computing/CPAN/ |
37a78d01 |
1362 | http://cpan.cict.fr/ |
4e860d0a |
1363 | ftp://cpan.cict.fr/pub/CPAN/ |
1364 | ftp://ftp.uvsq.fr/pub/perl/CPAN/ |
1365 | |
1366 | =item * |
1367 | |
1368 | Germany |
1369 | |
1370 | ftp://ftp.rz.ruhr-uni-bochum.de/pub/CPAN/ |
1371 | ftp://ftp.freenet.de/pub/ftp.cpan.org/pub/CPAN/ |
1372 | ftp://ftp.uni-erlangen.de/pub/source/CPAN/ |
1373 | ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/CPAN |
1374 | ftp://ftp.gigabell.net/pub/CPAN/ |
1375 | http://ftp.gwdg.de/pub/languages/perl/CPAN/ |
1376 | ftp://ftp.gwdg.de/pub/languages/perl/CPAN/ |
1377 | ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/ |
37a78d01 |
1378 | ftp://ftp.leo.org/pub/CPAN/ |
1379 | http://cpan.noris.de/ |
1380 | ftp://cpan.noris.de/pub/CPAN/ |
4e860d0a |
1381 | ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/ |
1382 | ftp://ftp.gmd.de/mirrors/CPAN/ |
1383 | |
1384 | =item * |
1385 | |
1386 | Greece |
1387 | |
1388 | ftp://ftp.forthnet.gr/pub/languages/perl/CPAN |
1389 | ftp://ftp.ntua.gr/pub/lang/perl/ |
1390 | |
1391 | =item * |
1392 | |
1393 | Hungary |
1394 | |
1395 | http://cpan.artifact.hu/ |
1396 | ftp://cpan.artifact.hu/CPAN/ |
37a78d01 |
1397 | http://ftp.kfki.hu/pub/CPAN/ |
1398 | ftp://ftp.kfki.hu/pub/CPAN/ |
4e860d0a |
1399 | |
1400 | =item * |
1401 | |
1402 | Iceland |
1403 | |
37a78d01 |
1404 | http://ftp.rhnet.is/pub/CPAN/ |
1405 | ftp://ftp.rhnet.is/pub/CPAN/ |
4e860d0a |
1406 | |
1407 | =item * |
1408 | |
1409 | Ireland |
1410 | |
1411 | http://cpan.indigo.ie/ |
1412 | ftp://cpan.indigo.ie/pub/CPAN/ |
1413 | http://sunsite.compapp.dcu.ie/pub/perl/ |
1414 | ftp://sunsite.compapp.dcu.ie/pub/perl/ |
1415 | |
1416 | =item * |
1417 | |
1418 | Italy |
1419 | |
1420 | http://cpan.nettuno.it/ |
1421 | http://gusp.dyndns.org/CPAN/ |
1422 | ftp://gusp.dyndns.org/pub/CPAN |
1423 | http://softcity.iol.it/cpan |
1424 | ftp://softcity.iol.it/pub/cpan |
1425 | ftp://ftp.unina.it/pub/Other/CPAN/ |
1426 | ftp://ftp.unipi.it/pub/mirror/perl/CPAN/ |
1427 | ftp://cis.uniRoma2.it/CPAN/ |
1428 | ftp://ftp.edisontel.it/pub/CPAN_Mirror/ |
1429 | ftp://ftp.flashnet.it/pub/CPAN/ |
1430 | |
1431 | =item * |
1432 | |
1433 | Latvia |
1434 | |
1435 | http://kvin.lv/pub/CPAN/ |
1436 | |
1437 | =item * |
1438 | |
37a78d01 |
1439 | Lithuania |
1440 | |
1441 | ftp://ftp.unix.lt/pub/CPAN/ |
1442 | |
1443 | =item * |
1444 | |
4e860d0a |
1445 | Netherlands |
1446 | |
1447 | ftp://download.xs4all.nl/pub/mirror/CPAN/ |
1448 | ftp://ftp.nl.uu.net/pub/CPAN/ |
1449 | ftp://ftp.nluug.nl/pub/languages/perl/CPAN/ |
37a78d01 |
1450 | http://cpan.cybercomm.nl/ |
1451 | ftp://mirror.cybercomm.nl/pub/cpan/ |
4e860d0a |
1452 | ftp://ftp.cpan.nl/pub/CPAN/ |
1453 | http://www.cs.uu.nl/mirror/CPAN/ |
1454 | ftp://ftp.cs.uu.nl/mirror/CPAN/ |
1455 | |
1456 | =item * |
1457 | |
1458 | Norway |
1459 | |
37a78d01 |
1460 | ftp://ftp.uninett.no/pub/languages/perl/CPAN |
4e860d0a |
1461 | ftp://ftp.uit.no/pub/languages/perl/cpan/ |
1462 | |
1463 | =item * |
1464 | |
1465 | Poland |
1466 | |
1467 | ftp://ftp.pk.edu.pl/pub/lang/perl/CPAN/ |
37a78d01 |
1468 | http://www.fic.uni.lodz.pl/pub/CPAN |
1469 | ftp://ftp.fic.uni.lodz.pl/pub/CPAN |
4e860d0a |
1470 | ftp://ftp.mega.net.pl/pub/mirrors/ftp.perl.com/ |
1471 | ftp://ftp.man.torun.pl/pub/doc/CPAN/ |
1472 | ftp://sunsite.icm.edu.pl/pub/CPAN/ |
1473 | |
1474 | =item * |
1475 | |
1476 | Portugal |
1477 | |
1478 | ftp://ftp.ua.pt/pub/CPAN/ |
1479 | ftp://perl.di.uminho.pt/pub/CPAN/ |
37a78d01 |
1480 | http://cpan.ip.pt/ |
1481 | ftp://cpan.ip.pt/pub/perl/ |
4e860d0a |
1482 | ftp://ftp.ist.utl.pt/pub/CPAN/ |
37a78d01 |
1483 | http://cpan.ip.pt/ |
1484 | ftp://cpan.ip.pt/pub/cpan/ |
4e860d0a |
1485 | ftp://ftp.netc.pt/pub/CPAN/ |
37a78d01 |
1486 | ftp://ftp.up.pt/pub/CPAN |
4e860d0a |
1487 | |
1488 | =item * |
1489 | |
1490 | Romania |
1491 | |
1492 | ftp://archive.logicnet.ro/mirrors/ftp.cpan.org/CPAN/ |
1493 | ftp://ftp.kappa.ro/pub/mirrors/ftp.perl.org/pub/CPAN/ |
1494 | ftp://ftp.dntis.ro/pub/cpan/ |
1495 | ftp://ftp.opsynet.com/cpan/ |
1496 | ftp://ftp.dnttm.ro/pub/CPAN/ |
37a78d01 |
1497 | ftp://ftp.lasting.ro/pub/CPAN |
4e860d0a |
1498 | ftp://ftp.timisoara.roedu.net/mirrors/CPAN/ |
1499 | |
1500 | =item * |
1501 | |
1502 | Russia |
1503 | |
1504 | ftp://ftp.chg.ru/pub/lang/perl/CPAN/ |
1505 | http://cpan.rinet.ru/ |
1506 | ftp://cpan.rinet.ru/pub/mirror/CPAN/ |
1507 | ftp://ftp.aha.ru/pub/CPAN/ |
37a78d01 |
1508 | http://cpan.sai.msu.ru/ |
4e860d0a |
1509 | ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/ |
1510 | |
1511 | =item * |
1512 | |
1513 | Slovakia |
1514 | |
1515 | ftp://ftp.entry.sk/pub/languages/perl/CPAN/ |
1516 | |
1517 | =item * |
1518 | |
1519 | Slovenia |
1520 | |
1521 | ftp://ftp.arnes.si/software/perl/CPAN/ |
1522 | |
1523 | =item * |
1524 | |
1525 | Spain |
1526 | |
1527 | ftp://ftp.rediris.es/mirror/CPAN/ |
1528 | ftp://ftp.etse.urv.es/pub/perl/ |
1529 | |
1530 | =item * |
1531 | |
1532 | Sweden |
1533 | |
1534 | http://ftp.du.se/CPAN/ |
1535 | ftp://ftp.du.se/pub/CPAN/ |
37a78d01 |
1536 | ftp://mirror.dataphone.se/pub/CPAN |
4e860d0a |
1537 | ftp://ftp.sunet.se/pub/lang/perl/CPAN/ |
1538 | |
1539 | =item * |
1540 | |
1541 | Switzerland |
1542 | |
1543 | ftp://ftp.danyk.ch/CPAN/ |
1544 | ftp://sunsite.cnlab-switch.ch/mirror/CPAN/ |
1545 | |
1546 | =item * |
1547 | |
1548 | Turkey |
1549 | |
1550 | ftp://sunsite.bilkent.edu.tr/pub/languages/CPAN/ |
1551 | |
37a78d01 |
1552 | =item * |
1553 | |
1554 | Ukraine |
1555 | |
1556 | http://cpan.org.ua/ |
1557 | ftp://cpan.org.ua/ |
1558 | ftp://ftp.perl.org.ua/pub/CPAN/ |
1559 | |
4e860d0a |
1560 | =back |
1561 | |
1562 | =head2 North America |
1563 | |
1564 | =over 4 |
1565 | |
1566 | =item * |
1567 | |
1568 | Canada |
1569 | |
1570 | =over 8 |
1571 | |
1572 | =item * |
1573 | |
1574 | Alberta |
1575 | |
1576 | http://sunsite.ualberta.ca/pub/Mirror/CPAN/ |
1577 | ftp://sunsite.ualberta.ca/pub/Mirror/CPAN/ |
1578 | |
1579 | =item * |
1580 | |
1581 | Manitoba |
1582 | |
1583 | http://theoryx5.uwinnipeg.ca/pub/CPAN/ |
1584 | ftp://theoryx5.uwinnipeg.ca/pub/CPAN/ |
1585 | |
1586 | =item * |
1587 | |
1588 | Nova Scotia |
1589 | |
1590 | ftp://cpan.chebucto.ns.ca/pub/CPAN/ |
1591 | |
1592 | =item * |
1593 | |
1594 | Ontario |
1595 | |
37a78d01 |
1596 | ftp://ftp.crc.ca/pub/CPAN/ |
1597 | |
1598 | =item * |
1599 | |
1600 | Quebec |
1601 | |
1602 | http://cpan.mirror.smartworker.org/ |
1603 | ftp://cpan.mirror.smartworker.org/pub/CPAN |
1604 | |
1605 | =back |
4e860d0a |
1606 | |
1607 | =item * |
1608 | |
1609 | Mexico |
1610 | |
37a78d01 |
1611 | http://cpan.azc.uam.mx |
1612 | ftp://cpan.azc.uam.mx/mirrors/CPAN |
1613 | http://cpan.unam.mx/ |
1614 | ftp://cpan.unam.mx/pub/CPAN |
4e860d0a |
1615 | http://www.msg.com.mx/CPAN/ |
1616 | ftp://ftp.msg.com.mx/pub/CPAN/ |
1617 | |
4e860d0a |
1618 | =item * |
1619 | |
1620 | United States |
1621 | |
1622 | =over 8 |
1623 | |
1624 | =item * |
1625 | |
1626 | Alabama |
1627 | |
1628 | http://mirror.hiwaay.net/CPAN/ |
1629 | ftp://mirror.hiwaay.net/CPAN/ |
1630 | |
1631 | =item * |
1632 | |
1633 | California |
1634 | |
1635 | http://www.cpan.org/ |
37a78d01 |
1636 | ftp://cpan.valueclick.com/pub/CPAN/ |
1637 | http://mirrors.gossamer-threads.com/CPAN |
4e860d0a |
1638 | ftp://cpan.nas.nasa.gov/pub/perl/CPAN/ |
1639 | ftp://ftp.digital.com/pub/plan/perl/CPAN/ |
37a78d01 |
1640 | http://mirrors.kernel.org/cpan/ |
1641 | ftp://mirrors.kernel.org/pub/CPAN |
1642 | http://cpan.digisle.net/ |
1643 | ftp://cpan.digisle.net/pub/CPAN |
1644 | http://www.linuxjar.com/CPAN |
1645 | ftp://linuxjar.com/pub/CPAN |
4e860d0a |
1646 | http://www.perl.com/CPAN/ |
1647 | http://download.sourceforge.net/mirrors/CPAN/ |
1648 | |
1649 | =item * |
1650 | |
1651 | Colorado |
1652 | |
1653 | ftp://ftp.cs.colorado.edu/pub/perl/CPAN/ |
1654 | |
1655 | =item * |
1656 | |
37a78d01 |
1657 | District of Columbia |
4e860d0a |
1658 | |
37a78d01 |
1659 | ftp://ftp.dc.us.telia.net/pub/cpan/ |
4e860d0a |
1660 | |
1661 | =item * |
1662 | |
37a78d01 |
1663 | Florida |
4e860d0a |
1664 | |
37a78d01 |
1665 | ftp://ftp.cise.ufl.edu/pub/mirrors/CPAN/ |
1666 | http://mirror.csit.fsu.edu/pub/CPAN/ |
1667 | ftp://mirror.csit.fsu.edu/pub/CPAN/ |
4e860d0a |
1668 | |
1669 | =item * |
1670 | |
1671 | Illinois |
1672 | |
37a78d01 |
1673 | http://uiarchive.uiuc.edu/mirrors/ftp/cpan.cse.msu.edu/ |
1674 | ftp://uiarchive.uiuc.edu/mirrors/ftp/cpan.cse.msu.edu/ |
4e860d0a |
1675 | |
1676 | =item * |
1677 | |
1678 | Indiana |
1679 | |
1680 | ftp://ftp.uwsg.indiana.edu/pub/perl/CPAN/ |
1681 | http://cpan.nitco.com/ |
1682 | ftp://cpan.nitco.com/pub/CPAN/ |
37a78d01 |
1683 | http://archive.progeny.com/CPAN/ |
1684 | ftp://archive.progeny.com/CPAN/ |
4e860d0a |
1685 | ftp://cpan.in-span.net/ |
1686 | http://csociety-ftp.ecn.purdue.edu/pub/CPAN |
1687 | ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN |
1688 | |
1689 | =item * |
1690 | |
1691 | Kentucky |
1692 | |
1693 | http://cpan.uky.edu/ |
1694 | ftp://cpan.uky.edu/pub/CPAN/ |
1695 | |
1696 | =item * |
1697 | |
1698 | Massachusetts |
1699 | |
1700 | ftp://ftp.ccs.neu.edu/net/mirrors/ftp.funet.fi/pub/languages/perl/CPAN/ |
37a78d01 |
1701 | http://cpan.mirrors.netnumina.com/ |
1702 | ftp://mirrors.netnumina.com/cpan/ |
4e860d0a |
1703 | ftp://ftp.iguide.com/pub/mirrors/packages/perl/CPAN/ |
1704 | |
1705 | =item * |
1706 | |
37a78d01 |
1707 | Michigan |
1708 | |
1709 | ftp://cpan.cse.msu.edu/ |
1710 | |
1711 | =item * |
1712 | |
4e860d0a |
1713 | New Jersey |
1714 | |
1715 | ftp://ftp.cpanel.net/pub/CPAN/ |
1716 | |
1717 | =item * |
1718 | |
1719 | New York |
1720 | |
1721 | ftp://ftp.freesoftware.com/pub/perl/CPAN/ |
37a78d01 |
1722 | ftp://ftp.stealth.net/pub/CPAN/ |
4e860d0a |
1723 | http://www.rge.com/pub/languages/perl/ |
1724 | ftp://ftp.rge.com/pub/languages/perl/ |
1725 | ftp://mirrors.cloud9.net/pub/mirrors/CPAN/ |
1726 | |
1727 | =item * |
1728 | |
1729 | North Carolina |
1730 | |
1731 | ftp://ftp.duke.edu/pub/perl/ |
1732 | |
1733 | =item * |
1734 | |
1735 | Ohio |
1736 | |
1737 | ftp://ftp.loaded.net/pub/CPAN/ |
1738 | |
1739 | =item * |
1740 | |
1741 | Oklahoma |
1742 | |
1743 | ftp://ftp.ou.edu/mirrors/CPAN/ |
1744 | |
1745 | =item * |
1746 | |
1747 | Oregon |
1748 | |
37a78d01 |
1749 | ftp://ftp.orst.edu/pub/CPAN |
4e860d0a |
1750 | |
1751 | =item * |
1752 | |
1753 | Pennsylvania |
1754 | |
1755 | http://ftp.epix.net/CPAN/ |
1756 | ftp://ftp.epix.net/pub/languages/perl/ |
37a78d01 |
1757 | http://mirrors.phenominet.com/pub/CPAN/ |
1758 | ftp://mirrors.phenominet.com/pub/CPAN/ |
4e860d0a |
1759 | ftp://carroll.cac.psu.edu/pub/CPAN/ |
1760 | |
1761 | =item * |
1762 | |
1763 | Tennessee |
1764 | |
1765 | ftp://ftp.sunsite.utk.edu/pub/CPAN/ |
1766 | |
1767 | =item * |
1768 | |
1769 | Texas |
1770 | |
1771 | http://ftp.sedl.org/pub/mirrors/CPAN/ |
4e860d0a |
1772 | |
1773 | =item * |
1774 | |
1775 | Utah |
1776 | |
1777 | ftp://mirror.xmission.com/CPAN/ |
1778 | |
1779 | =item * |
1780 | |
1781 | Virginia |
1782 | |
1783 | http://mirrors.rcn.net/pub/lang/CPAN/ |
1784 | ftp://mirrors.rcn.net/pub/lang/CPAN/ |
1785 | ftp://ruff.cs.jmu.edu/pub/CPAN/ |
1786 | http://perl.Liquidation.com/CPAN/ |
1787 | |
1788 | =item * |
1789 | |
1790 | Washington |
1791 | |
1792 | http://cpan.llarian.net/ |
1793 | ftp://cpan.llarian.net/pub/CPAN/ |
37a78d01 |
1794 | http://cpan.mirrorcentral.com/ |
1795 | ftp://ftp.mirrorcentral.com/pub/CPAN/ |
4e860d0a |
1796 | ftp://ftp-mirror.internap.com/pub/CPAN/ |
4e860d0a |
1797 | |
1798 | =back |
1799 | |
1800 | =back |
1801 | |
1802 | =head2 Oceania |
1803 | |
1804 | =over 4 |
1805 | |
1806 | =item * |
1807 | |
1808 | Australia |
1809 | |
1810 | http://ftp.planetmirror.com/pub/CPAN/ |
1811 | ftp://ftp.planetmirror.com/pub/CPAN/ |
1812 | ftp://mirror.aarnet.edu.au/pub/perl/CPAN/ |
1813 | ftp://cpan.topend.com.au/pub/CPAN/ |
1814 | |
1815 | =item * |
1816 | |
1817 | New Zealand |
4e860d0a |
1818 | ftp://ftp.auckland.ac.nz/pub/perl/CPAN/ |
1819 | |
1820 | =back |
1821 | |
1822 | =head2 South America |
1823 | |
1824 | =over 4 |
1825 | |
1826 | =item * |
1827 | |
1828 | Argentina |
1829 | |
1830 | ftp://mirrors.bannerlandia.com.ar/mirrors/CPAN/ |
1831 | |
1832 | =item * |
1833 | |
1834 | Brazil |
1835 | |
1836 | ftp://cpan.pop-mg.com.br/pub/CPAN/ |
37a78d01 |
1837 | ftp://ftp.matrix.com.br/pub/perl/CPAN/ |
4e860d0a |
1838 | |
1839 | =item * |
1840 | |
1841 | Chile |
1842 | |
1843 | ftp://ftp.psinet.cl/pub/programming/perl/CPAN/ |
1844 | ftp://sunsite.dcc.uchile.cl/pub/lang/perl/ |
f102b883 |
1845 | |
1846 | =back |
1847 | |
37a78d01 |
1848 | |
f102b883 |
1849 | For an up-to-date listing of CPAN sites, |
4e860d0a |
1850 | see http://www.cpan.org/SITES or ftp://www.cpan.org/SITES . |
f102b883 |
1851 | |
1852 | =head1 Modules: Creation, Use, and Abuse |
1853 | |
1854 | (The following section is borrowed directly from Tim Bunce's modules |
1855 | file, available at your nearest CPAN site.) |
1856 | |
1857 | Perl implements a class using a package, but the presence of a |
1858 | package doesn't imply the presence of a class. A package is just a |
1859 | namespace. A class is a package that provides subroutines that can be |
1860 | used as methods. A method is just a subroutine that expects, as its |
1861 | first argument, either the name of a package (for "static" methods), |
1862 | or a reference to something (for "virtual" methods). |
1863 | |
1864 | A module is a file that (by convention) provides a class of the same |
1865 | name (sans the .pm), plus an import method in that class that can be |
1866 | called to fetch exported symbols. This module may implement some of |
1867 | its methods by loading dynamic C or C++ objects, but that should be |
1868 | totally transparent to the user of the module. Likewise, the module |
1869 | might set up an AUTOLOAD function to slurp in subroutine definitions on |
1870 | demand, but this is also transparent. Only the F<.pm> file is required to |
2e1d04bc |
1871 | exist. See L<perlsub>, L<perltoot>, and L<AutoLoader> for details about |
f102b883 |
1872 | the AUTOLOAD mechanism. |
1873 | |
1874 | =head2 Guidelines for Module Creation |
1875 | |
1876 | =over 4 |
1877 | |
4e860d0a |
1878 | =item * |
1879 | |
1880 | Do similar modules already exist in some form? |
f102b883 |
1881 | |
1882 | If so, please try to reuse the existing modules either in whole or |
1883 | by inheriting useful features into a new class. If this is not |
1884 | practical try to get together with the module authors to work on |
1885 | extending or enhancing the functionality of the existing modules. |
1886 | A perfect example is the plethora of packages in perl4 for dealing |
1887 | with command line options. |
1888 | |
1889 | If you are writing a module to expand an already existing set of |
1890 | modules, please coordinate with the author of the package. It |
1891 | helps if you follow the same naming scheme and module interaction |
1892 | scheme as the original author. |
1893 | |
4e860d0a |
1894 | =item * |
1895 | |
1896 | Try to design the new module to be easy to extend and reuse. |
f102b883 |
1897 | |
9f1b1f2d |
1898 | Try to C<use warnings;> (or C<use warnings qw(...);>). |
1899 | Remember that you can add C<no warnings qw(...);> to individual blocks |
2e1d04bc |
1900 | of code that need less warnings. |
19799a22 |
1901 | |
f102b883 |
1902 | Use blessed references. Use the two argument form of bless to bless |
1903 | into the class name given as the first parameter of the constructor, |
1904 | e.g.,: |
1905 | |
1906 | sub new { |
2e1d04bc |
1907 | my $class = shift; |
1908 | return bless {}, $class; |
f102b883 |
1909 | } |
1910 | |
1911 | or even this if you'd like it to be used as either a static |
1912 | or a virtual method. |
1913 | |
1914 | sub new { |
2e1d04bc |
1915 | my $self = shift; |
1916 | my $class = ref($self) || $self; |
1917 | return bless {}, $class; |
f102b883 |
1918 | } |
1919 | |
1920 | Pass arrays as references so more parameters can be added later |
1921 | (it's also faster). Convert functions into methods where |
1922 | appropriate. Split large methods into smaller more flexible ones. |
1923 | Inherit methods from other modules if appropriate. |
1924 | |
1925 | Avoid class name tests like: C<die "Invalid" unless ref $ref eq 'FOO'>. |
19799a22 |
1926 | Generally you can delete the C<eq 'FOO'> part with no harm at all. |
f102b883 |
1927 | Let the objects look after themselves! Generally, avoid hard-wired |
1928 | class names as far as possible. |
1929 | |
c47ff5f1 |
1930 | Avoid C<< $r->Class::func() >> where using C<@ISA=qw(... Class ...)> and |
1931 | C<< $r->func() >> would work (see L<perlbot> for more details). |
f102b883 |
1932 | |
1933 | Use autosplit so little used or newly added functions won't be a |
5a964f20 |
1934 | burden to programs that don't use them. Add test functions to |
f102b883 |
1935 | the module after __END__ either using AutoSplit or by saying: |
1936 | |
1937 | eval join('',<main::DATA>) || die $@ unless caller(); |
1938 | |
1939 | Does your module pass the 'empty subclass' test? If you say |
19799a22 |
1940 | C<@SUBCLASS::ISA = qw(YOURCLASS);> your applications should be able |
f102b883 |
1941 | to use SUBCLASS in exactly the same way as YOURCLASS. For example, |
1942 | does your application still work if you change: C<$obj = new YOURCLASS;> |
1943 | into: C<$obj = new SUBCLASS;> ? |
1944 | |
1945 | Avoid keeping any state information in your packages. It makes it |
1946 | difficult for multiple other packages to use yours. Keep state |
1947 | information in objects. |
1948 | |
2e1d04bc |
1949 | Always use B<-w>. |
19799a22 |
1950 | |
1951 | Try to C<use strict;> (or C<use strict qw(...);>). |
f102b883 |
1952 | Remember that you can add C<no strict qw(...);> to individual blocks |
2e1d04bc |
1953 | of code that need less strictness. |
19799a22 |
1954 | |
2e1d04bc |
1955 | Always use B<-w>. |
19799a22 |
1956 | |
f102b883 |
1957 | Follow the guidelines in the perlstyle(1) manual. |
1958 | |
19799a22 |
1959 | Always use B<-w>. |
1960 | |
4e860d0a |
1961 | =item * |
1962 | |
1963 | Some simple style guidelines |
f102b883 |
1964 | |
5a964f20 |
1965 | The perlstyle manual supplied with Perl has many helpful points. |
f102b883 |
1966 | |
1967 | Coding style is a matter of personal taste. Many people evolve their |
1968 | style over several years as they learn what helps them write and |
1969 | maintain good code. Here's one set of assorted suggestions that |
1970 | seem to be widely used by experienced developers: |
1971 | |
1972 | Use underscores to separate words. It is generally easier to read |
1973 | $var_names_like_this than $VarNamesLikeThis, especially for |
1974 | non-native speakers of English. It's also a simple rule that works |
1975 | consistently with VAR_NAMES_LIKE_THIS. |
1976 | |
1977 | Package/Module names are an exception to this rule. Perl informally |
1978 | reserves lowercase module names for 'pragma' modules like integer |
1979 | and strict. Other modules normally begin with a capital letter and |
1980 | use mixed case with no underscores (need to be short and portable). |
1981 | |
1982 | You may find it helpful to use letter case to indicate the scope |
1983 | or nature of a variable. For example: |
1984 | |
5a964f20 |
1985 | $ALL_CAPS_HERE constants only (beware clashes with Perl vars) |
f102b883 |
1986 | $Some_Caps_Here package-wide global/static |
1987 | $no_caps_here function scope my() or local() variables |
1988 | |
1989 | Function and method names seem to work best as all lowercase. |
c47ff5f1 |
1990 | e.g., C<< $obj->as_string() >>. |
f102b883 |
1991 | |
1992 | You can use a leading underscore to indicate that a variable or |
1993 | function should not be used outside the package that defined it. |
1994 | |
4e860d0a |
1995 | =item * |
1996 | |
1997 | Select what to export. |
f102b883 |
1998 | |
1999 | Do NOT export method names! |
2000 | |
2001 | Do NOT export anything else by default without a good reason! |
2002 | |
2003 | Exports pollute the namespace of the module user. If you must |
2004 | export try to use @EXPORT_OK in preference to @EXPORT and avoid |
2005 | short or common names to reduce the risk of name clashes. |
2006 | |
2007 | Generally anything not exported is still accessible from outside the |
c47ff5f1 |
2008 | module using the ModuleName::item_name (or C<< $blessed_ref->method >>) |
f102b883 |
2009 | syntax. By convention you can use a leading underscore on names to |
2010 | indicate informally that they are 'internal' and not for public use. |
2011 | |
2012 | (It is actually possible to get private functions by saying: |
2013 | C<my $subref = sub { ... }; &$subref;>. But there's no way to call that |
2014 | directly as a method, because a method must have a name in the symbol |
2015 | table.) |
2016 | |
2017 | As a general rule, if the module is trying to be object oriented |
2018 | then export nothing. If it's just a collection of functions then |
2019 | @EXPORT_OK anything but use @EXPORT with caution. |
2020 | |
4e860d0a |
2021 | =item * |
2022 | |
2023 | Select a name for the module. |
f102b883 |
2024 | |
2025 | This name should be as descriptive, accurate, and complete as |
2026 | possible. Avoid any risk of ambiguity. Always try to use two or |
2027 | more whole words. Generally the name should reflect what is special |
2028 | about what the module does rather than how it does it. Please use |
2029 | nested module names to group informally or categorize a module. |
2030 | There should be a very good reason for a module not to have a nested name. |
2031 | Module names should begin with a capital letter. |
2032 | |
2033 | Having 57 modules all called Sort will not make life easy for anyone |
2034 | (though having 23 called Sort::Quick is only marginally better :-). |
2035 | Imagine someone trying to install your module alongside many others. |
2036 | If in any doubt ask for suggestions in comp.lang.perl.misc. |
2037 | |
2038 | If you are developing a suite of related modules/classes it's good |
2039 | practice to use nested classes with a common prefix as this will |
2040 | avoid namespace clashes. For example: Xyz::Control, Xyz::View, |
2041 | Xyz::Model etc. Use the modules in this list as a naming guide. |
2042 | |
2043 | If adding a new module to a set, follow the original author's |
2044 | standards for naming modules and the interface to methods in |
2045 | those modules. |
2046 | |
165c0277 |
2047 | If developing modules for private internal or project specific use, |
2048 | that will never be released to the public, then you should ensure |
2049 | that their names will not clash with any future public module. You |
2050 | can do this either by using the reserved Local::* category or by |
2051 | using a category name that includes an underscore like Foo_Corp::*. |
2052 | |
f102b883 |
2053 | To be portable each component of a module name should be limited to |
2054 | 11 characters. If it might be used on MS-DOS then try to ensure each is |
2055 | unique in the first 8 characters. Nested modules make this easier. |
2056 | |
4e860d0a |
2057 | =item * |
2058 | |
2059 | Have you got it right? |
f102b883 |
2060 | |
2061 | How do you know that you've made the right decisions? Have you |
2062 | picked an interface design that will cause problems later? Have |
2063 | you picked the most appropriate name? Do you have any questions? |
2064 | |
2065 | The best way to know for sure, and pick up many helpful suggestions, |
2066 | is to ask someone who knows. Comp.lang.perl.misc is read by just about |
2067 | all the people who develop modules and it's the best place to ask. |
2068 | |
2069 | All you need to do is post a short summary of the module, its |
2070 | purpose and interfaces. A few lines on each of the main methods is |
2071 | probably enough. (If you post the whole module it might be ignored |
2072 | by busy people - generally the very people you want to read it!) |
2073 | |
2074 | Don't worry about posting if you can't say when the module will be |
2075 | ready - just say so in the message. It might be worth inviting |
2076 | others to help you, they may be able to complete it for you! |
2077 | |
4e860d0a |
2078 | =item * |
2079 | |
2080 | README and other Additional Files. |
f102b883 |
2081 | |
2082 | It's well known that software developers usually fully document the |
2083 | software they write. If, however, the world is in urgent need of |
2084 | your software and there is not enough time to write the full |
2085 | documentation please at least provide a README file containing: |
2086 | |
2087 | =over 10 |
2088 | |
2089 | =item * |
4e860d0a |
2090 | |
f102b883 |
2091 | A description of the module/package/extension etc. |
2092 | |
2093 | =item * |
4e860d0a |
2094 | |
f102b883 |
2095 | A copyright notice - see below. |
2096 | |
2097 | =item * |
4e860d0a |
2098 | |
f102b883 |
2099 | Prerequisites - what else you may need to have. |
2100 | |
2101 | =item * |
4e860d0a |
2102 | |
f102b883 |
2103 | How to build it - possible changes to Makefile.PL etc. |
2104 | |
2105 | =item * |
4e860d0a |
2106 | |
f102b883 |
2107 | How to install it. |
2108 | |
2109 | =item * |
4e860d0a |
2110 | |
f102b883 |
2111 | Recent changes in this release, especially incompatibilities |
2112 | |
2113 | =item * |
4e860d0a |
2114 | |
f102b883 |
2115 | Changes / enhancements you plan to make in the future. |
2116 | |
2117 | =back |
2118 | |
2119 | If the README file seems to be getting too large you may wish to |
2120 | split out some of the sections into separate files: INSTALL, |
2121 | Copying, ToDo etc. |
2122 | |
2123 | =over 4 |
2124 | |
37a78d01 |
2125 | =item * |
f102b883 |
2126 | |
37a78d01 |
2127 | Adding a Copyright Notice. |
4e860d0a |
2128 | |
f102b883 |
2129 | How you choose to license your work is a personal decision. |
2130 | The general mechanism is to assert your Copyright and then make |
2131 | a declaration of how others may copy/use/modify your work. |
2132 | |
2133 | Perl, for example, is supplied with two types of licence: The GNU |
2134 | GPL and The Artistic Licence (see the files README, Copying, and |
2135 | Artistic). Larry has good reasons for NOT just using the GNU GPL. |
2136 | |
2137 | My personal recommendation, out of respect for Larry, Perl, and the |
5a964f20 |
2138 | Perl community at large is to state something simply like: |
f102b883 |
2139 | |
2140 | Copyright (c) 1995 Your Name. All rights reserved. |
2141 | This program is free software; you can redistribute it and/or |
2142 | modify it under the same terms as Perl itself. |
2143 | |
2144 | This statement should at least appear in the README file. You may |
2145 | also wish to include it in a Copying file and your source files. |
2146 | Remember to include the other words in addition to the Copyright. |
2147 | |
4e860d0a |
2148 | =item * |
2149 | |
2150 | Give the module a version/issue/release number. |
f102b883 |
2151 | |
2152 | To be fully compatible with the Exporter and MakeMaker modules you |
2153 | should store your module's version number in a non-my package |
2154 | variable called $VERSION. This should be a floating point |
2155 | number with at least two digits after the decimal (i.e., hundredths, |
2156 | e.g, C<$VERSION = "0.01">). Don't use a "1.3.2" style version. |
19799a22 |
2157 | See L<Exporter> for details. |
f102b883 |
2158 | |
2159 | It may be handy to add a function or method to retrieve the number. |
2160 | Use the number in announcements and archive file names when |
2161 | releasing the module (ModuleName-1.02.tar.Z). |
2162 | See perldoc ExtUtils::MakeMaker.pm for details. |
2163 | |
4e860d0a |
2164 | =item * |
2165 | |
2166 | How to release and distribute a module. |
f102b883 |
2167 | |
2168 | It's good idea to post an announcement of the availability of your |
2169 | module (or the module itself if small) to the comp.lang.perl.announce |
2170 | Usenet newsgroup. This will at least ensure very wide once-off |
2171 | distribution. |
2172 | |
2e1d04bc |
2173 | If possible, register the module with CPAN. You should |
f102b883 |
2174 | include details of its location in your announcement. |
2175 | |
2176 | Some notes about ftp archives: Please use a long descriptive file |
5a964f20 |
2177 | name that includes the version number. Most incoming directories |
f102b883 |
2178 | will not be readable/listable, i.e., you won't be able to see your |
2179 | file after uploading it. Remember to send your email notification |
2180 | message as soon as possible after uploading else your file may get |
2181 | deleted automatically. Allow time for the file to be processed |
2182 | and/or check the file has been processed before announcing its |
2183 | location. |
2184 | |
2185 | FTP Archives for Perl Modules: |
2186 | |
6cecdcac |
2187 | Follow the instructions and links on: |
f102b883 |
2188 | |
4e860d0a |
2189 | http://www.cpan.org/modules/00modlist.long.html |
2190 | http://www.cpan.org/modules/04pause.html |
f102b883 |
2191 | |
2192 | or upload to one of these sites: |
2193 | |
6cecdcac |
2194 | https://pause.kbx.de/pause/ |
2195 | http://pause.perl.org/pause/ |
f102b883 |
2196 | |
6cecdcac |
2197 | and notify <modules@perl.org>. |
f102b883 |
2198 | |
2199 | By using the WWW interface you can ask the Upload Server to mirror |
2200 | your modules from your ftp or WWW site into your own directory on |
2201 | CPAN! |
2202 | |
2203 | Please remember to send me an updated entry for the Module list! |
2204 | |
4e860d0a |
2205 | =item * |
2206 | |
2207 | Take care when changing a released module. |
f102b883 |
2208 | |
7b8d334a |
2209 | Always strive to remain compatible with previous released versions. |
2210 | Otherwise try to add a mechanism to revert to the |
19799a22 |
2211 | old behavior if people rely on it. Document incompatible changes. |
f102b883 |
2212 | |
2213 | =back |
2214 | |
2215 | =back |
2216 | |
2217 | =head2 Guidelines for Converting Perl 4 Library Scripts into Modules |
2218 | |
2219 | =over 4 |
2220 | |
4e860d0a |
2221 | =item * |
2222 | |
2223 | There is no requirement to convert anything. |
f102b883 |
2224 | |
2225 | If it ain't broke, don't fix it! Perl 4 library scripts should |
2226 | continue to work with no problems. You may need to make some minor |
2227 | changes (like escaping non-array @'s in double quoted strings) but |
2228 | there is no need to convert a .pl file into a Module for just that. |
2229 | |
4e860d0a |
2230 | =item * |
2231 | |
2232 | Consider the implications. |
f102b883 |
2233 | |
5a964f20 |
2234 | All Perl applications that make use of the script will need to |
f102b883 |
2235 | be changed (slightly) if the script is converted into a module. Is |
2236 | it worth it unless you plan to make other changes at the same time? |
2237 | |
4e860d0a |
2238 | =item * |
2239 | |
2240 | Make the most of the opportunity. |
f102b883 |
2241 | |
2242 | If you are going to convert the script to a module you can use the |
19799a22 |
2243 | opportunity to redesign the interface. The guidelines for module |
2244 | creation above include many of the issues you should consider. |
f102b883 |
2245 | |
4e860d0a |
2246 | =item * |
2247 | |
2248 | The pl2pm utility will get you started. |
f102b883 |
2249 | |
2250 | This utility will read *.pl files (given as parameters) and write |
2251 | corresponding *.pm files. The pl2pm utilities does the following: |
2252 | |
2253 | =over 10 |
2254 | |
2255 | =item * |
4e860d0a |
2256 | |
f102b883 |
2257 | Adds the standard Module prologue lines |
2258 | |
2259 | =item * |
4e860d0a |
2260 | |
f102b883 |
2261 | Converts package specifiers from ' to :: |
2262 | |
2263 | =item * |
4e860d0a |
2264 | |
f102b883 |
2265 | Converts die(...) to croak(...) |
2266 | |
2267 | =item * |
4e860d0a |
2268 | |
f102b883 |
2269 | Several other minor changes |
2270 | |
2271 | =back |
2272 | |
2273 | Being a mechanical process pl2pm is not bullet proof. The converted |
2274 | code will need careful checking, especially any package statements. |
2275 | Don't delete the original .pl file till the new .pm one works! |
2276 | |
2277 | =back |
2278 | |
2279 | =head2 Guidelines for Reusing Application Code |
2280 | |
2281 | =over 4 |
2282 | |
4e860d0a |
2283 | =item * |
551e1d92 |
2284 | |
2285 | Complete applications rarely belong in the Perl Module Library. |
f102b883 |
2286 | |
4e860d0a |
2287 | =item * |
551e1d92 |
2288 | |
2289 | Many applications contain some Perl code that could be reused. |
f102b883 |
2290 | |
2291 | Help save the world! Share your code in a form that makes it easy |
2292 | to reuse. |
2293 | |
4e860d0a |
2294 | =item * |
551e1d92 |
2295 | |
2296 | Break-out the reusable code into one or more separate module files. |
f102b883 |
2297 | |
4e860d0a |
2298 | =item * |
551e1d92 |
2299 | |
2300 | Take the opportunity to reconsider and redesign the interfaces. |
2301 | |
4e860d0a |
2302 | =item * |
f102b883 |
2303 | |
551e1d92 |
2304 | In some cases the 'application' can then be reduced to a small |
f102b883 |
2305 | |
2306 | fragment of code built on top of the reusable modules. In these cases |
2307 | the application could invoked as: |
2308 | |
5a964f20 |
2309 | % perl -e 'use Module::Name; method(@ARGV)' ... |
f102b883 |
2310 | or |
5a964f20 |
2311 | % perl -mModule::Name ... (in perl5.002 or higher) |
f102b883 |
2312 | |
2313 | =back |
2314 | |
2315 | =head1 NOTE |
2316 | |
2317 | Perl does not enforce private and public parts of its modules as you may |
2318 | have been used to in other languages like C++, Ada, or Modula-17. Perl |
2319 | doesn't have an infatuation with enforced privacy. It would prefer |
2320 | that you stayed out of its living room because you weren't invited, not |
2321 | because it has a shotgun. |
2322 | |
2323 | The module and its user have a contract, part of which is common law, |
2324 | and part of which is "written". Part of the common law contract is |
2325 | that a module doesn't pollute any namespace it wasn't asked to. The |
2326 | written contract for the module (A.K.A. documentation) may make other |
2327 | provisions. But then you know when you C<use RedefineTheWorld> that |
2328 | you're redefining the world and willing to take the consequences. |