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