summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes334
-rw-r--r--MANIFEST11
-rw-r--r--README.win3210
-rwxr-xr-xconfigpm2
-rw-r--r--ext/B/B/Bytecode.pm4
-rw-r--r--ext/DB_File/DB_File.pm64
-rw-r--r--ext/Data/Dumper/Dumper.pm1
-rw-r--r--ext/Devel/Peek/Peek.pm2
-rw-r--r--ext/Filter/Util/Call/Call.pm83
-rw-r--r--ext/Filter/Util/Call/Call.xs4
-rw-r--r--ext/GDBM_File/GDBM_File.pm3
-rw-r--r--ext/GDBM_File/GDBM_File.xs6
-rw-r--r--ext/IO/lib/IO/Handle.pm4
-rw-r--r--ext/IO/lib/IO/Seekable.pm4
-rw-r--r--ext/IO/lib/IO/Socket/UNIX.pm2
-rw-r--r--ext/IPC/SysV/Msg.pm2
-rw-r--r--ext/IPC/SysV/Semaphore.pm2
-rw-r--r--ext/IPC/SysV/SysV.pm2
-rw-r--r--ext/NDBM_File/NDBM_File.pm6
-rw-r--r--ext/ODBM_File/ODBM_File.pm6
-rw-r--r--ext/Socket/Socket.pm2
-rw-r--r--ext/Storable/ChangeLog32
-rw-r--r--ext/Storable/Storable.pm32
-rw-r--r--ext/Storable/Storable.xs45
-rw-r--r--ext/Sys/Syslog/Syslog.pm2
-rw-r--r--ext/Thread/Thread.pm2
-rw-r--r--ext/Thread/Thread/Queue.pm2
-rw-r--r--ext/attrs/attrs.pm2
-rw-r--r--hints/irix_6.sh3
-rw-r--r--jpl/JNI/JNI.pm2
-rw-r--r--lib/CPAN.pm8
-rw-r--r--lib/Class/Struct.pm4
-rw-r--r--lib/Dumpvalue.pm4
-rw-r--r--lib/ExtUtils/Embed.pm2
-rw-r--r--lib/ExtUtils/Installed.pm2
-rw-r--r--lib/ExtUtils/MM_Cygwin.pm2
-rw-r--r--lib/ExtUtils/MM_OS2.pm38
-rw-r--r--lib/ExtUtils/MM_VMS.pm4
-rw-r--r--lib/ExtUtils/MM_Win32.pm2
-rw-r--r--lib/ExtUtils/Manifest.pm2
-rw-r--r--lib/ExtUtils/Mksymlists.pm2
-rw-r--r--lib/ExtUtils/Packlist.pm2
-rw-r--r--lib/File/Basename.pm2
-rw-r--r--lib/File/Spec/VMS.pm4
-rw-r--r--lib/File/Spec/Win32.pm2
-rw-r--r--lib/FileHandle.pm2
-rw-r--r--lib/Filter/Simple.pm12
-rw-r--r--lib/Getopt/Long.pm4
-rw-r--r--lib/Locale/Constants.pm94
-rw-r--r--lib/Locale/Country.pm702
-rw-r--r--lib/Locale/Currency.pm529
-rw-r--r--lib/Locale/Language.pm455
-rw-r--r--lib/Switch.pm5
-rw-r--r--lib/Term/ANSIColor.pm2
-rw-r--r--lib/Test.pm2
-rw-r--r--lib/Test/Harness.pm2
-rw-r--r--lib/Text/Balanced.pod5
-rw-r--r--lib/Text/Wrap.pm2
-rw-r--r--lib/Tie/Array.pm2
-rw-r--r--lib/Tie/Handle.pm2
-rw-r--r--lib/Tie/Hash.pm20
-rw-r--r--lib/Tie/Scalar.pm2
-rw-r--r--lib/User/pwent.pm2
-rw-r--r--lib/autouse.pm2
-rw-r--r--lib/overload.pm10
-rw-r--r--op.c7
-rw-r--r--os2/OS2/ExtAttr/ExtAttr.pm2
-rw-r--r--os2/OS2/Process/Process.pm29
-rw-r--r--patchlevel.h2
-rw-r--r--pod/perl5005delta.pod6
-rw-r--r--pod/perldebtut.pod78
-rw-r--r--pod/perldelta.pod2
-rw-r--r--pod/perlfunc.pod7
-rw-r--r--pod/perlhack.pod4
-rw-r--r--pod/perllexwarn.pod8
-rw-r--r--pod/perllocale.pod14
-rw-r--r--pod/perllol.pod8
-rw-r--r--pod/perlmod.pod4
-rw-r--r--pod/perlmodlib.pod4
-rw-r--r--pod/perlport.pod5
-rw-r--r--pod/perlrun.pod3
-rw-r--r--pod/perltoc.pod4
-rw-r--r--pod/perlxs.pod6
-rw-r--r--pod/perlxstut.pod8
-rw-r--r--t/lib/lc-all.t361
-rw-r--r--t/lib/lc-constants.t44
-rw-r--r--t/lib/lc-country.t109
-rw-r--r--t/lib/lc-currency.t79
-rw-r--r--t/lib/lc-language.t102
-rw-r--r--t/lib/lc-uk.t65
-rw-r--r--t/lib/sigaction.t6
-rw-r--r--utils/h2ph.PL45
-rw-r--r--utils/perldoc.PL3
-rw-r--r--win32/sncfnmcs.pl63
94 files changed, 3382 insertions, 308 deletions
diff --git a/Changes b/Changes
index d261f69462..75de68bdc9 100644
--- a/Changes
+++ b/Changes
@@ -32,6 +32,340 @@ Version v5.7.1 Development release working toward v5.8
--------------
____________________________________________________________________________
+[ 9171] By: jhi on 2001/03/15 15:09:32
+ Log: Subject: Re: Another Borland C++ problem.
+ From: "Vadim Konovalov" <watman@inbox.ru>
+ Date: Sat, 10 Mar 2001 19:26:07 +0300
+ Message-ID: <001601c0a97f$143fcc40$da7b55c2@vad>
+
+ Borland filename case problem.
+ Branch: perl
+ + win32/sncfnmcs.pl
+ ! MANIFEST README.win32
+____________________________________________________________________________
+[ 9170] By: jhi on 2001/03/15 14:54:23
+ Log: Add Locale::Codes 1.06, from Neil Bowers.
+ Branch: perl
+ + lib/Locale/Constants.pm lib/Locale/Country.pm
+ + lib/Locale/Currency.pm lib/Locale/Language.pm t/lib/lc-all.t
+ + t/lib/lc-constants.t t/lib/lc-country.t t/lib/lc-currency.t
+ + t/lib/lc-language.t t/lib/lc-uk.t
+ ! MANIFEST
+____________________________________________________________________________
+[ 9169] By: jhi on 2001/03/15 14:19:01
+ Log: Upgrade to Storable 1.0.11, from Raphael Manfredi.
+ Branch: perl
+ ! ext/Storable/ChangeLog ext/Storable/Storable.pm
+ ! ext/Storable/Storable.xs
+____________________________________________________________________________
+[ 9168] By: jhi on 2001/03/15 14:13:22
+ Log: Integrate changes #9120,9167 from mainline to maintperl.
+
+ Subject: [PATCH 5.6.1] OS/2 docs
+
+ Subject: [PATCH 5.6.1] perldoc
+ Branch: maint-5.6/perl
+ !> os2/Changes utils/perldoc.PL
+____________________________________________________________________________
+[ 9167] By: jhi on 2001/03/15 14:07:42
+ Log: Subject: [PATCH 5.6.1] perldoc
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Date: Wed, 14 Mar 2001 23:46:52 -0500
+ Message-ID: <20010314234652.A7972@math.ohio-state.edu>
+ Branch: perl
+ ! utils/perldoc.PL
+____________________________________________________________________________
+[ 9166] By: jhi on 2001/03/15 13:53:15
+ Log: sigaction test condition tweakage.
+ Branch: perl
+ ! t/lib/sigaction.t
+____________________________________________________________________________
+[ 9165] By: alanbur on 2001/03/15 03:49:17
+ Log: Resynchronised with parent
+ Branch: maint-5.6/pureperl
+ +> os2/os2add.sym t/op/anonsub.t
+ !> (integrate 72 files)
+____________________________________________________________________________
+[ 9164] By: jhi on 2001/03/15 01:05:01
+ Log: Avoid stomping off the beginning of an array in tr///.
+ Branch: perl
+ ! op.c
+____________________________________________________________________________
+[ 9163] By: jhi on 2001/03/15 00:58:57
+ Log: h2ph strictness and cleanliness from Kurt Starsinic.
+ Branch: perl
+ ! utils/h2ph.PL
+____________________________________________________________________________
+[ 9162] By: gsar on 2001/03/15 00:56:53
+ Log: avoid warnings
+ Branch: maint-5.6/perl
+ ! t/op/magic.t
+____________________________________________________________________________
+[ 9161] By: gsar on 2001/03/15 00:52:09
+ Log: clearing of $ENV{PERL_DESTRUCT_LEVEL} interferes with purify
+ results
+ Branch: maint-5.6/perl
+ ! t/op/magic.t
+____________________________________________________________________________
+[ 9160] By: jhi on 2001/03/14 22:02:10
+ Log: Do not use the Perl malloc in IRIX, suggested by
+ Helmus Jarausch.
+ Branch: perl
+ ! hints/irix_6.sh
+____________________________________________________________________________
+[ 9159] By: nick on 2001/03/14 21:45:59
+ Log: Integrate mainline
+ Branch: perlio
+ +> t/op/loopctl.t
+ !> (integrate 41 files)
+____________________________________________________________________________
+[ 9158] By: jhi on 2001/03/14 21:10:09
+ Log: The Day of the Retractions continues: the #9138
+ (integrated in #9144) doesn't work well in mainline.
+ Branch: perl
+ ! t/comp/proto.t t/op/lex_assign.t t/op/local.t t/op/pat.t
+ ! t/op/regexp.t t/pragma/strict-vars t/pragma/warn/op
+ ! t/pragma/warn/regcomp t/pragma/warn/toke t/pragma/warnings.t
+____________________________________________________________________________
+[ 9157] By: jhi on 2001/03/14 20:58:12
+ Log: The #9145 CANNOT be enabled: the clear_pmop code still
+ dumps core all over in Tru64.
+ Branch: perl
+ ! op.c op.h t/op/pat.t
+____________________________________________________________________________
+[ 9156] By: jhi on 2001/03/14 20:48:06
+ Log: Integrate change #9154 from maintperl to mainline.
+
+ PerlIO_stdoutf() wasn't properly supported under PERL_IMPLICIT_SYS
+ (caused Storable 1.0.10 to break on windows)
+ Branch: perl
+ !> embed.h embed.pl global.sym globals.c iperlsys.h objXSUB.h
+ !> perlapi.c proto.h
+____________________________________________________________________________
+[ 9155] By: jhi on 2001/03/14 20:23:53
+ Log: Retract #9136: breaks threading (and binary compatibility).
+ Branch: perl
+ ! ext/DynaLoader/dl_aix.xs hints/aix.sh makedef.pl
+____________________________________________________________________________
+[ 9154] By: gsar on 2001/03/14 17:48:18
+ Log: PerlIO_stdoutf() wasn't properly supported under PERL_IMPLICIT_SYS
+ (caused Storable 1.0.10 to break on windows)
+ Branch: maint-5.6/perl
+ ! embed.h embed.pl global.sym globals.c iperlsys.h objXSUB.h
+ ! perlapi.c proto.h
+____________________________________________________________________________
+[ 9153] By: jhi on 2001/03/14 13:35:21
+ Log: Tweaked a tweak from H.Merijn Brand on the sigaction test.
+ Branch: perl
+ ! t/lib/sigaction.t
+____________________________________________________________________________
+[ 9152] By: gsar on 2001/03/14 07:29:40
+ Log: back out changes#9012,9010,9009 and parts of change#9016
+ (causes ABRs under purify, and some prerequisites don't
+ seem to be there in 5.6.x)
+ Branch: maint-5.6/perl
+ ! doop.c op.c t/op/tr.t toke.c
+____________________________________________________________________________
+[ 9151] By: gsar on 2001/03/14 07:01:29
+ Log: reenable change#9145 (the test was busted due to a missing
+ C<print "ok 27\n">)
+ Branch: perl
+ ! op.c op.h t/op/pat.t
+____________________________________________________________________________
+[ 9150] By: jhi on 2001/03/14 06:38:36
+ Log: Retract #9145.
+ Branch: perl
+ ! op.c op.h t/op/pat.t
+____________________________________________________________________________
+[ 9149] By: jhi on 2001/03/14 06:14:56
+ Log: Retract #9143.
+ Branch: perl
+ ! op.c
+____________________________________________________________________________
+[ 9148] By: gsar on 2001/03/14 06:13:02
+ Log: Uninitialized Memory Read in regexec.c
+ Branch: perl
+ ! regexec.c
+____________________________________________________________________________
+[ 9147] By: jhi on 2001/03/14 04:59:54
+ Log: Subject: PATCH: make goto work in nested eval ""
+ From: Robin Houston <robin@kitsite.com>
+ Date: Wed, 14 Mar 2001 04:16:10 +0000
+ Message-ID: <20010314041610.A16307@puffinry.freeserve.co.uk>
+ Branch: perl
+ ! pp_ctl.c t/op/goto.t
+____________________________________________________________________________
+[ 9146] By: jhi on 2001/03/14 04:42:54
+ Log: Preserve the #ifdef PERL_CORE in perly.h.
+ Branch: perl
+ ! perly.fixer
+____________________________________________________________________________
+[ 9145] By: jhi on 2001/03/14 03:57:41
+ Log: (Retracted by #9150.)
+ Branch: perl
+ ! op.c op.h t/op/pat.t
+____________________________________________________________________________
+[ 9144] By: jhi on 2001/03/14 03:50:38
+ Log: Integrate changes #9137,9138,9142 from maintperl into mainline.
+
+ fix leak in pregcomp() when RE fails to compile (e.g. m/\\/)
+
+ remove squelch controls for "Scalars leaked" messages in most places
+ (these are now cured)
+
+ fix another memory leak reported by purify (tie callbacks that
+ croak can leak when wiping out magic)
+ Branch: perl
+ !> regcomp.c scope.c t/comp/proto.t t/op/lex_assign.t
+ !> t/op/local.t t/op/pat.t t/op/regexp.t t/pragma/strict-vars
+ !> t/pragma/warn/op t/pragma/warn/regcomp t/pragma/warn/toke
+ !> t/pragma/warnings.t
+____________________________________________________________________________
+[ 9143] By: jhi on 2001/03/14 03:37:53
+ Log: (Retracted by #9149.)
+ Branch: perl
+ ! op.c
+____________________________________________________________________________
+[ 9142] By: gsar on 2001/03/14 03:20:48
+ Log: fix another memory leak reported by purify (tie callbacks that
+ croak can leak when wiping out magic)
+ Branch: maint-5.6/perl
+ ! scope.c
+____________________________________________________________________________
+[ 9141] By: jhi on 2001/03/14 02:55:00
+ Log: Subject: PATCH for [ID 20010305.003]
+ From: Robin Houston <robin@kitsite.com>
+ Date: Wed, 14 Mar 2001 02:45:51 +0000
+ Message-ID: <20010314024551.A16207@puffinry.freeserve.co.uk>
+ Branch: perl
+ ! pp_ctl.c t/op/eval.t
+____________________________________________________________________________
+[ 9140] By: jhi on 2001/03/14 02:41:54
+ Log: Subject: Re: [ID 20010309.004] my-variables lose values while goto'ing within a for(;;)-loop
+ Date: Wed, 14 Mar 2001 01:52:51 +0000
+ From: Robin Houston <robin@kitsite.com>
+ Message-ID: <20010314015251.B16112@puffinry.freeserve.co.uk>
+
+ Fix for 2000313.004.
+ Branch: perl
+ ! pp_ctl.c t/op/goto.t
+____________________________________________________________________________
+[ 9139] By: jhi on 2001/03/14 02:40:50
+ Log: Subject: Re: [ID 20010309.004] my-variables lose values while goto'ing within a for(;;)-loop
+ From: Robin Houston <robin@kitsite.com>
+ Date: Wed, 14 Mar 2001 00:43:45 +0000
+ Message-ID: <20010314004345.A15892@puffinry.freeserve.co.uk>
+ Branch: perl
+ + t/op/loopctl.t
+ ! AUTHORS MANIFEST perly.c perly.y perly_c.diff t/op/goto.t
+ ! vms/perly_c.vms
+____________________________________________________________________________
+[ 9138] By: gsar on 2001/03/14 01:18:00
+ Log: remove squelch controls for "Scalars leaked" messages in most places
+ (these are now cured)
+ Branch: maint-5.6/perl
+ ! t/comp/proto.t t/op/lex_assign.t t/op/local.t t/op/pat.t
+ ! t/op/regexp.t t/pragma/strict-vars t/pragma/warn/op
+ ! t/pragma/warn/regcomp t/pragma/warn/toke t/pragma/warnings.t
+____________________________________________________________________________
+[ 9137] By: gsar on 2001/03/14 00:57:04
+ Log: fix leak in pregcomp() when RE fails to compile (e.g. m/\\/)
+ Branch: maint-5.6/perl
+ ! regcomp.c
+____________________________________________________________________________
+[ 9136] By: jhi on 2001/03/13 23:12:24
+ Log: (Retracted by #9155)
+
+ Subject: Re: [gsar@ActiveState.com: v5.6.1 trial2 is available]
+ From: Jens-Uwe Mager <jum@helios.de>
+ Date: Wed, 21 Feb 2001 21:32:04 +0100
+ Message-ID: <20010221213203.A18340@ans.helios.de>
+ Branch: perl
+ ! ext/DynaLoader/dl_aix.xs hints/aix.sh makedef.pl
+____________________________________________________________________________
+[ 9135] By: jhi on 2001/03/13 22:50:05
+ Log: Integrate perlio.
+ Branch: perl
+ !> pp.c
+____________________________________________________________________________
+[ 9134] By: jhi on 2001/03/13 22:49:05
+ Log: Integrate change #9131 from maintperl into mainline.
+
+ make the error text look more consistent in hints/hpux.sh
+ Branch: perl
+ !> hints/hpux.sh
+____________________________________________________________________________
+[ 9133] By: gsar on 2001/03/13 22:46:20
+ Log: integrate change#9067 from mainline
+
+ Re: [PATCH: 5.6.1 trial2] DynaLoading for OS/390 build option
+ Branch: maint-5.6/perl
+ !> lib/ExtUtils/MM_Unix.pm
+____________________________________________________________________________
+[ 9132] By: jhi on 2001/03/13 22:41:21
+ Log: Subject: Re: [ID 20010309.004] my-variables lose values while goto'ing within a for(;;)-loop
+ From: "John P. Linderman" <jpl@research.att.com>
+ Date: Tue, 13 Mar 2001 12:36:32 -0500 (EST)
+ Message-Id: <200103131736.MAA35615@raptor.research.att.com>
+
+ A more correct prime finder.
+ Branch: perl
+ ! lib/Tie/SubstrHash.pm
+____________________________________________________________________________
+[ 9131] By: gsar on 2001/03/13 22:30:42
+ Log: make the error text look more consistent in hints/hpux.sh
+ Branch: maint-5.6/perl
+ ! hints/hpux.sh
+____________________________________________________________________________
+[ 9130] By: jhi on 2001/03/13 22:23:44
+ Log: Subject: Re: 9122 and sigaction/switch on HP-UX 11.00
+ From: "H.Merijn Brand" <h.m.brand@hccnet.nl>
+ Date: Tue, 13 Mar 2001 18:41:26 +0100
+ Message-Id: <20010313184043.BFFC.H.M.BRAND@hccnet.nl>
+
+ If the test is run non-interactively the default handler
+ is different.
+ Branch: perl
+ ! t/lib/sigaction.t
+____________________________________________________________________________
+[ 9129] By: jhi on 2001/03/13 22:20:21
+ Log: Subject: [PATCH perl@9125] t/lib/1_compile.t VMS mod
+ From: lane@DUPHY4.Physics.Drexel.Edu (Charles Lane)
+ Message-Id: <010313164414.d1225@DUPHY4.Physics.Drexel.Edu>
+ Date: Tue, 13 Mar 2001 16:44:32 EST
+ Branch: perl
+ ! t/lib/1_compile.t
+____________________________________________________________________________
+[ 9128] By: jhi on 2001/03/13 22:18:34
+ Log: Subject: Another patch for integer.pm POD
+ From: "John L. Allen" <allen@grumman.com>
+ Date: Tue, 13 Mar 2001 16:14:02 -0500 (EST)
+ Message-ID: <Pine.SOL.3.91.1010313160755.1630A-100000@gateway.grumman.com>
+ Branch: perl
+ ! lib/integer.pm
+____________________________________________________________________________
+[ 9127] By: nick on 2001/03/13 21:26:30
+ Log: Integrate mainline.
+ Branch: perlio
+ +> lib/Switch.pm lib/Text/Balanced.pm lib/Text/Balanced.pod
+ +> t/lib/switch.t t/lib/tb-genxt.t t/lib/tb-xbrak.t
+ +> t/lib/tb-xcode.t t/lib/tb-xdeli.t t/lib/tb-xmult.t
+ +> t/lib/tb-xquot.t t/lib/tb-xtagg.t t/lib/tb-xvari.t
+ !> Changes Configure MANIFEST README.os2 README.os390
+ !> ext/re/Makefile.PL hints/aix.sh hints/os390.sh lib/integer.pm
+ !> os2/Changes patchlevel.h win32/perlhost.h
+____________________________________________________________________________
+[ 9126] By: nick on 2001/03/13 20:39:51
+ Log: #ifdef'ed out code to make packed side of pack/unpack
+ octets. (i.e. pack('U') => encode_utf8).
+ Branch: perlio
+ ! pp.c
+____________________________________________________________________________
+[ 9125] By: jhi on 2001/03/13 15:07:16
+ Log: Update Changes.
+ Branch: perl
+ ! Changes patchlevel.h
+____________________________________________________________________________
[ 9124] By: jhi on 2001/03/13 14:22:45
Log: Workaround for the buggy ("internal compiler error")
AIX C compiler 5.0.1.0: skip the optimization for regcomp.c
diff --git a/MANIFEST b/MANIFEST
index 09119f9f7b..ad1b1f03c6 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -721,6 +721,10 @@ lib/Getopt/Std.pm Fetch command options (getopt, getopts)
lib/I18N/Collate.pm Routines to do strxfrm-based collation
lib/IPC/Open2.pm Open a two-ended pipe
lib/IPC/Open3.pm Open a three-ended pipe!
+lib/Locale/Constants.pm Locale::Codes
+lib/Locale/Country.pm Locale::Codes
+lib/Locale/Currency.pm Locale::Codes
+lib/Locale/Language.pm Locale::Codes
lib/Math/BigFloat.pm An arbitrary precision floating-point arithmetic package
lib/Math/BigInt.pm An arbitrary precision integer arithmetic package
lib/Math/Complex.pm A Complex package
@@ -1474,6 +1478,12 @@ t/lib/io_udp.t See if UDP socket-related methods from IO work
t/lib/io_unix.t See if UNIX socket-related methods from IO work
t/lib/io_xs.t See if XSUB methods from IO work
t/lib/ipc_sysv.t See if IPC::SysV works
+t/lib/lc-all.t See if Locale::Codes work
+t/lib/lc-constants.t See if Locale::Codes work
+t/lib/lc-country.t See if Locale::Codes work
+t/lib/lc-currency.t See if Locale::Codes work
+t/lib/lc-language.t See if Locale::Codes work
+t/lib/lc-uk.t See if Locale::Codes work
t/lib/ndbm.t See if NDBM_File works
t/lib/net-hostent.t See if Net::hostent works
t/lib/odbm.t See if ODBM_File works
@@ -1840,6 +1850,7 @@ win32/perlhost.h Perl "host" implementation
win32/perllib.c Win32 port
win32/pod.mak Win32 port
win32/runperl.c Win32 port
+win32/sncfnmcs.pl Win32 port
win32/splittree.pl Win32 port
win32/vdir.h Perl "host" virtual directory manager
win32/vmem.h Perl "host" memory manager
diff --git a/README.win32 b/README.win32
index 113c0f5c70..7d5ebd00fb 100644
--- a/README.win32
+++ b/README.win32
@@ -78,6 +78,16 @@ A patch is included in the above fixed version.)
Fetch and install dmake somewhere on your path (follow the instructions
in the README.NOW file).
+There exists a minor coexistence problem with dmake and Borland C++
+compilers. Namely, if a distribution have C files named with a mixed
+case letters, they will be compiled into appropriate .obj-files named
+with all lowercase letters, and every time when dmake will be invoked
+to bring files up to date, it will try to recompile such files again.
+For example, Tk distribution have a lot of such files, resulting in
+multiple recompiling everytime dmake is invoked. To avoid this, you
+may use the script "sncfnmcs.pl" after successful build. It is
+available in the win32 subdirectory.
+
=item Command Shell
Use the default "cmd" shell that comes with NT. Some versions of the
diff --git a/configpm b/configpm
index 31b416b7a3..6b5252cccc 100755
--- a/configpm
+++ b/configpm
@@ -418,7 +418,7 @@ EOF
print CONFIG <<EOF;
=head2 $c
-=over
+=over 4
EOF
$text = 1;
diff --git a/ext/B/B/Bytecode.pm b/ext/B/B/Bytecode.pm
index 54d7c533c8..1954116298 100644
--- a/ext/B/B/Bytecode.pm
+++ b/ext/B/B/Bytecode.pm
@@ -967,9 +967,9 @@ Output (bytecode) assembler source rather than piping it
through the assembler and outputting bytecode.
=item B<-upackage>
-
+
Stores package in the output.
-
+
=back
=head1 EXAMPLES
diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm
index c8302168f8..344227fcc0 100644
--- a/ext/DB_File/DB_File.pm
+++ b/ext/DB_File/DB_File.pm
@@ -388,8 +388,8 @@ DB_File - Perl5 access to Berkeley DB version 1.x
=head1 SYNOPSIS
- use DB_File ;
-
+ use DB_File;
+
[$X =] tie %hash, 'DB_File', [$filename, $flags, $mode, $DB_HASH] ;
[$X =] tie %hash, 'DB_File', $filename, $flags, $mode, $DB_BTREE ;
[$X =] tie @array, 'DB_File', $filename, $flags, $mode, $DB_RECNO ;
@@ -699,7 +699,7 @@ contents of the database.
here is the output:
Banana Exists
-
+
orange -> orange
tomato -> red
banana -> yellow
@@ -797,13 +797,13 @@ code:
$filename = "tree" ;
unlink $filename ;
-
+
# Enable duplicate records
$DB_BTREE->{'flags'} = R_DUP ;
-
+
tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0640, $DB_BTREE
or die "Cannot open $filename: $!\n";
-
+
# Add some key/value pairs to the file
$h{'Wall'} = 'Larry' ;
$h{'Wall'} = 'Brick' ; # Note the duplicate key
@@ -847,25 +847,25 @@ Here is the script above rewritten using the C<seq> API method.
use warnings ;
use strict ;
use DB_File ;
-
+
use vars qw($filename $x %h $status $key $value) ;
$filename = "tree" ;
unlink $filename ;
-
+
# Enable duplicate records
$DB_BTREE->{'flags'} = R_DUP ;
-
+
$x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0640, $DB_BTREE
or die "Cannot open $filename: $!\n";
-
+
# Add some key/value pairs to the file
$h{'Wall'} = 'Larry' ;
$h{'Wall'} = 'Brick' ; # Note the duplicate key
$h{'Wall'} = 'Brick' ; # Note the duplicate key and value
$h{'Smith'} = 'John' ;
$h{'mouse'} = 'mickey' ;
-
+
# iterate through the btree using seq
# and print each key/value pair.
$key = $value = 0 ;
@@ -873,7 +873,7 @@ Here is the script above rewritten using the C<seq> API method.
$status == 0 ;
$status = $x->seq($key, $value, R_NEXT) )
{ print "$key -> $value\n" }
-
+
undef $x ;
untie %h ;
@@ -919,14 +919,14 @@ this:
use warnings ;
use strict ;
use DB_File ;
-
+
use vars qw($filename $x %h ) ;
$filename = "tree" ;
-
+
# Enable duplicate records
$DB_BTREE->{'flags'} = R_DUP ;
-
+
$x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0640, $DB_BTREE
or die "Cannot open $filename: $!\n";
@@ -942,7 +942,7 @@ this:
@list = $x->get_dup("Smith") ;
print "Smith => [@list]\n" ;
-
+
@list = $x->get_dup("Dog") ;
print "Dog => [@list]\n" ;
@@ -969,23 +969,23 @@ Assuming the database from the previous example:
use warnings ;
use strict ;
use DB_File ;
-
+
use vars qw($filename $x %h $found) ;
my $filename = "tree" ;
-
+
# Enable duplicate records
$DB_BTREE->{'flags'} = R_DUP ;
-
+
$x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0640, $DB_BTREE
or die "Cannot open $filename: $!\n";
$found = ( $x->find_dup("Wall", "Larry") == 0 ? "" : "not") ;
print "Larry Wall is $found there\n" ;
-
+
$found = ( $x->find_dup("Wall", "Harry") == 0 ? "" : "not") ;
print "Harry Wall is $found there\n" ;
-
+
undef $x ;
untie %h ;
@@ -1008,14 +1008,14 @@ Again assuming the existence of the C<tree> database
use warnings ;
use strict ;
use DB_File ;
-
+
use vars qw($filename $x %h $found) ;
my $filename = "tree" ;
-
+
# Enable duplicate records
$DB_BTREE->{'flags'} = R_DUP ;
-
+
$x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0640, $DB_BTREE
or die "Cannot open $filename: $!\n";
@@ -1023,7 +1023,7 @@ Again assuming the existence of the C<tree> database
$found = ( $x->find_dup("Wall", "Larry") == 0 ? "" : "not") ;
print "Larry Wall is $found there\n" ;
-
+
undef $x ;
untie %h ;
@@ -1071,22 +1071,22 @@ and print the first matching key/value pair given a partial key.
$x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0640, $DB_BTREE
or die "Cannot open $filename: $!\n";
-
+
# Add some key/value pairs to the file
$h{'mouse'} = 'mickey' ;
$h{'Wall'} = 'Larry' ;
$h{'Walls'} = 'Brick' ;
$h{'Smith'} = 'John' ;
-
+
$key = $value = 0 ;
print "IN ORDER\n" ;
for ($st = $x->seq($key, $value, R_FIRST) ;
$st == 0 ;
$st = $x->seq($key, $value, R_NEXT) )
-
+
{ print "$key -> $value\n" }
-
+
print "\nPARTIAL MATCH\n" ;
match "Wa" ;
@@ -1250,14 +1250,14 @@ L<THE API INTERFACE>).
use vars qw(@h $H $file $i) ;
use DB_File ;
use Fcntl ;
-
+
$file = "text" ;
unlink $file ;
$H = tie @h, "DB_File", $file, O_RDWR|O_CREAT, 0640, $DB_RECNO
or die "Cannot open file $file: $!\n" ;
-
+
# first create a text file to play with
$h[0] = "zero" ;
$h[1] = "one" ;
@@ -1265,7 +1265,7 @@ L<THE API INTERFACE>).
$h[3] = "three" ;
$h[4] = "four" ;
-
+
# Print the records in order.
#
# The length method is needed here because evaluating a tied
diff --git a/ext/Data/Dumper/Dumper.pm b/ext/Data/Dumper/Dumper.pm
index a8e59ab379..b092a2202b 100644
--- a/ext/Data/Dumper/Dumper.pm
+++ b/ext/Data/Dumper/Dumper.pm
@@ -592,7 +592,6 @@ __END__
Data::Dumper - stringified perl data structures, suitable for both printing and C<eval>
-
=head1 SYNOPSIS
use Data::Dumper;
diff --git a/ext/Devel/Peek/Peek.pm b/ext/Devel/Peek/Peek.pm
index 08501728c0..112412a942 100644
--- a/ext/Devel/Peek/Peek.pm
+++ b/ext/Devel/Peek/Peek.pm
@@ -432,7 +432,7 @@ Looks like this:
This shows that
-=over
+=over 4
=item *
diff --git a/ext/Filter/Util/Call/Call.pm b/ext/Filter/Util/Call/Call.pm
index 1936bbeaac..6f301c3694 100644
--- a/ext/Filter/Util/Call/Call.pm
+++ b/ext/Filter/Util/Call/Call.pm
@@ -1,3 +1,11 @@
+
+# Call.pm
+#
+# Copyright (c) 1995-2001 Paul Marquess. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
package Filter::Util::Call ;
require 5.002 ;
@@ -58,13 +66,16 @@ __END__
Filter::Util::Call - Perl Source Filter Utility Module
=head1 SYNOPSIS
-
+
use Filter::Util::Call ;
=head1 DESCRIPTION
This module provides you with the framework to write I<Source Filters>
-in Perl.
+in Perl.
+
+An alternate interface to Filter::Util::Call is now available. See
+L<Filter::Simple> for more details.
A I<Perl Source Filter> is implemented as a Perl module. The structure
of the module can take one of two broadly similar formats. To
@@ -74,7 +85,7 @@ filter> and the second as I<closure filter>.
Here is a skeleton for the I<method filter>:
package MyFilter ;
-
+
use Filter::Util::Call ;
sub import
@@ -82,28 +93,28 @@ Here is a skeleton for the I<method filter>:
my($type, @arguments) = @_ ;
filter_add([]) ;
}
-
+
sub filter
{
my($self) = @_ ;
my($status) ;
-
+
$status = filter_read() ;
$status ;
}
-
+
1 ;
and this is the equivalent skeleton for the I<closure filter>:
package MyFilter ;
-
+
use Filter::Util::Call ;
sub import
{
my($type, @arguments) = @_ ;
-
+
filter_add(
sub
{
@@ -112,7 +123,7 @@ and this is the equivalent skeleton for the I<closure filter>:
$status ;
} )
}
-
+
1 ;
To make use of either of the two filter modules above, place the line
@@ -293,26 +304,26 @@ occurrences of the string C<"Joe"> to C<"Jim">. Not particularly
Useful, but it is the first example and I wanted to keep it simple.
package Joe2Jim ;
-
+
use Filter::Util::Call ;
sub import
{
my($type) = @_ ;
-
+
filter_add(bless []) ;
}
-
+
sub filter
{
my($self) = @_ ;
my($status) ;
-
+
s/Joe/Jim/g
if ($status = filter_read()) > 0 ;
$status ;
}
-
+
1 ;
Here is an example of using the filter:
@@ -333,10 +344,10 @@ I<closure filter>. To reflect its enhanced role, the filter is called
C<Subst>.
package Subst ;
-
+
use Filter::Util::Call ;
use Carp ;
-
+
sub import
{
croak("usage: use Subst qw(from to)")
@@ -371,14 +382,14 @@ will print a count of the number of substitutions actually made.
Note that C<$status> is set to C<1> in this case.
package Count ;
-
+
use Filter::Util::Call ;
-
+
sub filter
{
my ($self) = @_ ;
my ($status) ;
-
+
if (($status = filter_read()) > 0 ) {
s/Joe/Jim/g ;
++ $$self ;
@@ -391,14 +402,14 @@ Note that C<$status> is set to C<1> in this case.
$status ;
}
-
+
sub import
{
my ($self) = @_ ;
my ($count) = 0 ;
filter_add(\$count) ;
}
-
+
1 ;
Here is a script which uses it:
@@ -429,40 +440,52 @@ When used as a filter we want to invoke it like this:
Here is the module.
package NewSubst ;
-
+
use Filter::Util::Call ;
use Carp ;
-
+
sub import
{
my ($self, $start, $stop, $from, $to) = @_ ;
my ($found) = 0 ;
croak("usage: use Subst qw(start stop from to)")
unless @_ == 5 ;
-
+
filter_add(
sub
{
my ($status) ;
-
+
if (($status = filter_read()) > 0) {
-
+
$found = 1
if $found == 0 and /$start/ ;
-
+
if ($found) {
s/$from/$to/ ;
filter_del() if /$stop/ ;
}
-
+
}
$status ;
} )
-
+
}
-
+
1 ;
+=head1 Filter::Simple
+
+If you intend using the Filter::Call functionality, I would strongly
+recommend that you check out Damian Conway's excellent Filter::Simple
+module. This module provides a much cleaner interface than
+Filter::Util::Call. Although it doesn't allow the fine control that
+Filter::Util::Call does, it should be adequate for the majority of
+applications. It's available at
+
+ http://www.cpan.org/modules/by-author/Damian_Conway/Filter-Simple.tar.gz
+ http://www.csse.monash.edu.au/~damian/CPAN/Filter-Simple.tar.gz
+
=head1 AUTHOR
Paul Marquess
diff --git a/ext/Filter/Util/Call/Call.xs b/ext/Filter/Util/Call/Call.xs
index 6f55c8a5d6..94bc5da4d7 100644
--- a/ext/Filter/Util/Call/Call.xs
+++ b/ext/Filter/Util/Call/Call.xs
@@ -5,6 +5,10 @@
* Date : 26th March 2000
* Version : 1.05
*
+ * Copyright (c) 1995-2001 Paul Marquess. All rights reserved.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the same terms as Perl itself.
+ *
*/
#include "EXTERN.h"
diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm
index 074b976386..310243c736 100644
--- a/ext/GDBM_File/GDBM_File.pm
+++ b/ext/GDBM_File/GDBM_File.pm
@@ -54,13 +54,14 @@ use XSLoader ();
GDBM_FAST
GDBM_INSERT
GDBM_NEWDB
+ GDBM_NOLOCK
GDBM_READER
GDBM_REPLACE
GDBM_WRCREAT
GDBM_WRITER
);
-$VERSION = "1.04";
+$VERSION = "1.05";
sub AUTOLOAD {
my($constname);
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
index 01ee84f278..1ec5ea803d 100644
--- a/ext/GDBM_File/GDBM_File.xs
+++ b/ext/GDBM_File/GDBM_File.xs
@@ -124,6 +124,12 @@ constant(char *name, int arg)
#else
goto not_there;
#endif
+ if (strEQ(name, "GDBM_NOLOCK"))
+#ifdef GDBM_NOLOCK
+ return GDBM_NOLOCK;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "GDBM_READER"))
#ifdef GDBM_READER
return GDBM_READER;
diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm
index fb754a60bf..063341aeb4 100644
--- a/ext/IO/lib/IO/Handle.pm
+++ b/ext/IO/lib/IO/Handle.pm
@@ -100,7 +100,7 @@ The following methods are not supported on a per-filehandle basis.
Furthermore, for doing normal I/O you might need these:
-=over
+=over 4
=item $io->fdopen ( FD, MODE )
@@ -206,7 +206,7 @@ failure.
Lastly, there is a special method for working under B<-T> and setuid/gid
scripts:
-=over
+=over 4
=item $io->untaint
diff --git a/ext/IO/lib/IO/Seekable.pm b/ext/IO/lib/IO/Seekable.pm
index 243a971acc..d3dfa1e697 100644
--- a/ext/IO/lib/IO/Seekable.pm
+++ b/ext/IO/lib/IO/Seekable.pm
@@ -34,7 +34,7 @@ Uses the value of a previous getpos call to return to a previously visited
position. Returns "0 but true" on success, C<undef> on failure.
=back
-
+
See L<perlfunc> for complete descriptions of each of the following
supported C<IO::Seekable> methods, which are just front ends for the
corresponding built-in functions:
@@ -80,7 +80,7 @@ of zero is returned as the string C<"0 but true">
Returns the IO::File's current position, or -1 on error.
=back
-
+
=head1 SEE ALSO
L<perlfunc>,
diff --git a/ext/IO/lib/IO/Socket/UNIX.pm b/ext/IO/lib/IO/Socket/UNIX.pm
index 2a11752d02..53652423f9 100644
--- a/ext/IO/lib/IO/Socket/UNIX.pm
+++ b/ext/IO/lib/IO/Socket/UNIX.pm
@@ -103,7 +103,7 @@ be a C<Peer> specification.
NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
-
+
As of VERSION 1.18 all IO::Socket objects have autoflush turned on
by default. This was not the case with earlier releases.
diff --git a/ext/IPC/SysV/Msg.pm b/ext/IPC/SysV/Msg.pm
index 120a5b2d3a..a0932389cb 100644
--- a/ext/IPC/SysV/Msg.pm
+++ b/ext/IPC/SysV/Msg.pm
@@ -126,6 +126,8 @@ IPC::Msg - SysV Msg IPC object class
=head1 DESCRIPTION
+A class providing an object based interface to SysV IPC message queues.
+
=head1 METHODS
=over 4
diff --git a/ext/IPC/SysV/Semaphore.pm b/ext/IPC/SysV/Semaphore.pm
index faf7411950..1dac5dcdae 100644
--- a/ext/IPC/SysV/Semaphore.pm
+++ b/ext/IPC/SysV/Semaphore.pm
@@ -172,6 +172,8 @@ IPC::Semaphore - SysV Semaphore IPC object class
=head1 DESCRIPTION
+A class providing an object based interface to SysV IPC semaphores.
+
=head1 METHODS
=over 4
diff --git a/ext/IPC/SysV/SysV.pm b/ext/IPC/SysV/SysV.pm
index bebb8fd81b..0cc74004da 100644
--- a/ext/IPC/SysV/SysV.pm
+++ b/ext/IPC/SysV/SysV.pm
@@ -74,7 +74,7 @@ C<IPC::SysV> defines and conditionally exports all the constants
defined in your system include files which are needed by the SysV
IPC calls.
-=over
+=over 4
=item ftok( PATH, ID )
diff --git a/ext/NDBM_File/NDBM_File.pm b/ext/NDBM_File/NDBM_File.pm
index b2804597a1..a088bd3c33 100644
--- a/ext/NDBM_File/NDBM_File.pm
+++ b/ext/NDBM_File/NDBM_File.pm
@@ -28,11 +28,11 @@ NDBM_File - Tied access to ndbm files
$h{newkey} = newvalue;
print $h{oldkey};
...
-
+
untie %h;
-
+
=head1 DESCRIPTION
-
+
C<NDBM_File> establishes a connection between a Perl hash variable and
a file in NDBM_File format;. You can manipulate the data in the file
just as if it were in a Perl hash, but when your program exits, the
diff --git a/ext/ODBM_File/ODBM_File.pm b/ext/ODBM_File/ODBM_File.pm
index 9e8e008e02..c7b61d84ff 100644
--- a/ext/ODBM_File/ODBM_File.pm
+++ b/ext/ODBM_File/ODBM_File.pm
@@ -28,11 +28,11 @@ ODBM_File - Tied access to odbm files
$h{newkey} = newvalue;
print $h{oldkey};
...
-
+
untie %h;
-
+
=head1 DESCRIPTION
-
+
C<ODBM_File> establishes a connection between a Perl hash variable and
a file in ODBM_File format;. You can manipulate the data in the file
just as if it were in a Perl hash, but when your program exits, the
diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index 90e16e6e19..344c87dc94 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -56,7 +56,7 @@ be imported individually, and with the C<:crlf> export tag:
In addition, some structure manipulation functions are available:
-=over
+=over 4
=item inet_aton HOSTNAME
diff --git a/ext/Storable/ChangeLog b/ext/Storable/ChangeLog
index 1e33d739b7..bed6cec134 100644
--- a/ext/Storable/ChangeLog
+++ b/ext/Storable/ChangeLog
@@ -1,3 +1,21 @@
+Thu Mar 15 01:22:32 MET 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
+
+. Description:
+
+ Last version was wrongly compiling with assertions on, due
+ to an edit glitch. That did not cause any problem (apart from
+ a slight performance loss) excepted on Win* platforms, where the
+ assertion code does not compile.
+
+Sat Feb 17 13:37:37 MET 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
+
+. Description:
+
+ Version 1.0.10.
+
+ Forgot to increase version number at previous patch (there were
+ two of them, which is why we jump from 1.0.8 to 1.0.10).
+
Sat Feb 17 13:35:00 MET 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
. Description:
@@ -76,6 +94,20 @@ Thu Oct 26 19:14:38 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
Just check $^O, in t/lock.t: there's no need to pull the whole
Config module for that.
+Mon Oct 23 20:03:49 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
+
+. Description:
+
+ Version 1.0.4.
+
+ Protected calls to flock() for DOS platform: apparently, the
+ flock/fcnlt emulation is reported to be broken on that
+ platform.
+
+ Added logcarp emulation if they don't have Log::Agent, since
+ we now use it to carp when lock_store/lock_retrieve is used
+ on DOS.
+
Fri Sep 29 21:52:29 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
. Description:
diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm
index 85ecd132b4..fa15b010bd 100644
--- a/ext/Storable/Storable.pm
+++ b/ext/Storable/Storable.pm
@@ -1,4 +1,4 @@
-;# $Id: Storable.pm,v 1.0.1.8 2001/02/17 12:24:37 ram Exp $
+;# $Id: Storable.pm,v 1.0.1.10 2001/03/15 00:20:25 ram Exp $
;#
;# Copyright (c) 1995-2000, Raphael Manfredi
;#
@@ -6,6 +6,12 @@
;# in the README file that comes with the distribution.
;#
;# $Log: Storable.pm,v $
+;# Revision 1.0.1.10 2001/03/15 00:20:25 ram
+;# patch11: updated version number
+;#
+;# Revision 1.0.1.9 2001/02/17 12:37:32 ram
+;# patch10: forgot to increase version number at previous patch
+;#
;# Revision 1.0.1.8 2001/02/17 12:24:37 ram
;# patch8: fixed incorrect error message
;#
@@ -23,7 +29,16 @@
;# patch4: protected calls to flock() for dos platform
;# patch4: added logcarp emulation if they don't have Log::Agent
;#
-;# $Log: Storable.pm,v $
+;# Revision 1.0.1.3 2000/09/29 19:49:01 ram
+;# patch3: updated version number
+;#
+;# Revision 1.0.1.2 2000/09/28 21:42:51 ram
+;# patch2: added lock_store lock_nstore lock_retrieve
+;#
+;# Revision 1.0.1.1 2000/09/17 16:46:21 ram
+;# patch1: documented that doubles are stringified by nstore()
+;# patch1: added Salvador Ortiz Garcia in CREDITS section
+;#
;# Revision 1.0 2000/09/01 19:40:41 ram
;# Baseline for first official release.
;#
@@ -44,7 +59,7 @@ package Storable; @ISA = qw(Exporter DynaLoader);
use AutoLoader;
use vars qw($forgive_me $VERSION);
-$VERSION = '1.007';
+$VERSION = '1.011';
*AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr...
#
@@ -277,11 +292,10 @@ sub _retrieve {
my $da = $@; # Could be from exception handler
if ($use_locking) {
unless (&CAN_FLOCK) {
- logcarp "Storable::lock_retrieve: fcntl/flock emulation broken on $^O";
+ logcarp "Storable::lock_store: fcntl/flock emulation broken on $^O";
return undef;
}
- flock(FILE, LOCK_SH) ||
- logcroak "can't get shared lock on $file: $!";
+ flock(FILE, LOCK_SH) || logcroak "can't get shared lock on $file: $!";
# Unlocking will happen when FILE is closed
}
eval { $self = pretrieve(*FILE) }; # Call C routine
@@ -513,7 +527,7 @@ same object.
Here is the hooking interface:
-=over
+=over 4
=item C<STORABLE_freeze> I<obj>, I<cloning>
@@ -582,7 +596,7 @@ Returned value: none.
Predicates are not exportable. They must be called by explicitely prefixing
them with the Storable package name.
-=over
+=over 4
=item C<Storable::last_op_in_netorder>
@@ -609,7 +623,7 @@ serialization string?
There are a few things you need to know however:
-=over
+=over 4
=item *
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs
index 62c5095ed1..647673e86e 100644
--- a/ext/Storable/Storable.xs
+++ b/ext/Storable/Storable.xs
@@ -3,7 +3,7 @@
*/
/*
- * $Id: Storable.xs,v 1.0.1.7 2001/02/17 12:25:26 ram Exp $
+ * $Id: Storable.xs,v 1.0.1.8 2001/03/15 00:20:55 ram Exp $
*
* Copyright (c) 1995-2000, Raphael Manfredi
*
@@ -11,6 +11,9 @@
* in the README file that comes with the distribution.
*
* $Log: Storable.xs,v $
+ * Revision 1.0.1.8 2001/03/15 00:20:55 ram
+ * patch11: last version was wrongly compiling with assertions on
+ *
* Revision 1.0.1.7 2001/02/17 12:25:26 ram
* patch8: now bless objects ASAP at retrieve time
* patch8: added support for blessed ref to tied structures
@@ -29,7 +32,14 @@
* Revision 1.0.1.3 2000/09/29 19:49:57 ram
* patch3: avoid using "tainted" and "dirty" since Perl remaps them via cpp
*
- * $Log: Storable.xs,v $
+ * Revision 1.0.1.2 2000/09/28 21:43:10 ram
+ * patch2: perls before 5.004_04 lack newSVpvn
+ *
+ * Revision 1.0.1.1 2000/09/17 16:47:49 ram
+ * patch1: now only taint retrieved data when source was tainted
+ * patch1: added support for UTF-8 strings
+ * patch1: fixed store hook bug: was allocating class id too soon
+ *
* Revision 1.0 2000/09/01 19:40:41 ram
* Baseline for first official release.
*
@@ -106,6 +116,11 @@ typedef double NV; /* Older perls lack the NV type */
#endif
#ifdef DEBUGME
+
+#ifndef DASSERT
+#define DASSERT
+#endif
+
/*
* TRACEME() will only output things when the $Storable::DEBUGME is true.
*/
@@ -116,11 +131,8 @@ typedef double NV; /* Older perls lack the NV type */
} while (0)
#else
#define TRACEME(x)
-#endif
+#endif /* DEBUGME */
-#ifndef DASSERT
-#define DASSERT
-#endif
#ifdef DASSERT
#define ASSERT(x,y) do { \
if (!(x)) { \
@@ -3074,7 +3086,7 @@ static SV *retrieve_idx_blessed(stcxt_t *cxt, char *cname)
sva = av_fetch(cxt->aclass, idx, FALSE);
if (!sva)
- CROAK(("Class name #%d should have been seen already", (int)idx));
+ CROAK(("Class name #%d should have been seen already", idx));
class = SvPVX(*sva); /* We know it's a PV, by construction */
@@ -3269,7 +3281,7 @@ static SV *retrieve_hook(stcxt_t *cxt, char *cname)
sva = av_fetch(cxt->aclass, idx, FALSE);
if (!sva)
- CROAK(("Class name #%d should have been seen already", (int)idx));
+ CROAK(("Class name #%d should have been seen already", idx));
class = SvPVX(*sva); /* We know it's a PV, by construction */
TRACEME(("class ID %d => %s", idx, class));
@@ -3370,7 +3382,7 @@ static SV *retrieve_hook(stcxt_t *cxt, char *cname)
tag = ntohl(tag);
svh = av_fetch(cxt->aseen, tag, FALSE);
if (!svh)
- CROAK(("Object #%d should have been retrieved already", (int)tag));
+ CROAK(("Object #%d should have been retrieved already", tag));
xsv = *svh;
ary[i] = SvREFCNT_inc(xsv);
}
@@ -3994,18 +4006,19 @@ static SV *retrieve_byte(stcxt_t *cxt, char *cname)
{
SV *sv;
int siv;
- signed char tmp;
+ signed char tmp; /* must use temp var to work around
+ an AIX compiler bug --H.Merijn Brand */
TRACEME(("retrieve_byte (#%d)", cxt->tagnum));
GETMARK(siv);
TRACEME(("small integer read as %d", (unsigned char) siv));
- tmp = ((unsigned char)siv) - 128;
- sv = newSViv (tmp);
+ tmp = ((unsigned char)siv) - 128;
+ sv = newSViv (tmp);
SEEN(sv, cname); /* Associate this new scalar with tag "tagnum" */
- TRACEME(("byte %d", tmp));
+ TRACEME(("byte %d", tmp));
TRACEME(("ok (retrieve_byte at 0x%"UVxf")", PTR2UV(sv)));
return sv;
@@ -4519,7 +4532,7 @@ static SV *retrieve(stcxt_t *cxt, char *cname)
I32 tagn;
svh = hv_fetch(cxt->hseen, (char *) &tag, sizeof(tag), FALSE);
if (!svh)
- CROAK(("Old tag 0x%x should have been mapped already", (unsigned)tag));
+ CROAK(("Old tag 0x%x should have been mapped already", tag));
tagn = SvIV(*svh); /* Mapped tag number computed earlier below */
/*
@@ -4528,7 +4541,7 @@ static SV *retrieve(stcxt_t *cxt, char *cname)
svh = av_fetch(cxt->aseen, tagn, FALSE);
if (!svh)
- CROAK(("Object #%d should have been retrieved already", (int)tagn));
+ CROAK(("Object #%d should have been retrieved already", tagn));
sv = *svh;
TRACEME(("has retrieved #%d at 0x%"UVxf, tagn, PTR2UV(sv)));
SvREFCNT_inc(sv); /* One more reference to this same sv */
@@ -4569,7 +4582,7 @@ again:
tag = ntohl(tag);
svh = av_fetch(cxt->aseen, tag, FALSE);
if (!svh)
- CROAK(("Object #%d should have been retrieved already", (int)tag));
+ CROAK(("Object #%d should have been retrieved already", tag));
sv = *svh;
TRACEME(("had retrieved #%d at 0x%"UVxf, tag, PTR2UV(sv)));
SvREFCNT_inc(sv); /* One more reference to this same sv */
diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm
index 71f5b828d0..9c05dcd1f5 100644
--- a/ext/Sys/Syslog/Syslog.pm
+++ b/ext/Sys/Syslog/Syslog.pm
@@ -46,7 +46,7 @@ just like C<syslog(3)>.
Syslog provides the functions:
-=over
+=over 4
=item openlog $ident, $logopt, $facility
diff --git a/ext/Thread/Thread.pm b/ext/Thread/Thread.pm
index f8a8a26bbc..3a545482a9 100644
--- a/ext/Thread/Thread.pm
+++ b/ext/Thread/Thread.pm
@@ -22,7 +22,7 @@ Thread - manipulate threads in Perl (EXPERIMENTAL, subject to change)
$result = $t->eval;
$t->detach;
$flags = $t->flags;
-
+
if ($t->done) {
$t->join;
}
diff --git a/ext/Thread/Thread/Queue.pm b/ext/Thread/Thread/Queue.pm
index 831573c726..8ace16d48b 100644
--- a/ext/Thread/Thread/Queue.pm
+++ b/ext/Thread/Thread/Queue.pm
@@ -59,7 +59,7 @@ before checking to make sure that it stays in a consistent state)
=head1 SEE ALSO
L<Thread>
-
+
=cut
sub new {
diff --git a/ext/attrs/attrs.pm b/ext/attrs/attrs.pm
index 2070632558..6c50beaa5d 100644
--- a/ext/attrs/attrs.pm
+++ b/ext/attrs/attrs.pm
@@ -31,7 +31,7 @@ C<attrs::get> on a subroutine reference or name returns its list
of attribute names. Notice that C<attrs::get> is not exported.
Valid attributes are as follows.
-=over
+=over 4
=item method
diff --git a/hints/irix_6.sh b/hints/irix_6.sh
index 90f4766657..6f4ca17881 100644
--- a/hints/irix_6.sh
+++ b/hints/irix_6.sh
@@ -343,3 +343,6 @@ $define|true|[yY]*) ;;
*) d_casti32='undef' ;;
esac
+# Helmut Jarausch reports that Perl's malloc is rather unusable
+# with IRIX, and SGI confirms the problem.
+usemymalloc=${usemymalloc:-false}
diff --git a/jpl/JNI/JNI.pm b/jpl/JNI/JNI.pm
index edbc1e6067..c3ade26ff7 100644
--- a/jpl/JNI/JNI.pm
+++ b/jpl/JNI/JNI.pm
@@ -269,6 +269,8 @@ JNI - Perl encapsulation of the Java Native Interface
=head1 DESCRIPTION
+This module provides an encapsulation in Perl of the Java Native Interface.
+
=head1 Exported constants
JNI_ABORT
diff --git a/lib/CPAN.pm b/lib/CPAN.pm
index fdaadb3be7..7cab8c606d 100644
--- a/lib/CPAN.pm
+++ b/lib/CPAN.pm
@@ -6181,7 +6181,7 @@ beta and partially even alpha. In the following paragraphs only those
methods are documented that have proven useful over a longer time and
thus are unlikely to change.
-=over
+=over 4
=item CPAN::Author::as_glimpse()
@@ -6746,7 +6746,7 @@ that you can configure ncftp so that it works for your firewall.
Firewalls can be categorized into three basic types.
-=over
+=over 4
=item http firewall
@@ -6780,7 +6780,7 @@ FTP connections need to be done in a passive mode.
There are two that I can think off.
-=over
+=over 4
=item SOCKS
@@ -6819,7 +6819,7 @@ Your milage may vary...
=head1 FAQ
-=over
+=over 4
=item 1)
diff --git a/lib/Class/Struct.pm b/lib/Class/Struct.pm
index 185a8ff142..57b8c8611c 100644
--- a/lib/Class/Struct.pm
+++ b/lib/Class/Struct.pm
@@ -361,7 +361,7 @@ optionally preceded by a C<'*'>.
The accessor method provided by C<struct> for an element depends
on the declared type of the element.
-=over
+=over 4
=item Scalar (C<'$'> or C<'*$'>)
@@ -437,7 +437,7 @@ See Example 3 below for an example of initialization.
=head1 EXAMPLES
-=over
+=over 4
=item Example 1
diff --git a/lib/Dumpvalue.pm b/lib/Dumpvalue.pm
index c8282cfbd5..97946258a2 100644
--- a/lib/Dumpvalue.pm
+++ b/lib/Dumpvalue.pm
@@ -495,7 +495,7 @@ A new dumper is created by a call
Recognized options:
-=over
+=over 4
=item C<arrayDepth>, C<hashDepth>
@@ -563,7 +563,7 @@ method and set() method (which accept multiple arguments).
=head2 Methods
-=over
+=over 4
=item dumpValue
diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm
index c4167a3026..b5a1bae5f6 100644
--- a/lib/ExtUtils/Embed.pm
+++ b/lib/ExtUtils/Embed.pm
@@ -295,7 +295,7 @@ ccdlflags(), xsi_header(), xsi_protos(), xsi_body()
=head1 FUNCTIONS
-=over
+=over 4
=item xsinit()
diff --git a/lib/ExtUtils/Installed.pm b/lib/ExtUtils/Installed.pm
index 6961c6fdd4..b7ff8155b3 100644
--- a/lib/ExtUtils/Installed.pm
+++ b/lib/ExtUtils/Installed.pm
@@ -208,7 +208,7 @@ described below.
=head1 FUNCTIONS
-=over
+=over 4
=item new()
diff --git a/lib/ExtUtils/MM_Cygwin.pm b/lib/ExtUtils/MM_Cygwin.pm
index abb491f1a2..45833ca259 100644
--- a/lib/ExtUtils/MM_Cygwin.pm
+++ b/lib/ExtUtils/MM_Cygwin.pm
@@ -103,7 +103,7 @@ ExtUtils::MM_Cygwin - methods to override UN*X behaviour in ExtUtils::MakeMaker
See ExtUtils::MM_Unix for a documentation of the methods provided there.
-=over
+=over 4
=item canonpath
diff --git a/lib/ExtUtils/MM_OS2.pm b/lib/ExtUtils/MM_OS2.pm
index d6bbc1c76d..a4bcf73c37 100644
--- a/lib/ExtUtils/MM_OS2.pm
+++ b/lib/ExtUtils/MM_OS2.pm
@@ -14,6 +14,28 @@ ExtUtils::MakeMaker->import(qw( $Verbose &neatvalue));
unshift @MM::ISA, 'ExtUtils::MM_OS2';
+=pod
+
+=head1 NAME
+
+ExtUtils::MM_OS2 - methods to override UN*X behaviour in ExtUtils::MakeMaker
+
+=head1 SYNOPSIS
+
+ use ExtUtils::MM_OS2; # Done internally by ExtUtils::MakeMaker if needed
+
+=head1 DESCRIPTION
+
+See ExtUtils::MM_Unix for a documentation of the methods provided
+there. This package overrides the implementation of these methods, not
+the semantics.
+
+=head1 METHODS
+
+=over 4
+
+=cut
+
sub dlsyms {
my($self,%attribs) = @_;
@@ -120,19 +142,11 @@ sub export_list
}
1;
-__END__
-
-=head1 NAME
-
-ExtUtils::MM_OS2 - methods to override UN*X behaviour in ExtUtils::MakeMaker
-=head1 SYNOPSIS
-
- use ExtUtils::MM_OS2; # Done internally by ExtUtils::MakeMaker if needed
+__END__
-=head1 DESCRIPTION
+=pod
-See ExtUtils::MM_Unix for a documentation of the methods provided
-there. This package overrides the implementation of these methods, not
-the semantics.
+=back
+=cut
diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm
index b753e2a819..ef5b541057 100644
--- a/lib/ExtUtils/MM_VMS.pm
+++ b/lib/ExtUtils/MM_VMS.pm
@@ -41,7 +41,7 @@ the semantics.
=head2 Methods always loaded
-=over
+=over 4
=item wraplist
@@ -173,7 +173,7 @@ For overridden methods, documentation is limited to an explanation
of why this method overrides the MM_Unix method; see the ExtUtils::MM_Unix
documentation for more details.
-=over
+=over 4
=item guess_name (override)
diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm
index 80e247d27c..709be20ecc 100644
--- a/lib/ExtUtils/MM_Win32.pm
+++ b/lib/ExtUtils/MM_Win32.pm
@@ -16,7 +16,7 @@ See ExtUtils::MM_Unix for a documentation of the methods provided
there. This package overrides the implementation of these methods, not
the semantics.
-=over
+=over 4
=cut
diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm
index 3ac0fbf862..244214a765 100644
--- a/lib/ExtUtils/Manifest.pm
+++ b/lib/ExtUtils/Manifest.pm
@@ -447,7 +447,7 @@ produced.
All diagnostic output is sent to C<STDERR>.
-=over
+=over 4
=item C<Not in MANIFEST:> I<file>
diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm
index c06b393be3..5f5ea063c6 100644
--- a/lib/ExtUtils/Mksymlists.pm
+++ b/lib/ExtUtils/Mksymlists.pm
@@ -217,7 +217,7 @@ C<Mksymlists>, which is exported by default from C<ExtUtils::Mksymlists>.
It takes one argument, a list of key-value pairs, in which the following
keys are recognized:
-=over
+=over 4
=item DLBASE
diff --git a/lib/ExtUtils/Packlist.pm b/lib/ExtUtils/Packlist.pm
index 88ea206196..309d72764d 100644
--- a/lib/ExtUtils/Packlist.pm
+++ b/lib/ExtUtils/Packlist.pm
@@ -200,7 +200,7 @@ filename followed by the key=value pairs from the hash. Reading back the
=head1 FUNCTIONS
-=over
+=over 4
=item new()
diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm
index 94aac2dd44..297386f57b 100644
--- a/lib/File/Basename.pm
+++ b/lib/File/Basename.pm
@@ -95,7 +95,7 @@ would yield
$dir eq 'Doc_Root:[Help]'
$type eq '.Rnh'
-=over
+=over 4
=item C<basename>
diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm
index 60b0ec8e50..57c4005d99 100644
--- a/lib/File/Spec/VMS.pm
+++ b/lib/File/Spec/VMS.pm
@@ -26,7 +26,7 @@ See File::Spec::Unix for a documentation of the methods provided
there. This package overrides the implementation of these methods, not
the semantics.
-=over
+=over 4
=item eliminate_macros
@@ -138,7 +138,7 @@ sub fixpath {
=head2 Methods always loaded
-=over
+=over 4
=item canonpath (override)
diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm
index f5d6cda2bc..860ae0c2b2 100644
--- a/lib/File/Spec/Win32.pm
+++ b/lib/File/Spec/Win32.pm
@@ -23,7 +23,7 @@ See File::Spec::Unix for a documentation of the methods provided
there. This package overrides the implementation of these methods, not
the semantics.
-=over
+=over 4
=item devnull
diff --git a/lib/FileHandle.pm b/lib/FileHandle.pm
index 5eb3a89adc..cd80d19024 100644
--- a/lib/FileHandle.pm
+++ b/lib/FileHandle.pm
@@ -225,7 +225,7 @@ supported C<FileHandle> methods:
Furthermore, for doing normal I/O you might need these:
-=over
+=over 4
=item $fh->print
diff --git a/lib/Filter/Simple.pm b/lib/Filter/Simple.pm
index d5aa55afdf..e9948aec07 100644
--- a/lib/Filter/Simple.pm
+++ b/lib/Filter/Simple.pm
@@ -52,7 +52,6 @@ __END__
Filter::Simple - Simplified source filtering
-
=head1 SYNOPSIS
# in MyFilter.pm:
@@ -141,7 +140,7 @@ to the sequence C<die 'BANG' if $BANG> in any piece of code following a
C<use BANG;> statement (until the next C<no BANG;> statement, if any):
package BANG;
-
+
use Filter::Util::Call ;
sub import {
@@ -198,7 +197,7 @@ contents of $_ to change the source code in the desired manner.
In other words, the previous example, would become:
package BANG;
-
+
use Filter::Simple sub {
s/BANG\s+BANG/die 'BANG' if \$BANG/g;
};
@@ -218,7 +217,7 @@ list to the filtering subroutine, so the BANG.pm filter could easily
be made parametric:
package BANG;
-
+
use Filter::Simple sub {
my ($die_msg, $var_name) = @_;
s/BANG\s+BANG/die '$die_msg' if \${$var_name}/g;
@@ -243,6 +242,5 @@ Damian Conway (damian@conway.org)
=head1 COPYRIGHT
Copyright (c) 2000, Damian Conway. All Rights Reserved.
- This module is free software. It may be used, redistributed
-and/or modified under the terms of the Perl Artistic License
- (see http://www.perl.com/perl/misc/Artistic.html)
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
diff --git a/lib/Getopt/Long.pm b/lib/Getopt/Long.pm
index 472527d4a7..ff0475b34b 100644
--- a/lib/Getopt/Long.pm
+++ b/lib/Getopt/Long.pm
@@ -1326,7 +1326,7 @@ used on the command line.
The argument specification can be
-=over
+=over 4
=item !
@@ -1352,7 +1352,7 @@ The C<+> specifier is ignored if the option destination is not a scalar.
The option requires an argument of the given type. Supported types
are:
-=over
+=over 4
=item s
diff --git a/lib/Locale/Constants.pm b/lib/Locale/Constants.pm
new file mode 100644
index 0000000000..957207ed90
--- /dev/null
+++ b/lib/Locale/Constants.pm
@@ -0,0 +1,94 @@
+package Locale::Constants;
+#
+# Locale::Constants - defined constants for identifying codesets
+#
+# $Id: Constants.pm,v 1.1 2001/03/04 17:58:15 neilb Exp $
+#
+
+use strict;
+
+require Exporter;
+
+use vars qw($VERSION @ISA @EXPORT);
+@ISA = qw(Exporter);
+@EXPORT = qw(LOCALE_CODE_ALPHA_2 LOCALE_CODE_ALPHA_3 LOCALE_CODE_NUMERIC
+ LOCALE_CODE_DEFAULT);
+
+use constant LOCALE_CODE_ALPHA_2 => 1;
+use constant LOCALE_CODE_ALPHA_3 => 2;
+use constant LOCALE_CODE_NUMERIC => 3;
+
+use constant LOCALE_CODE_DEFAULT => LOCALE_CODE_ALPHA_2;
+
+1;
+
+__END__
+
+=head1 NAME
+
+Locale::Constants - constants for Locale codes
+
+=head1 SYNOPSIS
+
+ use Locale::Constants;
+
+ $codeset = LOCALE_CODE_ALPHA_2;
+
+=head1 DESCRIPTION
+
+B<Locale::Constants> defines symbols which are used in
+the three modules from the Locale-Codes distribution:
+
+ Locale::Language
+ Locale::Country
+ Locale::Currency
+
+B<Note:> at the moment only Locale::Country supports
+more than one code set.
+
+The symbols defined are used to specify which codes you
+want to be used:
+
+ LOCALE_CODE_ALPHA_2
+ LOCALE_CODE_ALPHA_3
+ LOCALE_CODE_NUMERIC
+
+You shouldn't have to C<use> this module directly yourself -
+it is used by the three Locale modules, which in turn export
+the symbols.
+
+=head1 KNOWN BUGS AND LIMITATIONS
+
+None at the moment.
+
+=head1 SEE ALSO
+
+=over 4
+
+=item Locale::Language
+
+Codes for identification of languages.
+
+=item Locale::Country
+
+Codes for identification of countries.
+
+=item Locale::Currency
+
+Codes for identification of currencies and funds.
+
+=back
+
+=head1 AUTHOR
+
+Neil Bowers E<lt>neilb@cre.canon.co.ukE<gt>
+
+=head1 COPYRIGHT
+
+Copyright (C) 2001, Canon Research Centre Europe (CRE).
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=cut
+
diff --git a/lib/Locale/Country.pm b/lib/Locale/Country.pm
new file mode 100644
index 0000000000..ea446ee5d9
--- /dev/null
+++ b/lib/Locale/Country.pm
@@ -0,0 +1,702 @@
+#-----------------------------------------------------------------------
+
+=head1 NAME
+
+Locale::Country - ISO codes for country identification (ISO 3166)
+
+=head1 SYNOPSIS
+
+ use Locale::Country;
+
+ $country = code2country('jp'); # $country gets 'Japan'
+ $code = country2code('Norway'); # $code gets 'no'
+
+ @codes = all_country_codes();
+ @names = all_country_names();
+
+ # add "uk" as a pseudo country code for United Kingdom
+ Locale::Country::_alias_code('uk' => 'gb');
+
+=cut
+
+#-----------------------------------------------------------------------
+
+package Locale::Country;
+use strict;
+require 5.002;
+
+#-----------------------------------------------------------------------
+
+=head1 DESCRIPTION
+
+The C<Locale::Country> module provides access to the ISO
+codes for identifying countries, as defined in ISO 3166.
+You can either access the codes via the L<conversion routines>
+(described below), or with the two functions which return lists
+of all country codes or all country names.
+
+There are three different code sets you can use for identifying
+countries:
+
+=over 4
+
+=item B<alpha-2>
+
+Two letter codes, such as 'tv' for Tuvalu.
+This code set is identified with the symbol C<LOCALE_CODE_ALPHA_2>.
+
+=item B<alpha-3>
+
+Three letter codes, such as 'brb' for Barbados.
+This code set is identified with the symbol C<LOCALE_CODE_ALPHA_3>.
+
+=item B<numeric>
+
+Numeric codes, such as 064 for Bhutan.
+This code set is identified with the symbol C<LOCALE_CODE_NUMERIC>.
+
+=back
+
+All of the routines take an optional additional argument
+which specifies the code set to use.
+If not specified, it defaults to the two-letter codes.
+This is partly for backwards compatibility (previous versions
+of this module only supported the alpha-2 codes), and
+partly because they are the most widely used codes.
+
+The alpha-2 and alpha-3 codes are not case-dependent,
+so you can use 'BO', 'Bo', 'bO' or 'bo' for Bolivia.
+When a code is returned by one of the functions in
+this module, it will always be lower-case.
+
+=cut
+
+#-----------------------------------------------------------------------
+
+require Exporter;
+use Carp;
+use Locale::Constants;
+
+
+#-----------------------------------------------------------------------
+# Public Global Variables
+#-----------------------------------------------------------------------
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+$VERSION = sprintf("%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/);
+@ISA = qw(Exporter);
+@EXPORT = qw(code2country country2code
+ all_country_codes all_country_names
+ country_code2code
+ LOCALE_CODE_ALPHA_2 LOCALE_CODE_ALPHA_3 LOCALE_CODE_NUMERIC);
+
+#-----------------------------------------------------------------------
+# Private Global Variables
+#-----------------------------------------------------------------------
+my $CODES = [];
+my $COUNTRIES = [];
+
+
+#=======================================================================
+
+=head1 CONVERSION ROUTINES
+
+There are three conversion routines: C<code2country()>, C<country2code()>,
+and C<country_code2code()>.
+
+=over 8
+
+=item code2country( CODE, [ CODESET ] )
+
+This function takes a country code and returns a string
+which contains the name of the country identified.
+If the code is not a valid country code, as defined by ISO 3166,
+then C<undef> will be returned:
+
+ $country = code2country('fi');
+
+=item country2code( STRING, [ CODESET ] )
+
+This function takes a country name and returns the corresponding
+country code, if such exists.
+If the argument could not be identified as a country name,
+then C<undef> will be returned:
+
+ $code = country2code('Norway', LOCALE_CODE_ALPHA_3);
+ # $code will now be 'nor'
+
+The case of the country name is not important.
+See the section L<KNOWN BUGS AND LIMITATIONS> below.
+
+=item country_code2code( CODE, CODESET, CODESET )
+
+This function takes a country code from one code set,
+and returns the corresponding code from another code set.
+
+ $alpha2 = country_code2code('fin',
+ LOCALE_CODE_ALPHA_3 => LOCALE_CODE_ALPHA_2);
+ # $alpha2 will now be 'fi'
+
+If the code passed is not a valid country code in
+the first code set, or if there isn't a code for the
+corresponding country in the second code set,
+then C<undef> will be returned.
+
+=back
+
+=cut
+
+#=======================================================================
+sub code2country
+{
+ my $code = shift;
+ my $codeset = @_ > 0 ? shift : LOCALE_CODE_DEFAULT;
+
+
+ return undef unless defined $code;
+
+ #-------------------------------------------------------------------
+ # Make sure the code is in the right form before we use it
+ # to look up the corresponding country.
+ # We have to sprintf because the codes are given as 3-digits,
+ # with leading 0's. Eg 052 for Barbados.
+ #-------------------------------------------------------------------
+ if ($codeset == LOCALE_CODE_NUMERIC)
+ {
+ return undef if ($code =~ /\D/);
+ $code = sprintf("%.3d", $code);
+ }
+ else
+ {
+ $code = lc($code);
+ }
+
+ if (exists $CODES->[$codeset]->{$code})
+ {
+ return $CODES->[$codeset]->{$code};
+ }
+ else
+ {
+ #---------------------------------------------------------------
+ # no such country code!
+ #---------------------------------------------------------------
+ return undef;
+ }
+}
+
+sub country2code
+{
+ my $country = shift;
+ my $codeset = @_ > 0 ? shift : LOCALE_CODE_DEFAULT;
+
+
+ return undef unless defined $country;
+ $country = lc($country);
+ if (exists $COUNTRIES->[$codeset]->{$country})
+ {
+ return $COUNTRIES->[$codeset]->{$country};
+ }
+ else
+ {
+ #---------------------------------------------------------------
+ # no such country!
+ #---------------------------------------------------------------
+ return undef;
+ }
+}
+
+sub country_code2code
+{
+ (@_ == 3) or croak "country_code2code() takes 3 arguments!";
+
+ my $code = shift;
+ my $inset = shift;
+ my $outset = shift;
+ my $outcode = shift;
+ my $country;
+
+
+ return undef if $inset == $outset;
+ $country = code2country($code, $inset);
+ return undef if not defined $country;
+ $outcode = country2code($country, $outset);
+ return $outcode;
+}
+
+#=======================================================================
+
+=head1 QUERY ROUTINES
+
+There are two function which can be used to obtain a list of all codes,
+or all country names:
+
+=over 8
+
+=item C<all_country_codes( [ CODESET ] )>
+
+Returns a list of all two-letter country codes.
+The codes are guaranteed to be all lower-case,
+and not in any particular order.
+
+=item C<all_country_names( [ CODESET ] )>
+
+Returns a list of all country names for which there is a corresponding
+country code in the specified code set.
+The names are capitalised, and not returned in any particular order.
+
+Not all countries have alpha-3 and numeric codes -
+some just have an alpha-2 code,
+so you'll get a different number of countries
+depending on which code set you specify.
+
+=back
+
+=cut
+
+#=======================================================================
+sub all_country_codes
+{
+ my $codeset = @_ > 0 ? shift : LOCALE_CODE_DEFAULT;
+
+ return keys %{ $CODES->[$codeset] };
+}
+
+sub all_country_names
+{
+ my $codeset = @_ > 0 ? shift : LOCALE_CODE_DEFAULT;
+
+ return values %{ $CODES->[$codeset] };
+}
+
+#-----------------------------------------------------------------------
+
+=head1 CODE ALIASING
+
+This module supports a semi-private routine for specifying two letter
+code aliases.
+
+ Locale::Country::_alias_code( ALIAS => CODE [, CODESET ] )
+
+This feature was added as a mechanism for handling
+a "uk" code. The ISO standard says that the two-letter code for
+"United Kingdom" is "gb", whereas domain names are all .uk.
+
+By default the module does not understand "uk", since it is implementing
+an ISO standard. If you would like 'uk' to work as the two-letter
+code for United Kingdom, use the following:
+
+ use Locale::Country;
+
+ Locale::Country::_alias_code('uk' => 'gb');
+
+With this code, both "uk" and "gb" are valid codes for United Kingdom,
+with the reverse lookup returning "uk" rather than the usual "gb".
+
+=cut
+
+#-----------------------------------------------------------------------
+
+sub _alias_code
+{
+ my $alias = shift;
+ my $real = shift;
+ my $codeset = @_ > 0 ? shift : LOCALE_CODE_DEFAULT;
+
+ my $country;
+
+
+ if (not exists $CODES->[$codeset]->{$real})
+ {
+ carp "attempt to alias \"$alias\" to unknown country code \"$real\"\n";
+ return undef;
+ }
+ $country = $CODES->[$codeset]->{$real};
+ $CODES->[$codeset]->{$alias} = $country;
+ $COUNTRIES->[$codeset]->{"\L$country"} = $alias;
+
+ return $alias;
+}
+
+#-----------------------------------------------------------------------
+
+=head1 EXAMPLES
+
+The following example illustrates use of the C<code2country()> function.
+The user is prompted for a country code, and then told the corresponding
+country name:
+
+ $| = 1; # turn off buffering
+
+ print "Enter country code: ";
+ chop($code = <STDIN>);
+ $country = code2country($code, LOCALE_CODE_ALPHA_2);
+ if (defined $country)
+ {
+ print "$code = $country\n";
+ }
+ else
+ {
+ print "'$code' is not a valid country code!\n";
+ }
+
+=head1 DOMAIN NAMES
+
+Most top-level domain names are based on these codes,
+but there are certain codes which aren't.
+If you are using this module to identify country from hostname,
+your best bet is to preprocess the country code.
+
+For example, B<edu>, B<com>, B<gov> and friends would map to B<us>;
+B<uk> would map to B<gb>. Any others?
+
+=head1 KNOWN BUGS AND LIMITATIONS
+
+=over 4
+
+=item *
+
+When using C<country2code()>, the country name must currently appear
+exactly as it does in the source of the module. For example,
+
+ country2code('United States')
+
+will return B<us>, as expected. But the following will all return C<undef>:
+
+ country2code('United States of America')
+ country2code('Great Britain')
+ country2code('U.S.A.')
+
+If there's need for it, a future version could have variants
+for country names.
+
+=item *
+
+In the current implementation, all data is read in when the
+module is loaded, and then held in memory.
+A lazy implementation would be more memory friendly.
+
+=back
+
+=head1 SEE ALSO
+
+=over 4
+
+=item Locale::Language
+
+ISO two letter codes for identification of language (ISO 639).
+
+=item Locale::Currency
+
+ISO three letter codes for identification of currencies
+and funds (ISO 4217).
+
+=item ISO 3166
+
+The ISO standard which defines these codes.
+
+=item http://www.din.de/gremien/nas/nabd/iso3166ma/
+
+Official home page for ISO 3166
+
+=item http://www.egt.ie/standards/iso3166/iso3166-1-en.html
+
+Another useful, but not official, home page.
+
+=item http://www.cia.gov/cia/publications/factbook/docs/app-f.html
+
+An appendix in the CIA world fact book which lists country codes
+as defined by ISO 3166, FIPS 10-4, and internet domain names.
+
+=back
+
+
+=head1 AUTHOR
+
+Neil Bowers E<lt>neilb@cre.canon.co.ukE<gt>
+
+=head1 COPYRIGHT
+
+Copyright (c) 1997-2001 Canon Research Centre Europe (CRE).
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=cut
+
+#-----------------------------------------------------------------------
+
+#=======================================================================
+# initialisation code - stuff the DATA into the ALPHA2 hash
+#=======================================================================
+{
+ my ($alpha2, $alpha3, $numeric);
+ my $country;
+
+
+ while (<DATA>)
+ {
+ next unless /\S/;
+ chop;
+ ($alpha2, $alpha3, $numeric, $country) = split(/:/, $_, 4);
+
+ $CODES->[LOCALE_CODE_ALPHA_2]->{$alpha2} = $country;
+ $COUNTRIES->[LOCALE_CODE_ALPHA_2]->{"\L$country"} = $alpha2;
+
+ if ($alpha3)
+ {
+ $CODES->[LOCALE_CODE_ALPHA_3]->{$alpha3} = $country;
+ $COUNTRIES->[LOCALE_CODE_ALPHA_3]->{"\L$country"} = $alpha3;
+ }
+
+ if ($numeric)
+ {
+ $CODES->[LOCALE_CODE_NUMERIC]->{$numeric} = $country;
+ $COUNTRIES->[LOCALE_CODE_NUMERIC]->{"\L$country"} = $numeric;
+ }
+
+ }
+}
+
+1;
+
+__DATA__
+ad:and:020:Andorra
+ae:are:784:United Arab Emirates
+af:afg:004:Afghanistan
+ag:atg:028:Antigua and Barbuda
+ai:aia:660:Anguilla
+al:alb:008:Albania
+am:arm:051:Armenia
+an:ant:530:Netherlands Antilles
+ao:ago:024:Angola
+aq:::Antarctica
+ar:arg:032:Argentina
+as:asm:016:American Samoa
+at:aut:040:Austria
+au:aus:036:Australia
+aw:abw:533:Aruba
+az:aze:031:Azerbaijan
+ba:bih:070:Bosnia and Herzegovina
+bb:brb:052:Barbados
+bd:bgd:050:Bangladesh
+be:bel:056:Belgium
+bf:bfa:854:Burkina Faso
+bg:bgr:100:Bulgaria
+bh:bhr:048:Bahrain
+bi:bdi:108:Burundi
+bj:ben:204:Benin
+bm:bmu:060:Bermuda
+bn:brn:096:Brunei Darussalam
+bo:bol:068:Bolivia
+br:bra:076:Brazil
+bs:bhs:044:Bahamas
+bt:btn:064:Bhutan
+bv:::Bouvet Island
+bw:bwa:072:Botswana
+by:blr:112:Belarus
+bz:blz:084:Belize
+ca:can:124:Canada
+cc:::Cocos (Keeling) Islands
+cd:cod:180:Congo, The Democratic Republic of the
+cf:caf:140:Central African Republic
+cg:cog:178:Congo
+ch:che:756:Switzerland
+ci:civ:384:Cote D'Ivoire
+ck:cok:184:Cook Islands
+cl:chl:152:Chile
+cm:cmr:120:Cameroon
+cn:chn:156:China
+co:col:170:Colombia
+cr:cri:188:Costa Rica
+cu:cub:192:Cuba
+cv:cpv:132:Cape Verde
+cx:::Christmas Island
+cy:cyp:196:Cyprus
+cz:cze:203:Czech Republic
+de:deu:276:Germany
+dj:dji:262:Djibouti
+dk:dnk:208:Denmark
+dm:dma:212:Dominica
+do:dom:214:Dominican Republic
+dz:dza:012:Algeria
+ec:ecu:218:Ecuador
+ee:est:233:Estonia
+eg:egy:818:Egypt
+eh:esh:732:Western Sahara
+er:eri:232:Eritrea
+es:esp:724:Spain
+et:eth:231:Ethiopia
+fi:fin:246:Finland
+fj:fji:242:Fiji
+fk:flk:238:Falkland Islands (Malvinas)
+fm:fsm:583:Micronesia, Federated States of
+fo:fro:234:Faroe Islands
+fr:fra:250:France
+fx:::France, Metropolitan
+ga:gab:266:Gabon
+gb:gbr:826:United Kingdom
+gd:grd:308:Grenada
+ge:geo:268:Georgia
+gf:guf:254:French Guiana
+gh:gha:288:Ghana
+gi:gib:292:Gibraltar
+gl:grl:304:Greenland
+gm:gmb:270:Gambia
+gn:gin:324:Guinea
+gp:glp:312:Guadeloupe
+gq:gnq:226:Equatorial Guinea
+gr:grc:300:Greece
+gs:::South Georgia and the South Sandwich Islands
+gt:gtm:320:Guatemala
+gu:gum:316:Guam
+gw:gnb:624:Guinea-Bissau
+gy:guy:328:Guyana
+hk:hkg:344:Hong Kong
+hm:::Heard Island and McDonald Islands
+hn:hnd:340:Honduras
+hr:hrv:191:Croatia
+ht:hti:332:Haiti
+hu:hun:348:Hungary
+id:idn:360:Indonesia
+ie:irl:372:Ireland
+il:isr:376:Israel
+in:ind:356:India
+io:::British Indian Ocean Territory
+iq:irq:368:Iraq
+ir:irn:364:Iran, Islamic Republic of
+is:isl:352:Iceland
+it:ita:380:Italy
+jm:jam:388:Jamaica
+jo:jor:400:Jordan
+jp:jpn:392:Japan
+ke:ken:404:Kenya
+kg:kgz:417:Kyrgyzstan
+kh:khm:116:Cambodia
+ki:kir:296:Kiribati
+km:com:174:Comoros
+kn:kna:659:Saint Kitts and Nevis
+kp:prk:408:Korea, Democratic People's Republic of
+kr:kor:410:Korea, Republic of
+kw:kwt:414:Kuwait
+ky:cym:136:Cayman Islands
+kz:kaz:398:Kazakstan
+la:lao:418:Lao People's Democratic Republic
+lb:lbn:422:Lebanon
+lc:lca:662:Saint Lucia
+li:lie:438:Liechtenstein
+lk:lka:144:Sri Lanka
+lr:lbr:430:Liberia
+ls:lso:426:Lesotho
+lt:ltu:440:Lithuania
+lu:lux:442:Luxembourg
+lv:lva:428:Latvia
+ly:lby:434:Libyan Arab Jamahiriya
+ma:mar:504:Morocco
+mc:mco:492:Monaco
+md:mda:498:Moldova, Republic of
+mg:mdg:450:Madagascar
+mh:mhl:584:Marshall Islands
+mk:mkd:807:Macedonia, the Former Yugoslav Republic of
+ml:mli:466:Mali
+mm:mmr:104:Myanmar
+mn:mng:496:Mongolia
+mo:mac:446:Macau
+mp:mnp:580:Northern Mariana Islands
+mq:mtq:474:Martinique
+mr:mrt:478:Mauritania
+ms:msr:500:Montserrat
+mt:mlt:470:Malta
+mu:mus:480:Mauritius
+mv:mdv:462:Maldives
+mw:mwi:454:Malawi
+mx:mex:484:Mexico
+my:mys:458:Malaysia
+mz:moz:508:Mozambique
+na:nam:516:Namibia
+nc:ncl:540:New Caledonia
+ne:ner:562:Niger
+nf:nfk:574:Norfolk Island
+ng:nga:566:Nigeria
+ni:nic:558:Nicaragua
+nl:nld:528:Netherlands
+no:nor:578:Norway
+np:npl:524:Nepal
+nr:nru:520:Nauru
+nu:niu:570:Niue
+nz:nzl:554:New Zealand
+om:omn:512:Oman
+pa:pan:591:Panama
+pe:per:604:Peru
+pf:pyf:258:French Polynesia
+pg:png:598:Papua New Guinea
+ph:phl:608:Philippines
+pk:pak:586:Pakistan
+pl:pol:616:Poland
+pm:spm:666:Saint Pierre and Miquelon
+pn:pcn:612:Pitcairn
+pr:pri:630:Puerto Rico
+ps:pse:275:Palestinian Territory, Occupied
+pt:prt:620:Portugal
+pw:plw:585:Palau
+py:pry:600:Paraguay
+qa:qat:634:Qatar
+re:reu:638:Reunion
+ro:rom:642:Romania
+ru:rus:643:Russian Federation
+rw:rwa:646:Rwanda
+sa:sau:682:Saudi Arabia
+sb:slb:090:Solomon Islands
+sc:syc:690:Seychelles
+sd:sdn:736:Sudan
+se:swe:752:Sweden
+sg:sgp:702:Singapore
+sh:shn:654:Saint Helena
+si:svn:705:Slovenia
+sj:sjm:744:Svalbard and Jan Mayen
+sk:svk:703:Slovakia
+sl:sle:694:Sierra Leone
+sm:smr:674:San Marino
+sn:sen:686:Senegal
+so:som:706:Somalia
+sr:sur:740:Suriname
+st:stp:678:Sao Tome and Principe
+sv:slv:222:El Salvador
+sy:syr:760:Syrian Arab Republic
+sz:swz:748:Swaziland
+tc:tca:796:Turks and Caicos Islands
+td:tcd:148:Chad
+tf:::French Southern Territories
+tg:tgo:768:Togo
+th:tha:764:Thailand
+tj:tjk:762:Tajikistan
+tk:tkl:772:Tokelau
+tm:tkm:795:Turkmenistan
+tn:tun:788:Tunisia
+to:ton:776:Tonga
+tp:tmp:626:East Timor
+tr:tur:792:Turkey
+tt:tto:780:Trinidad and Tobago
+tv:tuv:798:Tuvalu
+tw:twn:158:Taiwan, Province of China
+tz:tza:834:Tanzania, United Republic of
+ua:ukr:804:Ukraine
+ug:uga:800:Uganda
+um:::United States Minor Outlying Islands
+us:usa:840:United States
+uy:ury:858:Uruguay
+uz:uzb:860:Uzbekistan
+va:vat:336:Holy See (Vatican City State)
+vc:vct:670:Saint Vincent and the Grenadines
+ve:ven:862:Venezuela
+vg:vgb:092:Virgin Islands, British
+vi:vir:850:Virgin Islands, U.S.
+vn:vnm:704:Vietnam
+vu:vut:548:Vanuatu
+wf:wlf:876:Wallis and Futuna
+ws:wsm:882:Samoa
+ye:yem:887:Yemen
+yt:::Mayotte
+yu:yug:891:Yugoslavia
+za:zaf:710:South Africa
+zm:zmb:894:Zambia
+zr:::Zaire
+zw:zwe:716:Zimbabwe
diff --git a/lib/Locale/Currency.pm b/lib/Locale/Currency.pm
new file mode 100644
index 0000000000..054ac1b59d
--- /dev/null
+++ b/lib/Locale/Currency.pm
@@ -0,0 +1,529 @@
+#-----------------------------------------------------------------------
+
+=head1 NAME
+
+Locale::Currency - ISO three letter codes for currency identification (ISO 4217)
+
+=head1 SYNOPSIS
+
+ use Locale::Currency;
+
+ $curr = code2currency('usd'); # $curr gets 'US Dollar'
+ $code = currency2code('Euro'); # $code gets 'eur'
+
+ @codes = all_currency_codes();
+ @names = all_currency_names();
+
+=cut
+
+#-----------------------------------------------------------------------
+
+package Locale::Currency;
+use strict;
+require 5.002;
+
+#-----------------------------------------------------------------------
+
+=head1 DESCRIPTION
+
+The C<Locale::Currency> module provides access to the ISO three-letter
+codes for identifying currencies and funds, as defined in ISO 4217.
+You can either access the codes via the L<conversion routines>
+(described below),
+or with the two functions which return lists of all currency codes or
+all currency names.
+
+There are two special codes defined by the standard which aren't
+understood by this module:
+
+=over 4
+
+=item XTS
+
+Specifically reserved for testing purposes.
+
+=item XXX
+
+For transactions where no currency is involved.
+
+=back
+
+=cut
+
+#-----------------------------------------------------------------------
+
+require Exporter;
+
+#-----------------------------------------------------------------------
+# Public Global Variables
+#-----------------------------------------------------------------------
+use vars qw($VERSION @ISA @EXPORT);
+$VERSION = sprintf("%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/);
+@ISA = qw(Exporter);
+@EXPORT = qw(&code2currency &currency2code
+ &all_currency_codes &all_currency_names );
+
+#-----------------------------------------------------------------------
+# Private Global Variables
+#-----------------------------------------------------------------------
+my %CODES = ();
+my %CURRENCIES = ();
+
+
+#=======================================================================
+
+=head1 CONVERSION ROUTINES
+
+There are two conversion routines: C<code2currency()> and C<currency2code()>.
+
+=over 8
+
+=item code2currency()
+
+This function takes a three letter currency code and returns a string
+which contains the name of the currency identified. If the code is
+not a valid currency code, as defined by ISO 4217, then C<undef>
+will be returned.
+
+ $curr = code2currency($code);
+
+=item currency2code()
+
+This function takes a currency name and returns the corresponding
+three letter currency code, if such exists.
+If the argument could not be identified as a currency name,
+then C<undef> will be returned.
+
+ $code = currency2code('French Franc');
+
+The case of the currency name is not important.
+See the section L<KNOWN BUGS AND LIMITATIONS> below.
+
+=back
+
+=cut
+
+#=======================================================================
+sub code2currency
+{
+ my $code = shift;
+
+
+ return undef unless defined $code;
+ $code = lc($code);
+ if (exists $CODES{$code})
+ {
+ return $CODES{$code};
+ }
+ else
+ {
+ #---------------------------------------------------------------
+ # no such currency code!
+ #---------------------------------------------------------------
+ return undef;
+ }
+}
+
+sub currency2code
+{
+ my $curr = shift;
+
+
+ return undef unless defined $curr;
+ $curr = lc($curr);
+ if (exists $CURRENCIES{$curr})
+ {
+ return $CURRENCIES{$curr};
+ }
+ else
+ {
+ #---------------------------------------------------------------
+ # no such currency!
+ #---------------------------------------------------------------
+ return undef;
+ }
+}
+
+#=======================================================================
+
+=head1 QUERY ROUTINES
+
+There are two function which can be used to obtain a list of all
+currency codes, or all currency names:
+
+=over 8
+
+=item C<all_currency_codes()>
+
+Returns a list of all three-letter currency codes.
+The codes are guaranteed to be all lower-case,
+and not in any particular order.
+
+=item C<all_currency_names()>
+
+Returns a list of all currency names for which there is a corresponding
+three-letter currency code. The names are capitalised, and not returned
+in any particular order.
+
+=back
+
+=cut
+
+#=======================================================================
+sub all_currency_codes
+{
+ return keys %CODES;
+}
+
+sub all_currency_names
+{
+ return values %CODES;
+}
+
+#-----------------------------------------------------------------------
+
+=head1 EXAMPLES
+
+The following example illustrates use of the C<code2currency()> function.
+The user is prompted for a currency code, and then told the corresponding
+currency name:
+
+ $| = 1; # turn off buffering
+
+ print "Enter currency code: ";
+ chop($code = <STDIN>);
+ $curr = code2currency($code);
+ if (defined $curr)
+ {
+ print "$code = $curr\n";
+ }
+ else
+ {
+ print "'$code' is not a valid currency code!\n";
+ }
+
+=head1 KNOWN BUGS AND LIMITATIONS
+
+=over 4
+
+=item *
+
+In the current implementation, all data is read in when the
+module is loaded, and then held in memory.
+A lazy implementation would be more memory friendly.
+
+=item *
+
+This module also includes the special codes which are
+not for a currency, such as Gold, Platinum, etc.
+This might cause a problem if you're using this module
+to display a list of currencies.
+Let Neil know if this does cause a problem, and we can
+do something about it.
+
+=item *
+
+ISO 4217 also defines a numeric code for each currency.
+Currency codes are not currently supported by this module.
+
+=item *
+
+There are three cases where there is more than one
+code for the same currency name.
+Kwacha has two codes: mwk for Malawi, and zmk for Zambia.
+The Russian Ruble has two codes: rub and rur.
+The Belarussian Ruble has two codes: byr and byb.
+The currency2code() function only returns one code, so
+you might not get back the code you expected.
+
+=back
+
+=head1 SEE ALSO
+
+=over 4
+
+=item Locale::Country
+
+ISO codes for identification of country (ISO 3166).
+Supports alpha-2, alpha-3, and numeric codes.
+The currency codes use the alpha-2 codeset.
+
+=item ISO 4217:1995
+
+Code for the representation of currencies and funds.
+
+=item http://www.bsi-global.com/iso4217currency
+
+Official web page for the ISO 4217 maintenance agency.
+This has the latest list of codes, in MS Word format. Boo.
+
+=back
+
+=head1 AUTHOR
+
+Michael Hennecke E<lt>hennecke@rz.uni-karlsruhe.deE<gt>
+and
+Neil Bowers E<lt>neilb@cre.canon.co.ukE<gt>
+
+=head1 COPYRIGHT
+
+Copyright (c) 2001 Michael Hennecke and
+Canon Research Centre Europe (CRE).
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=cut
+
+#-----------------------------------------------------------------------
+
+#=======================================================================
+# initialisation code - stuff the DATA into the CODES hash
+#=======================================================================
+{
+ my $code;
+ my $currency;
+
+
+ while (<DATA>)
+ {
+ next unless /\S/;
+ chop;
+ ($code, $currency) = split(/:/, $_, 2);
+ $CODES{$code} = $currency;
+ $CURRENCIES{"\L$currency"} = $code;
+ }
+}
+
+1;
+
+__DATA__
+adp:Andorran Peseta
+aed:UAE Dirham
+afa:Afghani
+all:Lek
+amd:Armenian Dram
+ang:Netherlands Antillean Guilder
+aoa:Kwanza
+aon:New Kwanza
+aor:Kwanza Reajustado
+ars:Argentine Peso
+ats:Schilling
+aud:Australian Dollar
+awg:Aruban Guilder
+azm:Azerbaijanian Manat
+
+bam:Convertible Marks
+bbd:Barbados Dollar
+bdt:Taka
+bef:Belgian Franc
+bgl:Lev
+bgn:Bulgarian Lev
+bhd:Bahraini Dinar
+bhd:Dinar
+bif:Burundi Franc
+bmd:Bermudian Dollar
+bnd:Brunei Dollar
+bob:Boliviano
+bov:MVDol
+brl:Brazilian Real
+bsd:Bahamian Dollar
+btn:Ngultrum
+bwp:Pula
+byb:Belarussian Ruble
+byr:Belarussian Ruble
+bzd:Belize Dollar
+
+cad:Candian Dollar
+cdf:Franc Congolais
+chf:Swiss Franc
+clf:Unidades de Formento
+clp:Chilean Peso
+cny:Yuan Renminbi
+cop:Colombian Peso
+crc:Costa Rican Colon
+cup:Cuban Peso
+cve:Cape Verde Escudo
+cyp:Cyprus Pound
+czk:Czech Koruna
+
+dem:German Mark
+djf:Djibouti Franc
+dkk:Danish Krone
+dop:Dominican Peso
+dzd:Algerian Dinar
+
+ecs:Sucre
+ecv:Unidad de Valor Constante (UVC)
+eek:Kroon
+egp:Egyptian Pound
+ern:Nakfa
+esp:Spanish Peseta
+etb:Ethiopian Birr
+eur:Euro
+
+fim:Markka
+fjd:Fiji Dollar
+fkp:Falkland Islands Pound
+frf:French Franc
+
+gbp:Pound Sterling
+gel:Lari
+ghc:Cedi
+gip:Gibraltar Pound
+gmd:Dalasi
+gnf:Guinea Franc
+grd:Drachma
+gtq:Quetzal
+gwp:Guinea-Bissau Peso
+gyd:Guyana Dollar
+
+hkd:Hong Kong Dollar
+hnl:Lempira
+hrk:Kuna
+htg:Gourde
+huf:Forint
+
+idr:Rupiah
+iep:Irish Pound
+ils:Shekel
+inr:Indian Rupee
+iqd:Iraqi Dinar
+irr:Iranian Rial
+isk:Iceland Krona
+itl:Italian Lira
+
+jmd:Jamaican Dollar
+jod:Jordanian Dinar
+jpy:Yen
+
+kes:Kenyan Shilling
+kgs:Som
+khr:Riel
+kmf:Comoro Franc
+kpw:North Korean Won
+krw:Won
+kwd:Kuwaiti Dinar
+kyd:Cayman Islands Dollar
+kzt:Tenge
+
+lak:Kip
+lbp:Lebanese Pound
+lkr:Sri Lanka Rupee
+lrd:Liberian Dollar
+lsl:Loti
+ltl:Lithuanian Litas
+luf:Luxembourg Franc
+lvl:Latvian Lats
+lyd:Libyan Dinar
+
+mad:Moroccan Dirham
+mdl:Moldovan Leu
+mgf:Malagasy Franc
+mkd:Denar
+mmk:Kyat
+mnt:Tugrik
+mop:Pataca
+mro:Ouguiya
+mtl:Maltese Lira
+mur:Mauritius Rupee
+mvr:Rufiyaa
+mwk:Kwacha
+mxn:Mexican Nuevo Peso
+myr:Malaysian Ringgit
+mzm:Metical
+
+nad:Namibia Dollar
+ngn:Naira
+nio:Cordoba Oro
+nlg:Netherlands Guilder
+nok:Norwegian Krone
+npr:Nepalese Rupee
+nzd:New Zealand Dollar
+
+omr:Rial Omani
+
+pab:Balboa
+pen:Nuevo Sol
+pgk:Kina
+php:Philippine Peso
+pkr:Pakistan Rupee
+pln:Zloty
+pte:Portuguese Escudo
+pyg:Guarani
+
+qar:Qatari Rial
+
+rol:Leu
+rub:Russian Ruble
+rur:Russian Ruble
+rwf:Rwanda Franc
+
+sar:Saudi Riyal
+sbd:Solomon Islands Dollar
+scr:Seychelles Rupee
+sdd:Sudanese Dinar
+sek:Swedish Krona
+sgd:Singapore Dollar
+shp:St. Helena Pound
+sit:Tolar
+skk:Slovak Koruna
+sll:Leone
+sos:Somali Shilling
+srg:Surinam Guilder
+std:Dobra
+svc:El Salvador Colon
+syp:Syrian Pound
+szl:Lilangeni
+
+thb:Baht
+tjr:Tajik Ruble
+tmm:Manat
+tnd:Tunisian Dollar
+top:Pa'anga
+tpe:Timor Escudo
+trl:Turkish Lira
+ttd:Trinidad and Tobago Dollar
+twd:New Taiwan Dollar
+tzs:Tanzanian Shilling
+
+uah:Hryvnia
+uak:Karbovanets
+ugx:Uganda Shilling
+usd:US Dollar
+usn:US Dollar (Next day)
+uss:US Dollar (Same day)
+uyu:Peso Uruguayo
+uzs:Uzbekistan Sum
+
+veb:Bolivar
+vnd:Dong
+vuv:Vatu
+
+wst:Tala
+
+xaf:CFA Franc BEAC
+xag:Silver
+xau:Gold
+xba:European Composite Unit
+xbb:European Monetary Unit
+xbc:European Unit of Account 9
+xb5:European Unit of Account 17
+xcd:East Caribbean Dollar
+xdr:SDR
+xeu:ECU (until 1998-12-31)
+xfu:UIC-Franc
+xfo:Gold-Franc
+xof:CFA Franc BCEAO
+xpd:Palladium
+xpf:CFP Franc
+xpt:Platinum
+
+yer:Yemeni Rial
+yum:New Dinar
+
+zal:Financial Rand
+zar:Rand
+zmk:Kwacha
+zrn:New Zaire
+zwd:Zimbabwe Dollar
diff --git a/lib/Locale/Language.pm b/lib/Locale/Language.pm
new file mode 100644
index 0000000000..c561157deb
--- /dev/null
+++ b/lib/Locale/Language.pm
@@ -0,0 +1,455 @@
+#-----------------------------------------------------------------------
+
+=head1 NAME
+
+Locale::Language - ISO two letter codes for language identification (ISO 639)
+
+=head1 SYNOPSIS
+
+ use Locale::Language;
+
+ $lang = code2language('en'); # $lang gets 'English'
+ $code = language2code('French'); # $code gets 'fr'
+
+ @codes = all_language_codes();
+ @names = all_language_names();
+
+=cut
+
+#-----------------------------------------------------------------------
+
+package Locale::Language;
+use strict;
+require 5.002;
+
+#-----------------------------------------------------------------------
+
+=head1 DESCRIPTION
+
+The C<Locale::Language> module provides access to the ISO two-letter
+codes for identifying languages, as defined in ISO 639. You can either
+access the codes via the L<conversion routines> (described below),
+or with the two functions which return lists of all language codes or
+all language names.
+
+=cut
+
+#-----------------------------------------------------------------------
+
+require Exporter;
+
+#-----------------------------------------------------------------------
+# Public Global Variables
+#-----------------------------------------------------------------------
+use vars qw($VERSION @ISA @EXPORT);
+$VERSION = sprintf("%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/);
+@ISA = qw(Exporter);
+@EXPORT = qw(&code2language &language2code
+ &all_language_codes &all_language_names );
+
+#-----------------------------------------------------------------------
+# Private Global Variables
+#-----------------------------------------------------------------------
+my %CODES = ();
+my %LANGUAGES = ();
+
+
+#=======================================================================
+
+=head1 CONVERSION ROUTINES
+
+There are two conversion routines: C<code2language()> and C<language2code()>.
+
+=over 8
+
+=item code2language()
+
+This function takes a two letter language code and returns a string
+which contains the name of the language identified. If the code is
+not a valid language code, as defined by ISO 639, then C<undef>
+will be returned.
+
+ $lang = code2language($code);
+
+=item language2code()
+
+This function takes a language name and returns the corresponding
+two letter language code, if such exists.
+If the argument could not be identified as a language name,
+then C<undef> will be returned.
+
+ $code = language2code('French');
+
+The case of the language name is not important.
+See the section L<KNOWN BUGS AND LIMITATIONS> below.
+
+=back
+
+=cut
+
+#=======================================================================
+sub code2language
+{
+ my $code = shift;
+
+
+ return undef unless defined $code;
+ $code = lc($code);
+ if (exists $CODES{$code})
+ {
+ return $CODES{$code};
+ }
+ else
+ {
+ #---------------------------------------------------------------
+ # no such language code!
+ #---------------------------------------------------------------
+ return undef;
+ }
+}
+
+sub language2code
+{
+ my $lang = shift;
+
+
+ return undef unless defined $lang;
+ $lang = lc($lang);
+ if (exists $LANGUAGES{$lang})
+ {
+ return $LANGUAGES{$lang};
+ }
+ else
+ {
+ #---------------------------------------------------------------
+ # no such language!
+ #---------------------------------------------------------------
+ return undef;
+ }
+}
+
+#=======================================================================
+
+=head1 QUERY ROUTINES
+
+There are two function which can be used to obtain a list of all
+language codes, or all language names:
+
+=over 8
+
+=item C<all_language_codes()>
+
+Returns a list of all two-letter language codes.
+The codes are guaranteed to be all lower-case,
+and not in any particular order.
+
+=item C<all_language_names()>
+
+Returns a list of all language names for which there is a corresponding
+two-letter language code. The names are capitalised, and not returned
+in any particular order.
+
+=back
+
+=cut
+
+#=======================================================================
+sub all_language_codes
+{
+ return keys %CODES;
+}
+
+sub all_language_names
+{
+ return values %CODES;
+}
+
+#-----------------------------------------------------------------------
+
+=head1 EXAMPLES
+
+The following example illustrates use of the C<code2language()> function.
+The user is prompted for a language code, and then told the corresponding
+language name:
+
+ $| = 1; # turn off buffering
+
+ print "Enter language code: ";
+ chop($code = <STDIN>);
+ $lang = code2language($code);
+ if (defined $lang)
+ {
+ print "$code = $lang\n";
+ }
+ else
+ {
+ print "'$code' is not a valid language code!\n";
+ }
+
+=head1 KNOWN BUGS AND LIMITATIONS
+
+=over 4
+
+=item *
+
+In the current implementation, all data is read in when the
+module is loaded, and then held in memory.
+A lazy implementation would be more memory friendly.
+
+=item *
+
+Currently just supports the two letter language codes -
+there are also three-letter codes, and numbers.
+Would these be of any use to anyone?
+
+=back
+
+=head1 SEE ALSO
+
+=over 4
+
+=item Locale::Country
+
+ISO codes for identification of country (ISO 3166).
+Supports 2-letter, 3-letter, and numeric country codes.
+
+=item Locale::Currency
+
+ISO three letter codes for identification of currencies and funds (ISO 4217).
+
+=item ISO 639:1988 (E/F)
+
+Code for the representation of names of languages.
+
+=item http://lcweb.loc.gov/standards/iso639-2/langhome.html
+
+Home page for ISO 639-2
+
+=back
+
+
+=head1 AUTHOR
+
+Neil Bowers E<lt>neilb@cre.canon.co.ukE<gt>
+
+=head1 COPYRIGHT
+
+Copyright (c) 1997-2001 Canon Research Centre Europe (CRE).
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=cut
+
+#-----------------------------------------------------------------------
+
+#=======================================================================
+# initialisation code - stuff the DATA into the CODES hash
+#=======================================================================
+{
+ my $code;
+ my $language;
+
+
+ while (<DATA>)
+ {
+ next unless /\S/;
+ chop;
+ ($code, $language) = split(/:/, $_, 2);
+ $CODES{$code} = $language;
+ $LANGUAGES{"\L$language"} = $code;
+ }
+}
+
+1;
+
+__DATA__
+aa:Afar
+ab:Abkhazian
+ae:Avestan
+af:Afrikaans
+am:Amharic
+ar:Arabic
+as:Assamese
+ay:Aymara
+az:Azerbaijani
+
+ba:Bashkir
+be:Belarusian
+bg:Bulgarian
+bh:Bihari
+bi:Bislama
+bn:Bengali
+bo:Tibetan
+br:Breton
+bs:Bosnian
+
+ca:Catalan
+ce:Chechen
+ch:Chamorro
+co:Corsican
+cs:Czech
+cu:Church Slavic
+cv:Chuvash
+cy:Welsh
+
+da:Danish
+de:German
+dz:Dzongkha
+
+el:Greek
+en:English
+eo:Esperanto
+es:Spanish
+et:Estonian
+eu:Basque
+
+fa:Persian
+fi:Finnish
+fj:Fijian
+fo:Faeroese
+fr:French
+fy:Frisian
+
+ga:Irish
+gd:Gaelic (Scots)
+gl:Gallegan
+gn:Guarani
+gu:Gujarati
+gv:Manx
+
+ha:Hausa
+he:Hebrew
+hi:Hindi
+ho:Hiri Motu
+hr:Croatian
+hu:Hungarian
+hy:Armenian
+hz:Herero
+
+ia:Interlingua
+id:Indonesian
+ie:Interlingue
+ik:Inupiaq
+is:Icelandic
+it:Italian
+iu:Inuktitut
+
+ja:Japanese
+jw:Javanese
+
+ka:Georgian
+ki:Kikuyu
+kj:Kuanyama
+kk:Kazakh
+kl:Kalaallisut
+km:Khmer
+kn:Kannada
+ko:Korean
+ks:Kashmiri
+ku:Kurdish
+kv:Komi
+kw:Cornish
+ky:Kirghiz
+
+la:Latin
+lb:Letzeburgesch
+ln:Lingala
+lo:Lao
+lt:Lithuanian
+lv:Latvian
+
+mg:Malagasy
+mh:Marshall
+mi:Maori
+mk:Macedonian
+ml:Malayalam
+mn:Mongolian
+mo:Moldavian
+mr:Marathi
+ms:Malay
+mt:Maltese
+my:Burmese
+
+na:Nauru
+nb:Norwegian Bokmål
+nd:Ndebele, North
+ne:Nepali
+ng:Ndonga
+nl:Dutch
+nn:Norwegian Nynorsk
+no:Norwegian
+nr:Ndebele, South
+nv:Navajo
+ny:Chichewa; Nyanja
+
+oc:Occitan (post 1500)
+om:Oromo
+or:Oriya
+os:Ossetian; Ossetic
+
+pa:Panjabi
+pi:Pali
+pl:Polish
+ps:Pushto
+pt:Portuguese
+
+qu:Quechua
+
+rm:Rhaeto-Romance
+rn:Rundi
+ro:Romanian
+ru:Russian
+rw:Kinyarwanda
+
+sa:Sanskrit
+sc:Sardinian
+sd:Sindhi
+se:Sami
+sg:Sango
+si:Sinhalese
+sk:Slovak
+sl:Slovenian
+sm:Samoan
+sn:Shona
+so:Somali
+sq:Albanian
+sr:Serbian
+ss:Swati
+st:Sotho
+su:Sundanese
+sv:Swedish
+sw:Swahili
+
+ta:Tamil
+te:Telugu
+tg:Tajik
+th:Thai
+ti:Tigrinya
+tk:Turkmen
+tl:Tagalog
+tn:Tswana
+to:Tonga
+tr:Turkish
+ts:Tsonga
+tt:Tatar
+tw:Twi
+
+ug:Uighur
+uk:Ukrainian
+ur:Urdu
+uz:Uzbek
+
+vi:Vietnamese
+vo:Volapük
+
+wo:Wolof
+
+xh:Xhosa
+
+yi:Yiddish
+yo:Yoruba
+
+za:Zhuang
+zh:Chinese
+zu:Zulu
diff --git a/lib/Switch.pm b/lib/Switch.pm
index dfab91cbd9..1b84371a10 100644
--- a/lib/Switch.pm
+++ b/lib/Switch.pm
@@ -781,6 +781,5 @@ Bug reports and other feedback are most welcome.
=head1 COPYRIGHT
Copyright (c) 1997-2000, Damian Conway. All Rights Reserved.
-This module is free software. It may be used, redistributed
-and/or modified under the terms of the Perl Artistic License
- (see http://www.perl.com/perl/misc/Artistic.html)
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
diff --git a/lib/Term/ANSIColor.pm b/lib/Term/ANSIColor.pm
index b61efcb045..09ca297d33 100644
--- a/lib/Term/ANSIColor.pm
+++ b/lib/Term/ANSIColor.pm
@@ -187,7 +187,7 @@ Term::ANSIColor - Color screen output using ANSI escape sequences
This module has two interfaces, one through color() and colored() and the
other through constants.
-
+
color() takes any number of strings as arguments and considers them to be
space-separated lists of attributes. It then forms and returns the escape
sequence to set those attributes. It doesn't print it out, just returns
diff --git a/lib/Test.pm b/lib/Test.pm
index 89b9cec43f..19a9089978 100644
--- a/lib/Test.pm
+++ b/lib/Test.pm
@@ -151,7 +151,7 @@ __END__
=head1 NAME
- Test - provides a simple framework for writing test scripts
+Test - provides a simple framework for writing test scripts
=head1 SYNOPSIS
diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm
index 55a84fe066..73f3f79119 100644
--- a/lib/Test/Harness.pm
+++ b/lib/Test/Harness.pm
@@ -650,7 +650,7 @@ test program.
=over 4
-=item B<1..M>
+=item B<'1..M'>
This header tells how many tests there will be. It should be the
first line output by your test program (but its okay if its preceded
diff --git a/lib/Text/Balanced.pod b/lib/Text/Balanced.pod
index 7113af33f6..75d67aa2a4 100644
--- a/lib/Text/Balanced.pod
+++ b/lib/Text/Balanced.pod
@@ -1201,6 +1201,5 @@ Bug reports and other feedback are most welcome.
=head1 COPYRIGHT
Copyright (c) 1997-2000, Damian Conway. All Rights Reserved.
- This module is free software. It may be used, redistributed
-and/or modified under the terms of the Perl Artistic License
- (see http://www.perl.com/perl/misc/Artistic.html)
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
diff --git a/lib/Text/Wrap.pm b/lib/Text/Wrap.pm
index 579e09b395..3c88508b36 100644
--- a/lib/Text/Wrap.pm
+++ b/lib/Text/Wrap.pm
@@ -120,7 +120,7 @@ B<Example 2>
$huge = 'overflow';
B<Example 3>
-
+
use Text::Wrap
$Text::Wrap::columns = 72;
diff --git a/lib/Tie/Array.pm b/lib/Tie/Array.pm
index f4c6193596..5b8423e943 100644
--- a/lib/Tie/Array.pm
+++ b/lib/Tie/Array.pm
@@ -179,7 +179,7 @@ For developers wishing to write their own tied arrays, the required methods
are briefly defined below. See the L<perltie> section for more detailed
descriptive, as well as example code:
-=over
+=over 4
=item TIEARRAY classname, LIST
diff --git a/lib/Tie/Handle.pm b/lib/Tie/Handle.pm
index 81b0792249..638cdf7861 100644
--- a/lib/Tie/Handle.pm
+++ b/lib/Tie/Handle.pm
@@ -33,7 +33,7 @@ For developers wishing to write their own tied-handle classes, the methods
are summarized below. The L<perltie> section not only documents these, but
has sample code as well:
-=over
+=over 4
=item TIEHANDLE classname, LIST
diff --git a/lib/Tie/Hash.pm b/lib/Tie/Hash.pm
index 7399d8b853..3231155c81 100644
--- a/lib/Tie/Hash.pm
+++ b/lib/Tie/Hash.pm
@@ -10,24 +10,24 @@ Tie::Hash, Tie::StdHash - base class definitions for tied hashes
package NewHash;
require Tie::Hash;
-
+
@ISA = (Tie::Hash);
-
+
sub DELETE { ... } # Provides needed method
sub CLEAR { ... } # Overrides inherited method
-
-
+
+
package NewStdHash;
require Tie::Hash;
-
+
@ISA = (Tie::StdHash);
-
+
# All methods provided by default, define only those needing overrides
sub DELETE { ... }
-
-
+
+
package main;
-
+
tie %new_hash, 'NewHash';
tie %new_std_hash, 'NewStdHash';
@@ -46,7 +46,7 @@ For developers wishing to write their own tied hashes, the required methods
are briefly defined below. See the L<perltie> section for more detailed
descriptive, as well as example code:
-=over
+=over 4
=item TIEHASH classname, LIST
diff --git a/lib/Tie/Scalar.pm b/lib/Tie/Scalar.pm
index 39480c8a28..bcaad0b11e 100644
--- a/lib/Tie/Scalar.pm
+++ b/lib/Tie/Scalar.pm
@@ -47,7 +47,7 @@ For developers wishing to write their own tied-scalar classes, the methods
are summarized below. The L<perltie> section not only documents these, but
has sample code as well:
-=over
+=over 4
=item TIESCALAR classname, LIST
diff --git a/lib/User/pwent.pm b/lib/User/pwent.pm
index edd5f51dc7..91d23bd3f6 100644
--- a/lib/User/pwent.pm
+++ b/lib/User/pwent.pm
@@ -287,7 +287,7 @@ Tom Christiansen
=head1 HISTORY
-=over
+=over 4
=item March 18th, 2000
diff --git a/lib/autouse.pm b/lib/autouse.pm
index 179c382ca2..5e4f30f649 100644
--- a/lib/autouse.pm
+++ b/lib/autouse.pm
@@ -116,7 +116,7 @@ with the correct definitions.
Using C<autouse> will move important steps of your program's execution
from compile time to runtime. This can
-=over
+=over 4
=item *
diff --git a/lib/overload.pm b/lib/overload.pm
index 21a4b671ff..d355f6aa85 100644
--- a/lib/overload.pm
+++ b/lib/overload.pm
@@ -267,7 +267,7 @@ is called with arguments C<($a,undef,'')> when $a++ is executed.
Two types of mutators have different calling conventions:
-=over
+=over 4
=item C<++> and C<-->
@@ -450,7 +450,7 @@ A computer-readable form of the above table is available in the hash
Inheritance interacts with overloading in two ways.
-=over
+=over 4
=item Strings as values of C<use overload> directive
@@ -1028,7 +1028,7 @@ reference to the intermediate array, which keeps a reference to an
actual array, and the access hash. The tie()ing object for the access
hash is a reference to a reference to the actual array, so
-=over
+=over 4
=item *
@@ -1058,8 +1058,8 @@ Put this in F<symbolic.pm> in your Perl library directory:
}
This module is very unusual as overloaded modules go: it does not
-provide any usual overloaded operators, instead it provides the L<Last
-Resort> operator C<nomethod>. In this example the corresponding
+provide any usual overloaded operators, instead it provides the
+L<Last Resort> operator C<nomethod>. In this example the corresponding
subroutine returns an object which encapsulates operations done over
the objects: C<new symbolic 3> contains C<['n', 3]>, C<2 + new
symbolic 3> contains C<['+', 2, ['n', 3]]>.
diff --git a/op.c b/op.c
index 421dc9e69d..64914ea309 100644
--- a/op.c
+++ b/op.c
@@ -2872,11 +2872,8 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
}
}
}
- if (!del) {
- if (j >= rlen)
- j = rlen - 1;
- else
- cPVOPo->op_pv = (char*)Renew(tbl, 0x101+rlen-j, short);
+ if (!del && rlen >= j) {
+ cPVOPo->op_pv = (char*)Renew(tbl, 0x101+rlen-j, short);
tbl[0x100] = rlen - j;
for (i=0; i < rlen - j; i++)
tbl[0x101+i] = r[j+i];
diff --git a/os2/OS2/ExtAttr/ExtAttr.pm b/os2/OS2/ExtAttr/ExtAttr.pm
index bebbcc963e..c8b462c70c 100644
--- a/os2/OS2/ExtAttr/ExtAttr.pm
+++ b/os2/OS2/ExtAttr/ExtAttr.pm
@@ -133,7 +133,7 @@ OS2::ExtAttr - Perl access to extended attributes.
tie %ea, 'OS2::ExtAttr', 'my.file';
print $ea{eaname};
$ea{myfield} = 'value';
-
+
untie %ea;
=head1 DESCRIPTION
diff --git a/os2/OS2/Process/Process.pm b/os2/OS2/Process/Process.pm
index 88de2bfad5..556732e155 100644
--- a/os2/OS2/Process/Process.pm
+++ b/os2/OS2/Process/Process.pm
@@ -128,14 +128,14 @@ C<file_type(file)>, get_title() and C<set_title(newtitle)> are implemented.
my_type() returns the type of the current process (one of
"FS", "DOS", "VIO", "PM", "DETACH" and "UNKNOWN"), or C<undef> on error.
-=over
+=over 4
=item C<file_type(file)>
returns the type of the executable file C<file>, or
dies on error. The bits 0-2 of the result contain one of the values
-=over
+=over 4
=item C<T_NOTSPEC> (0)
@@ -158,7 +158,7 @@ Application type is window-API.
The remaining bits should be masked with the following values to
determine the type of the executable:
-=over
+=over 4
=item C<T_BOUND> (8)
@@ -204,46 +204,46 @@ to suppress).
returns a list of the following data:
-=over
+=over 4
-=item
+=item *
Title of the process (in the C<Ctrl-Esc> list);
-=item
+=item *
window handle of switch entry of the process (in the C<Ctrl-Esc> list);
-=item
+=item *
window handle of the icon of the process;
-=item
+=item *
process handle of the owner of the entry in C<Ctrl-Esc> list;
-=item
+=item *
process id of the owner of the entry in C<Ctrl-Esc> list;
-=item
+=item *
session id of the owner of the entry in C<Ctrl-Esc> list;
-=item
+=item *
whether visible in C<Ctrl-Esc> list;
-=item
+=item *
whether item cannot be switched to (note that it is not actually
grayed in the C<Ctrl-Esc> list));
-=item
+=item *
whether participates in jump sequence;
-=item
+=item *
program type. Possible values are:
@@ -263,7 +263,6 @@ is a windowed WIN-OS/2 program, it runs in a PROG_WINDOWEDVDM
session. Likewise, if it's a full-screen WIN-OS/2 program, it runs in
a PROG_VDM session.
-
=back
=item C<set_title(newtitle)>
diff --git a/patchlevel.h b/patchlevel.h
index b3c08c1e0d..b0630b8304 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -70,7 +70,7 @@
#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT)
static char *local_patches[] = {
NULL
- ,"DEVEL9124"
+ ,"DEVEL9171"
,NULL
};
diff --git a/pod/perl5005delta.pod b/pod/perl5005delta.pod
index 4b50f402c4..78bf90f616 100644
--- a/pod/perl5005delta.pod
+++ b/pod/perl5005delta.pod
@@ -609,6 +609,8 @@ Various pragmata to control behavior of regular expressions.
You can now run tests for I<x> seconds instead of guessing the right
number of tests to run.
+Keeps better time.
+
=item Carp
Carp has a new function cluck(). cluck() warns, like carp(), but also adds
@@ -666,10 +668,6 @@ See <perlmodinstall> and L<CPAN>.
Cwd::cwd is faster on most platforms.
-=item Benchmark
-
-Keeps better time.
-
=back
=head1 Utility Changes
diff --git a/pod/perldebtut.pod b/pod/perldebtut.pod
index ece5848269..e11102e567 100644
--- a/pod/perldebtut.pod
+++ b/pod/perldebtut.pod
@@ -21,10 +21,10 @@ straightforward when it comes to debugging perl programs, without using the
debugger at all. To demonstrate, here's a simple script with a problem:
#!/usr/bin/perl
-
+
$var1 = 'Hello World'; # always wanted to do that :-)
$var2 = "$varl\n";
-
+
print $var2;
exit;
@@ -45,7 +45,7 @@ first line of the script.
Now when you run it, perl complains about the 3 undeclared variables and we
get four error messages because one variable is referenced twice:
-
+
Global symbol "$var1" requires explicit package name at ./t1 line 4.
Global symbol "$var2" requires explicit package name at ./t1 line 5.
Global symbol "$varl" requires explicit package name at ./t1 line 5.
@@ -57,11 +57,11 @@ script looks like this:
#!/usr/bin/perl
use strict;
-
+
my $var1 = 'Hello World';
my $varl = '';
my $var2 = "$varl\n";
-
+
print $var2;
exit;
@@ -97,7 +97,7 @@ dynamic variable, just before using it?
Looks OK, after it's been through the syntax check (perl -c scriptname), we
run it and all we get is a blank line again! Hmmmm.
-
+
One common debugging approach here, would be to liberally sprinkle a few print
statements, to add a check just before we print out our data, and another just
after:
@@ -107,10 +107,10 @@ after:
print "done: '$data{$key}'\n";
And try again:
-
+
> perl data
All OK
-
+
done: ''
After much staring at the same piece of code and not seeing the wood for the
@@ -137,7 +137,7 @@ just the letter 'B<q>', not the words 'quit' or 'exit':
DB<1> q
>
-
+
That's it, you're back on home turf again.
@@ -174,7 +174,7 @@ break/watch/actions
V [Pk [Vars]] List Variables in Package. Vars can be ~pattern or !pattern.
X [Vars] Same as "V current_package [Vars]".
For more help, type h cmd_letter, or run man perldebug for all docs.
-
+
More confusing options than you can shake a big stick at! It's not as bad as
it looks and it's very useful to know more about all of it, and fun too!
@@ -196,7 +196,7 @@ the 'name':
DM<3>X ~err
FileHandle(stderr) => fileno(2)
-
+
Remember we're in our tiny program with a problem, we should have a look at
where we are, and what our data looks like. First of all let's have a window
on our present position (the first line of code in this case), via the letter
@@ -216,7 +216,7 @@ on our present position (the first line of code in this case), via the letter
At line number 4 is a helpful pointer, that tells you where you are now. To
see more code, type 'w' again:
-
+
DB<4> w
8 'welcome' => q(Hello World),
9 'zip' => q(welcome),
@@ -231,19 +231,19 @@ And if you wanted to list line 5 again, type 'l 5', (note the space):
DB<4> l 5
5: my %data = (
-
+
In this case, there's not much to see, but of course normally there's pages of
stuff to wade through, and 'l' can be very useful. To reset your view to the
line we're about to execute, type a lone period '.':
DB<5> .
main::(./data_a:4): my $key = 'welcome';
-
+
The line shown is the one that is about to be executed B<next>, it hasn't
happened yet. So while we can print a variable with the letter 'B<p>', at
this point all we'd get is an empty (undefined) value back. What we need to
do is to step through the next executable statement with an 'B<s>':
-
+
DB<6> s
main::(./data_a:5): my %data = (
main::(./data_a:6): 'this' => qw(that),
@@ -264,21 +264,21 @@ line or sub routine:
DB<8> c 13
All OK
main::(./data_a:13): print "$data{$key}\n";
-
+
We've gone past our check (where 'All OK' was printed) and have stopped just
before the meat of our task. We could try to print out a couple of variables
to see what is happening:
DB<9> p $data{$key}
-
+
Not much in there, lets have a look at our hash:
-
+
DB<10> p %data
Hello Worldziptomandwelcomejerrywelcomethisthat
DB<11> p keys %data
Hello Worldtomwelcomejerrythis
-
+
Well, this isn't very easy to read, and using the helpful manual (B<h h>), the
'B<x>' command looks promising:
@@ -349,7 +349,7 @@ Now build an on-the-fly object over a couple of lines (note the backslash):
cont: {'col' => 'black', 'things' => [qw(this that etc)]}}, 'MY_class')
And let's have a look at it:
-
+
DB<2> x $obj
0 MY_class=HASH(0x828ad98)
'attr' => HASH(0x828ad68)
@@ -365,7 +365,7 @@ Useful, huh? You can eval nearly anything in there, and experiment with bits
of code or regexes until the cows come home:
DB<3> @data = qw(this that the other atheism leather theory scythe)
-
+
DB<4> p 'saw -> '.($cnt += map { print "\t:\t$_\n" } grep(/the/, sort @data))
atheism
leather
@@ -384,7 +384,7 @@ If you want to see the command History, type an 'B<H>':
1: $obj = bless({'unique_id'=>'123', 'attr'=>
{'col' => 'black', 'things' => [qw(this that etc)]}}, 'MY_class')
DB<5>
-
+
And if you want to repeat any previous command, use the exclamation: 'B<!>':
DB<5> !4
@@ -446,22 +446,22 @@ expected output. This is what it does:
> temp -c0.72
33.30 f
-
+
> temp -f33.3
162.94 c
-
+
Not very consistent! We'll set a breakpoint in the code manually and run it
under the debugger to see what's going on. A breakpoint is a flag, to which
the debugger will run without interruption, when it reaches the breakpoint, it
will stop execution and offer a prompt for further interaction. In normal
use, these debugger commands are completely ignored, and they are safe - if a
little messy, to leave in production code.
-
+
my ($in, $out) = ($num, $num);
$DB::single=2; # insert at line 9!
if ($deg eq 'c')
...
-
+
> perl -d temp -f33.3
Default die handler restored.
@@ -478,7 +478,7 @@ We'll simply continue down to our pre-set breakpoint with a 'B<c>':
main::(temp:10): if ($deg eq 'c') {
Followed by a window command to see where we are:
-
+
DB<1> w
7: my ($deg, $num) = ($1, $2);
8: my ($in, $out) = ($num, $num);
@@ -499,9 +499,9 @@ And a print to show what values we're currently using:
We can put another break point on any line beginning with a colon, we'll use
line 17 as that's just as we come out of the subroutine, and we'd like to
pause there later on:
-
+
DB<2> b 17
-
+
There's no feedback from this, but you can see what breakpoints are set by
using the list 'L' command:
@@ -550,13 +550,13 @@ possibilities with our sum:
DB<6> p (5 * $f - 32 / 9)
162.944444444444
-
+
DB<7> p 5 * $f - (32 / 9)
162.944444444444
-
+
DB<8> p (5 * $f) - 32 / 9
162.944444444444
-
+
DB<9> p 5 * ($f - 32) / 9
0.722222222222221
@@ -564,10 +564,10 @@ possibilities with our sum:
return out of the sub with an 'r':
DB<10> $c = 5 * ($f - 32) / 9
-
+
DB<11> r
scalar context return from main::f2c: 0.722222222222221
-
+
Looks good, let's just continue off the end of the script:
DB<12> c
@@ -585,11 +585,11 @@ actual program and we're finished.
Actions, watch variables, stack traces etc.: on the TODO list.
a
-
+
W
-
+
t
-
+
T
@@ -597,7 +597,7 @@ Actions, watch variables, stack traces etc.: on the TODO list.
Ever wanted to know what a regex looked like? You'll need perl compiled with
the DEBUGGING flag for this one:
-
+
> perl -Dr -e '/^pe(a)*rl$/i'
Compiling REx `^pe(a)*rl$'
size 17 first at 2
@@ -674,7 +674,7 @@ In particular have a hunt around for the following:
B<ptkdb> perlTK based wrapper for the built-in debugger
B<ddd> data display debugger
-
+
B<PerlDevKit> and B<PerlBuilder> are NT specific
NB. (more info on these and others would be appreciated).
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index fa4a67e939..473686f21e 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -891,7 +891,7 @@ emit the following message for lib/thr5005
# is still an experimental feature. It is here to stop people
# from deploying threads in production. ;-)
#
-
+
and another known thread-related warning is
pragma/overload......Unbalanced saves: 3 more saves than restores
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 725b50ecd1..db582653b4 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -2118,7 +2118,7 @@ integer overflow trigger a warning.
There is no builtin C<import> function. It is just an ordinary
method (subroutine) defined (or inherited) by modules that wish to export
names to another module. The C<use> function calls the C<import> method
-for the package used. See also L</use()>, L<perlmod>, and L<Exporter>.
+for the package used. See also L</use>, L<perlmod>, and L<Exporter>.
=item index STR,SUBSTR,POSITION
@@ -2337,7 +2337,8 @@ success, false otherwise.
=item listen SOCKET,QUEUESIZE
Does the same thing that the listen system call does. Returns true if
-it succeeded, false otherwise. See the example in L<perlipc/"Sockets: Client/Server Communication">.
+it succeeded, false otherwise. See the example in
+L<perlipc/"Sockets: Client/Server Communication">.
=item local EXPR
@@ -2491,7 +2492,7 @@ such as using a unary C<+> to give perl some help:
%hash = map { ("\L$_", 1) } @array # this also works
%hash = map { lc($_), 1 } @array # as does this.
%hash = map +( lc($_), 1 ), @array # this is EXPR and works!
-
+
%hash = map ( lc($_), 1 ), @array # evaluates to (1, @array)
or to force an anon hash constructor use C<+{>
diff --git a/pod/perlhack.pod b/pod/perlhack.pod
index 62c80e701f..1959680c13 100644
--- a/pod/perlhack.pod
+++ b/pod/perlhack.pod
@@ -1241,7 +1241,7 @@ Run the program with the given arguments.
=item break source.c:xxx
Tells the debugger that we'll want to pause execution when we reach
-either the named function (but see L</Function names>!) or the given
+either the named function (but see L<perlguts/Internal Functions>!) or the given
line in the named source file.
=item step
@@ -1299,7 +1299,7 @@ C<+> operator:
(gdb) break Perl_pp_add
Breakpoint 1 at 0x46249f: file pp_hot.c, line 309.
-Notice we use C<Perl_pp_add> and not C<pp_add> - see L<perlguts/Function Names>.
+Notice we use C<Perl_pp_add> and not C<pp_add> - see L<perlguts/Internal Functions>.
With the breakpoint in place, we can run our program:
(gdb) run -e '$b = "6XXXX"; $c = 2.3; $a = $b + $c'
diff --git a/pod/perllexwarn.pod b/pod/perllexwarn.pod
index b98e3332e4..951a470b2e 100644
--- a/pod/perllexwarn.pod
+++ b/pod/perllexwarn.pod
@@ -325,16 +325,16 @@ and C<join> can all produce a C<"Useless use of xxx in void context">
warning.
use warnings ;
-
+
time ;
-
+
{
use warnings FATAL => qw(void) ;
length "abc" ;
}
-
+
join "", 1,2,3 ;
-
+
print "done\n" ;
When run it produces this output
diff --git a/pod/perllocale.pod b/pod/perllocale.pod
index d37664c5ab..f680c73109 100644
--- a/pod/perllocale.pod
+++ b/pod/perllocale.pod
@@ -381,7 +381,7 @@ with a single parameter--see L<The setlocale function>.)
localeconv() takes no arguments, and returns B<a reference to> a hash.
The keys of this hash are variable names for formatting, such as
C<decimal_point> and C<thousands_sep>. The values are the
-corresponding, er, values. See L<POSIX (3)/localeconv> for a longer
+corresponding, er, values. See L<POSIX/localeconv> for a longer
example listing the categories an implementation might be expected to
provide; some provide more and others fewer. You don't need an
explicit C<use locale>, because localeconv() always observes the
@@ -964,12 +964,12 @@ operating system upgrade.
=head1 SEE ALSO
-L<POSIX (3)/isalnum>, L<POSIX (3)/isalpha>, L<POSIX (3)/isdigit>,
-L<POSIX (3)/isgraph>, L<POSIX (3)/islower>, L<POSIX (3)/isprint>,
-L<POSIX (3)/ispunct>, L<POSIX (3)/isspace>, L<POSIX (3)/isupper>,
-L<POSIX (3)/isxdigit>, L<POSIX (3)/localeconv>, L<POSIX (3)/setlocale>,
-L<POSIX (3)/strcoll>, L<POSIX (3)/strftime>, L<POSIX (3)/strtod>,
-L<POSIX (3)/strxfrm>.
+L<POSIX/isalnum>, L<POSIX/isalpha>, L<POSIX/isdigit>,
+L<POSIX/isgraph>, L<POSIX/islower>, L<POSIX/isprint>,
+L<POSIX/ispunct>, L<POSIX/isspace>, L<POSIX/isupper>,
+L<POSIX/isxdigit>, L<POSIX/localeconv>, L<POSIX/setlocale>,
+L<POSIX/strcoll>, L<POSIX/strftime>, L<POSIX/strtod>,
+L<POSIX/strxfrm>.
=head1 HISTORY
diff --git a/pod/perllol.pod b/pod/perllol.pod
index f015a20bc4..5c16bfddff 100644
--- a/pod/perllol.pod
+++ b/pod/perllol.pod
@@ -4,7 +4,7 @@ perllol - Manipulating Arrays of Arrays in Perl
=head1 DESCRIPTION
-=head1 Declaration and Access of Arrays of Arrays
+=head2 Declaration and Access of Arrays of Arrays
The simplest thing to build an array of arrays (sometimes imprecisely
called a list of lists). It's reasonably easy to understand, and
@@ -58,7 +58,7 @@ square or curly), you are free to omit the pointer dereferencing arrow.
But you cannot do so for the very first one if it's a scalar containing
a reference, which means that $ref_to_AoA always needs it.
-=head1 Growing Your Own
+=head2 Growing Your Own
That's all well and good for declaration of a fixed data structure,
but what if you wanted to add new elements on the fly, or build
@@ -174,7 +174,7 @@ Notice that I I<couldn't> say just:
In fact, that wouldn't even compile. How come? Because the argument
to push() must be a real array, not just a reference to such.
-=head1 Access and Printing
+=head2 Access and Printing
Now it's time to print your data structure out. How
are you going to do that? Well, if you want only one
@@ -231,7 +231,7 @@ Hmm... that's still a bit ugly. How about this:
}
}
-=head1 Slices
+=head2 Slices
If you want to get at a slice (part of a row) in a multidimensional
array, you're going to have to do some fancy subscripting. That's
diff --git a/pod/perlmod.pod b/pod/perlmod.pod
index 6f98cf6d99..01056f1d98 100644
--- a/pod/perlmod.pod
+++ b/pod/perlmod.pod
@@ -61,8 +61,8 @@ as a pattern match, a substitution, or a transliteration.
Variables beginning with underscore used to be forced into package
main, but we decided it was more useful for package writers to be able
to use leading underscore to indicate private variables and method names.
-$_ is still global though. See also L<perlvar/"Technical Note on the
-Syntax of Variable Names">.
+$_ is still global though. See also
+L<perlvar/"Technical Note on the Syntax of Variable Names">.
C<eval>ed strings are compiled in the package in which the eval() was
compiled. (Assignments to C<$SIG{}>, however, assume the signal
diff --git a/pod/perlmodlib.pod b/pod/perlmodlib.pod
index 8f3eb61b63..15be6f27a2 100644
--- a/pod/perlmodlib.pod
+++ b/pod/perlmodlib.pod
@@ -819,7 +819,7 @@ Most importantly, CPAN includes around a thousand unbundled modules,
some of which require a C compiler to build. Major categories of
modules are:
-=over
+=over 4
=item *
Language Extensions and Documentation Tools
@@ -889,7 +889,7 @@ Miscellaneous Modules
Registered CPAN sites as of this writing include the following.
You should try to choose one close to you:
-=over
+=over 4
=item Africa
diff --git a/pod/perlport.pod b/pod/perlport.pod
index 457584c0cb..9f471388a6 100644
--- a/pod/perlport.pod
+++ b/pod/perlport.pod
@@ -720,10 +720,11 @@ as L<perlcygwin>), http://www.cygwin.com/
=item *
The U/WIN environment for Win32,
-<http://www.research.att.com/sw/tools/uwin/
+http://www.research.att.com/sw/tools/uwin/
-=item Build instructions for OS/2, L<perlos2>
+=item *
+Build instructions for OS/2, L<perlos2>
=back
diff --git a/pod/perlrun.pod b/pod/perlrun.pod
index aa2f06d0e2..3170df4ccc 100644
--- a/pod/perlrun.pod
+++ b/pod/perlrun.pod
@@ -451,8 +451,7 @@ specified in the extension then it will skip that file and continue on
with the next one (if it exists).
For a discussion of issues surrounding file permissions and B<-i>,
-see L<perlfaq5/Why does Perl let me delete read-only files? Why
-does -i clobber protected files? Isn't this a bug in Perl?>.
+see L<perlfaq5/Why does Perl let me delete read-only files? Why does -i clobber protected files? Isn't this a bug in Perl?>.
You cannot use B<-i> to create directories or to strip extensions from
files.
diff --git a/pod/perltoc.pod b/pod/perltoc.pod
index 940c3c0132..af5b4cc2ae 100644
--- a/pod/perltoc.pod
+++ b/pod/perltoc.pod
@@ -2303,8 +2303,8 @@ Look around, Check it's new, Discuss the need, Choose a name, Check again
=item Step-by-step: Making the module
Start with F<h2xs>, Use L<strict|strict> and L<warnings|warnings>, Use
-L<Carp|Carp>, Use L<Exporter|Exporter> - wisely!, Use L<plain old
-documentation|perlpod>, Write tests, Write the README
+L<Carp|Carp>, Use L<Exporter|Exporter> - wisely!,
+Use L<plain old documentation|perlpod>, Write tests, Write the README
=item Step-by-step: Distributing your module
diff --git a/pod/perlxs.pod b/pod/perlxs.pod
index a4db596755..541f75e535 100644
--- a/pod/perlxs.pod
+++ b/pod/perlxs.pod
@@ -809,9 +809,9 @@ mixed with ANSI-style declarations, as in
(here the optional C<IN> keyword is omitted).
The C<IN_OUT> parameters are identical with parameters introduced with
-L<The & Unary Operator> and put into the C<OUTPUT:> section (see L<The
-OUTPUT: Keyword>). The C<IN_OUTLIST> parameters are very similar, the
-only difference being that the value C function writes through the
+L<The & Unary Operator> and put into the C<OUTPUT:> section (see
+L<The OUTPUT: Keyword>). The C<IN_OUTLIST> parameters are very similar,
+the only difference being that the value C function writes through the
pointer would not modify the Perl parameter, but is put in the output
list.
diff --git a/pod/perlxstut.pod b/pod/perlxstut.pod
index 5b7ed6da34..f06e166326 100644
--- a/pod/perlxstut.pod
+++ b/pod/perlxstut.pod
@@ -1094,15 +1094,15 @@ Mytest.xs:
HV * rh;
STRLEN l;
char * fn = SvPV(*av_fetch((AV *)SvRV(paths), n, 0), l);
-
+
i = statfs(fn, &buf);
if (i != 0) {
av_push(results, newSVnv(errno));
continue;
}
-
+
rh = (HV *)sv_2mortal((SV *)newHV());
-
+
hv_store(rh, "f_bavail", 8, newSVnv(buf.f_bavail), 0);
hv_store(rh, "f_bfree", 7, newSVnv(buf.f_bfree), 0);
hv_store(rh, "f_blocks", 8, newSVnv(buf.f_blocks), 0);
@@ -1110,7 +1110,7 @@ Mytest.xs:
hv_store(rh, "f_ffree", 7, newSVnv(buf.f_ffree), 0);
hv_store(rh, "f_files", 7, newSVnv(buf.f_files), 0);
hv_store(rh, "f_type", 6, newSVnv(buf.f_type), 0);
-
+
av_push(results, newRV((SV *)rh));
}
RETVAL = newRV((SV *)results);
diff --git a/t/lib/lc-all.t b/t/lib/lc-all.t
new file mode 100644
index 0000000000..d34feca472
--- /dev/null
+++ b/t/lib/lc-all.t
@@ -0,0 +1,361 @@
+#!./perl
+#
+# all.t - tests for all_* routines in
+# Locale::Country
+# Locale::Language
+# Locale::Currency
+#
+# There are four tests. We get a list of all codes, convert to
+# language/country/currency, # convert back to code,
+# and check that they're the same. Then we do the same,
+# starting with list of languages/countries/currencies.
+#
+
+use Locale::Country;
+use Locale::Language;
+use Locale::Currency;
+
+print "1..12\n";
+
+my $code;
+my $language;
+my $country;
+my $ok;
+my $reverse;
+my $currency;
+
+
+#-----------------------------------------------------------------------
+# Old API - without codeset specified, default to ALPHA_2
+#-----------------------------------------------------------------------
+$ok = 1;
+foreach $code (all_country_codes())
+{
+ $country = code2country($code);
+ if (!defined $country)
+ {
+ $ok = 0;
+ last;
+ }
+ $reverse = country2code($country);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $code)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 1\n" : "not ok 1\n");
+
+#-----------------------------------------------------------------------
+# code to country, back to code, for ALPHA2
+#-----------------------------------------------------------------------
+$ok = 1;
+foreach $code (all_country_codes(LOCALE_CODE_ALPHA_2))
+{
+ $country = code2country($code, LOCALE_CODE_ALPHA_2);
+ if (!defined $country)
+ {
+ $ok = 0;
+ last;
+ }
+ $reverse = country2code($country, LOCALE_CODE_ALPHA_2);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $code)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 2\n" : "not ok 2\n");
+
+#-----------------------------------------------------------------------
+# code to country, back to code, for ALPHA3
+#-----------------------------------------------------------------------
+$ok = 1;
+foreach $code (all_country_codes(LOCALE_CODE_ALPHA_3))
+{
+ $country = code2country($code, LOCALE_CODE_ALPHA_3);
+ if (!defined $country)
+ {
+ $ok = 0;
+ last;
+ }
+ $reverse = country2code($country, LOCALE_CODE_ALPHA_3);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $code)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 3\n" : "not ok 3\n");
+
+#-----------------------------------------------------------------------
+# code to country, back to code, for NUMERIC
+#-----------------------------------------------------------------------
+$ok = 1;
+foreach $code (all_country_codes(LOCALE_CODE_NUMERIC))
+{
+ $country = code2country($code, LOCALE_CODE_NUMERIC);
+ if (!defined $country)
+ {
+ $ok = 0;
+ last;
+ }
+ $reverse = country2code($country, LOCALE_CODE_NUMERIC);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $code)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 4\n" : "not ok 4\n");
+
+
+#-----------------------------------------------------------------------
+# Old API - country to code, back to country, using default of ALPHA_2
+#-----------------------------------------------------------------------
+$ok = 1;
+foreach $country (all_country_names())
+{
+ $code = country2code($country);
+ if (!defined $code)
+ {
+ $ok = 0;
+ last;
+ }
+ $reverse = code2country($code);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $country)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 5\n" : "not ok 5\n");
+
+#-----------------------------------------------------------------------
+# country to code, back to country, using LOCALE_CODE_ALPHA_2
+#-----------------------------------------------------------------------
+$ok = 1;
+foreach $country (all_country_names())
+{
+ $code = country2code($country, LOCALE_CODE_ALPHA_2);
+ if (!defined $code)
+ {
+ $ok = 0;
+ last;
+ }
+ $reverse = code2country($code, LOCALE_CODE_ALPHA_2);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $country)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 6\n" : "not ok 6\n");
+
+#-----------------------------------------------------------------------
+# country to code, back to country, using LOCALE_CODE_ALPHA_3
+#-----------------------------------------------------------------------
+$ok = 1;
+foreach $country (all_country_names())
+{
+ $code = country2code($country, LOCALE_CODE_ALPHA_3);
+ if (!defined $code)
+ {
+ next if ($country eq 'Antarctica'
+ || $country eq 'Bouvet Island'
+ || $country eq 'Cocos (Keeling) Islands'
+ || $country eq 'Christmas Island'
+ || $country eq 'France, Metropolitan'
+ || $country eq 'South Georgia and the South Sandwich Islands'
+ || $country eq 'Heard Island and McDonald Islands'
+ || $country eq 'British Indian Ocean Territory'
+ || $country eq 'French Southern Territories'
+ || $country eq 'United States Minor Outlying Islands'
+ || $country eq 'Mayotte'
+ || $country eq 'Zaire');
+ $ok = 0;
+ last;
+ }
+ $reverse = code2country($code, LOCALE_CODE_ALPHA_3);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $country)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 7\n" : "not ok 7\n");
+
+#-----------------------------------------------------------------------
+# country to code, back to country, using LOCALE_CODE_NUMERIC
+#-----------------------------------------------------------------------
+$ok = 1;
+foreach $country (all_country_names())
+{
+ $code = country2code($country, LOCALE_CODE_NUMERIC);
+ if (!defined $code)
+ {
+ next if ($country eq 'Antarctica'
+ || $country eq 'Bouvet Island'
+ || $country eq 'Cocos (Keeling) Islands'
+ || $country eq 'Christmas Island'
+ || $country eq 'France, Metropolitan'
+ || $country eq 'South Georgia and the South Sandwich Islands'
+ || $country eq 'Heard Island and McDonald Islands'
+ || $country eq 'British Indian Ocean Territory'
+ || $country eq 'French Southern Territories'
+ || $country eq 'United States Minor Outlying Islands'
+ || $country eq 'Mayotte'
+ || $country eq 'Zaire');
+ $ok = 0;
+ last;
+ }
+ $reverse = code2country($code, LOCALE_CODE_NUMERIC);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $country)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 8\n" : "not ok 8\n");
+
+
+$ok = 1;
+foreach $code (all_language_codes())
+{
+ $language = code2language($code);
+ if (!defined $language)
+ {
+ $ok = 0;
+ last;
+ }
+ $reverse = language2code($language);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $code)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 9\n" : "not ok 9\n");
+
+
+$ok = 1;
+foreach $language (all_language_names())
+{
+ $code = language2code($language);
+ if (!defined $code)
+ {
+ $ok = 0;
+ last;
+ }
+ $reverse = code2language($code);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $language)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 10\n" : "not ok 10\n");
+
+$ok = 1;
+foreach $code (all_currency_codes())
+{
+ $currency = code2currency($code);
+ if (!defined $currency)
+ {
+ $ok = 0;
+ last;
+ }
+ $reverse = currency2code($currency);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ #
+ # three special cases:
+ # The Kwacha has two codes - used in Zambia and Malawi
+ # The Russian Ruble has two codes - rub and rur
+ # The Belarussian Ruble has two codes - byb and byr
+ if ($reverse ne $code
+ && $code ne 'mwk' && $code ne 'zmk'
+ && $code ne 'byr' && $code ne 'byb'
+ && $code ne 'rub' && $code ne 'rur')
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 11\n" : "not ok 11\n");
+
+$ok = 1;
+foreach $currency (all_currency_names())
+{
+ $code = currency2code($currency);
+ if (!defined $code)
+ {
+ $ok = 0;
+ last;
+ }
+ $reverse = code2currency($code);
+ if (!defined $reverse)
+ {
+ $ok = 0;
+ last;
+ }
+ if ($reverse ne $currency)
+ {
+ $ok = 0;
+ last;
+ }
+}
+print ($ok ? "ok 12\n" : "not ok 12\n");
diff --git a/t/lib/lc-constants.t b/t/lib/lc-constants.t
new file mode 100644
index 0000000000..e71103d0f0
--- /dev/null
+++ b/t/lib/lc-constants.t
@@ -0,0 +1,44 @@
+#!./perl
+#
+# constants.t - tests for Locale::Constants
+#
+
+use Locale::Constants;
+
+print "1..3\n";
+
+if (defined LOCALE_CODE_ALPHA_2
+ && defined LOCALE_CODE_ALPHA_3
+ && defined LOCALE_CODE_NUMERIC)
+{
+ print "ok 1\n";
+}
+else
+{
+ print "not ok 1\n";
+}
+
+if (LOCALE_CODE_ALPHA_2 != LOCALE_CODE_ALPHA_3
+ && LOCALE_CODE_ALPHA_2 != LOCALE_CODE_NUMERIC
+ && LOCALE_CODE_ALPHA_3 != LOCALE_CODE_NUMERIC)
+{
+ print "ok 2\n";
+}
+else
+{
+ print "not ok 2\n";
+}
+
+if (defined LOCALE_CODE_DEFAULT
+ && (LOCALE_CODE_DEFAULT == LOCALE_CODE_ALPHA_2
+ || LOCALE_CODE_DEFAULT == LOCALE_CODE_ALPHA_3
+ || LOCALE_CODE_DEFAULT == LOCALE_CODE_NUMERIC))
+{
+ print "ok 3\n";
+}
+else
+{
+ print "not ok 3\n";
+}
+
+exit 0;
diff --git a/t/lib/lc-country.t b/t/lib/lc-country.t
new file mode 100644
index 0000000000..535291e10c
--- /dev/null
+++ b/t/lib/lc-country.t
@@ -0,0 +1,109 @@
+#!./perl
+#
+# country.t - tests for Locale::Country
+#
+
+use Locale::Country;
+
+#-----------------------------------------------------------------------
+# This is an array of tests specs. Each spec is [TEST, OK_TO_DIE]
+# Each TEST is eval'd as an expression.
+# If it evaluates to FALSE, then "not ok N" is printed for the test,
+# otherwise "ok N". If the eval dies, then the OK_TO_DIE flag is checked.
+# If it is true (1), the test is treated as passing, otherwise it failed.
+#-----------------------------------------------------------------------
+@TESTS =
+(
+ #================================================
+ # TESTS FOR code2country
+ #================================================
+
+ #---- selection of examples which should all result in undef -----------
+ ['!defined code2country()', 0], # no argument
+ ['!defined code2country(undef)', 0], # undef argument
+ ['!defined code2country("zz")', 0], # illegal code
+ ['!defined code2country("zz", LOCALE_CODE_ALPHA_2)', 0], # illegal code
+ ['!defined code2country("zz", LOCALE_CODE_ALPHA_3)', 0], # illegal code
+ ['!defined code2country("zz", LOCALE_CODE_NUMERIC)', 0], # illegal code
+ ['!defined code2country("ja")', 0], # should be jp for country
+ ['!defined code2country("uk")', 0], # should be jp for country
+
+ #---- some successful examples -----------------------------------------
+ ['code2country("BO") eq "Bolivia"', 0],
+ ['code2country("BO", LOCALE_CODE_ALPHA_2) eq "Bolivia"', 0],
+ ['code2country("bol", LOCALE_CODE_ALPHA_3) eq "Bolivia"', 0],
+ ['code2country("pk") eq "Pakistan"', 0],
+ ['code2country("sn") eq "Senegal"', 0],
+ ['code2country("us") eq "United States"', 0],
+ ['code2country("ad") eq "Andorra"', 0], # first in DATA segment
+ ['code2country("ad", LOCALE_CODE_ALPHA_2) eq "Andorra"', 0],
+ ['code2country("and", LOCALE_CODE_ALPHA_3) eq "Andorra"', 0],
+ ['code2country("020", LOCALE_CODE_NUMERIC) eq "Andorra"', 0],
+ ['code2country(48, LOCALE_CODE_NUMERIC) eq "Bahrain"', 0],
+ ['code2country("zw") eq "Zimbabwe"', 0], # last in DATA segment
+ ['code2country("gb") eq "United Kingdom"', 0], # United Kingdom is "gb", not "uk"
+
+ #================================================
+ # TESTS FOR country2code
+ #================================================
+
+ #---- selection of examples which should all result in undef -----------
+ ['!defined code2country("BO", LOCALE_CODE_ALPHA_3)', 0],
+ ['!defined code2country("BO", LOCALE_CODE_NUMERIC)', 0],
+ ['!defined country2code()', 0], # no argument
+ ['!defined country2code(undef)', 0], # undef argument
+ ['!defined country2code("Banana")', 0], # illegal country name
+
+ #---- some successful examples -----------------------------------------
+ ['country2code("japan") eq "jp"', 0],
+ ['country2code("japan") ne "ja"', 0],
+ ['country2code("Japan") eq "jp"', 0],
+ ['country2code("United States") eq "us"', 0],
+ ['country2code("United Kingdom") eq "gb"', 0],
+ ['country2code("Andorra") eq "ad"', 0], # first in DATA segment
+ ['country2code("Zimbabwe") eq "zw"', 0], # last in DATA segment
+
+ #================================================
+ # TESTS FOR country_code2code
+ #================================================
+
+ #---- selection of examples which should all result in undef -----------
+ ['!defined country_code2code("bo", LOCALE_CODE_ALPHA_3, LOCALE_CODE_ALPHA_3)', 0],
+ ['!defined country_code2code("zz", LOCALE_CODE_ALPHA_2, LOCALE_CODE_ALPHA_3)', 0],
+ ['!defined country_code2code("zz", LOCALE_CODE_ALPHA_3, LOCALE_CODE_ALPHA_3)', 0],
+ ['!defined country_code2code("zz", LOCALE_CODE_ALPHA_2)', 1],
+ ['!defined country_code2code("bo", LOCALE_CODE_ALPHA_2)', 1],
+ ['!defined country_code2code()', 1], # no argument
+ ['!defined country_code2code(undef)', 1], # undef argument
+
+ #---- some successful examples -----------------------------------------
+ ['country_code2code("BO", LOCALE_CODE_ALPHA_2, LOCALE_CODE_ALPHA_3) eq "bol"', 0],
+ ['country_code2code("bol", LOCALE_CODE_ALPHA_3, LOCALE_CODE_ALPHA_2) eq "bo"', 0],
+ ['country_code2code("zwe", LOCALE_CODE_ALPHA_3, LOCALE_CODE_ALPHA_2) eq "zw"', 0],
+ ['country_code2code("858", LOCALE_CODE_NUMERIC, LOCALE_CODE_ALPHA_3) eq "ury"', 0],
+ ['country_code2code(858, LOCALE_CODE_NUMERIC, LOCALE_CODE_ALPHA_3) eq "ury"', 0],
+ ['country_code2code("tr", LOCALE_CODE_ALPHA_2, LOCALE_CODE_NUMERIC) eq "792"', 0],
+
+);
+
+print "1..", int(@TESTS), "\n";
+
+$testid = 1;
+foreach $test (@TESTS)
+{
+ eval "print (($test->[0]) ? \"ok $testid\\n\" : \"not ok $testid\\n\" )";
+ if ($@)
+ {
+ if (!$test->[1])
+ {
+ print "not ok $testid\n";
+ }
+ else
+ {
+ print "ok $testid\n";
+ }
+ }
+ ++$testid;
+}
+
+exit 0;
diff --git a/t/lib/lc-currency.t b/t/lib/lc-currency.t
new file mode 100644
index 0000000000..f66353c465
--- /dev/null
+++ b/t/lib/lc-currency.t
@@ -0,0 +1,79 @@
+#!./perl
+#
+# currency.t - tests for Locale::Currency
+#
+use Locale::Currency;
+
+#-----------------------------------------------------------------------
+# This is an array of tests. Each test is eval'd as an expression.
+# If it evaluates to FALSE, then "not ok N" is printed for the test,
+# otherwise "ok N".
+#-----------------------------------------------------------------------
+@TESTS =
+(
+ #================================================
+ # TESTS FOR code2currency
+ #================================================
+
+ #---- selection of examples which should all result in undef -----------
+ '!defined code2currency()', # no argument => undef returned
+ '!defined code2currency(undef)', # undef arg => undef returned
+ '!defined code2currency("zz")', # illegal code => undef
+ '!defined code2currency("zzzz")', # illegal code => undef
+ '!defined code2currency("zzz")', # illegal code => undef
+ '!defined code2currency("ukp")', # gbp for sterling, not ukp
+
+ #---- misc tests -------------------------------------------------------
+ 'code2currency("all") eq "Lek"',
+ 'code2currency("ats") eq "Schilling"',
+ 'code2currency("bob") eq "Boliviano"',
+ 'code2currency("bnd") eq "Brunei Dollar"',
+ 'code2currency("cop") eq "Colombian Peso"',
+ 'code2currency("dkk") eq "Danish Krone"',
+ 'code2currency("fjd") eq "Fiji Dollar"',
+ 'code2currency("idr") eq "Rupiah"',
+ 'code2currency("chf") eq "Swiss Franc"',
+ 'code2currency("mvr") eq "Rufiyaa"',
+ 'code2currency("mmk") eq "Kyat"',
+ 'code2currency("mwk") eq "Kwacha"', # two different codes for Kwacha
+ 'code2currency("zmk") eq "Kwacha"', # used in Zambia and Malawi
+ 'code2currency("byr") eq "Belarussian Ruble"', # 2 codes for belarussian ruble
+ 'code2currency("byb") eq "Belarussian Ruble"', #
+ 'code2currency("rub") eq "Russian Ruble"', # 2 codes for russian ruble
+ 'code2currency("rur") eq "Russian Ruble"', #
+
+ #---- some successful examples -----------------------------------------
+ 'code2currency("BOB") eq "Boliviano"',
+ 'code2currency("adp") eq "Andorran Peseta"', # first in DATA segment
+ 'code2currency("zwd") eq "Zimbabwe Dollar"', # last in DATA segment
+
+ #================================================
+ # TESTS FOR currency2code
+ #================================================
+
+ #---- selection of examples which should all result in undef -----------
+ '!defined currency2code()', # no argument => undef returned
+ '!defined currency2code(undef)', # undef arg => undef returned
+ '!defined currency2code("")', # empty string => undef returned
+ '!defined currency2code("Banana")', # illegal curr name => undef
+
+ #---- some successful examples -----------------------------------------
+ 'currency2code("Kroon") eq "eek"',
+ 'currency2code("Markka") eq "fim"',
+ 'currency2code("Riel") eq "khr"',
+ 'currency2code("PULA") eq "bwp"',
+ 'currency2code("Andorran Peseta") eq "adp"', # first in DATA segment
+ 'currency2code("Zimbabwe Dollar") eq "zwd"', # last in DATA segment
+);
+
+print "1..", int(@TESTS), "\n";
+
+$testid = 1;
+foreach $test (@TESTS)
+{
+ eval "print (($test) ? \"ok $testid\\n\" : \"not ok $testid\\n\" )";
+ print "not ok $testid\n" if $@;
+ ++$testid;
+}
+
+exit 0;
diff --git a/t/lib/lc-language.t b/t/lib/lc-language.t
new file mode 100644
index 0000000000..b9c25f1f5b
--- /dev/null
+++ b/t/lib/lc-language.t
@@ -0,0 +1,102 @@
+#!./perl
+#
+# language.t - tests for Locale::Language
+#
+use Locale::Language;
+
+#-----------------------------------------------------------------------
+# This is an array of tests. Each test is eval'd as an expression.
+# If it evaluates to FALSE, then "not ok N" is printed for the test,
+# otherwise "ok N".
+#-----------------------------------------------------------------------
+@TESTS =
+(
+ #================================================
+ # TESTS FOR code2language
+ #================================================
+
+ #---- selection of examples which should all result in undef -----------
+ '!defined code2language()', # no argument => undef returned
+ '!defined code2language(undef)', # undef arg => undef returned
+ '!defined code2language("zz")', # illegal code => undef
+ '!defined code2language("jp")', # ja for lang, jp for country
+
+ #---- test recent changes ----------------------------------------------
+ 'code2language("ae") eq "Avestan"',
+ 'code2language("bs") eq "Bosnian"',
+ 'code2language("ch") eq "Chamorro"',
+ 'code2language("ce") eq "Chechen"',
+ 'code2language("cu") eq "Church Slavic"',
+ 'code2language("cv") eq "Chuvash"',
+ 'code2language("hz") eq "Herero"',
+ 'code2language("ho") eq "Hiri Motu"',
+ 'code2language("ki") eq "Kikuyu"',
+ 'code2language("kj") eq "Kuanyama"',
+ 'code2language("kv") eq "Komi"',
+ 'code2language("mh") eq "Marshall"',
+ 'code2language("nv") eq "Navajo"',
+ 'code2language("nr") eq "Ndebele, South"',
+ 'code2language("nd") eq "Ndebele, North"',
+ 'code2language("ng") eq "Ndonga"',
+ 'code2language("nn") eq "Norwegian Nynorsk"',
+ 'code2language("nb") eq "Norwegian Bokmål"',
+ 'code2language("ny") eq "Chichewa; Nyanja"',
+ 'code2language("oc") eq "Occitan (post 1500)"',
+ 'code2language("os") eq "Ossetian; Ossetic"',
+ 'code2language("pi") eq "Pali"',
+ '!defined code2language("sh")', # Serbo-Croatian withdrawn
+ 'code2language("se") eq "Sami"',
+ 'code2language("sc") eq "Sardinian"',
+ 'code2language("kw") eq "Cornish"',
+ 'code2language("gv") eq "Manx"',
+ 'code2language("lb") eq "Letzeburgesch"',
+ 'code2language("he") eq "Hebrew"',
+ '!defined code2language("iw")', # Hebrew withdrawn
+ 'code2language("id") eq "Indonesian"',
+ '!defined code2language("in")', # Indonesian withdrawn
+ 'code2language("iu") eq "Inuktitut"',
+ 'code2language("ug") eq "Uighur"',
+ '!defined code2language("ji")', # Yiddish withdrawn
+ 'code2language("yi") eq "Yiddish"',
+ 'code2language("za") eq "Zhuang"',
+
+ #---- some successful examples -----------------------------------------
+ 'code2language("DA") eq "Danish"',
+ 'code2language("eo") eq "Esperanto"',
+ 'code2language("fi") eq "Finnish"',
+ 'code2language("en") eq "English"',
+ 'code2language("aa") eq "Afar"', # first in DATA segment
+ 'code2language("zu") eq "Zulu"', # last in DATA segment
+
+ #================================================
+ # TESTS FOR language2code
+ #================================================
+
+ #---- selection of examples which should all result in undef -----------
+ '!defined language2code()', # no argument => undef returned
+ '!defined language2code(undef)', # undef arg => undef returned
+ '!defined language2code("Banana")', # illegal lang name => undef
+
+ #---- some successful examples -----------------------------------------
+ 'language2code("Japanese") eq "ja"',
+ 'language2code("japanese") eq "ja"',
+ 'language2code("japanese") ne "jp"',
+ 'language2code("French") eq "fr"',
+ 'language2code("Greek") eq "el"',
+ 'language2code("english") eq "en"',
+ 'language2code("ESTONIAN") eq "et"',
+ 'language2code("Afar") eq "aa"', # first in DATA segment
+ 'language2code("Zulu") eq "zu"', # last in DATA segment
+);
+
+print "1..", int(@TESTS), "\n";
+
+$testid = 1;
+foreach $test (@TESTS)
+{
+ eval "print (($test) ? \"ok $testid\\n\" : \"not ok $testid\\n\" )";
+ print "not ok $testid\n" if $@;
+ ++$testid;
+}
+
+exit 0;
diff --git a/t/lib/lc-uk.t b/t/lib/lc-uk.t
new file mode 100644
index 0000000000..98f71d242a
--- /dev/null
+++ b/t/lib/lc-uk.t
@@ -0,0 +1,65 @@
+#!./perl
+#
+# uk.t - tests for Locale::Country with "uk" aliases to "gb"
+#
+
+use Locale::Country;
+
+Locale::Country::_alias_code('uk' => 'gb');
+
+#-----------------------------------------------------------------------
+# This is an array of tests. Each test is eval'd as an expression.
+# If it evaluates to FALSE, then "not ok N" is printed for the test,
+# otherwise "ok N".
+#-----------------------------------------------------------------------
+@TESTS =
+(
+ #================================================
+ # TESTS FOR code2country
+ #================================================
+
+ #---- selection of examples which should all result in undef -----------
+ '!defined code2country()', # no argument
+ '!defined code2country(undef)', # undef argument
+ '!defined code2country("zz")', # illegal code
+ '!defined code2country("ja")', # should be jp for country
+
+ #---- some successful examples -----------------------------------------
+ 'code2country("BO") eq "Bolivia"',
+ 'code2country("pk") eq "Pakistan"',
+ 'code2country("sn") eq "Senegal"',
+ 'code2country("us") eq "United States"',
+ 'code2country("ad") eq "Andorra"', # first in DATA segment
+ 'code2country("zw") eq "Zimbabwe"', # last in DATA segment
+ 'code2country("uk") eq "United Kingdom"', # normally "gb"
+
+ #================================================
+ # TESTS FOR country2code
+ #================================================
+
+ #---- selection of examples which should all result in undef -----------
+ '!defined country2code()', # no argument
+ '!defined country2code(undef)', # undef argument
+ '!defined country2code("Banana")', # illegal country name
+
+ #---- some successful examples -----------------------------------------
+ 'country2code("japan") eq "jp"',
+ 'country2code("japan") ne "ja"',
+ 'country2code("Japan") eq "jp"',
+ 'country2code("United States") eq "us"',
+ 'country2code("United Kingdom") eq "uk"',
+ 'country2code("Andorra") eq "ad"', # first in DATA segment
+ 'country2code("Zimbabwe") eq "zw"', # last in DATA segment
+);
+
+print "1..", int(@TESTS), "\n";
+
+$testid = 1;
+foreach $test (@TESTS)
+{
+ eval "print (($test) ? \"ok $testid\\n\" : \"not ok $testid\\n\" )";
+ print "not ok $testid\n" if $@;
+ ++$testid;
+}
+
+exit 0;
diff --git a/t/lib/sigaction.t b/t/lib/sigaction.t
index 8200a6f9dd..8b0a907e44 100644
--- a/t/lib/sigaction.t
+++ b/t/lib/sigaction.t
@@ -43,9 +43,9 @@ my $oldaction=POSIX::SigAction->new('::bar', new POSIX::SigSet(), 0);
if($bad) { print "not ok 1\n" } else { print "ok 1\n"}
}
-if((-t STDIN && $oldaction->{HANDLER} eq 'IGNORE') ||
- $oldaction->{HANDLER} eq 'DEFAULT')
- { print "ok 2\n" } else { print "not ok 2\n"}
+if($oldaction->{HANDLER} eq 'DEFAULT' ||
+ (! -t STDIN && $oldaction->{HANDLER} eq 'IGNORE'))
+ { print "ok 2\n" } else { print "not ok 2 # ", $oldaction->{HANDLER}, "\n"}
print $SIG{HUP} eq '::foo' ? "ok 3\n" : "not ok 3\n";
sigaction(SIGHUP, $newaction, $oldaction);
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 0b0208b0ca..855a899499 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -36,13 +36,16 @@ $Config{startperl}
print OUT <<'!NO!SUBS!';
+use strict;
+
use Config;
use File::Path qw(mkpath);
use Getopt::Std;
getopts('Dd:rlhaQ');
+use vars qw($opt_D $opt_d $opt_r $opt_l $opt_h $opt_a $opt_Q);
die "-r and -a options are mutually exclusive\n" if ($opt_r and $opt_a);
-@inc_dirs = inc_dirs() if $opt_a;
+my @inc_dirs = inc_dirs() if $opt_a;
my $Exit = 0;
@@ -50,7 +53,7 @@ my $Dest_dir = $opt_d || $Config{installsitearch};
die "Destination directory $Dest_dir doesn't exist or isn't a directory\n"
unless -d $Dest_dir;
-@isatype = split(' ',<<END);
+my @isatype = split(' ',<<END);
char uchar u_char
short ushort u_short
int uint u_int
@@ -58,14 +61,18 @@ die "Destination directory $Dest_dir doesn't exist or isn't a directory\n"
FILE key_t caddr_t
END
+my %isatype;
@isatype{@isatype} = (1) x @isatype;
-$inif = 0;
+my $inif = 0;
+my %Is_converted;
@ARGV = ('-') unless @ARGV;
build_preamble_if_necessary();
-while (defined ($file = next_file())) {
+my ($t, $tab, %curargs, $new, $eval_index, $dir, $name, $args, $outfile);
+my ($incl, $next);
+while (defined (my $file = next_file())) {
if (-l $file and -d $file) {
link_if_possible($file) if ($opt_l);
next;
@@ -129,7 +136,7 @@ while (defined ($file = next_file())) {
my $proto = '() ';
if ($args ne '') {
$proto = '';
- foreach $arg (split(/,\s*/,$args)) {
+ foreach my $arg (split(/,\s*/,$args)) {
$arg =~ s/^\s*([^\s].*[^\s])\s*$/$1/;
$curargs{$arg} = 1;
}
@@ -257,11 +264,11 @@ while (defined ($file = next_file())) {
s@/\*.*?\*/@@g;
s/\s+/ /g;
/^\s?(typedef\s?)?enum\s?([a-zA-Z_]\w*)?\s?\{(.*)\}\s?([a-zA-Z_]\w*)?\s?;/;
- ($enum_subs = $3) =~ s/\s//g;
- @enum_subs = split(/,/, $enum_subs);
- $enum_val = -1;
- for $enum (@enum_subs) {
- ($enum_name, $enum_value) = $enum =~ /^([a-zA-Z_]\w*)(=.+)?$/;
+ (my $enum_subs = $3) =~ s/\s//g;
+ my @enum_subs = split(/,/, $enum_subs);
+ my $enum_val = -1;
+ foreach my $enum (@enum_subs) {
+ my ($enum_name, $enum_value) = $enum =~ /^([a-zA-Z_]\w*)(=.+)?$/;
$enum_value =~ s/^=//;
$enum_val = (length($enum_value) ? $enum_value : $enum_val + 1);
if ($opt_h) {
@@ -280,12 +287,13 @@ while (defined ($file = next_file())) {
}
print OUT "1;\n";
- $is_converted{$file} = 1;
+ $Is_converted{$file} = 1;
queue_includes_from($file) if ($opt_a);
}
exit $Exit;
+
sub reindent($) {
my($text) = shift;
$text =~ s/\n/\n /g;
@@ -293,9 +301,11 @@ sub reindent($) {
$text;
}
+
sub expr {
+ my $joined_args;
if(keys(%curargs)) {
- my($joined_args) = join('|', keys(%curargs));
+ $joined_args = join('|', keys(%curargs));
}
while ($_ ne '') {
s/^\&\&// && do { $new .= " &&"; next;}; # handle && operator
@@ -347,7 +357,7 @@ sub expr {
};
# struct/union member, including arrays:
s/^([_A-Z]\w*(\[[^\]]+\])?((\.|->)[_A-Z]\w*(\[[^\]]+\])?)+)//i && do {
- $id = $1;
+ my $id = $1;
$id =~ s/(\.|(->))([^\.\-]*)/->\{$3\}/g;
$id =~ s/\b([^\$])($joined_args)/$1\$$2/g if length($joined_args);
while($id =~ /\[\s*([^\$\&\d\]]+)\]/) {
@@ -363,7 +373,7 @@ sub expr {
$new .= " (\$$id)";
};
s/^([_a-zA-Z]\w*)// && do {
- $id = $1;
+ my $id = $1;
if ($id eq 'struct') {
s/^\s+(\w+)//;
$id .= ' ' . $1;
@@ -505,7 +515,7 @@ sub queue_includes_from
}
if ($line =~ /^#\s*include\s+<(.*?)>/) {
- push(@ARGV, $1) unless $is_converted{$1};
+ push(@ARGV, $1) unless $Is_converted{$1};
}
}
close HEADER;
@@ -575,7 +585,8 @@ sub build_preamble_if_necessary
sub _extract_cc_defines
{
my %define;
- my $allsymbols = join " ", @Config{ccsymbols, cppsymbols, cppccsymbols};
+ my $allsymbols = join " ",
+ @Config{'ccsymbols', 'cppsymbols', 'cppccsymbols'};
# Split compiler pre-definitions into `key=value' pairs:
foreach (split /\s+/, $allsymbols) {
@@ -708,8 +719,6 @@ that it can translate.
It's only intended as a rough tool.
You may need to dicker with the files produced.
-Doesn't run with C<use strict>
-
You have to run this program by hand; it's not run as part of the Perl
installation.
diff --git a/utils/perldoc.PL b/utils/perldoc.PL
index ca631dda2b..aa61a97293 100644
--- a/utils/perldoc.PL
+++ b/utils/perldoc.PL
@@ -81,6 +81,7 @@ my $global_target = "";
my $Is_VMS = $^O eq 'VMS';
my $Is_MSWin32 = $^O eq 'MSWin32';
my $Is_Dos = $^O eq 'dos';
+my $Is_OS2 = $^O eq 'os2';
sub usage{
warn "@_\n" if @_;
@@ -149,7 +150,7 @@ usage if $opt_h;
# refuse to run if we should be tainting and aren't
# (but regular users deserve protection too, though!)
-if (!($Is_VMS || $Is_MSWin32 || $Is_Dos) && ($> == 0 || $< == 0)
+if (!($Is_VMS || $Is_MSWin32 || $Is_Dos || $Is_OS2) && ($> == 0 || $< == 0)
&& !am_taint_checking())
{{
if ($opt_U) {
diff --git a/win32/sncfnmcs.pl b/win32/sncfnmcs.pl
new file mode 100644
index 0000000000..bb62460ea0
--- /dev/null
+++ b/win32/sncfnmcs.pl
@@ -0,0 +1,63 @@
+=comment
+
+Synchronize filename cases.
+This script takes two arguments - first and second extensions to synchronize
+filename cases with.
+
+There may be specified following options:
+ --verbose <== say everything what is going on
+ --recurse <== recurse subdirectories
+ --dummy <== do not perform actual renaming
+ --say-subdir
+Every such option can be specified with an optional "no" prefix to negate it.
+
+Typically, it is invoked as:
+ perl sync-fnamescase.pl c obj --verbose
+
+=cut
+
+use strict;
+
+my ($ext1, $ext2) = map {quotemeta} grep {!/^--/} @ARGV;
+my %opts = (
+ #defaults
+ 'verbose' => 0,
+ 'recurse' => 1,
+ 'dummy' => 0,
+ 'say-subdir' => 0,
+ #options itself
+ (map {/^--([\-_\w]+)=(.*)$/} @ARGV), # --opt=smth
+ (map {/^no-?(.*)$/i?($1=>0):($_=>1)} map {/^--([\-_\w]+)$/} @ARGV), # --opt --no-opt --noopt
+ );
+
+my $sp = '';
+sub xx {
+ opendir DIR, '.';
+ my @t = readdir DIR;
+ my @f = map {/^(.*)\.$ext1$/i} @t;
+ my %f = map {lc($_)=>$_} map {/^(.*)\.$ext2$/i} @t;
+ for (@f) {
+ my $lc = lc($_);
+ if (exists $f{$lc} and $f{$lc} ne $_) {
+ print STDERR "$sp$f{$lc}.$ext2 <==> $_.$ext1\n" if $opts{verbose};
+ if ($opts{dummy}) {
+ print STDERR "ren $f{$lc}.$ext2 $_.$ext2\n";
+ }
+ else {
+ system "ren $f{$lc}.$ext2 $_.$ext2";
+ }
+ }
+ }
+ if ($opts{recurse}) {
+ for (grep {-d&&!/^\.\.?$/} @t) {
+ print STDERR "$sp\\$_\n" if $opts{'say-subdir'};
+ $sp .= ' ';
+ chdir $_ or die;
+ xx();
+ chdir ".." or die;
+ chop $sp;
+ }
+ }
+}
+
+xx();