They work somewhat like pragmas in that they tend to affect the compilation of
your program, and thus will usually work well only when used within a
-C<use>, or C<no>. Most of these are locally scoped, so an inner BLOCK
+C<use>, or C<no>. Most of these are lexically scoped, so an inner BLOCK
may countermand any of these by saying:
no integer;
overload basic Perl operations
+=item re
+
+alter behaviour of regular expressions
+
=item sigtrap
enable simple signal handling
access to Berkeley DB
+=item Devel::Peek
+
+data debugging tool for the XS programmer
+
=item Devel::SelfStubber
generate stubs for a SelfLoading module
add blib/* directories to @INC
+=item Fatal
+
+make errors in builtins or Perl functions fatal
+
=item Fcntl
load the C Fcntl.h defines
create or remove a series of directories
+=item File::Spec
+
+portably perform operations on file names
+
+=item File::Spec::Functions
+
+function call interface to File::Spec module
+
=item File::stat
by-name interface to Perl's builtin stat() functions
=item FindBin
-locate directory of original perl script
+locate directory of original Perl script
=item GDBM_File
complex numbers and associated mathematical functions
+=item Math::Trig
+
+simple interface to parts of Math::Complex for those who
+need trigonometric functions only for real numbers
+
=item NDBM_File
tied access to ndbm files
=item Opcode
-disable named opcodes when compiling or running perl code
+disable named opcodes when compiling or running Perl code
=item Pod::Text
=item Shell
-run shell commands transparently within perl
+run shell commands transparently within Perl
=item Socket
=item Test::Harness
-run perl standard test scripts with statistics
+run Perl standard test scripts with statistics
=item Text::Abbrev
To find out I<all> the modules installed on your system, including
those without documentation or outside the standard release, do this:
- find `perl -e 'print "@INC"'` -name '*.pm' -print
+ % find `perl -e 'print "@INC"'` -name '*.pm' -print
They should all have their own documentation installed and accessible via
your system man(1) command. If that fails, try the I<perldoc> program.
=item *
Africa
- South Africa ftp://ftp.is.co.za/programming/perl/CPAN/
+ South Africa ftp://ftp.is.co.za/programming/perl/CPAN/
+ ftp://ftpza.co.za/pub/mirrors/cpan/
=item *
Asia
- Hong Kong ftp://ftp.hkstar.com/pub/CPAN/
- Japan ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/
- ftp://ftp.lab.kdd.co.jp/lang/perl/CPAN/
- South Korea ftp://ftp.nuri.net/pub/CPAN/
- Taiwan ftp://dongpo.math.ncu.edu.tw/perl/CPAN/
- ftp://ftp.wownet.net/pub2/PERL/
+ Armenia ftp://sunsite.aua.am/pub/CPAN/
+ China ftp://freesoft.cei.gov.cn/pub/languages/perl/CPAN/
+ Hong Kong ftp://ftp.hkstar.com/pub/CPAN/
+ Israel ftp://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/
+ Japan ftp://ftp.dti.ad.jp/pub/lang/CPAN/
+ ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/
+ ftp://ftp.lab.kdd.co.jp/lang/perl/CPAN/
+ ftp://ftp.meisei-u.ac.jp/pub/CPAN/
+ ftp://mirror.nucba.ac.jp/mirror/Perl/
+ Singapore ftp://ftp.nus.edu.sg/pub/unix/perl/CPAN/
+ South Korea ftp://ftp.bora.net/pub/CPAN/
+ ftp://ftp.nuri.net/pub/CPAN/
+ Taiwan ftp://ftp.wownet.net/pub2/PERL/
+ ftp://ftp1.sinica.edu.tw/pub1/perl/CPAN/
+ Thailand ftp://ftp.cs.riubon.ac.th/pub/mirrors/CPAN/
+ ftp://ftp.nectec.or.th/pub/mirrors/CPAN/
=item *
Australasia
- Australia ftp://ftp.netinfo.com.au/pub/perl/CPAN/
- New Zealand ftp://ftp.tekotago.ac.nz/pub/perl/CPAN/
+ Australia ftp://cpan.topend.com.au/pub/CPAN/
+ ftp://ftp.labyrinth.net.au/pub/perl/CPAN/
+ ftp://ftp.sage-au.org.au/pub/compilers/perl/CPAN/
+ ftp://mirror.aarnet.edu.au/pub/perl/CPAN/
+ New Zealand ftp://ftp.auckland.ac.nz/pub/perl/CPAN/
+ ftp://sunsite.net.nz/pub/languages/perl/CPAN/
+
+=item *
+Central America
+
+ Costa Rica ftp://ftp.ucr.ac.cr/pub/Unix/CPAN/
=item *
Europe
- Austria ftp://ftp.tuwien.ac.at/pub/languages/perl/CPAN/
- Belgium ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/
- Czech Republic ftp://sunsite.mff.cuni.cz/Languages/Perl/CPAN/
- Denmark ftp://sunsite.auc.dk/pub/languages/perl/CPAN/
- Finland ftp://ftp.funet.fi/pub/languages/perl/CPAN/
- France ftp://ftp.ibp.fr/pub/perl/CPAN/
- ftp://ftp.pasteur.fr/pub/computing/unix/perl/CPAN/
- Germany ftp://ftp.gmd.de/packages/CPAN/
- ftp://ftp.leo.org/pub/comp/programming/languages/perl/CPAN/
- ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/
- ftp://ftp.rz.ruhr-uni-bochum.de/pub/CPAN/
- ftp://ftp.uni-erlangen.de/pub/source/Perl/CPAN/
- ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/
- Greece ftp://ftp.ntua.gr/pub/lang/perl/
- Hungary ftp://ftp.kfki.hu/pub/packages/perl/CPAN/
- Italy ftp://cis.utovrm.it/CPAN/
- the Netherlands ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
- ftp://ftp.EU.net/packages/cpan/
- Norway ftp://ftp.uit.no/pub/languages/perl/cpan/
- Poland ftp://ftp.pk.edu.pl/pub/lang/perl/CPAN/
- ftp://sunsite.icm.edu.pl/pub/CPAN/
- Portugal ftp://ftp.ci.uminho.pt/pub/lang/perl/
- ftp://ftp.telepac.pt/pub/CPAN/
- Russia ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/
- Slovenia ftp://ftp.arnes.si/software/perl/CPAN/
- Spain ftp://ftp.etse.urv.es/pub/mirror/perl/
- ftp://ftp.rediris.es/mirror/CPAN/
- Sweden ftp://ftp.sunet.se/pub/lang/perl/CPAN/
- UK ftp://ftp.demon.co.uk/pub/mirrors/perl/CPAN/
- ftp://sunsite.doc.ic.ac.uk/packages/CPAN/
- ftp://unix.hensa.ac.uk/mirrors/perl-CPAN/
+ Austria ftp://ftp.tuwien.ac.at/pub/languages/perl/CPAN/
+ Belgium ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/
+ Bulgaria ftp://ftp.ntrl.net/pub/mirrors/CPAN/
+ Croatia ftp://ftp.linux.hr/pub/CPAN/
+ Czech Republic ftp://ftp.fi.muni.cz/pub/perl/
+ ftp://sunsite.mff.cuni.cz/Languages/Perl/CPAN/
+ Denmark ftp://sunsite.auc.dk/pub/languages/perl/CPAN/
+ Estonia ftp://ftp.ut.ee/pub/languages/perl/CPAN/
+ Finland ftp://ftp.funet.fi/pub/languages/perl/CPAN/
+ France ftp://ftp.lip6.fr/pub/perl/CPAN/
+ ftp://ftp.oleane.net/pub/mirrors/CPAN/
+ ftp://ftp.pasteur.fr/pub/computing/CPAN/
+ Germany ftp://ftp.archive.de.uu.net/pub/CPAN/
+ ftp://ftp.gmd.de/packages/CPAN/
+ ftp://ftp.gwdg.de/pub/languages/perl/CPAN/
+ ftp://ftp.leo.org/pub/comp/programming/languages/script/perl/CPAN/
+ ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/
+ ftp://ftp.rz.ruhr-uni-bochum.de/pub/CPAN/
+ ftp://ftp.uni-erlangen.de/pub/source/CPAN/
+ ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/
+ Greece ftp://ftp.ntua.gr/pub/lang/perl/
+ Hungary ftp://ftp.kfki.hu/pub/packages/perl/CPAN/
+ Ireland ftp://sunsite.compapp.dcu.ie/pub/perl/
+ Italy ftp://cis.uniRoma2.it/CPAN/
+ ftp://ftp.flashnet.it/pub/CPAN/
+ ftp://ftp.unipi.it/pub/mirror/perl/CPAN/
+ Netherlands ftp://ftp.cs.uu.nl/mirror/CPAN/
+ ftp://ftp.nluug.nl/pub/languages/perl/CPAN/
+ Norway ftp://ftp.uit.no/pub/languages/perl/cpan/
+ ftp://sunsite.uio.no/pub/languages/perl/CPAN/
+ Poland ftp://ftp.man.szczecin.pl/pub/perl/CPAN/
+ ftp://ftp.man.torun.pl/pub/doc/CPAN/
+ ftp://ftp.pk.edu.pl/pub/lang/perl/CPAN/
+ ftp://sunsite.icm.edu.pl/pub/CPAN/
+ Portugal ftp://ftp.ci.uminho.pt/pub/mirrors/cpan/
+ ftp://ftp.ua.pt/pub/CPAN/
+ Romania ftp://ftp.dntis.ro/pub/mirrors/perl-cpan/
+ ftp://ftp.dnttm.ro/pub/CPAN/
+ Russia ftp://cpan.npi.msu.su/CPAN/
+ ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/
+ Slovakia ftp://ftp.entry.sk/pub/languages/perl/CPAN/
+ Slovenia ftp://ftp.arnes.si/software/perl/CPAN/
+ Spain ftp://ftp.etse.urv.es/pub/perl/
+ ftp://ftp.rediris.es/mirror/CPAN/
+ Sweden ftp://ftp.sunet.se/pub/lang/perl/CPAN/
+ Switzerland ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
+ Turkey ftp://sunsite.bilkent.edu.tr/pub/languages/CPAN/
+ United Kingdom ftp://ftp.demon.co.uk/pub/mirrors/perl/CPAN/
+ ftp://ftp.flirble.org/pub/languages/perl/CPAN/
+ ftp://ftp.plig.org/pub/CPAN/
+ ftp://sunsite.doc.ic.ac.uk/packages/CPAN/
+ ftp://unix.hensa.ac.uk/mirrors/perl-CPAN/
=item *
North America
- Ontario ftp://ftp.utilis.com/public/CPAN/
- ftp://enterprise.ic.gc.ca/pub/perl/CPAN/
- Manitoba ftp://theory.uwinnipeg.ca/pub/CPAN/
- California ftp://ftp.digital.com/pub/plan/perl/CPAN/
- ftp://ftp.cdrom.com/pub/perl/CPAN/
- Colorado ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
- Florida ftp://ftp.cis.ufl.edu/pub/perl/CPAN/
- Illinois ftp://uiarchive.uiuc.edu/pub/lang/perl/CPAN/
- Massachusetts ftp://ftp.iguide.com/pub/mirrors/packages/perl/CPAN/
- New York ftp://ftp.rge.com/pub/languages/perl/
- North Carolina ftp://ftp.duke.edu/pub/perl/
- Oklahoma ftp://ftp.ou.edu/mirrors/CPAN/
- Oregon http://www.perl.org/CPAN/
- ftp://ftp.orst.edu/pub/packages/CPAN/
- Pennsylvania ftp://ftp.epix.net/pub/languages/perl/
- Texas ftp://ftp.sedl.org/pub/mirrors/CPAN/
- ftp://ftp.metronet.com/pub/perl/
+ Alberta ftp://sunsite.ualberta.ca/pub/Mirror/CPAN/
+ California ftp://ftp.cdrom.com/pub/perl/CPAN/
+ ftp://ftp.digital.com/pub/plan/perl/CPAN/
+ Colorado ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
+ Florida ftp://ftp.cise.ufl.edu/pub/perl/CPAN/
+ Illinois ftp://uiarchive.uiuc.edu/pub/lang/perl/CPAN/
+ Indiana ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN/
+ ftp://ftp.uwsg.indiana.edu/pub/perl/CPAN/
+ Manitoba ftp://theory.uwinnipeg.ca/pub/CPAN/
+ Massachusetts ftp://ftp.ccs.neu.edu/net/mirrors/ftp.funet.fi/pub/languages/perl/CPAN/
+ ftp://ftp.iguide.com/pub/mirrors/packages/perl/CPAN/
+ Mexico D.F. ftp://ftp.msg.com.mx/pub/CPAN/
+ New York ftp://ftp.rge.com/pub/languages/perl/
+ North Carolina ftp://ftp.duke.edu/pub/perl/
+ Oklahoma ftp://ftp.ou.edu/mirrors/CPAN/
+ Ontario ftp://ftp.crc.ca/pub/packages/perl/CPAN/
+ Oregon ftp://ftp.orst.edu/pub/packages/CPAN/
+ Pennsylvania ftp://ftp.epix.net/pub/languages/perl/
+ Texas ftp://ftp.sedl.org/pub/mirrors/CPAN/
+ Utah ftp://mirror.xmission.com/CPAN/
+ Virginia ftp://ftp.perl.org/pub/perl/CPAN/
+ ftp://ruff.cs.jmu.edu/pub/CPAN/
+ Washington ftp://ftp.spu.edu/pub/CPAN/
=item *
South America
- Chile ftp://sunsite.dcc.uchile.cl/pub/Lang/perl/CPAN/
+ Brazil ftp://cpan.if.usp.br/pub/mirror/CPAN/
+ Chile ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/
+ ftp://sunsite.dcc.uchile.cl/pub/Lang/perl/CPAN/
=back
C<$r-E<gt>func()> would work (see L<perlbot> for more details).
Use autosplit so little used or newly added functions won't be a
-burden to programs which don't use them. Add test functions to
+burden to programs that don't use them. Add test functions to
the module after __END__ either using AutoSplit or by saying:
eval join('',<main::DATA>) || die $@ unless caller();
Always use B<-w>. Try to C<use strict;> (or C<use strict qw(...);>).
Remember that you can add C<no strict qw(...);> to individual blocks
-of code which need less strictness. Always use B<-w>. Always use B<-w>!
+of code that need less strictness. Always use B<-w>. Always use B<-w>!
Follow the guidelines in the perlstyle(1) manual.
=item Some simple style guidelines
-The perlstyle manual supplied with perl has many helpful points.
+The perlstyle manual supplied with Perl has many helpful points.
Coding style is a matter of personal taste. Many people evolve their
style over several years as they learn what helps them write and
You may find it helpful to use letter case to indicate the scope
or nature of a variable. For example:
- $ALL_CAPS_HERE constants only (beware clashes with perl vars)
+ $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
Artistic). Larry has good reasons for NOT just using the GNU GPL.
My personal recommendation, out of respect for Larry, Perl, and the
-perl community at large is to state something simply like:
+Perl community at large is to state something simply like:
Copyright (c) 1995 Your Name. All rights reserved.
This program is free software; you can redistribute it and/or
include details of its location in your announcement.
Some notes about ftp archives: Please use a long descriptive file
-name which includes the version number. Most incoming directories
+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
=item Take care when changing a released module.
-Always strive to remain compatible with previous released versions
-(see 2.2 above) Otherwise try to add a mechanism to revert to the
+Always strive to remain compatible with previous released versions.
+Otherwise try to add a mechanism to revert to the
old behaviour if people rely on it. Document incompatible changes.
=back
=item Consider the implications.
-All the perl applications which make use of the script will need to
+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?
=item Complete applications rarely belong in the Perl Module Library.
-=item Many applications contain some perl code which could be reused.
+=item Many applications contain some Perl code that could be reused.
Help save the world! Share your code in a form that makes it easy
to reuse.
fragment of code built on top of the reusable modules. In these cases
the application could invoked as:
- perl -e 'use Module::Name; method(@ARGV)' ...
+ % perl -e 'use Module::Name; method(@ARGV)' ...
or
- perl -mModule::Name ... (in perl5.002 or higher)
+ % perl -mModule::Name ... (in perl5.002 or higher)
=back