.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "PERLMODLIB 1"
.TH PERLMODLIB 1 "2002-11-24" "perl v5.8.0" "Perl Programmers Reference Guide"
.SH "NAME"
perlmodlib \- constructing new Perl modules and finding existing ones
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
.SH "THE PERL MODULE LIBRARY"
.IX Header "THE PERL MODULE LIBRARY"
Many modules are included the Perl distribution. These are described
below, and all end in \fI.pm\fR. You may discover compiled library
file (usually ending in \fI.so\fR) or small pieces of modules to be
autoloaded (ending in \fI.al\fR); these were automatically generated
by the installation process. You may also discover files in the
library directory that end in either \fI.pl\fR or \fI.ph\fR. These are
old libraries supplied so that old programs that use them still
run. The \fI.pl\fR files will all eventually be converted into standard
modules, and the \fI.ph\fR files made by \fBh2ph\fR will probably end up
as extension modules made by \fBh2xs\fR. (Some \fI.ph\fR values may
already be available through the \s-1POSIX\s0, Errno, or Fcntl modules.)
The \fBpl2pm\fR file in the distribution may help in your conversion,
but it's just a mechanical process and therefore far from bulletproof.
.Sh "Pragmatic Modules"
.IX Subsection "Pragmatic Modules"
They work somewhat like compiler directives (pragmata) in that they
tend to affect the compilation of your program, and thus will usually
work well only when used within a \f(CW\*(C`use\*(C'\fR, or \f(CW\*(C`no\*(C'\fR. Most of these
are lexically scoped, so an inner \s-1BLOCK\s0 may countermand them
by saying:
.PP
.Vb 3
\& no integer;
\& no strict 'refs';
\& no warnings;
.Ve
.PP
which lasts until the end of that \s-1BLOCK\s0.
.PP
Some pragmas are lexically scoped\*(--typically those that affect the
\&\f(CW$^H\fR hints variable. Others affect the current package instead,
like \f(CW\*(C`use vars\*(C'\fR and \f(CW\*(C`use subs\*(C'\fR, which allow you to predeclare a
variables or subroutines within a particular \fIfile\fR rather than
just a block. Such declarations are effective for the entire file
for which they were declared. You cannot rescind them with \f(CW\*(C`no
vars\*(C'\fR or \f(CW\*(C`no subs\*(C'\fR.
.PP
The following pragmas are defined (and have their own documentation).
.IP "attributes" 12
.IX Item "attributes"
Get/set subroutine or variable attributes
.IP "attrs" 12
.IX Item "attrs"
Set/get attributes of a subroutine (deprecated)
.IP "autouse" 12
.IX Item "autouse"
Postpone load of modules until a function is used
.IP "base" 12
.IX Item "base"
Establish IS-A relationship with base class at compile time
.IP "bigint" 12
.IX Item "bigint"
Transparent big integer support for Perl
.IP "bignum" 12
.IX Item "bignum"
Transparent BigNumber support for Perl
.IP "bigrat" 12
.IX Item "bigrat"
Transparent BigNumber/BigRational support for Perl
.IP "blib" 12
.IX Item "blib"
Use MakeMaker's uninstalled version of a package
.IP "bytes" 12
.IX Item "bytes"
Force byte semantics rather than character semantics
.IP "charnames" 12
.IX Item "charnames"
Define character names for \f(CW\*(C`\eN{named}\*(C'\fR string literal escapes
.IP "constant" 12
.IX Item "constant"
Declare constants
.IP "diagnostics" 12
.IX Item "diagnostics"
Perl compiler pragma to force verbose warning diagnostics
.IP "encoding" 12
.IX Item "encoding"
Allows you to write your script in non-ascii or non\-utf8
.IP "fields" 12
.IX Item "fields"
Compile-time class fields
.IP "filetest" 12
.IX Item "filetest"
Control the filetest permission operators
.IP "if" 12
.IX Item "if"
\&\f(CW\*(C`use\*(C'\fR a Perl module if a condition holds
.IP "integer" 12
.IX Item "integer"
Use integer arithmetic instead of floating point
.IP "less" 12
.IX Item "less"
Request less of something from the compiler
.IP "locale" 12
.IX Item "locale"
Use and avoid \s-1POSIX\s0 locales for built-in operations
.IP "open" 12
.IX Item "open"
Set default PerlIO layers for input and output
.IP "ops" 12
.IX Item "ops"
Restrict unsafe operations when compiling
.IP "overload" 12
.IX Item "overload"
Package for overloading perl operations
.IP "re" 12
.IX Item "re"
Alter regular expression behaviour
.IP "sigtrap" 12
.IX Item "sigtrap"
Enable simple signal handling
.IP "sort" 12
.IX Item "sort"
Control \fIsort()\fR behaviour
.IP "strict" 12
.IX Item "strict"
Restrict unsafe constructs
.IP "subs" 12
.IX Item "subs"
Predeclare sub names
.IP "threads" 12
.IX Item "threads"
Perl extension allowing use of interpreter based threads from perl
.IP "utf8" 12
.IX Item "utf8"
Enable/disable \s-1UTF\-8\s0 (or \s-1UTF\-EBCDIC\s0) in source code
.IP "vars" 12
.IX Item "vars"
Predeclare global variable names (obsolete)
.IP "vmsish" 12
.IX Item "vmsish"
Control VMS-specific language features
.IP "warnings" 12
.IX Item "warnings"
Control optional warnings
.IP "warnings::register" 12
.IX Item "warnings::register"
Warnings import function
.Sh "Standard Modules"
.IX Subsection "Standard Modules"
Standard, bundled modules are all expected to behave in a well-defined
manner with respect to namespace pollution because they use the
Exporter module. See their own documentation for details.
.IP "AnyDBM_File" 12
.IX Item "AnyDBM_File"
Provide framework for multiple DBMs
.IP "Attribute::Handlers" 12
.IX Item "Attribute::Handlers"
Simpler definition of attribute handlers
.IP "AutoLoader" 12
.IX Item "AutoLoader"
Load subroutines only on demand
.IP "AutoSplit" 12
.IX Item "AutoSplit"
Split a package for autoloading
.IP "B" 12
.IX Item "B"
The Perl Compiler
.IP "B::Asmdata" 12
.IX Item "B::Asmdata"
Autogenerated data about Perl ops, used to generate bytecode
.IP "B::Assembler" 12
.IX Item "B::Assembler"
Assemble Perl bytecode
.IP "B::Bblock" 12
.IX Item "B::Bblock"
Walk basic blocks
.IP "B::Bytecode" 12
.IX Item "B::Bytecode"
Perl compiler's bytecode backend
.IP "B::C" 12
.IX Item "B::C"
Perl compiler's C backend
.IP "B::CC" 12
.IX Item "B::CC"
Perl compiler's optimized C translation backend
.IP "B::Concise" 12
.IX Item "B::Concise"
Walk Perl syntax tree, printing concise info about ops
.IP "B::Debug" 12
.IX Item "B::Debug"
Walk Perl syntax tree, printing debug info about ops
.IP "B::Deparse" 12
.IX Item "B::Deparse"
Perl compiler backend to produce perl code
.IP "B::Disassembler" 12
.IX Item "B::Disassembler"
Disassemble Perl bytecode
.IP "B::Lint" 12
.IX Item "B::Lint"
Perl lint
.IP "B::Showlex" 12
.IX Item "B::Showlex"
Show lexical variables used in functions or files
.IP "B::Stackobj" 12
.IX Item "B::Stackobj"
Helper module for \s-1CC\s0 backend
.IP "B::Stash" 12
.IX Item "B::Stash"
Show what stashes are loaded
.IP "B::Terse" 12
.IX Item "B::Terse"
Walk Perl syntax tree, printing terse info about ops
.IP "B::Xref" 12
.IX Item "B::Xref"
Generates cross reference reports for Perl programs
.IP "Benchmark" 12
.IX Item "Benchmark"
Benchmark running times of Perl code
.IP "ByteLoader" 12
.IX Item "ByteLoader"
Load byte compiled perl code
.IP "\s-1CGI\s0" 12
.IX Item "CGI"
Simple Common Gateway Interface Class
.IP "CGI::Apache" 12
.IX Item "CGI::Apache"
Backward compatibility module for \s-1CGI\s0.pm
.IP "CGI::Carp" 12
.IX Item "CGI::Carp"
\&\s-1CGI\s0 routines for writing to the \s-1HTTPD\s0 (or other) error log
.IP "CGI::Cookie" 12
.IX Item "CGI::Cookie"
Interface to Netscape Cookies
.IP "CGI::Fast" 12
.IX Item "CGI::Fast"
\&\s-1CGI\s0 Interface for Fast \s-1CGI\s0
.IP "CGI::Pretty" 12
.IX Item "CGI::Pretty"
Module to produce nicely formatted \s-1HTML\s0 code
.IP "CGI::Push" 12
.IX Item "CGI::Push"
Simple Interface to Server Push
.IP "CGI::Switch" 12
.IX Item "CGI::Switch"
Backward compatibility module for defunct CGI::Switch
.IP "CGI::Util" 12
.IX Item "CGI::Util"
Internal utilities used by \s-1CGI\s0 module
.IP "\s-1CPAN\s0" 12
.IX Item "CPAN"
Query, download and build perl modules from \s-1CPAN\s0 sites
.IP "CPAN::FirstTime" 12
.IX Item "CPAN::FirstTime"
Utility for CPAN::Config file Initialization
.IP "CPAN::Nox" 12
.IX Item "CPAN::Nox"
Wrapper around \s-1CPAN\s0.pm without using any \s-1XS\s0 module
.IP "Carp" 12
.IX Item "Carp"
Warn of errors (from perspective of caller)
.IP "Carp::Heavy" 12
.IX Item "Carp::Heavy"
No user serviceable parts inside
.IP "Class::ISA" 12
.IX Item "Class::ISA"
Report the search path for a class's \s-1ISA\s0 tree
.IP "Class::Struct" 12
.IX Item "Class::Struct"
Declare struct-like datatypes as Perl classes
.IP "Config" 12
.IX Item "Config"
Access Perl configuration information
.IP "Cwd" 12
.IX Item "Cwd"
Get pathname of current working directory
.IP "\s-1DB\s0" 12
.IX Item "DB"
Programmatic interface to the Perl debugging \s-1API\s0 (draft, subject to
.IP "DB_File" 12
.IX Item "DB_File"
Perl5 access to Berkeley \s-1DB\s0 version 1.x
.IP "Devel::SelfStubber" 12
.IX Item "Devel::SelfStubber"
Generate stubs for a SelfLoading module
.IP "Digest" 12
.IX Item "Digest"
Modules that calculate message digests
.IP "DirHandle" 12
.IX Item "DirHandle"
Supply object methods for directory handles
.IP "Dumpvalue" 12
.IX Item "Dumpvalue"
Provides screen dump of Perl data.
.IP "Encode" 12
.IX Item "Encode"
Character encodings
.IP "English" 12
.IX Item "English"
Use nice English (or awk) names for ugly punctuation variables
.IP "Env" 12
.IX Item "Env"
Perl module that imports environment variables as scalars or arrays
.IP "Errno" 12
.IX Item "Errno"
System errno constants
.IP "Exporter" 12
.IX Item "Exporter"
Implements default import method for modules
.IP "Exporter::Heavy" 12
.IX Item "Exporter::Heavy"
Exporter guts
.IP "ExtUtils::Command" 12
.IX Item "ExtUtils::Command"
Utilities to replace common \s-1UNIX\s0 commands in Makefiles etc.
.IP "ExtUtils::Command::MM" 12
.IX Item "ExtUtils::Command::MM"
Commands for the \s-1MM\s0's to use in Makefiles
.IP "ExtUtils::Constant" 12
.IX Item "ExtUtils::Constant"
Generate \s-1XS\s0 code to import C header constants
.IP "ExtUtils::Embed" 12
.IX Item "ExtUtils::Embed"
Utilities for embedding Perl in C/\*(C+ applications
.IP "ExtUtils::Install" 12
.IX Item "ExtUtils::Install"
Install files from here to there
.IP "ExtUtils::Installed" 12
.IX Item "ExtUtils::Installed"
Inventory management of installed modules
.IP "ExtUtils::Liblist" 12
.IX Item "ExtUtils::Liblist"
Determine libraries to use and how to use them
.IP "ExtUtils::MM" 12
.IX Item "ExtUtils::MM"
\&\s-1OS\s0 adjusted ExtUtils::MakeMaker subclass
.IP "ExtUtils::MM_Any" 12
.IX Item "ExtUtils::MM_Any"
Platform agnostic \s-1MM\s0 methods
.IP "ExtUtils::MM_BeOS" 12
.IX Item "ExtUtils::MM_BeOS"
Methods to override UN*X behaviour in ExtUtils::MakeMaker
.IP "ExtUtils::MM_Cygwin" 12
.IX Item "ExtUtils::MM_Cygwin"
Methods to override UN*X behaviour in ExtUtils::MakeMaker
.IP "ExtUtils::MM_DOS" 12
.IX Item "ExtUtils::MM_DOS"
\&\s-1DOS\s0 specific subclass of ExtUtils::MM_Unix
.IP "ExtUtils::MM_MacOS" 12
.IX Item "ExtUtils::MM_MacOS"
Methods to override UN*X behaviour in ExtUtils::MakeMaker
.IP "ExtUtils::MM_NW5" 12
.IX Item "ExtUtils::MM_NW5"
Methods to override UN*X behaviour in ExtUtils::MakeMaker
.IP "ExtUtils::MM_OS2" 12
.IX Item "ExtUtils::MM_OS2"
Methods to override UN*X behaviour in ExtUtils::MakeMaker
.IP "ExtUtils::MM_UWIN" 12
.IX Item "ExtUtils::MM_UWIN"
U/WIN specific subclass of ExtUtils::MM_Unix
.IP "ExtUtils::MM_Unix" 12
.IX Item "ExtUtils::MM_Unix"
Methods used by ExtUtils::MakeMaker
.IP "ExtUtils::MM_VMS" 12
.IX Item "ExtUtils::MM_VMS"
Methods to override UN*X behaviour in ExtUtils::MakeMaker
.IP "ExtUtils::MM_Win32" 12
.IX Item "ExtUtils::MM_Win32"
Methods to override UN*X behaviour in ExtUtils::MakeMaker
.IP "ExtUtils::MM_Win95" 12
.IX Item "ExtUtils::MM_Win95"
Method to customize MakeMaker for Win9X
.IP "ExtUtils::MY" 12
.IX Item "ExtUtils::MY"
ExtUtils::MakeMaker subclass for customization
.IP "ExtUtils::MakeMaker" 12
.IX Item "ExtUtils::MakeMaker"
Create an extension Makefile
.IP "ExtUtils::Manifest" 12
.IX Item "ExtUtils::Manifest"
Utilities to write and check a \s-1MANIFEST\s0 file
.IP "ExtUtils::Mkbootstrap" 12
.IX Item "ExtUtils::Mkbootstrap"
Make a bootstrap file for use by DynaLoader
.IP "ExtUtils::Mksymlists" 12
.IX Item "ExtUtils::Mksymlists"
Write linker options files for dynamic extension
.IP "ExtUtils::Packlist" 12
.IX Item "ExtUtils::Packlist"
Manage .packlist files
.IP "ExtUtils::testlib" 12
.IX Item "ExtUtils::testlib"
Add blib/* directories to \f(CW@INC\fR
.IP "Fatal" 12
.IX Item "Fatal"
Replace functions with equivalents which succeed or die
.IP "Fcntl" 12
.IX Item "Fcntl"
Load the C Fcntl.h defines
.IP "File::Basename" 12
.IX Item "File::Basename"
Split a pathname into pieces
.IP "File::CheckTree" 12
.IX Item "File::CheckTree"
Run many filetest checks on a tree
.IP "File::Compare" 12
.IX Item "File::Compare"
Compare files or filehandles
.IP "File::Copy" 12
.IX Item "File::Copy"
Copy files or filehandles
.IP "File::DosGlob" 12
.IX Item "File::DosGlob"
\&\s-1DOS\s0 like globbing and then some
.IP "File::Find" 12
.IX Item "File::Find"
Traverse a directory tree.
.IP "File::Path" 12
.IX Item "File::Path"
Create or remove directory trees
.IP "File::Spec" 12
.IX Item "File::Spec"
Portably perform operations on file names
.IP "File::Spec::Cygwin" 12
.IX Item "File::Spec::Cygwin"
Methods for Cygwin file specs
.IP "File::Spec::Epoc" 12
.IX Item "File::Spec::Epoc"
Methods for Epoc file specs
.IP "File::Spec::Functions" 12
.IX Item "File::Spec::Functions"
Portably perform operations on file names
.IP "File::Spec::Mac" 12
.IX Item "File::Spec::Mac"
File::Spec for Mac \s-1OS\s0 (Classic)
.IP "File::Spec::OS2" 12
.IX Item "File::Spec::OS2"
Methods for \s-1OS/2\s0 file specs
.IP "File::Spec::Unix" 12
.IX Item "File::Spec::Unix"
File::Spec for Unix, base for other File::Spec modules
.IP "File::Spec::VMS" 12
.IX Item "File::Spec::VMS"
Methods for \s-1VMS\s0 file specs
.IP "File::Spec::Win32" 12
.IX Item "File::Spec::Win32"
Methods for Win32 file specs
.IP "File::Temp" 12
.IX Item "File::Temp"
Return name and handle of a temporary file safely
.IP "File::stat" 12
.IX Item "File::stat"
By-name interface to Perl's built-in \fIstat()\fR functions
.IP "FileCache" 12
.IX Item "FileCache"
Keep more files open than the system permits
.IP "FileHandle" 12
.IX Item "FileHandle"
Supply object methods for filehandles
.IP "Filter::Simple" 12
.IX Item "Filter::Simple"
Simplified source filtering
.IP "FindBin" 12
.IX Item "FindBin"
Locate directory of original perl script
.IP "Getopt::Long" 12
.IX Item "Getopt::Long"
Extended processing of command line options
.IP "Getopt::Std" 12
.IX Item "Getopt::Std"
Process single-character switches with switch clustering
.IP "Hash::Util" 12
.IX Item "Hash::Util"
A selection of general-utility hash subroutines
.IP "I18N::Collate" 12
.IX Item "I18N::Collate"
Compare 8\-bit scalar data according to the current locale
.IP "I18N::LangTags" 12
.IX Item "I18N::LangTags"
Functions for dealing with RFC3066\-style language tags
.IP "I18N::LangTags::List" 12
.IX Item "I18N::LangTags::List"
Tags and names for human languages
.IP "\s-1IO\s0" 12
.IX Item "IO"
Load various \s-1IO\s0 modules
.IP "IPC::Open2" 12
.IX Item "IPC::Open2"
Open a process for both reading and writing
.IP "IPC::Open3" 12
.IX Item "IPC::Open3"
Open a process for reading, writing, and error handling
.IP "Locale::Constants" 12
.IX Item "Locale::Constants"
Constants for Locale codes
.IP "Locale::Country" 12
.IX Item "Locale::Country"
\&\s-1ISO\s0 codes for country identification (\s-1ISO\s0 3166)
.IP "Locale::Currency" 12
.IX Item "Locale::Currency"
\&\s-1ISO\s0 three letter codes for currency identification (\s-1ISO\s0 4217)
.IP "Locale::Language" 12
.IX Item "Locale::Language"
\&\s-1ISO\s0 two letter codes for language identification (\s-1ISO\s0 639)
.IP "Locale::Maketext" 12
.IX Item "Locale::Maketext"
Framework for localization
.IP "Locale::Maketext::TPJ13" 12
.IX Item "Locale::Maketext::TPJ13"
Article about software localization
.IP "Locale::Script" 12
.IX Item "Locale::Script"
\&\s-1ISO\s0 codes for script identification (\s-1ISO\s0 15924)
.IP "Math::BigFloat" 12
.IX Item "Math::BigFloat"
Arbitrary size floating point math package
.IP "Math::BigInt" 12
.IX Item "Math::BigInt"
Arbitrary size integer math package
.IP "Math::BigInt::Calc" 12
.IX Item "Math::BigInt::Calc"
Pure Perl module to support Math::BigInt
.IP "Math::BigRat" 12
.IX Item "Math::BigRat"
Arbitrarily big rationals
.IP "Math::Complex" 12
.IX Item "Math::Complex"
Complex numbers and associated mathematical functions
.IP "Math::Trig" 12
.IX Item "Math::Trig"
Trigonometric functions
.IP "Memoize" 12
.IX Item "Memoize"
Make functions faster by trading space for time
.IP "Memoize::AnyDBM_File" 12
.IX Item "Memoize::AnyDBM_File"
Glue to provide \s-1EXISTS\s0 for AnyDBM_File for Storable use
.IP "Memoize::Expire" 12
.IX Item "Memoize::Expire"
Plug-in module for automatic expiration of memoized values
.IP "Memoize::ExpireFile" 12
.IX Item "Memoize::ExpireFile"
Test for Memoize expiration semantics
.IP "Memoize::ExpireTest" 12
.IX Item "Memoize::ExpireTest"
Test for Memoize expiration semantics
.IP "Memoize::NDBM_File" 12
.IX Item "Memoize::NDBM_File"
Glue to provide \s-1EXISTS\s0 for NDBM_File for Storable use
.IP "Memoize::SDBM_File" 12
.IX Item "Memoize::SDBM_File"
Glue to provide \s-1EXISTS\s0 for SDBM_File for Storable use
.IP "Memoize::Storable" 12
.IX Item "Memoize::Storable"
Store Memoized data in Storable database
.IP "NDBM_File" 12
.IX Item "NDBM_File"
Tied access to ndbm files
.IP "\s-1NEXT\s0" 12
.IX Item "NEXT"
Provide a pseudo-class \s-1NEXT\s0 that allows method redispatch
.IP "Net::Cmd" 12
.IX Item "Net::Cmd"
Network Command class (as used by \s-1FTP\s0, \s-1SMTP\s0 etc)
.IP "Net::Config" 12
.IX Item "Net::Config"
Local configuration data for libnet
.IP "Net::Domain" 12
.IX Item "Net::Domain"
Attempt to evaluate the current host's internet name and domain
.IP "Net::FTP" 12
.IX Item "Net::FTP"
\&\s-1FTP\s0 Client class
.IP "Net::NNTP" 12
.IX Item "Net::NNTP"
\&\s-1NNTP\s0 Client class
.IP "Net::Netrc" 12
.IX Item "Net::Netrc"
\&\s-1OO\s0 interface to users netrc file
.IP "Net::POP3" 12
.IX Item "Net::POP3"
Post Office Protocol 3 Client class (\s-1RFC1939\s0)
.IP "Net::Ping" 12
.IX Item "Net::Ping"
Check a remote host for reachability
.IP "Net::SMTP" 12
.IX Item "Net::SMTP"
Simple Mail Transfer Protocol Client
.IP "Net::Time" 12
.IX Item "Net::Time"
Time and daytime network client interface
.IP "Net::hostent" 12
.IX Item "Net::hostent"
By-name interface to Perl's built-in gethost*() functions
.IP "Net::libnetFAQ" 12
.IX Item "Net::libnetFAQ"
Libnet Frequently Asked Questions
.IP "Net::netent" 12
.IX Item "Net::netent"
By-name interface to Perl's built-in getnet*() functions
.IP "Net::protoent" 12
.IX Item "Net::protoent"
By-name interface to Perl's built-in getproto*() functions
.IP "Net::servent" 12
.IX Item "Net::servent"
By-name interface to Perl's built-in getserv*() functions
.IP "O" 12
.IX Item "O"
Generic interface to Perl Compiler backends
.IP "ODBM_File" 12
.IX Item "ODBM_File"
Tied access to odbm files
.IP "Opcode" 12
.IX Item "Opcode"
Disable named opcodes when compiling perl code
.IP "\s-1POSIX\s0" 12
.IX Item "POSIX"
Perl interface to \s-1IEEE\s0 Std 1003.1
.IP "PerlIO" 12
.IX Item "PerlIO"
On demand loader for PerlIO layers and root of PerlIO::* name space
.IP "PerlIO::via::QuotedPrint" 12
.IX Item "PerlIO::via::QuotedPrint"
PerlIO layer for quoted-printable strings
.IP "Pod::Checker" 12
.IX Item "Pod::Checker"
Check pod documents for syntax errors
.IP "Pod::Find" 12
.IX Item "Pod::Find"
Find \s-1POD\s0 documents in directory trees
.IP "Pod::Functions" 12
.IX Item "Pod::Functions"
Group Perl's functions a la perlfunc.pod
.IP "Pod::Html" 12
.IX Item "Pod::Html"
Module to convert pod files to \s-1HTML\s0
.IP "Pod::InputObjects" 12
.IX Item "Pod::InputObjects"
Objects representing \s-1POD\s0 input paragraphs, commands, etc.
.IP "Pod::LaTeX" 12
.IX Item "Pod::LaTeX"
Convert Pod data to formatted Latex
.IP "Pod::Man" 12
.IX Item "Pod::Man"
Convert \s-1POD\s0 data to formatted *roff input
.IP "Pod::ParseLink" 12
.IX Item "Pod::ParseLink"
Parse an L<> formatting code in \s-1POD\s0 text
.IP "Pod::ParseUtils" 12
.IX Item "Pod::ParseUtils"
Helpers for \s-1POD\s0 parsing and conversion
.IP "Pod::Parser" 12
.IX Item "Pod::Parser"
Base class for creating \s-1POD\s0 filters and translators
.IP "Pod::Plainer" 12
.IX Item "Pod::Plainer"
Perl extension for converting Pod to old style Pod.
.IP "Pod::Select" 12
.IX Item "Pod::Select"
Extract selected sections of \s-1POD\s0 from input
.IP "Pod::Text" 12
.IX Item "Pod::Text"
Convert \s-1POD\s0 data to formatted \s-1ASCII\s0 text
.IP "Pod::Text::Color" 12
.IX Item "Pod::Text::Color"
Convert \s-1POD\s0 data to formatted color \s-1ASCII\s0 text
.IP "Pod::Text::Overstrike" 12
.IX Item "Pod::Text::Overstrike"
Convert \s-1POD\s0 data to formatted overstrike text
.IP "Pod::Text::Termcap" 12
.IX Item "Pod::Text::Termcap"
Convert \s-1POD\s0 data to \s-1ASCII\s0 text with format escapes
.IP "Pod::Usage" 12
.IX Item "Pod::Usage"
Print a usage message from embedded pod documentation
.IP "SDBM_File" 12
.IX Item "SDBM_File"
Tied access to sdbm files
.IP "Safe" 12
.IX Item "Safe"
Compile and execute code in restricted compartments
.IP "Search::Dict" 12
.IX Item "Search::Dict"
Search for key in dictionary file
.IP "SelectSaver" 12
.IX Item "SelectSaver"
Save and restore selected file handle
.IP "SelfLoader" 12
.IX Item "SelfLoader"
Load functions only on demand
.IP "Shell" 12
.IX Item "Shell"
Run shell commands transparently within perl
.IP "Socket" 12
.IX Item "Socket"
Load the C socket.h defines and structure manipulators
.IP "Storable" 12
.IX Item "Storable"
Persistence for Perl data structures
.IP "Switch" 12
.IX Item "Switch"
A switch statement for Perl
.IP "Symbol" 12
.IX Item "Symbol"
Manipulate Perl symbols and their names
.IP "Term::ANSIColor" 12
.IX Item "Term::ANSIColor"
Color screen output using \s-1ANSI\s0 escape sequences
.IP "Term::Cap" 12
.IX Item "Term::Cap"
Perl termcap interface
.IP "Term::Complete" 12
.IX Item "Term::Complete"
Perl word completion module
.IP "Term::ReadLine" 12
.IX Item "Term::ReadLine"
Perl interface to various \f(CW\*(C`readline\*(C'\fR packages. If
.IP "Test" 12
.IX Item "Test"
Provides a simple framework for writing test scripts
.IP "Test::Builder" 12
.IX Item "Test::Builder"
Backend for building test libraries
.IP "Test::Harness" 12
.IX Item "Test::Harness"
Run perl standard test scripts with statistics
.IP "Test::Harness::Assert" 12
.IX Item "Test::Harness::Assert"
Simple assert
.IP "Test::Harness::Iterator" 12
.IX Item "Test::Harness::Iterator"
Internal Test::Harness Iterator
.IP "Test::Harness::Straps" 12
.IX Item "Test::Harness::Straps"
Detailed analysis of test results
.IP "Test::More" 12
.IX Item "Test::More"
Yet another framework for writing test scripts
.IP "Test::Simple" 12
.IX Item "Test::Simple"
Basic utilities for writing tests.
.IP "Test::Tutorial" 12
.IX Item "Test::Tutorial"
A tutorial about writing really basic tests
.IP "Text::Abbrev" 12
.IX Item "Text::Abbrev"
Create an abbreviation table from a list
.IP "Text::Balanced" 12
.IX Item "Text::Balanced"
Extract delimited text sequences from strings.
.IP "Text::ParseWords" 12
.IX Item "Text::ParseWords"
Parse text into an array of tokens or array of arrays
.IP "Text::Soundex" 12
.IX Item "Text::Soundex"
Implementation of the Soundex Algorithm as Described by Knuth
.IP "Text::Tabs" 12
.IX Item "Text::Tabs"
Expand and unexpand tabs per the unix \fIexpand\fR\|(1) and \fIunexpand\fR\|(1)
.IP "Text::Wrap" 12
.IX Item "Text::Wrap"
Line wrapping to form simple paragraphs
.IP "Thread" 12
.IX Item "Thread"
Manipulate threads in Perl (for old code only)
.IP "Thread::Queue" 12
.IX Item "Thread::Queue"
Thread-safe queues
.IP "Thread::Semaphore" 12
.IX Item "Thread::Semaphore"
Thread-safe semaphores
.IP "Tie::Array" 12
.IX Item "Tie::Array"
Base class for tied arrays
.IP "Tie::File" 12
.IX Item "Tie::File"
Access the lines of a disk file via a Perl array
.IP "Tie::Handle" 12
.IX Item "Tie::Handle"
Base class definitions for tied handles
.IP "Tie::Hash" 12
.IX Item "Tie::Hash"
Base class definitions for tied hashes
.IP "Tie::Memoize" 12
.IX Item "Tie::Memoize"
Add data to hash when needed
.IP "Tie::RefHash" 12
.IX Item "Tie::RefHash"
Use references as hash keys
.IP "Tie::Scalar" 12
.IX Item "Tie::Scalar"
Base class definitions for tied scalars
.IP "Tie::SubstrHash" 12
.IX Item "Tie::SubstrHash"
Fixed\-table\-size, fixed-key-length hashing
.IP "Time::Local" 12
.IX Item "Time::Local"
Efficiently compute time from local and \s-1GMT\s0 time
.IP "Time::gmtime" 12
.IX Item "Time::gmtime"
By-name interface to Perl's built-in \fIgmtime()\fR function
.IP "Time::localtime" 12
.IX Item "Time::localtime"
By-name interface to Perl's built-in \fIlocaltime()\fR function
.IP "Time::tm" 12
.IX Item "Time::tm"
Internal object used by Time::gmtime and Time::localtime
.IP "\s-1UNIVERSAL\s0" 12
.IX Item "UNIVERSAL"
Base class for \s-1ALL\s0 classes (blessed references)
.IP "Unicode::Collate" 12
.IX Item "Unicode::Collate"
Unicode Collation Algorithm
.IP "Unicode::UCD" 12
.IX Item "Unicode::UCD"
Unicode character database
.IP "User::grent" 12
.IX Item "User::grent"
By-name interface to Perl's built-in getgr*() functions
.IP "User::pwent" 12
.IX Item "User::pwent"
By-name interface to Perl's built-in getpw*() functions
.IP "Win32" 12
.IX Item "Win32"
Interfaces to some Win32 \s-1API\s0 Functions
.PP
To find out \fIall\fR modules installed on your system, including
those without documentation or outside the standard release,
just do this:
.PP
.Vb 1
\& % find `perl -e 'print "@INC"'` -name '*.pm' -print
.Ve
.PP
They should all have their own documentation installed and accessible
via your system \fIman\fR\|(1) command. If you do not have a \fBfind\fR
program, you can use the Perl \fBfind2perl\fR program instead, which
generates Perl code as output you can run through perl. If you
have a \fBman\fR program but it doesn't find your modules, you'll have
to fix your manpath. See perl for details. If you have no
system \fBman\fR command, you might try the \fBperldoc\fR program.
.Sh "Extension Modules"
.IX Subsection "Extension Modules"
Extension modules are written in C (or a mix of Perl and C). They
are usually dynamically loaded into Perl if and when you need them,
but may also be linked in statically. Supported extension modules
include Socket, Fcntl, and \s-1POSIX\s0.
.PP
Many popular C extension modules do not come bundled (at least, not
completely) due to their sizes, volatility, or simply lack of time
for adequate testing and configuration across the multitude of
platforms on which Perl was beta\-tested. You are encouraged to
look for them on \s-1CPAN\s0 (described below), or using web search engines
like Alta Vista or Deja News.
.SH "CPAN"
.IX Header "CPAN"
\&\s-1CPAN\s0 stands for Comprehensive Perl Archive Network; it's a globally
replicated trove of Perl materials, including documentation, style
guides, tricks and traps, alternate ports to non-Unix systems and
occasional binary distributions for these. Search engines for
\&\s-1CPAN\s0 can be found at http://www.cpan.org/
.PP
Most importantly, \s-1CPAN\s0 includes around a thousand unbundled modules,
some of which require a C compiler to build. Major categories of
modules are:
.IP "\(bu" 4
Language Extensions and Documentation Tools
.IP "\(bu" 4
Development Support
.IP "\(bu" 4
Operating System Interfaces
.IP "\(bu" 4
Networking, Device Control (modems) and InterProcess Communication
.IP "\(bu" 4
Data Types and Data Type Utilities
.IP "\(bu" 4
Database Interfaces
.IP "\(bu" 4
User Interfaces
.IP "\(bu" 4
Interfaces to / Emulations of Other Programming Languages
.IP "\(bu" 4
File Names, File Systems and File Locking (see also File Handles)
.IP "\(bu" 4
String Processing, Language Text Processing, Parsing, and Searching
.IP "\(bu" 4
Option, Argument, Parameter, and Configuration File Processing
.IP "\(bu" 4
Internationalization and Locale
.IP "\(bu" 4
Authentication, Security, and Encryption
.IP "\(bu" 4
World Wide Web, \s-1HTML\s0, \s-1HTTP\s0, \s-1CGI\s0, \s-1MIME\s0
.IP "\(bu" 4
Server and Daemon Utilities
.IP "\(bu" 4
Archiving and Compression
.IP "\(bu" 4
Images, Pixmap and Bitmap Manipulation, Drawing, and Graphing
.IP "\(bu" 4
Mail and Usenet News
.IP "\(bu" 4
Control Flow Utilities (callbacks and exceptions etc)
.IP "\(bu" 4
File Handle and Input/Output Stream Utilities
.IP "\(bu" 4
Miscellaneous Modules
.PP
The list of the registered \s-1CPAN\s0 sites as of this writing follows.
Please note that the sorting order is alphabetical on fields:
.PP
Continent
|
|\-\->Country
|
|\-\->[state/province]
|
|\-\->ftp
|
|\-\->[http]
.PP
and thus the North American servers happen to be listed between the
European and the South American sites.
.PP
You should try to choose one close to you.
.Sh "Africa"
.IX Subsection "Africa"
.IP "South Africa" 4
.IX Item "South Africa"
.Vb 4
\& ftp://ftp.is.co.za/programming/perl/CPAN/
\& ftp://ftp.mweb.co.za/pub/mirrors/cpan/
\& ftp://ftp.saix.net/pub/CPAN/
\& ftp://ftp.sun.ac.za/CPAN/CPAN/
.Ve
.Sh "Asia"
.IX Subsection "Asia"
.IP "China" 4
.IX Item "China"
.Vb 4
\& ftp://freesoft.cei.gov.cn/pub/languages/perl/CPAN/
\& http://www2.linuxforum.net/mirror/CPAN/
\& http://cpan.shellhung.org/
\& ftp://ftp.shellhung.org/pub/CPAN
.Ve
.IP "India" 4
.IX Item "India"
.Vb 2
\& http://cpan.in.freeos.com
\& ftp://cpan.in.freeos.com/pub/CPAN/
.Ve
.IP "Indonesia" 4
.IX Item "Indonesia"
.Vb 6
\& http://cpan.itb.web.id/
\& ftp://mirrors.piksi.itb.ac.id/CPAN/
\& http://cpan.cbn.net.id/
\& ftp://ftp.cbn.net.id/mirror/CPAN
\& http://CPAN.mweb.co.id/
\& ftp://ftp.mweb.co.id/pub/languages/perl/CPAN/
.Ve
.IP "Israel" 4
.IX Item "Israel"
.Vb 5
\& http://www.iglu.org.il:/pub/CPAN/
\& ftp://ftp.iglu.org.il/pub/CPAN/
\& http://cpan.lerner.co.il/
\& http://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/
\& ftp://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/
.Ve
.IP "Japan" 4
.IX Item "Japan"
.Vb 9
\& ftp://ftp.u-aizu.ac.jp/pub/CPAN
\& ftp://ftp.kddlabs.co.jp/CPAN/
\& http://mirror.nucba.ac.jp/mirror/Perl/
\& ftp://mirror.nucba.ac.jp/mirror/Perl/
\& ftp://ftp.meisei-u.ac.jp/pub/CPAN/
\& ftp://ftp.ayamura.org/pub/CPAN/
\& ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/
\& ftp://ftp.dti.ad.jp/pub/lang/CPAN/
\& ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/
.Ve
.IP "Korea" 4
.IX Item "Korea"
.Vb 2
\& http://mirror.Mazic.org/pub/CPAN
\& ftp://mirror.Mazic.org/pub/CPAN
.Ve
.IP "Philippines" 4
.IX Item "Philippines"
.Vb 1
\& http://www.adzu.edu.ph/CPAN
.Ve
.IP "Russian Federation" 4
.IX Item "Russian Federation"
.Vb 2
\& http://cpan.tomsk.ru
\& ftp://cpan.tomsk.ru/pub/CPAN
.Ve
.IP "Saudi Arabia" 4
.IX Item "Saudi Arabia"
.Vb 1
\& ftp://ftp.isu.net.sa/pub/CPAN/
.Ve
.IP "Singapore" 4
.IX Item "Singapore"
.Vb 3
\& http://cpan.hjc.edu.sg
\& http://mirror.averse.net/pub/CPAN
\& ftp://mirror.averse.net/pub/CPAN
.Ve
.IP "South Korea" 4
.IX Item "South Korea"
.Vb 7
\& http://CPAN.bora.net/
\& ftp://ftp.bora.net/pub/CPAN/
\& http://ftp.kornet.net/pub/CPAN/
\& ftp://ftp.kornet.net/pub/CPAN/
\& ftp://ftp.nuri.net/pub/CPAN/
\& http://ftp.xgate.co.kr/cpan/
\& ftp://ftp.xgate.co.kr/pub/mirror/CPAN
.Ve
.IP "Taiwan" 4
.IX Item "Taiwan"
.Vb 5
\& ftp://ftp.nctu.edu.tw/UNIX/perl/CPAN
\& ftp://ftp.ee.ncku.edu.tw/pub/perl/CPAN/
\& ftp://ftp1.sinica.edu.tw/pub1/perl/CPAN/
\& http://ftp.tku.edu.tw/pub/CPAN/
\& ftp://ftp.tku.edu.tw/pub/CPAN/
.Ve
.IP "Thailand" 4
.IX Item "Thailand"
.Vb 2
\& ftp://ftp.loxinfo.co.th/pub/cpan/
\& ftp://ftp.cs.riubon.ac.th/pub/mirrors/CPAN/
.Ve
.Sh "Central America"
.IX Subsection "Central America"
.IP "Costa Rica" 4
.IX Item "Costa Rica"
.Vb 3
\& ftp://ftp.linux.co.cr/mirrors/CPAN/
\& http://ftp.ucr.ac.cr/Unix/CPAN/
\& ftp://ftp.ucr.ac.cr/pub/Unix/CPAN/
.Ve
.Sh "Europe"
.IX Subsection "Europe"
.IP "Austria" 4
.IX Item "Austria"
.Vb 1
\& ftp://ftp.tuwien.ac.at/pub/CPAN/
.Ve
.IP "Belgium" 4
.IX Item "Belgium"
.Vb 5
\& http://ftp.easynet.be/pub/CPAN/
\& ftp://ftp.easynet.be/pub/CPAN/
\& http://cpan.skynet.be
\& ftp://ftp.skynet.be/pub/CPAN
\& ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/
.Ve
.IP "Bulgaria" 4
.IX Item "Bulgaria"
.Vb 2
\& http://cpan.lirex.net/
\& ftp://ftp.lirex.net/pub/mirrors/CPAN
.Ve
.IP "Croatia" 4
.IX Item "Croatia"
.Vb 2
\& http://ftp.linux.hr/pub/CPAN/
\& ftp://ftp.linux.hr/pub/CPAN/
.Ve
.IP "Czech Republic" 4
.IX Item "Czech Republic"
.Vb 3
\& http://ftp.fi.muni.cz/pub/CPAN/
\& ftp://ftp.fi.muni.cz/pub/CPAN/
\& ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.funet.fi/pub/languages/perl/CPAN/
.Ve
.IP "Denmark" 4
.IX Item "Denmark"
.Vb 5
\& http://mirrors.sunsite.dk/cpan/
\& ftp://sunsite.dk/mirrors/cpan/
\& http://cpan.cybercity.dk
\& http://www.cpan.dk/CPAN/
\& ftp://www.cpan.dk/ftp.cpan.org/CPAN/
.Ve
.IP "Estonia" 4
.IX Item "Estonia"
.Vb 1
\& ftp://ftp.ut.ee/pub/languages/perl/CPAN/
.Ve
.IP "Finland" 4
.IX Item "Finland"
.Vb 2
\& ftp://ftp.funet.fi/pub/languages/perl/CPAN/
\& http://cpan.kpnqwest.fi/
.Ve
.IP "France" 4
.IX Item "France"
.Vb 16
\& http://ftp.u-paris10.fr/perl/CPAN
\& ftp://ftp.u-paris10.fr/perl/CPAN
\& http://cpan.mirrors.easynet.fr/
\& ftp://cpan.mirrors.easynet.fr/pub/ftp.cpan.org/
\& ftp://ftp.club-internet.fr/pub/perl/CPAN/
\& http://fr.cpan.org/
\& ftp://ftp.lip6.fr/pub/perl/CPAN/
\& ftp://ftp.oleane.net/pub/mirrors/CPAN/
\& ftp://ftp.pasteur.fr/pub/computing/CPAN/
\& http://mir2.ovh.net/ftp.cpan.org
\& ftp://mir1.ovh.net/ftp.cpan.org
\& http://ftp.u-strasbg.fr/CPAN
\& ftp://ftp.u-strasbg.fr/CPAN
\& http://cpan.cict.fr/
\& ftp://cpan.cict.fr/pub/CPAN/
\& ftp://ftp.uvsq.fr/pub/perl/CPAN/
.Ve
.IP "Germany" 4
.IX Item "Germany"
.Vb 14
\& ftp://ftp.rz.ruhr-uni-bochum.de/pub/CPAN/
\& ftp://ftp.freenet.de/pub/ftp.cpan.org/pub/CPAN/
\& ftp://ftp.uni-erlangen.de/pub/source/CPAN/
\& ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/CPAN
\& http://pandemonium.tiscali.de/pub/CPAN/
\& ftp://pandemonium.tiscali.de/pub/CPAN/
\& http://ftp.gwdg.de/pub/languages/perl/CPAN/
\& ftp://ftp.gwdg.de/pub/languages/perl/CPAN/
\& ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/
\& ftp://ftp.leo.org/pub/CPAN/
\& http://cpan.noris.de/
\& ftp://cpan.noris.de/pub/CPAN/
\& ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/
\& ftp://ftp.gmd.de/mirrors/CPAN/
.Ve
.IP "Greece" 4
.IX Item "Greece"
.Vb 3
\& ftp://ftp.acn.gr/pub/lang/perl/CPAN
\& ftp://ftp.forthnet.gr/pub/languages/perl/CPAN
\& ftp://ftp.ntua.gr/pub/lang/perl/
.Ve
.IP "Hungary" 4
.IX Item "Hungary"
.Vb 4
\& http://cpan.artifact.hu/
\& ftp://cpan.artifact.hu/CPAN/
\& http://ftp.kfki.hu/packages/perl/CPAN/
\& ftp://ftp.kfki.hu/pub/packages/perl/CPAN/
.Ve
.IP "Iceland" 4
.IX Item "Iceland"
.Vb 2
\& http://ftp.rhnet.is/pub/CPAN/
\& ftp://ftp.rhnet.is/pub/CPAN/
.Ve
.IP "Ireland" 4
.IX Item "Ireland"
.Vb 4
\& http://cpan.indigo.ie/
\& ftp://cpan.indigo.ie/pub/CPAN/
\& http://sunsite.compapp.dcu.ie/pub/perl/
\& ftp://sunsite.compapp.dcu.ie/pub/perl/
.Ve
.IP "Italy" 4
.IX Item "Italy"
.Vb 10
\& http://cpan.nettuno.it/
\& http://gusp.dyndns.org/CPAN/
\& ftp://gusp.dyndns.org/pub/CPAN
\& http://softcity.iol.it/cpan
\& ftp://softcity.iol.it/pub/cpan
\& ftp://ftp.unina.it/pub/Other/CPAN/CPAN/
\& ftp://ftp.unipi.it/pub/mirror/perl/CPAN/
\& ftp://cis.uniRoma2.it/CPAN/
\& ftp://ftp.edisontel.it/pub/CPAN_Mirror/
\& ftp://ftp.flashnet.it/pub/CPAN/
.Ve
.IP "Latvia" 4
.IX Item "Latvia"
.Vb 1
\& http://kvin.lv/pub/CPAN/
.Ve
.IP "Lithuania" 4
.IX Item "Lithuania"
.Vb 1
\& ftp://ftp.unix.lt/pub/CPAN/
.Ve
.IP "Netherlands" 4
.IX Item "Netherlands"
.Vb 10
\& ftp://download.xs4all.nl/pub/mirror/CPAN/
\& ftp://ftp.nl.uu.net/pub/CPAN/
\& ftp://ftp.nluug.nl/pub/languages/perl/CPAN/
\& http://cpan.cybercomm.nl/
\& ftp://mirror.cybercomm.nl/pub/CPAN
\& ftp://ftp.cpan.nl/pub/CPAN/
\& http://ftp.easynet.nl/mirror/CPAN
\& ftp://ftp.easynet.nl/mirror/CPAN
\& http://archive.cs.uu.nl/mirror/CPAN/
\& ftp://ftp.cs.uu.nl/mirror/CPAN/
.Ve
.IP "Norway" 4
.IX Item "Norway"
.Vb 2
\& ftp://ftp.uninett.no/pub/languages/perl/CPAN
\& ftp://ftp.uit.no/pub/languages/perl/cpan/
.Ve
.IP "Poland" 4
.IX Item "Poland"
.Vb 4
\& ftp://ftp.pk.edu.pl/pub/lang/perl/CPAN/
\& ftp://ftp.mega.net.pl/pub/mirrors/ftp.perl.com/
\& ftp://ftp.man.torun.pl/pub/doc/CPAN/
\& ftp://sunsite.icm.edu.pl/pub/CPAN/
.Ve
.IP "Portugal" 4
.IX Item "Portugal"
.Vb 9
\& ftp://ftp.ua.pt/pub/CPAN/
\& ftp://perl.di.uminho.pt/pub/CPAN/
\& http://cpan.dei.uc.pt/
\& ftp://ftp.dei.uc.pt/pub/CPAN
\& ftp://ftp.ist.utl.pt/pub/CPAN/
\& http://cpan.ip.pt/
\& ftp://cpan.ip.pt/pub/cpan/
\& ftp://ftp.netc.pt/pub/CPAN/
\& ftp://ftp.up.pt/pub/CPAN
.Ve
.IP "Romania" 4
.IX Item "Romania"
.Vb 5
\& ftp://ftp.kappa.ro/pub/mirrors/ftp.perl.org/pub/CPAN/
\& ftp://ftp.dntis.ro/pub/cpan/
\& ftp://ftp.dnttm.ro/pub/CPAN/
\& ftp://ftp.lasting.ro/pub/CPAN
\& ftp://ftp.timisoara.roedu.net/mirrors/CPAN/
.Ve
.IP "Russia" 4
.IX Item "Russia"
.Vb 6
\& ftp://ftp.chg.ru/pub/lang/perl/CPAN/
\& http://cpan.rinet.ru/
\& ftp://cpan.rinet.ru/pub/mirror/CPAN/
\& ftp://ftp.aha.ru/pub/CPAN/
\& http://cpan.sai.msu.ru/
\& ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/
.Ve
.IP "Slovakia" 4
.IX Item "Slovakia"
.Vb 2
\& http://ftp.cvt.stuba.sk/pub/CPAN/
\& ftp://ftp.cvt.stuba.sk/pub/CPAN/
.Ve
.IP "Slovenia" 4
.IX Item "Slovenia"
.Vb 1
\& ftp://ftp.arnes.si/software/perl/CPAN/
.Ve
.IP "Spain" 4
.IX Item "Spain"
.Vb 3
\& http://cpan.imasd.elmundo.es/
\& ftp://ftp.rediris.es/mirror/CPAN/
\& ftp://ftp.etse.urv.es/pub/perl/
.Ve
.IP "Sweden" 4
.IX Item "Sweden"
.Vb 4
\& http://ftp.du.se/CPAN/
\& ftp://ftp.du.se/pub/CPAN/
\& ftp://mirror.dataphone.se/pub/CPAN
\& ftp://ftp.sunet.se/pub/lang/perl/CPAN/
.Ve
.IP "Switzerland" 4
.IX Item "Switzerland"
.Vb 2
\& ftp://ftp.danyk.ch/CPAN/
\& ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
.Ve
.IP "Turkey" 4
.IX Item "Turkey"
.Vb 3
\& http://ftp.ulak.net.tr/perl/CPAN/
\& ftp://ftp.ulak.net.tr/perl/CPAN
\& ftp://sunsite.bilkent.edu.tr/pub/languages/CPAN/
.Ve
.IP "Ukraine" 4
.IX Item "Ukraine"
.Vb 3
\& http://cpan.org.ua/
\& ftp://cpan.org.ua/
\& ftp://ftp.perl.org.ua/pub/CPAN/
.Ve
.IP "United Kingdom" 4
.IX Item "United Kingdom"
.Vb 14
\& http://www.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN
\& ftp://ftp.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN/
\& http://cpan.teleglobe.net/
\& ftp://cpan.teleglobe.net/pub/CPAN
\& http://cpan.crazygreek.co.uk
\& ftp://ftp.demon.co.uk/pub/CPAN/
\& http://cpan.m.flirble.org/
\& ftp://ftp.flirble.org/pub/languages/perl/CPAN/
\& ftp://ftp.plig.org/pub/CPAN/
\& http://mirror.uklinux.net/CPAN/
\& ftp://mirror.uklinux.net/pub/CPAN/
\& http://cpan.mirrors.clockerz.net/
\& ftp://ftp.clockerz.net/pub/CPAN/
\& ftp://usit.shef.ac.uk/pub/packages/CPAN/
.Ve
.Sh "North America"
.IX Subsection "North America"
.IP "Alberta" 4
.IX Item "Alberta"
.Vb 2
\& http://sunsite.ualberta.ca/pub/Mirror/CPAN/
\& ftp://sunsite.ualberta.ca/pub/Mirror/CPAN/
.Ve
.IP "Manitoba" 4
.IX Item "Manitoba"
.Vb 2
\& http://theoryx5.uwinnipeg.ca/pub/CPAN/
\& ftp://theoryx5.uwinnipeg.ca/pub/CPAN/
.Ve
.IP "Nova Scotia" 4
.IX Item "Nova Scotia"
.Vb 1
\& ftp://cpan.chebucto.ns.ca/pub/CPAN/
.Ve
.IP "Ontario" 4
.IX Item "Ontario"
.Vb 1
\& ftp://ftp.crc.ca/pub/CPAN/
.Ve
.IP "Quebec" 4
.IX Item "Quebec"
.Vb 1
\& http://cpan.mirror.smartworker.org/
.Ve
.IP "Mexico" 4
.IX Item "Mexico"
.Vb 6
\& http://cpan.azc.uam.mx
\& ftp://cpan.azc.uam.mx/mirrors/CPAN
\& http://cpan.unam.mx/
\& ftp://cpan.unam.mx/pub/CPAN
\& http://www.msg.com.mx/CPAN/
\& ftp://ftp.msg.com.mx/pub/CPAN/
.Ve
.Sh "United States"
.IX Subsection "United States"
.IP "Alabama" 4
.IX Item "Alabama"
.Vb 2
\& http://mirror.hiwaay.net/CPAN/
\& ftp://mirror.hiwaay.net/CPAN/
.Ve
.IP "California" 4
.IX Item "California"
.Vb 11
\& http://cpan.develooper.com/
\& http://www.cpan.org/
\& ftp://cpan.valueclick.com/pub/CPAN/
\& http://mirrors.gossamer-threads.com/CPAN
\& ftp://cpan.nas.nasa.gov/pub/perl/CPAN/
\& http://mirrors.kernel.org/cpan/
\& ftp://mirrors.kernel.org/pub/CPAN
\& http://cpan.digisle.net/
\& ftp://cpan.digisle.net/pub/CPAN
\& http://www.perl.com/CPAN/
\& http://download.sourceforge.net/mirrors/CPAN/
.Ve
.IP "Colorado" 4
.IX Item "Colorado"
.Vb 1
\& ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
.Ve
.IP "Delaware" 4
.IX Item "Delaware"
.Vb 2
\& http://ftp.lug.udel.edu/pub/CPAN
\& ftp://ftp.lug.udel.edu/pub/CPAN
.Ve
.IP "District of Columbia" 4
.IX Item "District of Columbia"
.Vb 1
\& ftp://ftp.dc.aleron.net/pub/CPAN/
.Ve
.IP "Florida" 4
.IX Item "Florida"
.Vb 4
\& ftp://ftp.cise.ufl.edu/pub/mirrors/CPAN/
\& http://mirror.csit.fsu.edu/pub/CPAN/
\& ftp://mirror.csit.fsu.edu/pub/CPAN/
\& http://cpan.mirrors.nks.net/
.Ve
.IP "Illinois" 4
.IX Item "Illinois"
.Vb 2
\& http://uiarchive.uiuc.edu/mirrors/ftp/cpan.cse.msu.edu/
\& ftp://uiarchive.uiuc.edu/mirrors/ftp/cpan.cse.msu.edu/
.Ve
.IP "Indiana" 4
.IX Item "Indiana"
.Vb 8
\& ftp://ftp.uwsg.iu.edu/pub/perl/CPAN/
\& http://cpan.netnitco.net/
\& ftp://cpan.netnitco.net/pub/mirrors/CPAN/
\& http://archive.progeny.com/CPAN/
\& ftp://archive.progeny.com/CPAN/
\& ftp://cpan.in-span.net/
\& http://csociety-ftp.ecn.purdue.edu/pub/CPAN
\& ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN
.Ve
.IP "Kentucky" 4
.IX Item "Kentucky"
.Vb 2
\& http://cpan.uky.edu/
\& ftp://cpan.uky.edu/pub/CPAN/
.Ve
.IP "Massachusetts" 4
.IX Item "Massachusetts"
.Vb 3
\& ftp://ftp.ccs.neu.edu/net/mirrors/ftp.funet.fi/pub/languages/perl/CPAN/
\& http://cpan.mirrors.netnumina.com/
\& ftp://mirrors.netnumina.com/cpan/
.Ve
.IP "Michigan" 4
.IX Item "Michigan"
.Vb 1
\& ftp://cpan.cse.msu.edu/
.Ve
.IP "New Jersey" 4
.IX Item "New Jersey"
.Vb 3
\& ftp://ftp.cpanel.net/pub/CPAN/
\& http://cpan.teleglobe.net/
\& ftp://cpan.teleglobe.net/pub/CPAN
.Ve
.IP "New York" 4
.IX Item "New York"
.Vb 8
\& ftp://ftp.exobit.org/pub/perl/CPAN
\& http://cpan.belfry.net/
\& http://cpan.thepirtgroup.com/
\& ftp://cpan.thepirtgroup.com/
\& ftp://ftp.stealth.net/pub/CPAN/
\& http://www.rge.com/pub/languages/perl/
\& ftp://ftp.rge.com/pub/languages/perl/
\& ftp://mirrors.cloud9.net/pub/mirrors/CPAN/
.Ve
.IP "North Carolina" 4
.IX Item "North Carolina"
.Vb 1
\& ftp://ftp.duke.edu/pub/perl/
.Ve
.IP "Ohio" 4
.IX Item "Ohio"
.Vb 1
\& ftp://ftp.loaded.net/pub/CPAN/
.Ve
.IP "Oklahoma" 4
.IX Item "Oklahoma"
.Vb 1
\& ftp://ftp.ou.edu/mirrors/CPAN/
.Ve
.IP "Oregon" 4
.IX Item "Oregon"
.Vb 1
\& ftp://ftp.orst.edu/pub/CPAN
.Ve
.IP "Pennsylvania" 4
.IX Item "Pennsylvania"
.Vb 7
\& http://ftp.epix.net/CPAN/
\& ftp://ftp.epix.net/pub/languages/perl/
\& http://mirrors.phenominet.com/pub/CPAN/
\& ftp://mirrors.phenominet.com/pub/CPAN/
\& http://cpan.pair.com/
\& ftp://cpan.pair.com/pub/CPAN/
\& ftp://carroll.cac.psu.edu/pub/CPAN/
.Ve
.IP "Tennessee" 4
.IX Item "Tennessee"
.Vb 1
\& ftp://ftp.sunsite.utk.edu/pub/CPAN/
.Ve
.IP "Texas" 4
.IX Item "Texas"
.Vb 2
\& http://ftp.sedl.org/pub/mirrors/CPAN/
\& ftp://mirror.telentente.com/pub/CPAN
.Ve
.IP "Utah" 4
.IX Item "Utah"
.Vb 1
\& ftp://mirror.xmission.com/CPAN/
.Ve
.IP "Virginia" 4
.IX Item "Virginia"
.Vb 8
\& http://mirrors.rcn.net/pub/lang/CPAN/
\& ftp://mirrors.rcn.net/pub/lang/CPAN/
\& http://perl.secsup.org/
\& ftp://perl.secsup.org/pub/perl/
\& http://mirrors.phihost.com/CPAN/
\& ftp://mirrors.phihost.com/CPAN/
\& ftp://ruff.cs.jmu.edu/pub/CPAN/
\& http://perl.Liquidation.com/CPAN/
.Ve
.IP "ashington" 4
.IX Item "ashington"
.Vb 5
\& http://cpan.llarian.net/
\& ftp://cpan.llarian.net/pub/CPAN/
\& http://cpan.mirrorcentral.com/
\& ftp://ftp.mirrorcentral.com/pub/CPAN/
\& ftp://ftp-mirror.internap.com/pub/CPAN/
.Ve
.IP "Wisconsin" 4
.IX Item "Wisconsin"
.Vb 2
\& http://mirror.sit.wisc.edu/pub/CPAN/
\& ftp://mirror.sit.wisc.edu/pub/CPAN/
.Ve
.Sh "Oceania"
.IX Subsection "Oceania"
.IP "Australia" 4
.IX Item "Australia"
.Vb 4
\& http://ftp.planetmirror.com/pub/CPAN/
\& ftp://ftp.planetmirror.com/pub/CPAN/
\& ftp://mirror.aarnet.edu.au/pub/perl/CPAN/
\& ftp://cpan.topend.com.au/pub/CPAN/
.Ve
.IP "New Zealand" 4
.IX Item "New Zealand"
.Vb 2
\& ftp://ftp.auckland.ac.nz/pub/perl/CPAN/
\& http://cpan.soa.co.nz/CPAN/
.Ve
.Sh "South America"
.IX Subsection "South America"
.IP "Argentina" 4
.IX Item "Argentina"
.Vb 3
\& ftp://mirrors.bannerlandia.com.ar/mirrors/CPAN/
\& http://ftp.fcaglp.unlp.edu.ar/pub/CPAN/
\& ftp://ftp.fcaglp.unlp.edu.ar/pub/CPAN/
.Ve
.IP "Brazil" 4
.IX Item "Brazil"
.Vb 2
\& ftp://cpan.pop-mg.com.br/pub/CPAN/
\& ftp://ftp.matrix.com.br/pub/perl/CPAN/
.Ve
.IP "Chile" 4
.IX Item "Chile"
.Vb 2
\& http://cpan.netglobalis.net/
\& ftp://cpan.netglobalis.net/pub/CPAN/
.Ve
.Sh "\s-1RSYNC\s0 Mirrors"
.IX Subsection "RSYNC Mirrors"
.Vb 25
\& ftp.fcaglp.unlp.edu.ar::CPAN
\& cpan.mirror.smartworker.org::CPAN
\& theoryx5.uwinnipeg.ca::CPAN
\& ftp.shellhung.org::CPAN
\& ftp.funet.fi::CPAN
\& ftp.u-paris10.fr::CPAN
\& mir1.ovh.net::CPAN
\& ftp.gwdg.de::FTP/languages/perl/CPAN/
\& ftp.leo.org::CPAN
\& CPAN.piksi.itb.ac.id::CPAN
\& ftp.cbn.net.id::CPAN
\& ftp.iglu.org.il::CPAN
\& gusp.dyndns.org::cpan
\& ftp.kddlabs.co.jp::cpan
\& ftp.ayamura.org::pub/CPAN/
\& mirror.averse.net::cpan
\& cpan.teleglobe.net::CPAN
\& ftp.sedl.org::cpan
\& archive.progeny.com::CPAN
\& cpan.teleglobe.net::CPAN
\& ftp.lug.udel.edu::cpan
\& mirrors.kernel.org::mirrors/CPAN
\& mirrors.phenominet.com::CPAN
\& mirror.csit.fsu.edu::CPAN
\& csociety-ftp.ecn.purdue.edu::CPAN
.Ve
.PP
For an up-to-date listing of \s-1CPAN\s0 sites,
see http://www.cpan.org/SITES or ftp://www.cpan.org/SITES .
.SH "Modules: Creation, Use, and Abuse"
.IX Header "Modules: Creation, Use, and Abuse"
(The following section is borrowed directly from Tim Bunce's modules
file, available at your nearest \s-1CPAN\s0 site.)
.PP
Perl implements a class using a package, but the presence of a
package doesn't imply the presence of a class. A package is just a
namespace. A class is a package that provides subroutines that can be
used as methods. A method is just a subroutine that expects, as its
first argument, either the name of a package (for \*(L"static\*(R" methods),
or a reference to something (for \*(L"virtual\*(R" methods).
.PP
A module is a file that (by convention) provides a class of the same
name (sans the .pm), plus an import method in that class that can be
called to fetch exported symbols. This module may implement some of
its methods by loading dynamic C or \*(C+ objects, but that should be
totally transparent to the user of the module. Likewise, the module
might set up an \s-1AUTOLOAD\s0 function to slurp in subroutine definitions on
demand, but this is also transparent. Only the \fI.pm\fR file is required to
exist. See perlsub, perltoot, and AutoLoader for details about
the \s-1AUTOLOAD\s0 mechanism.
.Sh "Guidelines for Module Creation"
.IX Subsection "Guidelines for Module Creation"
.IP "\(bu" 4
Do similar modules already exist in some form?
.Sp
If so, please try to reuse the existing modules either in whole or
by inheriting useful features into a new class. If this is not
practical try to get together with the module authors to work on
extending or enhancing the functionality of the existing modules.
A perfect example is the plethora of packages in perl4 for dealing
with command line options.
.Sp
If you are writing a module to expand an already existing set of
modules, please coordinate with the author of the package. It
helps if you follow the same naming scheme and module interaction
scheme as the original author.
.IP "\(bu" 4
Try to design the new module to be easy to extend and reuse.
.Sp
Try to \f(CW\*(C`use warnings;\*(C'\fR (or \f(CW\*(C`use warnings qw(...);\*(C'\fR).
Remember that you can add \f(CW\*(C`no warnings qw(...);\*(C'\fR to individual blocks
of code that need less warnings.
.Sp
Use blessed references. Use the two argument form of bless to bless
into the class name given as the first parameter of the constructor,
e.g.,:
.Sp
.Vb 4
\& sub new {
\& my $class = shift;
\& return bless {}, $class;
\& }
.Ve
.Sp
or even this if you'd like it to be used as either a static
or a virtual method.
.Sp
.Vb 5
\& sub new {
\& my $self = shift;
\& my $class = ref($self) || $self;
\& return bless {}, $class;
\& }
.Ve
.Sp
Pass arrays as references so more parameters can be added later
(it's also faster). Convert functions into methods where
appropriate. Split large methods into smaller more flexible ones.
Inherit methods from other modules if appropriate.
.Sp
Avoid class name tests like: \f(CW\*(C`die "Invalid" unless ref $ref eq 'FOO'\*(C'\fR.
Generally you can delete the \f(CW\*(C`eq 'FOO'\*(C'\fR part with no harm at all.
Let the objects look after themselves! Generally, avoid hard-wired
class names as far as possible.
.Sp
Avoid \f(CW\*(C`$r\->Class::func()\*(C'\fR where using \f(CW\*(C`@ISA=qw(... Class ...)\*(C'\fR and
\&\f(CW\*(C`$r\->func()\*(C'\fR would work (see perlbot for more details).
.Sp
Use autosplit so little used or newly added functions won't be a
burden to programs that don't use them. Add test functions to
the module after _\|_END_\|_ either using AutoSplit or by saying:
.Sp
.Vb 1
\& eval join('',<main::DATA>) || die $@ unless caller();
.Ve
.Sp
Does your module pass the 'empty subclass' test? If you say
\&\f(CW\*(C`@SUBCLASS::ISA = qw(YOURCLASS);\*(C'\fR your applications should be able
to use \s-1SUBCLASS\s0 in exactly the same way as \s-1YOURCLASS\s0. For example,
does your application still work if you change: \f(CW\*(C`$obj = new YOURCLASS;\*(C'\fR
into: \f(CW\*(C`$obj = new SUBCLASS;\*(C'\fR ?
.Sp
Avoid keeping any state information in your packages. It makes it
difficult for multiple other packages to use yours. Keep state
information in objects.
.Sp
Always use \fB\-w\fR.
.Sp
Try to \f(CW\*(C`use strict;\*(C'\fR (or \f(CW\*(C`use strict qw(...);\*(C'\fR).
Remember that you can add \f(CW\*(C`no strict qw(...);\*(C'\fR to individual blocks
of code that need less strictness.
.Sp
Always use \fB\-w\fR.
.Sp
Follow the guidelines in the \fIperlstyle\fR\|(1) manual.
.Sp
Always use \fB\-w\fR.
.IP "\(bu" 4
Some simple style guidelines
.Sp
The perlstyle manual supplied with Perl has many helpful points.
.Sp
Coding style is a matter of personal taste. Many people evolve their
style over several years as they learn what helps them write and
maintain good code. Here's one set of assorted suggestions that
seem to be widely used by experienced developers:
.Sp
Use underscores to separate words. It is generally easier to read
\&\f(CW$var_names_like_this\fR than \f(CW$VarNamesLikeThis\fR, especially for
non-native speakers of English. It's also a simple rule that works
consistently with \s-1VAR_NAMES_LIKE_THIS\s0.
.Sp
Package/Module names are an exception to this rule. Perl informally
reserves lowercase module names for 'pragma' modules like integer
and strict. Other modules normally begin with a capital letter and
use mixed case with no underscores (need to be short and portable).
.Sp
You may find it helpful to use letter case to indicate the scope
or nature of a variable. For example:
.Sp
.Vb 3
\& $ALL_CAPS_HERE constants only (beware clashes with Perl vars)
\& $Some_Caps_Here package-wide global/static
\& $no_caps_here function scope my() or local() variables
.Ve
.Sp
Function and method names seem to work best as all lowercase.
e.g., \f(CW\*(C`$obj\->as_string()\*(C'\fR.
.Sp
You can use a leading underscore to indicate that a variable or
function should not be used outside the package that defined it.
.IP "\(bu" 4
Select what to export.
.Sp
Do \s-1NOT\s0 export method names!
.Sp
Do \s-1NOT\s0 export anything else by default without a good reason!
.Sp
Exports pollute the namespace of the module user. If you must
export try to use \f(CW@EXPORT_OK\fR in preference to \f(CW@EXPORT\fR and avoid
short or common names to reduce the risk of name clashes.
.Sp
Generally anything not exported is still accessible from outside the
module using the ModuleName::item_name (or \f(CW\*(C`$blessed_ref\->method\*(C'\fR)
syntax. By convention you can use a leading underscore on names to
indicate informally that they are 'internal' and not for public use.
.Sp
(It is actually possible to get private functions by saying:
\&\f(CW\*(C`my $subref = sub { ... }; &$subref;\*(C'\fR. But there's no way to call that
directly as a method, because a method must have a name in the symbol
table.)
.Sp
As a general rule, if the module is trying to be object oriented
then export nothing. If it's just a collection of functions then
\&\f(CW@EXPORT_OK\fR anything but use \f(CW@EXPORT\fR with caution.
.IP "\(bu" 4
Select a name for the module.
.Sp
This name should be as descriptive, accurate, and complete as
possible. Avoid any risk of ambiguity. Always try to use two or
more whole words. Generally the name should reflect what is special
about what the module does rather than how it does it. Please use
nested module names to group informally or categorize a module.
There should be a very good reason for a module not to have a nested name.
Module names should begin with a capital letter.
.Sp
Having 57 modules all called Sort will not make life easy for anyone
(though having 23 called Sort::Quick is only marginally better :\-).
Imagine someone trying to install your module alongside many others.
If in any doubt ask for suggestions in comp.lang.perl.misc.
.Sp
If you are developing a suite of related modules/classes it's good
practice to use nested classes with a common prefix as this will
avoid namespace clashes. For example: Xyz::Control, Xyz::View,
Xyz::Model etc. Use the modules in this list as a naming guide.
.Sp
If adding a new module to a set, follow the original author's
standards for naming modules and the interface to methods in
those modules.
.Sp
If developing modules for private internal or project specific use,
that will never be released to the public, then you should ensure
that their names will not clash with any future public module. You
can do this either by using the reserved Local::* category or by
using a category name that includes an underscore like Foo_Corp::*.
.Sp
To be portable each component of a module name should be limited to
11 characters. If it might be used on MS-DOS then try to ensure each is
unique in the first 8 characters. Nested modules make this easier.
.IP "\(bu" 4
Have you got it right?
.Sp
How do you know that you've made the right decisions? Have you
picked an interface design that will cause problems later? Have
you picked the most appropriate name? Do you have any questions?
.Sp
The best way to know for sure, and pick up many helpful suggestions,
is to ask someone who knows. Comp.lang.perl.misc is read by just about
all the people who develop modules and it's the best place to ask.
.Sp
All you need to do is post a short summary of the module, its
purpose and interfaces. A few lines on each of the main methods is
probably enough. (If you post the whole module it might be ignored
by busy people \- generally the very people you want to read it!)
.Sp
Don't worry about posting if you can't say when the module will be
ready \- just say so in the message. It might be worth inviting
others to help you, they may be able to complete it for you!
.IP "\(bu" 4
\&\s-1README\s0 and other Additional Files.
.Sp
It's well known that software developers usually fully document the
software they write. If, however, the world is in urgent need of
your software and there is not enough time to write the full
documentation please at least provide a \s-1README\s0 file containing:
.RS 4
.IP "\(bu" 10
A description of the module/package/extension etc.
.IP "\(bu" 10
A copyright notice \- see below.
.IP "\(bu" 10
Prerequisites \- what else you may need to have.
.IP "\(bu" 10
How to build it \- possible changes to Makefile.PL etc.
.IP "\(bu" 10
How to install it.
.IP "\(bu" 10
Recent changes in this release, especially incompatibilities
.IP "\(bu" 10
Changes / enhancements you plan to make in the future.
.RE
.RS 4
.Sp
If the \s-1README\s0 file seems to be getting too large you may wish to
split out some of the sections into separate files: \s-1INSTALL\s0,
Copying, ToDo etc.
.IP "\(bu" 4
Adding a Copyright Notice.
.Sp
How you choose to license your work is a personal decision.
The general mechanism is to assert your Copyright and then make
a declaration of how others may copy/use/modify your work.
.Sp
Perl, for example, is supplied with two types of licence: The \s-1GNU\s0
\&\s-1GPL\s0 and The Artistic Licence (see the files \s-1README\s0, Copying, and
Artistic). Larry has good reasons for \s-1NOT\s0 just using the \s-1GNU\s0 \s-1GPL\s0.
.Sp
My personal recommendation, out of respect for Larry, Perl, and the
Perl community at large is to state something simply like:
.Sp
.Vb 3
\& Copyright (c) 1995 Your Name. All rights reserved.
\& This program is free software; you can redistribute it and/or
\& modify it under the same terms as Perl itself.
.Ve
.Sp
This statement should at least appear in the \s-1README\s0 file. You may
also wish to include it in a Copying file and your source files.
Remember to include the other words in addition to the Copyright.
.IP "\(bu" 4
Give the module a version/issue/release number.
.Sp
To be fully compatible with the Exporter and MakeMaker modules you
should store your module's version number in a non-my package
variable called \f(CW$VERSION\fR. This should be a floating point
number with at least two digits after the decimal (i.e., hundredths,
e.g, \f(CW\*(C`$VERSION = "0.01"\*(C'\fR). Don't use a \*(L"1.3.2\*(R" style version.
See Exporter for details.
.Sp
It may be handy to add a function or method to retrieve the number.
Use the number in announcements and archive file names when
releasing the module (ModuleName\-1.02.tar.Z).
See perldoc ExtUtils::MakeMaker.pm for details.
.IP "\(bu" 4
How to release and distribute a module.
.Sp
It's good idea to post an announcement of the availability of your
module (or the module itself if small) to the comp.lang.perl.announce
Usenet newsgroup. This will at least ensure very wide once-off
distribution.
.Sp
If possible, register the module with \s-1CPAN\s0. You should
include details of its location in your announcement.
.Sp
Some notes about ftp archives: Please use a long descriptive file
name that includes the version number. Most incoming directories
will not be readable/listable, i.e., you won't be able to see your
file after uploading it. Remember to send your email notification
message as soon as possible after uploading else your file may get
deleted automatically. Allow time for the file to be processed
and/or check the file has been processed before announcing its
location.
.Sp
\&\s-1FTP\s0 Archives for Perl Modules:
.Sp
Follow the instructions and links on:
.Sp
.Vb 2
\& http://www.cpan.org/modules/00modlist.long.html
\& http://www.cpan.org/modules/04pause.html
.Ve
.Sp
or upload to one of these sites:
.Sp
.Vb 2
\& https://pause.kbx.de/pause/
\& http://pause.perl.org/pause/
.Ve
.Sp
and notify <modules@perl.org>.
.Sp
By using the \s-1WWW\s0 interface you can ask the Upload Server to mirror
your modules from your ftp or \s-1WWW\s0 site into your own directory on
\&\s-1CPAN\s0!
.Sp
Please remember to send me an updated entry for the Module list!
.IP "\(bu" 4
Take care when changing a released module.
.Sp
Always strive to remain compatible with previous released versions.
Otherwise try to add a mechanism to revert to the
old behavior if people rely on it. Document incompatible changes.
.RE
.RS 4
.RE
.Sh "Guidelines for Converting Perl 4 Library Scripts into Modules"
.IX Subsection "Guidelines for Converting Perl 4 Library Scripts into Modules"
.IP "\(bu" 4
There is no requirement to convert anything.
.Sp
If it ain't broke, don't fix it! Perl 4 library scripts should
continue to work with no problems. You may need to make some minor
changes (like escaping non-array @'s in double quoted strings) but
there is no need to convert a .pl file into a Module for just that.
.IP "\(bu" 4
Consider the implications.
.Sp
All Perl applications that make use of the script will need to
be changed (slightly) if the script is converted into a module. Is
it worth it unless you plan to make other changes at the same time?
.IP "\(bu" 4
Make the most of the opportunity.
.Sp
If you are going to convert the script to a module you can use the
opportunity to redesign the interface. The guidelines for module
creation above include many of the issues you should consider.
.IP "\(bu" 4
The pl2pm utility will get you started.
.Sp
This utility will read *.pl files (given as parameters) and write
corresponding *.pm files. The pl2pm utilities does the following:
.RS 4
.IP "\(bu" 10
Adds the standard Module prologue lines
.IP "\(bu" 10
Converts package specifiers from ' to ::
.IP "\(bu" 10
Converts die(...) to croak(...)
.IP "\(bu" 10
Several other minor changes
.RE
.RS 4
.Sp
Being a mechanical process pl2pm is not bullet proof. The converted
code will need careful checking, especially any package statements.
Don't delete the original .pl file till the new .pm one works!
.RE
.Sh "Guidelines for Reusing Application Code"
.IX Subsection "Guidelines for Reusing Application Code"
.IP "\(bu" 4
Complete applications rarely belong in the Perl Module Library.
.IP "\(bu" 4
Many applications contain some Perl code that could be reused.
.Sp
Help save the world! Share your code in a form that makes it easy
to reuse.
.IP "\(bu" 4
Break-out the reusable code into one or more separate module files.
.IP "\(bu" 4
Take the opportunity to reconsider and redesign the interfaces.
.IP "\(bu" 4
In some cases the 'application' can then be reduced to a small
.Sp
fragment of code built on top of the reusable modules. In these cases
the application could invoked as:
.Sp
.Vb 3
\& % perl -e 'use Module::Name; method(@ARGV)' ...
\&or
\& % perl -mModule::Name ... (in perl5.002 or higher)
.Ve
.SH "NOTE"
.IX Header "NOTE"
Perl does not enforce private and public parts of its modules as you may
have been used to in other languages like \*(C+, Ada, or Modula\-17. Perl
doesn't have an infatuation with enforced privacy. It would prefer
that you stayed out of its living room because you weren't invited, not
because it has a shotgun.
.PP
The module and its user have a contract, part of which is common law,
and part of which is \*(L"written\*(R". Part of the common law contract is
that a module doesn't pollute any namespace it wasn't asked to. The
written contract for the module (A.K.A. documentation) may make other
provisions. But then you know when you \f(CW\*(C`use RedefineTheWorld\*(C'\fR that
you're redefining the world and willing to take the consequences.
|