2 Generated by perlmodlib.PL -- DO NOT EDIT!
6 perlmodlib - constructing new Perl modules and finding existing ones
8 =head1 THE PERL MODULE LIBRARY
10 Many modules are included in the Perl distribution. These are described
11 below, and all end in F<.pm>. You may discover compiled library
12 files (usually ending in F<.so>) or small pieces of modules to be
13 autoloaded (ending in F<.al>); these were automatically generated
14 by the installation process. You may also discover files in the
15 library directory that end in either F<.pl> or F<.ph>. These are
16 old libraries supplied so that old programs that use them still
17 run. The F<.pl> files will all eventually be converted into standard
18 modules, and the F<.ph> files made by B<h2ph> will probably end up
19 as extension modules made by B<h2xs>. (Some F<.ph> values may
20 already be available through the POSIX, Errno, or Fcntl modules.)
21 The B<pl2pm> file in the distribution may help in your conversion,
22 but it's just a mechanical process and therefore far from bulletproof.
24 =head2 Pragmatic Modules
26 They work somewhat like compiler directives (pragmata) in that they
27 tend to affect the compilation of your program, and thus will usually
28 work well only when used within a C<use>, or C<no>. Most of these
29 are lexically scoped, so an inner BLOCK may countermand them
36 which lasts until the end of that BLOCK.
38 Some pragmas are lexically scoped--typically those that affect the
39 C<$^H> hints variable. Others affect the current package instead,
40 like C<use vars> and C<use subs>, which allow you to predeclare a
41 variables or subroutines within a particular I<file> rather than
42 just a block. Such declarations are effective for the entire file
43 for which they were declared. You cannot rescind them with C<no
46 The following pragmas are defined (and have their own documentation).
52 Get/set subroutine or variable attributes
56 Set/get attributes of a subroutine (deprecated)
60 Postpone load of modules until a function is used
64 Establish IS-A relationship with base classes at compile time
68 Transparent BigInteger support for Perl
72 Transparent BigNumber support for Perl
76 Transparent BigNumber/BigRational support for Perl
80 Use MakeMaker's uninstalled version of a package
84 Force byte semantics rather than character semantics
88 Define character names for C<\N{named}> string literal escapes
96 Produce verbose warning diagnostics
100 Allows you to write your script in non-ascii or non-utf8
104 Compile-time class fields
108 Control the filetest permission operators
112 C<use> a Perl module if a condition holds
116 Use integer arithmetic instead of floating point
120 Request less of something from the compiler
124 Manipulate @INC at compile time
128 Use and avoid POSIX locales for built-in operations
132 Set default PerlIO layers for input and output
136 Restrict unsafe operations when compiling
140 Package for overloading Perl operations
144 Alter regular expression behaviour
148 Enable simple signal handling
152 Control sort() behaviour
156 Restrict unsafe constructs
164 Perl extension allowing use of interpreter based threads from perl
166 =item threads::shared
168 Perl extension for sharing data structures between threads
172 Enable/disable UTF-8 (or UTF-EBCDIC) in source code
176 Predeclare global variable names (obsolete)
180 Control VMS-specific language features
184 Control optional warnings
186 =item warnings::register
188 Warnings import function
192 =head2 Standard Modules
194 Standard, bundled modules are all expected to behave in a well-defined
195 manner with respect to namespace pollution because they use the
196 Exporter module. See their own documentation for details.
198 It's possible that not all modules listed below are installed on your
199 system. For example, the GDBM_File module will not be installed if you
200 don't have the gdbm library.
206 Provide framework for multiple DBMs
208 =item Attribute::Handlers
210 Simpler definition of attribute handlers
214 Load subroutines only on demand
218 Split a package for autoloading
226 Autogenerated data about Perl ops, used to generate bytecode
230 Assemble Perl bytecode
238 Perl compiler's bytecode backend
242 Perl compiler's C backend
246 Perl compiler's optimized C translation backend
250 Walk Perl syntax tree, printing concise info about ops
254 Walk Perl syntax tree, printing debug info about ops
258 Perl compiler backend to produce perl code
260 =item B::Disassembler
262 Disassemble Perl bytecode
270 Show lexical variables used in functions or files
274 Helper module for CC backend
278 Show what stashes are loaded
282 Walk Perl syntax tree, printing terse info about ops
286 Generates cross reference reports for Perl programs
290 Benchmark running times of Perl code
294 Load byte compiled perl code
298 Simple Common Gateway Interface Class
302 Backward compatibility module for CGI.pm
306 CGI routines for writing to the HTTPD (or other) error log
310 Interface to Netscape Cookies
314 CGI Interface for Fast CGI
318 Module to produce nicely formatted HTML code
322 Simple Interface to Server Push
326 Backward compatibility module for defunct CGI::Switch
330 Internal utilities used by CGI module
334 Query, download and build perl modules from CPAN sites
336 =item CPAN::FirstTime
338 Utility for CPAN::Config file Initialization
342 Wrapper around CPAN.pm without using any XS module
346 Utility functions to compare CPAN versions
350 Warn of errors (from perspective of caller)
354 Heavy machinery, no user serviceable parts inside
358 Report the search path for a class's ISA tree
362 Declare struct-like datatypes as Perl classes
366 Access Perl configuration information
370 Get pathname of current working directory
374 Programmatic interface to the Perl debugging API (draft, subject to
378 Filter DBM keys/values
382 Perl5 access to Berkeley DB version 1.x
386 Stringified perl data structures, suitable for both printing and C<eval>
394 Perl/Pollution/Portability
398 A data debugging tool for the XS programmer
400 =item Devel::SelfStubber
402 Generate stubs for a SelfLoading module
406 Modules that calculate message digests
410 Perl interface to the MD5 Algorithm
418 Calculate digests of files
422 Supply object methods for directory handles
426 Provides screen dump of Perl data.
430 Dynamically load C libraries into Perl code
438 Alias definitions to encodings
442 Single Byte Encodings
444 =item Encode::CJKConstants
446 Internally used by Encode::??::ISO_2022_*
450 China-based Chinese Encodings
454 Internally used by Encode::CN
458 Internally used by Encode
464 =item Encode::Encoder
466 Object Oriented Encoder
468 =item Encode::Encoding
470 Encode Implementation Base Class
474 Guesses encoding from data
480 =item Encode::JP::H2Z
482 Internally used by Encode::JP::2022_JP*
484 =item Encode::JP::JIS7
486 Internally used by Encode::JP
492 =item Encode::KR::2022_KR
494 Internally used by Encode::KR
496 =item Encode::MIME::Header
498 MIME 'B' and 'Q' header encoding
502 A detailed document on Encode and PerlIO
504 =item Encode::Supported
506 Encodings supported by Encode
514 Taiwan-based Chinese Encodings
516 =item Encode::Unicode
518 Various Unicode Transformation Formats
520 =item Encode::Unicode::UTF7
526 Use nice English (or awk) names for ugly punctuation variables
530 Perl module that imports environment variables as scalars or arrays
534 System errno constants
538 Implements default import method for modules
540 =item Exporter::Heavy
544 =item ExtUtils::Command
546 Utilities to replace common UNIX commands in Makefiles etc.
548 =item ExtUtils::Command::MM
550 Commands for the MM's to use in Makefiles
552 =item ExtUtils::Constant
554 Generate XS code to import C header constants
556 =item ExtUtils::Constant::Base
558 Base class for ExtUtils::Constant objects
560 =item ExtUtils::Constant::Utils
562 Helper functions for ExtUtils::Constant
564 =item ExtUtils::Constant::XS
566 Base class for ExtUtils::Constant objects
568 =item ExtUtils::Embed
570 Utilities for embedding Perl in C/C++ applications
572 =item ExtUtils::Install
574 Install files from here to there
576 =item ExtUtils::Installed
578 Inventory management of installed modules
580 =item ExtUtils::Liblist
582 Determine libraries to use and how to use them
586 OS adjusted ExtUtils::MakeMaker subclass
588 =item ExtUtils::MM_AIX
590 AIX specific subclass of ExtUtils::MM_Unix
592 =item ExtUtils::MM_Any
594 Platform-agnostic MM methods
596 =item ExtUtils::MM_BeOS
598 Methods to override UN*X behaviour in ExtUtils::MakeMaker
600 =item ExtUtils::MM_Cygwin
602 Methods to override UN*X behaviour in ExtUtils::MakeMaker
604 =item ExtUtils::MM_DOS
606 DOS specific subclass of ExtUtils::MM_Unix
608 =item ExtUtils::MM_MacOS
610 Once produced Makefiles for MacOS Classic
612 =item ExtUtils::MM_NW5
614 Methods to override UN*X behaviour in ExtUtils::MakeMaker
616 =item ExtUtils::MM_OS2
618 Methods to override UN*X behaviour in ExtUtils::MakeMaker
620 =item ExtUtils::MM_QNX
622 QNX specific subclass of ExtUtils::MM_Unix
624 =item ExtUtils::MM_UWIN
626 U/WIN specific subclass of ExtUtils::MM_Unix
628 =item ExtUtils::MM_Unix
630 Methods used by ExtUtils::MakeMaker
632 =item ExtUtils::MM_VMS
634 Methods to override UN*X behaviour in ExtUtils::MakeMaker
636 =item ExtUtils::MM_VOS
638 VOS specific subclass of ExtUtils::MM_Unix
640 =item ExtUtils::MM_Win32
642 Methods to override UN*X behaviour in ExtUtils::MakeMaker
644 =item ExtUtils::MM_Win95
646 Method to customize MakeMaker for Win9X
650 ExtUtils::MakeMaker subclass for customization
652 =item ExtUtils::MakeMaker
654 Create a module Makefile
656 =item ExtUtils::MakeMaker::Config
658 Wrapper around Config.pm
660 =item ExtUtils::MakeMaker::FAQ
662 Frequently Asked Questions About MakeMaker
664 =item ExtUtils::MakeMaker::Tutorial
666 Writing a module with MakeMaker
668 =item ExtUtils::MakeMaker::bytes
670 Version-agnostic bytes.pm
672 =item ExtUtils::MakeMaker::vmsish
674 Platform-agnostic vmsish.pm
676 =item ExtUtils::Manifest
678 Utilities to write and check a MANIFEST file
680 =item ExtUtils::Mkbootstrap
682 Make a bootstrap file for use by DynaLoader
684 =item ExtUtils::Mksymlists
686 Write linker options files for dynamic extension
688 =item ExtUtils::Packlist
690 Manage .packlist files
692 =item ExtUtils::testlib
694 Add blib/* directories to @INC
698 Replace functions with equivalents which succeed or die
702 Load the C Fcntl.h defines
706 Parse file paths into directory, filename and suffix.
708 =item File::CheckTree
710 Run many filetest checks on a tree
714 Compare files or filehandles
718 Copy files or filehandles
722 DOS like globbing and then some
726 Traverse a directory tree.
730 Perl extension for BSD glob routine
734 Create or remove directory trees
738 Portably perform operations on file names
740 =item File::Spec::Cygwin
742 Methods for Cygwin file specs
744 =item File::Spec::Epoc
746 Methods for Epoc file specs
748 =item File::Spec::Functions
750 Portably perform operations on file names
752 =item File::Spec::Mac
754 File::Spec for Mac OS (Classic)
756 =item File::Spec::OS2
758 Methods for OS/2 file specs
760 =item File::Spec::Unix
762 File::Spec for Unix, base for other File::Spec modules
764 =item File::Spec::VMS
766 Methods for VMS file specs
768 =item File::Spec::Win32
770 Methods for Win32 file specs
774 Return name and handle of a temporary file safely
778 By-name interface to Perl's built-in stat() functions
782 Keep more files open than the system permits
786 Supply object methods for filehandles
790 Simplified source filtering
792 =item Filter::Util::Call
794 Perl Source Filter Utility Module
798 Locate directory of original perl script
802 Perl5 access to the gdbm library.
806 Extended processing of command line options
810 Process single-character switches with switch clustering
814 A selection of general-utility hash subroutines
818 Compare 8-bit scalar data according to the current locale
822 Functions for dealing with RFC3066-style language tags
824 =item I18N::LangTags::Detect
826 Detect the user's language preferences
828 =item I18N::LangTags::List
830 Tags and names for human languages
834 Query locale information
838 Load various IO modules
842 Supply object methods for directory handles
846 Supply object methods for filehandles
850 Supply object methods for I/O handles
854 Supply object methods for pipes
858 Object interface to system poll call
862 Supply seek based methods for I/O objects
866 OO interface to the select system call
870 Object interface to socket communications
872 =item IO::Socket::INET
874 Object interface for AF_INET domain sockets
876 =item IO::Socket::UNIX
878 Object interface for AF_UNIX domain sockets
882 Open a process for both reading and writing
886 Open a process for reading, writing, and error handling
894 SysV Msg IPC object class
896 =item IPC::SysV::Semaphore
898 SysV Semaphore IPC object class
902 A selection of general-utility list subroutines
904 =item Locale::Constants
906 Constants for Locale codes
908 =item Locale::Country
910 ISO codes for country identification (ISO 3166)
912 =item Locale::Currency
914 ISO three letter codes for currency identification (ISO 4217)
916 =item Locale::Language
918 ISO two letter codes for language identification (ISO 639)
920 =item Locale::Maketext
922 Framework for localization
924 =item Locale::Maketext::TPJ13
926 Article about software localization
930 ISO codes for script identification (ISO 15924)
934 Encoding and decoding of base64 strings
936 =item MIME::Base64::QuotedPrint
938 Encoding and decoding of quoted-printable strings
942 Arbitrary size floating point math package
946 Arbitrary size integer/float math package
948 =item Math::BigInt::Calc
950 Pure Perl module to support Math::BigInt
952 =item Math::BigInt::CalcEmu
954 Emulate low-level math with BigInt code
958 Arbitrary big rational numbers
962 Complex numbers and associated mathematical functions
966 Trigonometric functions
970 Make functions faster by trading space for time
972 =item Memoize::AnyDBM_File
974 Glue to provide EXISTS for AnyDBM_File for Storable use
976 =item Memoize::Expire
978 Plug-in module for automatic expiration of memoized values
980 =item Memoize::ExpireFile
982 Test for Memoize expiration semantics
984 =item Memoize::ExpireTest
986 Test for Memoize expiration semantics
988 =item Memoize::NDBM_File
990 Glue to provide EXISTS for NDBM_File for Storable use
992 =item Memoize::SDBM_File
994 Glue to provide EXISTS for SDBM_File for Storable use
996 =item Memoize::Storable
998 Store Memoized data in Storable database
1002 Tied access to ndbm files
1006 Provide a pseudo-class NEXT (et al) that allows method redispatch
1010 Network Command class (as used by FTP, SMTP etc)
1014 Local configuration data for libnet
1018 Attempt to evaluate the current host's internet name and domain
1030 OO interface to users netrc file
1034 Post Office Protocol 3 Client class (RFC1939)
1038 Check a remote host for reachability
1042 Simple Mail Transfer Protocol Client
1046 Time and daytime network client interface
1050 By-name interface to Perl's built-in gethost*() functions
1052 =item Net::libnetFAQ
1054 Libnet Frequently Asked Questions
1058 By-name interface to Perl's built-in getnet*() functions
1062 By-name interface to Perl's built-in getproto*() functions
1066 By-name interface to Perl's built-in getserv*() functions
1070 Generic interface to Perl Compiler backends
1074 Tied access to odbm files
1078 Disable named opcodes when compiling perl code
1082 Perl interface to IEEE Std 1003.1
1086 On demand loader for PerlIO layers and root of PerlIO::* name space
1088 =item PerlIO::encoding
1092 =item PerlIO::scalar
1094 In-memory IO, scalar IO
1098 Helper class for PerlIO layers implemented in perl
1100 =item PerlIO::via::QuotedPrint
1102 PerlIO layer for quoted-printable strings
1106 Check pod documents for syntax errors
1110 Find POD documents in directory trees
1112 =item Pod::Functions
1114 Group Perl's functions a la perlfunc.pod
1118 Module to convert pod files to HTML
1120 =item Pod::InputObjects
1122 Objects representing POD input paragraphs, commands, etc.
1126 Convert Pod data to formatted Latex
1130 Convert POD data to formatted *roff input
1132 =item Pod::ParseLink
1134 Parse an LE<lt>E<gt> formatting code in POD text
1136 =item Pod::ParseUtils
1138 Helpers for POD parsing and conversion
1142 Base class for creating POD filters and translators
1144 =item Pod::Perldoc::ToChecker
1146 Let Perldoc check Pod for errors
1148 =item Pod::Perldoc::ToMan
1150 Let Perldoc render Pod as man pages
1152 =item Pod::Perldoc::ToNroff
1154 Let Perldoc convert Pod to nroff
1156 =item Pod::Perldoc::ToPod
1158 Let Perldoc render Pod as ... Pod!
1160 =item Pod::Perldoc::ToRtf
1162 Let Perldoc render Pod as RTF
1164 =item Pod::Perldoc::ToText
1166 Let Perldoc render Pod as plaintext
1168 =item Pod::Perldoc::ToTk
1170 Let Perldoc use Tk::Pod to render Pod
1172 =item Pod::Perldoc::ToXml
1174 Let Perldoc render Pod as XML
1176 =item Pod::PlainText
1178 Convert POD data to formatted ASCII text
1182 Perl extension for converting Pod to old style Pod.
1186 Extract selected sections of POD from input
1190 Convert POD data to formatted ASCII text
1192 =item Pod::Text::Color
1194 Convert POD data to formatted color ASCII text
1196 =item Pod::Text::Overstrike
1198 Convert POD data to formatted overstrike text
1200 =item Pod::Text::Termcap
1202 Convert POD data to ASCII text with format escapes
1206 Print a usage message from embedded pod documentation
1210 Tied access to sdbm files
1214 Compile and execute code in restricted compartments
1218 A selection of general-utility scalar subroutines
1222 Search for key in dictionary file
1226 Save and restore selected file handle
1230 Load functions only on demand
1234 Run shell commands transparently within perl
1238 Load the C socket.h defines and structure manipulators
1242 Persistence for Perl data structures
1246 A switch statement for Perl
1250 Manipulate Perl symbols and their names
1254 Try every conceivable way to get hostname
1258 Perl interface to the UNIX syslog(3) calls
1260 =item Term::ANSIColor
1262 Color screen output using ANSI escape sequences
1266 Perl termcap interface
1268 =item Term::Complete
1270 Perl word completion module
1272 =item Term::ReadLine
1274 Perl interface to various C<readline> packages.
1278 Provides a simple framework for writing test scripts
1282 Backend for building test libraries
1284 =item Test::Builder::Module
1286 Base class for test modules
1288 =item Test::Builder::Tester
1290 Test testsuites that have been built with
1292 =item Test::Builder::Tester::Color
1294 Turn on colour in Test::Builder::Tester
1298 Run Perl standard test scripts with statistics
1300 =item Test::Harness::Assert
1304 =item Test::Harness::Iterator
1306 Internal Test::Harness Iterator
1308 =item Test::Harness::Point
1310 Object for tracking a single test point
1312 =item Test::Harness::Straps
1314 Detailed analysis of test results
1316 =item Test::Harness::TAP
1318 Documentation for the TAP format
1322 Yet another framework for writing test scripts
1326 Basic utilities for writing tests.
1328 =item Test::Tutorial
1330 A tutorial about writing really basic tests
1334 Create an abbreviation table from a list
1336 =item Text::Balanced
1338 Extract delimited text sequences from strings.
1340 =item Text::ParseWords
1342 Parse text into an array of tokens or array of arrays
1346 Implementation of the Soundex Algorithm as Described by Knuth
1350 Expand and unexpand tabs per the unix expand(1) and unexpand(1)
1354 Line wrapping to form simple paragraphs
1358 Manipulate threads in Perl (for old code only)
1364 =item Thread::Semaphore
1366 Thread-safe semaphores
1368 =item Thread::Signal
1370 Start a thread which runs signal handlers reliably (for old code)
1372 =item Thread::Specific
1374 Thread-specific keys
1378 Base class for tied arrays
1382 Access the lines of a disk file via a Perl array
1386 Base class definitions for tied handles
1390 Base class definitions for tied hashes
1394 Add data to hash when needed
1398 Use references as hash keys
1402 Base class definitions for tied scalars
1404 =item Tie::SubstrHash
1406 Fixed-table-size, fixed-key-length hashing
1410 High resolution alarm, sleep, gettimeofday, interval timers
1414 Efficiently compute time from local and GMT time
1418 By-name interface to Perl's built-in gmtime() function
1420 =item Time::localtime
1422 By-name interface to Perl's built-in localtime() function
1426 Internal object used by Time::gmtime and Time::localtime
1430 Base class for ALL classes (blessed references)
1432 =item Unicode::Collate
1434 Unicode Collation Algorithm
1436 =item Unicode::Normalize
1438 Unicode Normalization Forms
1442 Unicode character database
1446 By-name interface to Perl's built-in getgr*() functions
1450 By-name interface to Perl's built-in getpw*() functions
1458 Module to test the XS typemaps distributed with perl
1462 Dynamically load C libraries into Perl code
1466 To find out I<all> modules installed on your system, including
1467 those without documentation or outside the standard release,
1468 just use the following command (under the default win32 shell,
1469 double quotes should be used instead of single quotes).
1471 % perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \
1472 'find { wanted => sub { print canonpath $_ if /\.pm\z/ },
1473 no_chdir => 1 }, @INC'
1475 (The -T is here to prevent '.' from being listed in @INC.)
1476 They should all have their own documentation installed and accessible
1477 via your system man(1) command. If you do not have a B<find>
1478 program, you can use the Perl B<find2perl> program instead, which
1479 generates Perl code as output you can run through perl. If you
1480 have a B<man> program but it doesn't find your modules, you'll have
1481 to fix your manpath. See L<perl> for details. If you have no
1482 system B<man> command, you might try the B<perldoc> program.
1484 Note also that the command C<perldoc perllocal> gives you a (possibly
1485 incomplete) list of the modules that have been further installed on
1486 your system. (The perllocal.pod file is updated by the standard MakeMaker
1489 =head2 Extension Modules
1491 Extension modules are written in C (or a mix of Perl and C). They
1492 are usually dynamically loaded into Perl if and when you need them,
1493 but may also be linked in statically. Supported extension modules
1494 include Socket, Fcntl, and POSIX.
1496 Many popular C extension modules do not come bundled (at least, not
1497 completely) due to their sizes, volatility, or simply lack of time
1498 for adequate testing and configuration across the multitude of
1499 platforms on which Perl was beta-tested. You are encouraged to
1500 look for them on CPAN (described below), or using web search engines
1501 like Alta Vista or Google.
1505 CPAN stands for Comprehensive Perl Archive Network; it's a globally
1506 replicated trove of Perl materials, including documentation, style
1507 guides, tricks and traps, alternate ports to non-Unix systems and
1508 occasional binary distributions for these. Search engines for
1509 CPAN can be found at http://www.cpan.org/
1511 Most importantly, CPAN includes around a thousand unbundled modules,
1512 some of which require a C compiler to build. Major categories of
1519 Language Extensions and Documentation Tools
1527 Operating System Interfaces
1531 Networking, Device Control (modems) and InterProcess Communication
1535 Data Types and Data Type Utilities
1547 Interfaces to / Emulations of Other Programming Languages
1551 File Names, File Systems and File Locking (see also File Handles)
1555 String Processing, Language Text Processing, Parsing, and Searching
1559 Option, Argument, Parameter, and Configuration File Processing
1563 Internationalization and Locale
1567 Authentication, Security, and Encryption
1571 World Wide Web, HTML, HTTP, CGI, MIME
1575 Server and Daemon Utilities
1579 Archiving and Compression
1583 Images, Pixmap and Bitmap Manipulation, Drawing, and Graphing
1587 Mail and Usenet News
1591 Control Flow Utilities (callbacks and exceptions etc)
1595 File Handle and Input/Output Stream Utilities
1599 Miscellaneous Modules
1603 The list of the registered CPAN sites as of this writing follows.
1604 Please note that the sorting order is alphabetical on fields:
1610 |-->[state/province]
1616 and thus the North American servers happen to be listed between the
1617 European and the South American sites.
1619 You should try to choose one close to you.
1627 http://ftp.rucus.ru.ac.za/pub/perl/CPAN/
1628 ftp://ftp.rucus.ru.ac.za/pub/perl/CPAN/
1629 ftp://ftp.is.co.za/programming/perl/CPAN/
1630 ftp://ftp.saix.net/pub/CPAN/
1631 ftp://ftp.sun.ac.za/CPAN/CPAN/
1641 http://cpan.linuxforum.net/
1642 http://cpan.shellhung.org/
1643 ftp://ftp.shellhung.org/pub/CPAN
1644 ftp://mirrors.hknet.com/CPAN
1648 http://mirrors.tf.itb.ac.id/cpan/
1649 http://cpan.cbn.net.id/
1650 ftp://ftp.cbn.net.id/mirror/CPAN
1654 ftp://ftp.iglu.org.il/pub/CPAN/
1655 http://cpan.lerner.co.il/
1656 http://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/
1657 ftp://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/
1661 ftp://ftp.u-aizu.ac.jp/pub/CPAN
1662 ftp://ftp.kddlabs.co.jp/CPAN/
1663 ftp://ftp.ayamura.org/pub/CPAN/
1664 ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/
1666 ftp://ftp.cpan.jp/CPAN/
1667 ftp://ftp.dti.ad.jp/pub/lang/CPAN/
1668 ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/
1672 http://cpan.MyBSD.org.my
1673 http://mirror.leafbug.org/pub/CPAN
1674 http://ossig.mncc.com.my/mirror/pub/CPAN
1676 =item Russian Federation
1678 http://cpan.tomsk.ru
1679 ftp://cpan.tomsk.ru/
1683 ftp://ftp.isu.net.sa/pub/CPAN/
1687 http://CPAN.en.com.sg/
1688 ftp://cpan.en.com.sg/
1689 http://mirror.averse.net/pub/CPAN
1690 ftp://mirror.averse.net/pub/CPAN
1691 http://cpan.oss.eznetsols.org
1692 ftp://ftp.oss.eznetsols.org/cpan
1696 http://CPAN.bora.net/
1697 ftp://ftp.bora.net/pub/CPAN/
1698 http://mirror.kr.FreeBSD.org/CPAN
1699 ftp://ftp.kr.FreeBSD.org/pub/CPAN
1703 ftp://ftp.nctu.edu.tw/UNIX/perl/CPAN
1704 http://cpan.cdpa.nsysu.edu.tw/
1705 ftp://cpan.cdpa.nsysu.edu.tw/pub/CPAN
1706 http://ftp.isu.edu.tw/pub/CPAN
1707 ftp://ftp.isu.edu.tw/pub/CPAN
1708 ftp://ftp1.sinica.edu.tw/pub1/perl/CPAN/
1709 http://ftp.tku.edu.tw/pub/CPAN/
1710 ftp://ftp.tku.edu.tw/pub/CPAN/
1714 ftp://ftp.loxinfo.co.th/pub/cpan/
1715 ftp://ftp.cs.riubon.ac.th/pub/mirrors/CPAN/
1719 =head2 Central America
1725 http://ftp.ucr.ac.cr/Unix/CPAN/
1726 ftp://ftp.ucr.ac.cr/pub/Unix/CPAN/
1736 http://cpan.inode.at/
1738 ftp://ftp.tuwien.ac.at/pub/CPAN/
1742 http://ftp.easynet.be/pub/CPAN/
1743 ftp://ftp.easynet.be/pub/CPAN/
1744 http://cpan.skynet.be
1745 ftp://ftp.cpan.skynet.be/pub/CPAN
1746 ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/
1748 =item Bosnia and Herzegovina
1750 http://cpan.blic.net/
1754 http://cpan.online.bg
1755 ftp://cpan.online.bg/cpan
1756 http://cpan.zadnik.org
1757 ftp://ftp.zadnik.org/mirrors/CPAN/
1758 http://cpan.lirex.net/
1759 ftp://ftp.lirex.net/pub/mirrors/CPAN
1763 http://ftp.linux.hr/pub/CPAN/
1764 ftp://ftp.linux.hr/pub/CPAN/
1766 =item Czech Republic
1768 ftp://ftp.fi.muni.cz/pub/CPAN/
1769 ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.funet.fi/pub/languages/perl/CPAN/
1773 http://mirrors.sunsite.dk/cpan/
1774 ftp://sunsite.dk/mirrors/cpan/
1775 http://cpan.cybercity.dk
1776 http://www.cpan.dk/CPAN/
1777 ftp://www.cpan.dk/ftp.cpan.org/CPAN/
1781 ftp://ftp.ut.ee/pub/languages/perl/CPAN/
1785 ftp://ftp.funet.fi/pub/languages/perl/CPAN/
1786 http://mirror.eunet.fi/CPAN
1790 http://www.enstimac.fr/Perl/CPAN
1791 http://ftp.u-paris10.fr/perl/CPAN
1792 ftp://ftp.u-paris10.fr/perl/CPAN
1793 http://cpan.mirrors.easynet.fr/
1794 ftp://cpan.mirrors.easynet.fr/pub/ftp.cpan.org/
1795 ftp://ftp.club-internet.fr/pub/perl/CPAN/
1797 ftp://ftp.lip6.fr/pub/perl/CPAN/
1798 ftp://ftp.oleane.net/pub/mirrors/CPAN/
1799 ftp://ftp.pasteur.fr/pub/computing/CPAN/
1800 http://mir2.ovh.net/ftp.cpan.org
1801 ftp://mir1.ovh.net/ftp.cpan.org
1802 http://ftp.crihan.fr/mirrors/ftp.cpan.org/
1803 ftp://ftp.crihan.fr/mirrors/ftp.cpan.org/
1804 http://ftp.u-strasbg.fr/CPAN
1805 ftp://ftp.u-strasbg.fr/CPAN
1806 ftp://cpan.cict.fr/pub/CPAN/
1807 ftp://ftp.uvsq.fr/pub/perl/CPAN/
1811 ftp://ftp.rub.de/pub/CPAN/
1812 ftp://ftp.freenet.de/pub/ftp.cpan.org/pub/CPAN/
1813 ftp://ftp.uni-erlangen.de/pub/source/CPAN/
1814 ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/CPAN
1815 http://pandemonium.tiscali.de/pub/CPAN/
1816 ftp://pandemonium.tiscali.de/pub/CPAN/
1817 http://ftp.gwdg.de/pub/languages/perl/CPAN/
1818 ftp://ftp.gwdg.de/pub/languages/perl/CPAN/
1819 ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/
1820 ftp://ftp.leo.org/pub/CPAN/
1821 http://cpan.noris.de/
1822 ftp://cpan.noris.de/pub/CPAN/
1823 ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/
1824 ftp://ftp.gmd.de/mirrors/CPAN/
1828 ftp://ftp.acn.gr/pub/lang/perl
1829 ftp://ftp.forthnet.gr/pub/languages/perl/CPAN
1830 ftp://ftp.ntua.gr/pub/lang/perl/
1834 http://ftp.kfki.hu/packages/perl/CPAN/
1835 ftp://ftp.kfki.hu/pub/packages/perl/CPAN/
1839 http://ftp.rhnet.is/pub/CPAN/
1840 ftp://ftp.rhnet.is/pub/CPAN/
1844 http://cpan.indigo.ie/
1845 ftp://cpan.indigo.ie/pub/CPAN/
1846 http://ftp.heanet.ie/mirrors/ftp.perl.org/pub/CPAN
1847 ftp://ftp.heanet.ie/mirrors/ftp.perl.org/pub/CPAN
1848 http://sunsite.compapp.dcu.ie/pub/perl/
1849 ftp://sunsite.compapp.dcu.ie/pub/perl/
1853 http://cpan.nettuno.it/
1854 http://gusp.dyndns.org/CPAN/
1855 ftp://gusp.dyndns.org/pub/CPAN
1856 http://softcity.iol.it/cpan
1857 ftp://softcity.iol.it/pub/cpan
1858 ftp://ftp.unina.it/pub/Other/CPAN/CPAN/
1859 ftp://ftp.unipi.it/pub/mirror/perl/CPAN/
1860 ftp://cis.uniRoma2.it/CPAN/
1861 ftp://ftp.edisontel.it/pub/CPAN_Mirror/
1862 http://cpan.flashnet.it/
1863 ftp://ftp.flashnet.it/pub/CPAN/
1867 http://kvin.lv/pub/CPAN/
1871 ftp://ftp.unix.lt/pub/CPAN/
1875 ftp://download.xs4all.nl/pub/mirror/CPAN/
1876 ftp://ftp.nl.uu.net/pub/CPAN/
1877 ftp://ftp.nluug.nl/pub/languages/perl/CPAN/
1878 http://cpan.cybercomm.nl/
1879 ftp://mirror.cybercomm.nl/pub/CPAN
1880 ftp://mirror.vuurwerk.nl/pub/CPAN/
1881 ftp://ftp.cpan.nl/pub/CPAN/
1882 http://ftp.easynet.nl/mirror/CPAN
1883 ftp://ftp.easynet.nl/mirror/CPAN
1884 http://archive.cs.uu.nl/mirror/CPAN/
1885 ftp://ftp.cs.uu.nl/mirror/CPAN/
1889 ftp://ftp.uninett.no/pub/languages/perl/CPAN
1890 ftp://ftp.uit.no/pub/languages/perl/cpan/
1894 ftp://ftp.mega.net.pl/CPAN
1895 ftp://ftp.man.torun.pl/pub/doc/CPAN/
1896 ftp://sunsite.icm.edu.pl/pub/CPAN/
1900 ftp://ftp.ua.pt/pub/CPAN/
1901 ftp://perl.di.uminho.pt/pub/CPAN/
1902 http://cpan.dei.uc.pt/
1903 ftp://ftp.dei.uc.pt/pub/CPAN
1904 ftp://ftp.nfsi.pt/pub/CPAN
1905 http://ftp.linux.pt/pub/mirrors/CPAN
1906 ftp://ftp.linux.pt/pub/mirrors/CPAN
1908 ftp://cpan.ip.pt/pub/cpan/
1909 http://cpan.telepac.pt/
1910 ftp://ftp.telepac.pt/pub/cpan/
1914 ftp://ftp.bio-net.ro/pub/CPAN
1915 ftp://ftp.kappa.ro/pub/mirrors/ftp.perl.org/pub/CPAN/
1916 ftp://ftp.lug.ro/CPAN
1917 ftp://ftp.roedu.net/pub/CPAN/
1918 ftp://ftp.dntis.ro/pub/cpan/
1919 ftp://ftp.iasi.roedu.net/pub/mirrors/ftp.cpan.org/
1920 http://cpan.ambra.ro/
1921 ftp://ftp.ambra.ro/pub/CPAN
1922 ftp://ftp.dnttm.ro/pub/CPAN/
1923 ftp://ftp.lasting.ro/pub/CPAN
1924 ftp://ftp.timisoara.roedu.net/mirrors/CPAN/
1928 ftp://ftp.chg.ru/pub/lang/perl/CPAN/
1929 http://cpan.rinet.ru/
1930 ftp://cpan.rinet.ru/pub/mirror/CPAN/
1931 ftp://ftp.aha.ru/pub/CPAN/
1932 ftp://ftp.corbina.ru/pub/CPAN/
1933 http://cpan.sai.msu.ru/
1934 ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/
1938 ftp://ftp.cvt.stuba.sk/pub/CPAN/
1942 ftp://ftp.arnes.si/software/perl/CPAN/
1946 http://cpan.imasd.elmundo.es/
1947 ftp://ftp.rediris.es/mirror/CPAN/
1948 ftp://ftp.ri.telefonica-data.net/CPAN
1949 ftp://ftp.etse.urv.es/pub/perl/
1953 http://ftp.du.se/CPAN/
1954 ftp://ftp.du.se/pub/CPAN/
1955 http://mirror.dataphone.se/CPAN
1956 ftp://mirror.dataphone.se/pub/CPAN
1957 ftp://ftp.sunet.se/pub/lang/perl/CPAN/
1961 http://cpan.mirror.solnet.ch/
1962 ftp://ftp.solnet.ch/mirror/CPAN/
1963 ftp://ftp.danyk.ch/CPAN/
1964 ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
1968 http://ftp.ulak.net.tr/perl/CPAN/
1969 ftp://ftp.ulak.net.tr/perl/CPAN
1970 ftp://sunsite.bilkent.edu.tr/pub/languages/CPAN/
1976 ftp://ftp.perl.org.ua/pub/CPAN/
1977 http://no-more.kiev.ua/CPAN/
1978 ftp://no-more.kiev.ua/pub/CPAN/
1980 =item United Kingdom
1982 http://www.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN
1983 ftp://ftp.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN/
1984 http://cpan.teleglobe.net/
1985 ftp://cpan.teleglobe.net/pub/CPAN
1986 http://cpan.mirror.anlx.net/
1987 ftp://ftp.mirror.anlx.net/CPAN/
1988 http://cpan.etla.org/
1989 ftp://cpan.etla.org/pub/CPAN
1990 ftp://ftp.demon.co.uk/pub/CPAN/
1991 http://cpan.m.flirble.org/
1992 ftp://ftp.flirble.org/pub/languages/perl/CPAN/
1993 ftp://ftp.plig.org/pub/CPAN/
1994 http://cpan.hambule.co.uk/
1995 http://cpan.mirrors.clockerz.net/
1996 ftp://ftp.clockerz.net/pub/CPAN/
1997 ftp://usit.shef.ac.uk/pub/packages/CPAN/
2001 =head2 North America
2011 http://cpan.sunsite.ualberta.ca/
2012 ftp://cpan.sunsite.ualberta.ca/pub/CPAN/
2016 http://theoryx5.uwinnipeg.ca/pub/CPAN/
2017 ftp://theoryx5.uwinnipeg.ca/pub/CPAN/
2021 ftp://cpan.chebucto.ns.ca/pub/CPAN/
2025 ftp://ftp.nrc.ca/pub/CPAN/
2031 http://cpan.azc.uam.mx
2032 ftp://cpan.azc.uam.mx/mirrors/CPAN
2033 http://www.cpan.unam.mx/
2034 ftp://ftp.unam.mx/pub/CPAN
2035 http://www.msg.com.mx/CPAN/
2036 ftp://ftp.msg.com.mx/pub/CPAN/
2044 http://mirror.hiwaay.net/CPAN/
2045 ftp://mirror.hiwaay.net/CPAN/
2049 http://cpan.develooper.com/
2050 http://www.cpan.org/
2051 ftp://cpan.valueclick.com/pub/CPAN/
2052 http://www.mednor.net/ftp/pub/mirrors/CPAN/
2053 ftp://ftp.mednor.net/pub/mirrors/CPAN/
2054 http://mirrors.gossamer-threads.com/CPAN
2055 ftp://cpan.nas.nasa.gov/pub/perl/CPAN/
2056 http://mirrors.kernel.org/cpan/
2057 ftp://mirrors.kernel.org/pub/CPAN
2058 http://cpan-sj.viaverio.com/
2059 ftp://cpan-sj.viaverio.com/pub/CPAN/
2060 http://cpan.digisle.net/
2061 ftp://cpan.digisle.net/pub/CPAN
2062 http://www.perl.com/CPAN/
2063 http://www.uberlan.net/CPAN
2067 ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
2068 http://cpan.four10.com
2072 http://ftp.lug.udel.edu/pub/CPAN
2073 ftp://ftp.lug.udel.edu/pub/CPAN
2075 =item District of Columbia
2077 ftp://ftp.dc.aleron.net/pub/CPAN/
2081 ftp://ftp.cise.ufl.edu/pub/mirrors/CPAN/
2082 http://mirror.csit.fsu.edu/pub/CPAN/
2083 ftp://mirror.csit.fsu.edu/pub/CPAN/
2084 http://cpan.mirrors.nks.net/
2088 ftp://ftp.uwsg.iu.edu/pub/perl/CPAN/
2089 http://cpan.netnitco.net/
2090 ftp://cpan.netnitco.net/pub/mirrors/CPAN/
2091 http://archive.progeny.com/CPAN/
2092 ftp://archive.progeny.com/CPAN/
2093 http://fx.saintjoe.edu/pub/CPAN
2094 ftp://ftp.saintjoe.edu/pub/CPAN
2095 http://csociety-ftp.ecn.purdue.edu/pub/CPAN
2096 ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN
2100 http://cpan.uky.edu/
2101 ftp://cpan.uky.edu/pub/CPAN/
2102 http://slugsite.louisville.edu/cpan
2103 ftp://slugsite.louisville.edu/CPAN
2107 http://mirrors.towardex.com/CPAN
2108 ftp://mirrors.towardex.com/pub/CPAN
2109 ftp://ftp.ccs.neu.edu/net/mirrors/ftp.funet.fi/pub/languages/perl/CPAN/
2113 ftp://cpan.cse.msu.edu/
2114 http://cpan.calvin.edu/pub/CPAN
2115 ftp://cpan.calvin.edu/pub/CPAN
2119 http://www.oss.redundant.com/pub/CPAN
2120 ftp://www.oss.redundant.com/pub/CPAN
2124 http://ftp.cpanel.net/pub/CPAN/
2125 ftp://ftp.cpanel.net/pub/CPAN/
2126 http://cpan.teleglobe.net/
2127 ftp://cpan.teleglobe.net/pub/CPAN
2131 http://cpan.belfry.net/
2132 http://cpan.erlbaum.net/
2133 ftp://cpan.erlbaum.net/
2134 http://cpan.thepirtgroup.com/
2135 ftp://cpan.thepirtgroup.com/
2136 ftp://ftp.stealth.net/pub/CPAN/
2137 http://www.rge.com/pub/languages/perl/
2138 ftp://ftp.rge.com/pub/languages/perl/
2140 =item North Carolina
2142 http://www.ibiblio.org/pub/languages/perl/CPAN
2143 ftp://ftp.ibiblio.org/pub/languages/perl/CPAN
2144 ftp://ftp.duke.edu/pub/perl/
2145 ftp://ftp.ncsu.edu/pub/mirror/CPAN/
2149 ftp://ftp.ou.edu/mirrors/CPAN/
2153 ftp://ftp.orst.edu/pub/CPAN
2157 http://ftp.epix.net/CPAN/
2158 ftp://ftp.epix.net/pub/languages/perl/
2159 http://mirrors.phenominet.com/pub/CPAN/
2160 ftp://mirrors.phenominet.com/pub/CPAN/
2161 http://cpan.pair.com/
2162 ftp://cpan.pair.com/pub/CPAN/
2163 ftp://carroll.cac.psu.edu/pub/CPAN/
2167 ftp://ftp.sunsite.utk.edu/pub/CPAN/
2171 http://ftp.sedl.org/pub/mirrors/CPAN/
2172 http://www.binarycode.org/cpan
2173 ftp://mirror.telentente.com/pub/CPAN
2174 http://mirrors.theonlinerecordstore.com/CPAN
2178 ftp://mirror.xmission.com/CPAN/
2182 http://cpan-du.viaverio.com/
2183 ftp://cpan-du.viaverio.com/pub/CPAN/
2184 http://mirrors.rcn.net/pub/lang/CPAN/
2185 ftp://mirrors.rcn.net/pub/lang/CPAN/
2186 http://perl.secsup.org/
2187 ftp://perl.secsup.org/pub/perl/
2188 http://noc.cvaix.com/mirrors/CPAN/
2192 http://cpan.llarian.net/
2193 ftp://cpan.llarian.net/pub/CPAN/
2194 http://cpan.mirrorcentral.com/
2195 ftp://ftp.mirrorcentral.com/pub/CPAN/
2196 ftp://ftp-mirror.internap.com/pub/CPAN/
2200 http://mirror.sit.wisc.edu/pub/CPAN/
2201 ftp://mirror.sit.wisc.edu/pub/CPAN/
2202 http://mirror.aphix.com/CPAN
2203 ftp://mirror.aphix.com/pub/CPAN
2215 http://ftp.planetmirror.com/pub/CPAN/
2216 ftp://ftp.planetmirror.com/pub/CPAN/
2217 ftp://mirror.aarnet.edu.au/pub/perl/CPAN/
2218 ftp://cpan.topend.com.au/pub/CPAN/
2219 http://cpan.mirrors.ilisys.com.au
2223 ftp://ftp.auckland.ac.nz/pub/perl/CPAN/
2227 http://aniani.ifa.hawaii.edu/CPAN/
2228 ftp://aniani.ifa.hawaii.edu/CPAN/
2232 =head2 South America
2238 ftp://mirrors.bannerlandia.com.ar/mirrors/CPAN/
2239 http://www.linux.org.ar/mirrors/cpan
2240 ftp://ftp.linux.org.ar/mirrors/cpan
2244 ftp://cpan.pop-mg.com.br/pub/CPAN/
2245 ftp://ftp.matrix.com.br/pub/perl/CPAN/
2246 http://cpan.hostsul.com.br/
2247 ftp://cpan.hostsul.com.br/
2251 http://cpan.netglobalis.net/
2252 ftp://cpan.netglobalis.net/pub/CPAN/
2256 =head2 RSYNC Mirrors
2258 www.linux.org.ar::cpan
2259 theoryx5.uwinnipeg.ca::CPAN
2260 ftp.shellhung.org::CPAN
2261 rsync.nic.funet.fi::CPAN
2262 ftp.u-paris10.fr::CPAN
2264 rsync://ftp.crihan.fr::CPAN
2265 ftp.gwdg.de::FTP/languages/perl/CPAN/
2267 ftp.cbn.net.id::CPAN
2268 rsync://ftp.heanet.ie/mirrors/ftp.perl.org/pub/CPAN
2269 ftp.iglu.org.il::CPAN
2270 gusp.dyndns.org::cpan
2271 ftp.kddlabs.co.jp::cpan
2272 ftp.ayamura.org::pub/CPAN/
2273 mirror.leafbug.org::CPAN
2274 rsync.en.com.sg::CPAN
2275 mirror.averse.net::cpan
2276 rsync.oss.eznetsols.org
2277 ftp.kr.FreeBSD.org::CPAN
2279 cpan.cdpa.nsysu.edu.tw::CPAN
2280 cpan.teleglobe.net::CPAN
2281 rsync://rsync.mirror.anlx.net::CPAN
2284 cpan-du.viaverio.com::CPAN
2285 aniani.ifa.hawaii.edu::CPAN
2286 archive.progeny.com::CPAN
2287 rsync://slugsite.louisville.edu::CPAN
2288 mirror.aphix.com::CPAN
2289 cpan.teleglobe.net::CPAN
2290 ftp.lug.udel.edu::cpan
2291 mirrors.kernel.org::mirrors/CPAN
2292 mirrors.phenominet.com::CPAN
2294 cpan-sj.viaverio.com::CPAN
2295 mirror.csit.fsu.edu::CPAN
2296 csociety-ftp.ecn.purdue.edu::CPAN
2298 For an up-to-date listing of CPAN sites,
2299 see http://www.cpan.org/SITES or ftp://www.cpan.org/SITES .
2301 =head1 Modules: Creation, Use, and Abuse
2303 (The following section is borrowed directly from Tim Bunce's modules
2304 file, available at your nearest CPAN site.)
2306 Perl implements a class using a package, but the presence of a
2307 package doesn't imply the presence of a class. A package is just a
2308 namespace. A class is a package that provides subroutines that can be
2309 used as methods. A method is just a subroutine that expects, as its
2310 first argument, either the name of a package (for "static" methods),
2311 or a reference to something (for "virtual" methods).
2313 A module is a file that (by convention) provides a class of the same
2314 name (sans the .pm), plus an import method in that class that can be
2315 called to fetch exported symbols. This module may implement some of
2316 its methods by loading dynamic C or C++ objects, but that should be
2317 totally transparent to the user of the module. Likewise, the module
2318 might set up an AUTOLOAD function to slurp in subroutine definitions on
2319 demand, but this is also transparent. Only the F<.pm> file is required to
2320 exist. See L<perlsub>, L<perltoot>, and L<AutoLoader> for details about
2321 the AUTOLOAD mechanism.
2323 =head2 Guidelines for Module Creation
2329 Do similar modules already exist in some form?
2331 If so, please try to reuse the existing modules either in whole or
2332 by inheriting useful features into a new class. If this is not
2333 practical try to get together with the module authors to work on
2334 extending or enhancing the functionality of the existing modules.
2335 A perfect example is the plethora of packages in perl4 for dealing
2336 with command line options.
2338 If you are writing a module to expand an already existing set of
2339 modules, please coordinate with the author of the package. It
2340 helps if you follow the same naming scheme and module interaction
2341 scheme as the original author.
2345 Try to design the new module to be easy to extend and reuse.
2347 Try to C<use warnings;> (or C<use warnings qw(...);>).
2348 Remember that you can add C<no warnings qw(...);> to individual blocks
2349 of code that need less warnings.
2351 Use blessed references. Use the two argument form of bless to bless
2352 into the class name given as the first parameter of the constructor,
2357 return bless {}, $class;
2360 or even this if you'd like it to be used as either a static
2361 or a virtual method.
2365 my $class = ref($self) || $self;
2366 return bless {}, $class;
2369 Pass arrays as references so more parameters can be added later
2370 (it's also faster). Convert functions into methods where
2371 appropriate. Split large methods into smaller more flexible ones.
2372 Inherit methods from other modules if appropriate.
2374 Avoid class name tests like: C<die "Invalid" unless ref $ref eq 'FOO'>.
2375 Generally you can delete the C<eq 'FOO'> part with no harm at all.
2376 Let the objects look after themselves! Generally, avoid hard-wired
2377 class names as far as possible.
2379 Avoid C<< $r->Class::func() >> where using C<@ISA=qw(... Class ...)> and
2380 C<< $r->func() >> would work (see L<perlbot> for more details).
2382 Use autosplit so little used or newly added functions won't be a
2383 burden to programs that don't use them. Add test functions to
2384 the module after __END__ either using AutoSplit or by saying:
2386 eval join('',<main::DATA>) || die $@ unless caller();
2388 Does your module pass the 'empty subclass' test? If you say
2389 C<@SUBCLASS::ISA = qw(YOURCLASS);> your applications should be able
2390 to use SUBCLASS in exactly the same way as YOURCLASS. For example,
2391 does your application still work if you change: C<$obj = new YOURCLASS;>
2392 into: C<$obj = new SUBCLASS;> ?
2394 Avoid keeping any state information in your packages. It makes it
2395 difficult for multiple other packages to use yours. Keep state
2396 information in objects.
2400 Try to C<use strict;> (or C<use strict qw(...);>).
2401 Remember that you can add C<no strict qw(...);> to individual blocks
2402 of code that need less strictness.
2406 Follow the guidelines in the perlstyle(1) manual.
2412 Some simple style guidelines
2414 The perlstyle manual supplied with Perl has many helpful points.
2416 Coding style is a matter of personal taste. Many people evolve their
2417 style over several years as they learn what helps them write and
2418 maintain good code. Here's one set of assorted suggestions that
2419 seem to be widely used by experienced developers:
2421 Use underscores to separate words. It is generally easier to read
2422 $var_names_like_this than $VarNamesLikeThis, especially for
2423 non-native speakers of English. It's also a simple rule that works
2424 consistently with VAR_NAMES_LIKE_THIS.
2426 Package/Module names are an exception to this rule. Perl informally
2427 reserves lowercase module names for 'pragma' modules like integer
2428 and strict. Other modules normally begin with a capital letter and
2429 use mixed case with no underscores (need to be short and portable).
2431 You may find it helpful to use letter case to indicate the scope
2432 or nature of a variable. For example:
2434 $ALL_CAPS_HERE constants only (beware clashes with Perl vars)
2435 $Some_Caps_Here package-wide global/static
2436 $no_caps_here function scope my() or local() variables
2438 Function and method names seem to work best as all lowercase.
2439 e.g., C<< $obj->as_string() >>.
2441 You can use a leading underscore to indicate that a variable or
2442 function should not be used outside the package that defined it.
2446 Select what to export.
2448 Do NOT export method names!
2450 Do NOT export anything else by default without a good reason!
2452 Exports pollute the namespace of the module user. If you must
2453 export try to use @EXPORT_OK in preference to @EXPORT and avoid
2454 short or common names to reduce the risk of name clashes.
2456 Generally anything not exported is still accessible from outside the
2457 module using the ModuleName::item_name (or C<< $blessed_ref->method >>)
2458 syntax. By convention you can use a leading underscore on names to
2459 indicate informally that they are 'internal' and not for public use.
2461 (It is actually possible to get private functions by saying:
2462 C<my $subref = sub { ... }; &$subref;>. But there's no way to call that
2463 directly as a method, because a method must have a name in the symbol
2466 As a general rule, if the module is trying to be object oriented
2467 then export nothing. If it's just a collection of functions then
2468 @EXPORT_OK anything but use @EXPORT with caution.
2472 Select a name for the module.
2474 This name should be as descriptive, accurate, and complete as
2475 possible. Avoid any risk of ambiguity. Always try to use two or
2476 more whole words. Generally the name should reflect what is special
2477 about what the module does rather than how it does it. Please use
2478 nested module names to group informally or categorize a module.
2479 There should be a very good reason for a module not to have a nested name.
2480 Module names should begin with a capital letter.
2482 Having 57 modules all called Sort will not make life easy for anyone
2483 (though having 23 called Sort::Quick is only marginally better :-).
2484 Imagine someone trying to install your module alongside many others.
2485 If in any doubt ask for suggestions in comp.lang.perl.misc.
2487 If you are developing a suite of related modules/classes it's good
2488 practice to use nested classes with a common prefix as this will
2489 avoid namespace clashes. For example: Xyz::Control, Xyz::View,
2490 Xyz::Model etc. Use the modules in this list as a naming guide.
2492 If adding a new module to a set, follow the original author's
2493 standards for naming modules and the interface to methods in
2496 If developing modules for private internal or project specific use,
2497 that will never be released to the public, then you should ensure
2498 that their names will not clash with any future public module. You
2499 can do this either by using the reserved Local::* category or by
2500 using a category name that includes an underscore like Foo_Corp::*.
2502 To be portable each component of a module name should be limited to
2503 11 characters. If it might be used on MS-DOS then try to ensure each is
2504 unique in the first 8 characters. Nested modules make this easier.
2508 Have you got it right?
2510 How do you know that you've made the right decisions? Have you
2511 picked an interface design that will cause problems later? Have
2512 you picked the most appropriate name? Do you have any questions?
2514 The best way to know for sure, and pick up many helpful suggestions,
2515 is to ask someone who knows. Comp.lang.perl.misc is read by just about
2516 all the people who develop modules and it's the best place to ask.
2518 All you need to do is post a short summary of the module, its
2519 purpose and interfaces. A few lines on each of the main methods is
2520 probably enough. (If you post the whole module it might be ignored
2521 by busy people - generally the very people you want to read it!)
2523 Don't worry about posting if you can't say when the module will be
2524 ready - just say so in the message. It might be worth inviting
2525 others to help you, they may be able to complete it for you!
2529 README and other Additional Files.
2531 It's well known that software developers usually fully document the
2532 software they write. If, however, the world is in urgent need of
2533 your software and there is not enough time to write the full
2534 documentation please at least provide a README file containing:
2540 A description of the module/package/extension etc.
2544 A copyright notice - see below.
2548 Prerequisites - what else you may need to have.
2552 How to build it - possible changes to Makefile.PL etc.
2560 Recent changes in this release, especially incompatibilities
2564 Changes / enhancements you plan to make in the future.
2568 If the README file seems to be getting too large you may wish to
2569 split out some of the sections into separate files: INSTALL,
2576 Adding a Copyright Notice.
2578 How you choose to license your work is a personal decision.
2579 The general mechanism is to assert your Copyright and then make
2580 a declaration of how others may copy/use/modify your work.
2582 Perl, for example, is supplied with two types of licence: The GNU GPL
2583 and The Artistic Licence (see the files README, Copying, and Artistic,
2584 or L<perlgpl> and L<perlartistic>). Larry has good reasons for NOT
2585 just using the GNU GPL.
2587 My personal recommendation, out of respect for Larry, Perl, and the
2588 Perl community at large is to state something simply like:
2590 Copyright (c) 1995 Your Name. All rights reserved.
2591 This program is free software; you can redistribute it and/or
2592 modify it under the same terms as Perl itself.
2594 This statement should at least appear in the README file. You may
2595 also wish to include it in a Copying file and your source files.
2596 Remember to include the other words in addition to the Copyright.
2600 Give the module a version/issue/release number.
2602 To be fully compatible with the Exporter and MakeMaker modules you
2603 should store your module's version number in a non-my package
2604 variable called $VERSION. This should be a floating point
2605 number with at least two digits after the decimal (i.e., hundredths,
2606 e.g, C<$VERSION = "0.01">). Don't use a "1.3.2" style version.
2607 See L<Exporter> for details.
2609 It may be handy to add a function or method to retrieve the number.
2610 Use the number in announcements and archive file names when
2611 releasing the module (ModuleName-1.02.tar.Z).
2612 See perldoc ExtUtils::MakeMaker.pm for details.
2616 How to release and distribute a module.
2618 It's good idea to post an announcement of the availability of your
2619 module (or the module itself if small) to the comp.lang.perl.announce
2620 Usenet newsgroup. This will at least ensure very wide once-off
2623 If possible, register the module with CPAN. You should
2624 include details of its location in your announcement.
2626 Some notes about ftp archives: Please use a long descriptive file
2627 name that includes the version number. Most incoming directories
2628 will not be readable/listable, i.e., you won't be able to see your
2629 file after uploading it. Remember to send your email notification
2630 message as soon as possible after uploading else your file may get
2631 deleted automatically. Allow time for the file to be processed
2632 and/or check the file has been processed before announcing its
2635 FTP Archives for Perl Modules:
2637 Follow the instructions and links on:
2639 http://www.cpan.org/modules/00modlist.long.html
2640 http://www.cpan.org/modules/04pause.html
2642 or upload to one of these sites:
2644 https://pause.kbx.de/pause/
2645 http://pause.perl.org/pause/
2647 and notify <modules@perl.org>.
2649 By using the WWW interface you can ask the Upload Server to mirror
2650 your modules from your ftp or WWW site into your own directory on
2653 Please remember to send me an updated entry for the Module list!
2657 Take care when changing a released module.
2659 Always strive to remain compatible with previous released versions.
2660 Otherwise try to add a mechanism to revert to the
2661 old behavior if people rely on it. Document incompatible changes.
2667 =head2 Guidelines for Converting Perl 4 Library Scripts into Modules
2673 There is no requirement to convert anything.
2675 If it ain't broke, don't fix it! Perl 4 library scripts should
2676 continue to work with no problems. You may need to make some minor
2677 changes (like escaping non-array @'s in double quoted strings) but
2678 there is no need to convert a .pl file into a Module for just that.
2682 Consider the implications.
2684 All Perl applications that make use of the script will need to
2685 be changed (slightly) if the script is converted into a module. Is
2686 it worth it unless you plan to make other changes at the same time?
2690 Make the most of the opportunity.
2692 If you are going to convert the script to a module you can use the
2693 opportunity to redesign the interface. The guidelines for module
2694 creation above include many of the issues you should consider.
2698 The pl2pm utility will get you started.
2700 This utility will read *.pl files (given as parameters) and write
2701 corresponding *.pm files. The pl2pm utilities does the following:
2707 Adds the standard Module prologue lines
2711 Converts package specifiers from ' to ::
2715 Converts die(...) to croak(...)
2719 Several other minor changes
2723 Being a mechanical process pl2pm is not bullet proof. The converted
2724 code will need careful checking, especially any package statements.
2725 Don't delete the original .pl file till the new .pm one works!
2729 =head2 Guidelines for Reusing Application Code
2735 Complete applications rarely belong in the Perl Module Library.
2739 Many applications contain some Perl code that could be reused.
2741 Help save the world! Share your code in a form that makes it easy
2746 Break-out the reusable code into one or more separate module files.
2750 Take the opportunity to reconsider and redesign the interfaces.
2754 In some cases the 'application' can then be reduced to a small
2756 fragment of code built on top of the reusable modules. In these cases
2757 the application could invoked as:
2759 % perl -e 'use Module::Name; method(@ARGV)' ...
2761 % perl -mModule::Name ... (in perl5.002 or higher)
2767 Perl does not enforce private and public parts of its modules as you may
2768 have been used to in other languages like C++, Ada, or Modula-17. Perl
2769 doesn't have an infatuation with enforced privacy. It would prefer
2770 that you stayed out of its living room because you weren't invited, not
2771 because it has a shotgun.
2773 The module and its user have a contract, part of which is common law,
2774 and part of which is "written". Part of the common law contract is
2775 that a module doesn't pollute any namespace it wasn't asked to. The
2776 written contract for the module (A.K.A. documentation) may make other
2777 provisions. But then you know when you C<use RedefineTheWorld> that
2778 you're redefining the world and willing to take the consequences.