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