summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorAndrew Fresh <afresh1@cvs.openbsd.org>2015-04-25 19:14:50 +0000
committerAndrew Fresh <afresh1@cvs.openbsd.org>2015-04-25 19:14:50 +0000
commit3db0c96927b00fc26e05bb455381d6c6a21a0509 (patch)
treec02fd4db0e9501c47b2f132b96b25b2198174539 /gnu/usr.bin
parentc036cc150b888a1343d3224d3ab1815181e7797b (diff)
Fix merge issues, remove excess files - match perl-5.20.2 dist
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/perl/Configure91
-rw-r--r--gnu/usr.bin/perl/Cross/config.sh-arm-linux37
-rw-r--r--gnu/usr.bin/perl/INSTALL33
-rw-r--r--gnu/usr.bin/perl/MANIFEST452
-rw-r--r--gnu/usr.bin/perl/Makefile.SH101
-rw-r--r--gnu/usr.bin/perl/NetWare/config.wc1
-rw-r--r--gnu/usr.bin/perl/Porting/Maintainers.pl17
-rw-r--r--gnu/usr.bin/perl/Porting/config.sh39
-rw-r--r--gnu/usr.bin/perl/Porting/config_H18
-rw-r--r--gnu/usr.bin/perl/Porting/pumpkin.pod4
-rw-r--r--gnu/usr.bin/perl/README2
-rw-r--r--gnu/usr.bin/perl/README.os22
-rw-r--r--gnu/usr.bin/perl/README.vms4
-rw-r--r--gnu/usr.bin/perl/README.win3240
-rw-r--r--gnu/usr.bin/perl/config_h.SH6
-rw-r--r--gnu/usr.bin/perl/configpm8
-rw-r--r--gnu/usr.bin/perl/configure.com3
-rw-r--r--gnu/usr.bin/perl/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm3
-rw-r--r--gnu/usr.bin/perl/cpan/Compress-Raw-Zlib/private/MakeUtil.pm3
-rw-r--r--gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs378
-rwxr-xr-xgnu/usr.bin/perl/cpan/Digest-MD5/t/files.t2
-rw-r--r--gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm4
-rw-r--r--gnu/usr.bin/perl/cpan/IO-Compress/private/MakeUtil.pm3
-rw-r--r--gnu/usr.bin/perl/cpan/NEXT/lib/NEXT.pm2
-rw-r--r--gnu/usr.bin/perl/cpan/Pod-Parser/lib/Pod/PlainText.pm7
-rw-r--r--gnu/usr.bin/perl/cpan/Text-Balanced/lib/Text/Balanced.pm2
-rwxr-xr-xgnu/usr.bin/perl/cpan/autodie/t/truncate.t7
-rw-r--r--gnu/usr.bin/perl/cpan/podlators/lib/Pod/Man.pm4
-rw-r--r--gnu/usr.bin/perl/deb.c2
-rw-r--r--gnu/usr.bin/perl/dist/Data-Dumper/Dumper.pm4
-rw-r--r--gnu/usr.bin/perl/dist/Data-Dumper/Dumper.xs25
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm1
-rw-r--r--gnu/usr.bin/perl/dist/Math-BigInt/lib/Math/BigInt.pm11
-rw-r--r--gnu/usr.bin/perl/dist/Module-CoreList/t/corevers.t21
-rwxr-xr-xgnu/usr.bin/perl/dist/threads-shared/t/stress.t2
-rw-r--r--gnu/usr.bin/perl/ext/DynaLoader/Makefile.PL4
-rw-r--r--gnu/usr.bin/perl/ext/DynaLoader/dl_dlopen.xs4
-rw-r--r--gnu/usr.bin/perl/ext/NDBM_File/Makefile.PL2
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/POSIX.xs24
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/lib/POSIX.pod6
-rw-r--r--gnu/usr.bin/perl/ext/POSIX/t/posix.t22
-rw-r--r--gnu/usr.bin/perl/ext/re/t/reflags.t2
-rw-r--r--gnu/usr.bin/perl/gv.c4
-rw-r--r--gnu/usr.bin/perl/hints/dec_osf.sh20
-rw-r--r--gnu/usr.bin/perl/hints/irix_6.sh36
-rw-r--r--gnu/usr.bin/perl/hints/netbsd.sh16
-rw-r--r--gnu/usr.bin/perl/hints/openbsd.sh26
-rw-r--r--gnu/usr.bin/perl/installperl53
-rw-r--r--gnu/usr.bin/perl/lib/AnyDBM_File.pm2
-rw-r--r--gnu/usr.bin/perl/lib/Config.t4
-rw-r--r--gnu/usr.bin/perl/lib/Getopt/Std.pm2
-rw-r--r--gnu/usr.bin/perl/lib/locale.t2
-rw-r--r--gnu/usr.bin/perl/makedef.pl152
-rw-r--r--gnu/usr.bin/perl/mg.c2
-rw-r--r--gnu/usr.bin/perl/op.c31
-rw-r--r--gnu/usr.bin/perl/op.h2
-rw-r--r--gnu/usr.bin/perl/patchlevel.h3
-rw-r--r--gnu/usr.bin/perl/perl.c4
-rw-r--r--gnu/usr.bin/perl/perl.h27
-rw-r--r--gnu/usr.bin/perl/plan9/config.plan910
-rw-r--r--gnu/usr.bin/perl/plan9/config_sh.sample35
-rw-r--r--gnu/usr.bin/perl/plan9/mkfile2
-rw-r--r--gnu/usr.bin/perl/pod/perl.pod9
-rw-r--r--gnu/usr.bin/perl/pod/perldelta.pod365
-rw-r--r--gnu/usr.bin/perl/pod/perldiag.pod35
-rw-r--r--gnu/usr.bin/perl/pod/perlfunc.pod72
-rw-r--r--gnu/usr.bin/perl/pod/perlguts.pod2
-rw-r--r--gnu/usr.bin/perl/pod/perlhist.pod11
-rw-r--r--gnu/usr.bin/perl/pod/perlipc.pod71
-rw-r--r--gnu/usr.bin/perl/pod/perllocale.pod44
-rw-r--r--gnu/usr.bin/perl/pod/perlmod.pod21
-rw-r--r--gnu/usr.bin/perl/pod/perlmodinstall.pod4
-rw-r--r--gnu/usr.bin/perl/pod/perlop.pod221
-rw-r--r--gnu/usr.bin/perl/pod/perlref.pod68
-rw-r--r--gnu/usr.bin/perl/pod/perlsec.pod42
-rw-r--r--gnu/usr.bin/perl/pod/perlsub.pod34
-rw-r--r--gnu/usr.bin/perl/pod/perlsyn.pod263
-rw-r--r--gnu/usr.bin/perl/pod/perlthrtut.pod66
-rw-r--r--gnu/usr.bin/perl/pod/perlvar.pod11
-rw-r--r--gnu/usr.bin/perl/pp.c5
-rw-r--r--gnu/usr.bin/perl/pp_ctl.c5
-rw-r--r--gnu/usr.bin/perl/pp_sys.c13
-rw-r--r--gnu/usr.bin/perl/regcomp.c21
-rw-r--r--gnu/usr.bin/perl/regexec.c4
-rw-r--r--gnu/usr.bin/perl/sv.c47
-rw-r--r--gnu/usr.bin/perl/sv.h2
-rw-r--r--gnu/usr.bin/perl/symbian/config.sh1
-rw-r--r--gnu/usr.bin/perl/t/lib/h2ph.pht4
-rw-r--r--gnu/usr.bin/perl/t/loc_tools.pl3
-rw-r--r--gnu/usr.bin/perl/t/op/list.t4
-rw-r--r--gnu/usr.bin/perl/t/op/quotemeta.t16
-rw-r--r--gnu/usr.bin/perl/t/op/sort.t4
-rw-r--r--gnu/usr.bin/perl/t/op/taint.t84
-rw-r--r--gnu/usr.bin/perl/t/op/time.t10
-rw-r--r--gnu/usr.bin/perl/t/op/write.t38
-rw-r--r--gnu/usr.bin/perl/t/porting/customized.dat11
-rw-r--r--gnu/usr.bin/perl/t/porting/dual-life.t6
-rwxr-xr-xgnu/usr.bin/perl/t/re/pat.t24
-rw-r--r--gnu/usr.bin/perl/t/uni/fold.t10
-rw-r--r--gnu/usr.bin/perl/t/uni/overload.t6
-rw-r--r--gnu/usr.bin/perl/toke.c12
-rw-r--r--gnu/usr.bin/perl/uconfig.h10
-rw-r--r--gnu/usr.bin/perl/uconfig.sh1
-rw-r--r--gnu/usr.bin/perl/uconfig64.sh1
-rw-r--r--gnu/usr.bin/perl/util.c8
-rw-r--r--gnu/usr.bin/perl/utils.lst8
-rw-r--r--gnu/usr.bin/perl/utils/Makefile.PL18
-rw-r--r--gnu/usr.bin/perl/utils/h2ph.PL6
-rw-r--r--gnu/usr.bin/perl/utils/perlbug.PL11
-rw-r--r--gnu/usr.bin/perl/vutil.c4
-rw-r--r--gnu/usr.bin/perl/win32/Makefile10
-rw-r--r--gnu/usr.bin/perl/win32/config.ce5
-rw-r--r--gnu/usr.bin/perl/win32/config.gc1
-rw-r--r--gnu/usr.bin/perl/win32/config.vc1
-rw-r--r--gnu/usr.bin/perl/win32/makefile.mk10
-rw-r--r--gnu/usr.bin/perl/win32/pod.mak12
-rw-r--r--gnu/usr.bin/perl/win32/win32.h9
117 files changed, 1928 insertions, 1692 deletions
diff --git a/gnu/usr.bin/perl/Configure b/gnu/usr.bin/perl/Configure
index d34fded7ee1..2f91ba1b789 100644
--- a/gnu/usr.bin/perl/Configure
+++ b/gnu/usr.bin/perl/Configure
@@ -589,7 +589,6 @@ d_localtime_r=''
d_localtime_r_needs_tzset=''
localtime_r_proto=''
d_locconv=''
-d_lc_monetary_2008=''
d_lockf=''
d_longdbl=''
longdblsize=''
@@ -2796,31 +2795,38 @@ $define|true|[yY]*)
*) case "$lns:$issymlink" in
*"ln"*" -s:"*"test -"?)
echo "Creating the symbolic links..." >&4
+ echo "(First creating the subdirectories...)" >&4
cd ..
- awk -v src="$src" '{
- dir=$1;
- if (!sub(/\/[^\/]*$/, "", dir)) { dir = "." }
- mf[dir] = mf[dir]" "src"/"$1;
- } END {
- for (d in mf) {
- if (d != ".") { system("mkdir -p "d) }
- system("ln -sf "mf[d]" "d);
- }
- }' $src/MANIFEST
+ awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
+ read directory
+ test -z "$directory" && break
+ mkdir -p $directory
+ done
# Sanity check 1.
if test ! -d t/base; then
echo "Failed to create the subdirectories. Aborting." >&4
exit 1
fi
+ echo "(Then creating the symlinks...)" >&4
+ awk '{print $1}' $src/MANIFEST | while true; do
+ read filename
+ test -z "$filename" && break
+ if test -f $filename; then
+ if $issymlink $filename; then
+ rm -f $filename
+ fi
+ fi
+ if test -f $filename; then
+ echo "$filename already exists, not symlinking."
+ else
+ ln -s $src/$filename $filename
+ fi
+ done
# Sanity check 2.
if test ! -f t/base/lex.t; then
echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
exit 1
fi
- if test ! -f x2p/walk.c; then
- echo "Failed to create the symlinks (x2p/walk.c missing). Aborting." >&4
- exit 1
- fi
cd UU
;;
*) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
@@ -5343,25 +5349,6 @@ default|recommended)
eval $checkccflag
;;
esac
- case "$gccversion" in
- 1*) ;;
- 2*) ;;
- ?*) echo " "
- echo "Checking if your compiler accepts -fno-delete-null-pointer-checks" 2>&1
- echo 'int main(void) { return 0; }' > gcctest.c
- if $cc -O2 -fno-delete-null-pointer-checks -o gcctest gcctest.c; then
- echo "Yes, it does." 2>&1
- case "$ccflags" in
- *delete-null-pointer-checks*)
- echo "Leaving current flags $ccflags alone." 2>&1
- ;;
- *) dflt="$dflt -fno-delete-null-pointer-checks" ;;
- esac
- else
- echo "Nope, it doesn't, but that's ok." 2>&1
- fi
- ;;
- esac
# For gcc, adding -pipe speeds up compilations for some, but apparently
# some assemblers can't read from stdin. (It also slows down compilations
# in other cases, but those are apparently rarer these days.) AD 5/2004.
@@ -8555,15 +8542,12 @@ if "$useshrplib"; then
freebsd|mirbsd|netbsd|openbsd|interix|dragonfly|bitrig)
xxx="-Wl,-R$shrpdir"
;;
- bsdos|linux|irix*|dec_osf|gnu*)
+ bsdos|linux|irix*|dec_osf|gnu*|haiku)
xxx="-Wl,-rpath,$shrpdir"
;;
next)
# next doesn't like the default...
;;
- haiku)
- # Haiku doesn't like the default, either.
- ;;
hpux*)
# hpux doesn't like the default, either.
tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
@@ -15598,27 +15582,6 @@ $rm_try
set localeconv d_locconv
eval $inlibc
-: see if localtime_r calls tzset
-case "$d_locconv:$d_lc_monetary_2008" in
-define:)
- $cat >try.c <<EOCP
-#include <locale.h>
-int main() {
- struct lconv *lc = localeconv();
- char int_p_cs_precedes = lc->int_p_cs_precedes;
- return 0;
-}
-EOCP
- set try
- if eval $compile; then
- d_lc_monetary_2008="$define"
- else
- d_lc_monetary_2008="$undef"
- fi;
- $rm_try
- ;;
-esac
-
: see if lockf exists
set lockf d_lockf
eval $inlibc
@@ -19620,9 +19583,9 @@ case "$ccflags" in
;;
esac
-randfunc=drand48
-drand01="drand48()"
-seedfunc="srand48"
+randfunc=Perl_drand48
+drand01="Perl_drand48()"
+seedfunc="Perl_drand48_init"
randbits=48
randseedtype=U32
@@ -22427,7 +22390,6 @@ xs_extensions=''
find_extensions='
for xxx in *; do
case "$xxx" in
- CVS) ;;
DynaLoader|dynaload) ;;
*)
this_ext=`echo $xxx | $sed -e s/-/\\\//g`;
@@ -22655,8 +22617,6 @@ esac
nonxs_ext=''
for xxx in $nonxs_extensions ; do
case "$xxx" in
- CVS|RCS|SCCS|.svn)
- ;;
VMS*)
;;
*) nonxs_ext="$nonxs_ext $xxx"
@@ -23216,7 +23176,6 @@ d_localtime64='$d_localtime64'
d_localtime_r='$d_localtime_r'
d_localtime_r_needs_tzset='$d_localtime_r_needs_tzset'
d_locconv='$d_locconv'
-d_lc_monetary_2008='$d_lc_monetary_2008'
d_lockf='$d_lockf'
d_longdbl='$d_longdbl'
d_longlong='$d_longlong'
diff --git a/gnu/usr.bin/perl/Cross/config.sh-arm-linux b/gnu/usr.bin/perl/Cross/config.sh-arm-linux
index 29c0cbcc0c5..a6e221959b1 100644
--- a/gnu/usr.bin/perl/Cross/config.sh-arm-linux
+++ b/gnu/usr.bin/perl/Cross/config.sh-arm-linux
@@ -34,10 +34,10 @@ aphostname='/bin/hostname'
api_revision='5'
api_subversion='0'
api_version='20'
-api_versionstring='5.20.1'
+api_versionstring='5.20.2'
ar='ar'
-archlib='/usr/lib/perl5/5.20.1/armv4l-linux'
-archlibexp='/usr/lib/perl5/5.20.1/armv4l-linux'
+archlib='/usr/lib/perl5/5.20.2/armv4l-linux'
+archlibexp='/usr/lib/perl5/5.20.2/armv4l-linux'
archname64=''
archname='armv4l-linux'
archobjs=''
@@ -56,7 +56,7 @@ castflags='0'
cat='cat'
cc='cc'
cccdlflags='-fpic'
-ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.20.1/armv4l-linux/CORE'
+ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.20.2/armv4l-linux/CORE'
ccflags='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='arm-linux-gcc'
@@ -296,7 +296,6 @@ d_isinf='define'
d_isnan='define'
d_isnanl='define'
d_killpg='define'
-d_lc_monetary_2008='undef'
d_lchown='define'
d_ldbl_dig='define'
d_libm_lib_version='define'
@@ -729,7 +728,7 @@ inc_version_list=' '
inc_version_list_init='0'
incpath=''
inews=''
-installarchlib='./install_me_here/usr/lib/perl5/5.20.1/armv4l-linux'
+installarchlib='./install_me_here/usr/lib/perl5/5.20.2/armv4l-linux'
installbin='./install_me_here/usr/bin'
installhtml1dir=''
installhtml3dir=''
@@ -737,13 +736,13 @@ installman1dir='./install_me_here/usr/share/man/man1'
installman3dir='./install_me_here/usr/share/man/man3'
installprefix='./install_me_here/usr'
installprefixexp='./install_me_here/usr'
-installprivlib='./install_me_here/usr/lib/perl5/5.20.1'
+installprivlib='./install_me_here/usr/lib/perl5/5.20.2'
installscript='./install_me_here/usr/bin'
-installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.20.1/armv4l-linux'
+installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.20.2/armv4l-linux'
installsitebin='./install_me_here/usr/bin'
installsitehtml1dir=''
installsitehtml3dir=''
-installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.20.1'
+installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.20.2'
installsiteman1dir='./install_me_here/usr/share/man/man1'
installsiteman3dir='./install_me_here/usr/share/man/man3'
installsitescript='./install_me_here/usr/bin'
@@ -872,8 +871,8 @@ pmake=''
pr=''
prefix='/usr'
prefixexp='/usr'
-privlib='/usr/lib/perl5/5.20.1'
-privlibexp='/usr/lib/perl5/5.20.1'
+privlib='/usr/lib/perl5/5.20.2'
+privlibexp='/usr/lib/perl5/5.20.2'
procselfexe='"/proc/self/exe"'
prototype='define'
ptrsize='4'
@@ -938,17 +937,17 @@ sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0'
sig_size='68'
signal_t='void'
-sitearch='/usr/lib/perl5/site_perl/5.20.1/armv4l-linux'
-sitearchexp='/usr/lib/perl5/site_perl/5.20.1/armv4l-linux'
+sitearch='/usr/lib/perl5/site_perl/5.20.2/armv4l-linux'
+sitearchexp='/usr/lib/perl5/site_perl/5.20.2/armv4l-linux'
sitebin='/usr/bin'
sitebinexp='/usr/bin'
sitehtml1dir=''
sitehtml1direxp=''
sitehtml3dir=''
sitehtml3direxp=''
-sitelib='/usr/lib/perl5/site_perl/5.20.1'
+sitelib='/usr/lib/perl5/site_perl/5.20.2'
sitelib_stem='/usr/lib/perl5/site_perl'
-sitelibexp='/usr/lib/perl5/site_perl/5.20.1'
+sitelibexp='/usr/lib/perl5/site_perl/5.20.2'
siteman1dir='/usr/share/man/man1'
siteman1direxp='/usr/share/man/man1'
siteman3dir='/usr/share/man/man3'
@@ -987,7 +986,7 @@ stdio_stream_array=''
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
-subversion='1'
+subversion='2'
sysman='/usr/share/man/man1'
tail=''
tar=''
@@ -1077,8 +1076,8 @@ vendorprefix=''
vendorprefixexp=''
vendorscript=''
vendorscriptexp=''
-version='5.20.1'
-version_patchlevel_string='version 20 subversion 1'
+version='5.20.2'
+version_patchlevel_string='version 20 subversion 2'
versiononly='undef'
vi=''
xlibpth='/usr/lib/386 /lib/386'
@@ -1092,7 +1091,7 @@ config_args=''
config_argc=0
PERL_REVISION=5
PERL_VERSION=20
-PERL_SUBVERSION=1
+PERL_SUBVERSION=2
PERL_API_REVISION=5
PERL_API_VERSION=20
PERL_API_SUBVERSION=0
diff --git a/gnu/usr.bin/perl/INSTALL b/gnu/usr.bin/perl/INSTALL
index b1028eab911..bc2374ad742 100644
--- a/gnu/usr.bin/perl/INSTALL
+++ b/gnu/usr.bin/perl/INSTALL
@@ -89,7 +89,8 @@ potential incompatibilities introduced with this release. A few of
the most important issues are listed below, but you should refer
to pod/perldelta.pod for more detailed information.
-B<WARNING:> This version is not binary compatible with prior releases of Perl.
+B<WARNING:> This version is not binary compatible with versions of Perl
+earlier than 5.20.0.
If you have built extensions (i.e. modules that include C code)
using an earlier version of Perl, you will need to rebuild and reinstall
those extensions.
@@ -563,7 +564,7 @@ The directories set up by Configure fall into three broad categories.
=item Directories for the perl distribution
-By default, Configure will use the following directories for 5.20.1.
+By default, Configure will use the following directories for 5.20.2.
$version is the full perl version number, including subversion, e.g.
5.12.3, and $archname is a string like sun4-sunos,
determined by Configure. The full definitions of all Configure
@@ -2417,7 +2418,7 @@ http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
=head1 Coexistence with earlier versions of perl 5
-Perl 5.20.1 is not binary compatible with earlier versions of Perl.
+Perl 5.20.2 is not binary compatible with versions of Perl earlier than 5.20.0.
In other words, you will have to recompile your XS modules.
In general, you can usually safely upgrade from one version of Perl (e.g.
@@ -2491,9 +2492,9 @@ won't interfere with another version. (The defaults guarantee this for
libraries after 5.6.0, but not for executables. TODO?) One convenient
way to do this is by using a separate prefix for each version, such as
- sh Configure -Dprefix=/opt/perl5.20.1
+ sh Configure -Dprefix=/opt/perl5.20.2
-and adding /opt/perl5.20.1/bin to the shell PATH variable. Such users
+and adding /opt/perl5.20.2/bin to the shell PATH variable. Such users
may also wish to add a symbolic link /usr/local/bin/perl so that
scripts can still start with #!/usr/local/bin/perl.
@@ -2506,13 +2507,13 @@ seriously consider using a separate directory, since development
subversions may not have all the compatibility wrinkles ironed out
yet.
-=head2 Upgrading from 5.19.0 or earlier
+=head2 Upgrading from 5.19.11 or earlier
-B<Perl 5.20.1 may not be binary compatible with Perl 5.19.11 or
+B<Perl 5.20.2 may not be binary compatible with Perl 5.19.11 or
earlier Perl releases.> Perl modules having binary parts
(meaning that a C compiler is used) will have to be recompiled to be
-used with 5.20.1. If you find you do need to rebuild an extension with
-5.20.1, you may safely do so without disturbing the older
+used with 5.20.2. If you find you do need to rebuild an extension with
+5.20.2, you may safely do so without disturbing the older
installations. (See L<"Coexistence with earlier versions of perl 5">
above.)
@@ -2545,15 +2546,15 @@ Firstly, the bare minimum to run this script
print("$f\n");
}
-in Linux with perl-5.20.1 is as follows (under $Config{prefix}):
+in Linux with perl-5.20.2 is as follows (under $Config{prefix}):
./bin/perl
- ./lib/perl5/5.20.1/strict.pm
- ./lib/perl5/5.20.1/warnings.pm
- ./lib/perl5/5.20.1/i686-linux/File/Glob.pm
- ./lib/perl5/5.20.1/feature.pm
- ./lib/perl5/5.20.1/XSLoader.pm
- ./lib/perl5/5.20.1/i686-linux/auto/File/Glob/Glob.so
+ ./lib/perl5/5.20.2/strict.pm
+ ./lib/perl5/5.20.2/warnings.pm
+ ./lib/perl5/5.20.2/i686-linux/File/Glob.pm
+ ./lib/perl5/5.20.2/feature.pm
+ ./lib/perl5/5.20.2/XSLoader.pm
+ ./lib/perl5/5.20.2/i686-linux/auto/File/Glob/Glob.so
Secondly, for perl-5.10.1, the Debian perl-base package contains 591 files,
(of which 510 are for lib/unicore) totaling about 3.5MB in its i386 version.
diff --git a/gnu/usr.bin/perl/MANIFEST b/gnu/usr.bin/perl/MANIFEST
index 19068c05014..689685447cc 100644
--- a/gnu/usr.bin/perl/MANIFEST
+++ b/gnu/usr.bin/perl/MANIFEST
@@ -8,7 +8,6 @@ cflags.SH A script that emits C compilation flags per file
Changes Describe how to peruse changes between releases
charclass_invlists.h Compiled-in inversion lists
config_h.SH Produces config.h
-config.over Site-specific overrides for Configure defaults
configpm Produces lib/Config.pm
Configure Portability tool
configure.com Configure-equivalent for VMS
@@ -1725,10 +1724,6 @@ cpan/NEXT/t/dynamically_scoped_regex_vars.t NEXT
cpan/NEXT/t/next.t NEXT
cpan/NEXT/t/stringify.t NEXT
cpan/NEXT/t/unseen.t NEXT
-cpan/OpenBSD-MkTemp/lib/OpenBSD/MkTemp.pm OpenBSD::MkTemp
-cpan/OpenBSD-MkTemp/MkTemp.xs OpenBSD::MkTemp
-cpan/OpenBSD-MkTemp/README OpenBSD::MkTemp Readme
-cpan/OpenBSD-MkTemp/t/OpenBSD-MkTemp.t OpenBSD::MkTemp test file
cpan/Package-Constants/lib/Package/Constants.pm Package::Constants
cpan/Package-Constants/t/01_list.t Package::Constants tests
cpan/Params-Check/lib/Params/Check.pm Params::Check
@@ -3311,7 +3306,6 @@ dist/Module-CoreList/Makefile.PL Module::CoreList
dist/Module-CoreList/MANIFEST Module::CoreList
dist/Module-CoreList/README Module::CoreList
dist/Module-CoreList/t/corelist.t Module::CoreList tests
-dist/Module-CoreList/t/corevers.t Module::CoreList tests
dist/Module-CoreList/t/deprecated.t Module::CoreList tests
dist/Module-CoreList/t/find_modules.t Module::CoreList tests
dist/Module-CoreList/t/is_core.t Module::CoreList tests
@@ -3593,6 +3587,7 @@ ext/B/B/Terse.pm Compiler Terse backend
ext/B/B/Xref.pm Compiler Xref backend
ext/B/B.xs Compiler backend external subroutines
ext/B/hints/darwin.pl Hints for named architecture
+ext/B/hints/openbsd.pl Hints for named architecture
ext/B/Makefile.PL Compiler backend makefile writer
ext/B/O.pm Compiler front-end module (-MO=...)
ext/B/t/b.t See if B works
@@ -4021,7 +4016,6 @@ fakesdio.h stdio in terms of PerlIO
feature.h Feature header
form.h Public declarations for formats
generate_uudmap.c Generate uudmap.h, the uuencode decoding map
-git_version.h Pre-generated git_version.h for OpenBSD
globals.c File to declare global symbols (for shared library)
globvar.sym Global variables that need hiding when embedded
gv.c Glob value code
@@ -4167,7 +4161,6 @@ lib/Class/Struct.pm Declare struct-like datatypes as Perl classes
lib/Class/Struct.t See if Class::Struct works
lib/Config/Extensions.pm Convenient hash lookup for built extensions
lib/Config/Extensions.t See if Config::Extensions works
-lib/Config_git.pl Pre-generated Config_git.pl for OpenBSD
lib/Config.t See if Config works
lib/CORE.pod document the CORE namespace
lib/DBM_Filter/compress.pm DBM Filter to compress keys/values
@@ -4324,444 +4317,54 @@ lib/Unicode/README Explanation what happened to lib/unicode.
lib/Unicode/UCD.pm Unicode character database
lib/Unicode/UCD.t See if Unicode character database works
lib/unicore/ArabicShaping.txt Unicode character database
-lib/unicore/auxiliary/GCBTest.txt Unicode character database
-lib/unicore/auxiliary/GraphemeBreakProperty.txt Unicode character database
-lib/unicore/auxiliary/SentenceBreakProperty.txt Unicode character database
-lib/unicore/auxiliary/WordBreakProperty.txt Unicode character database
+lib/unicore/auxiliary/GCBTest.txt Unicode character database
+lib/unicore/auxiliary/GraphemeBreakProperty.txt Unicode character database
+lib/unicore/auxiliary/SentenceBreakProperty.txt Unicode character database
+lib/unicore/auxiliary/WordBreakProperty.txt Unicode character database
lib/unicore/BidiBrackets.txt Unicode character database
lib/unicore/BidiMirroring.txt Unicode character database
lib/unicore/Blocks.txt Unicode character database
lib/unicore/CaseFolding.txt Unicode character database
lib/unicore/CJKRadicals.txt Unicode character database
-lib/unicore/CombiningClass.pl Unicode character database
-lib/unicore/CompositionExclusions.txt Unicode character database
+lib/unicore/CompositionExclusions.txt Unicode character database
lib/unicore/DAge.txt Unicode character database
lib/unicore/DCoreProperties.txt Unicode character database
-lib/unicore/Decomposition.pl Unicode character database
-lib/unicore/DNormalizationProps.txt Unicode character database
+lib/unicore/DNormalizationProps.txt Unicode character database
lib/unicore/EastAsianWidth.txt Unicode character database
lib/unicore/EmojiSources.txt Unicode character database
-lib/unicore/extracted/DBidiClass.txt Unicode character database
-lib/unicore/extracted/DBinaryProperties.txt Unicode character database
-lib/unicore/extracted/DCombiningClass.txt Unicode character database
-lib/unicore/extracted/DDecompositionType.txt Unicode character database
-lib/unicore/extracted/DEastAsianWidth.txt Unicode character database
-lib/unicore/extracted/DGeneralCategory.txt Unicode character database
-lib/unicore/extracted/DJoinGroup.txt Unicode character database
-lib/unicore/extracted/DJoinType.txt Unicode character database
-lib/unicore/extracted/DLineBreak.txt Unicode character database
-lib/unicore/extracted/DNumType.txt Unicode character database
-lib/unicore/extracted/DNumValues.txt Unicode character database
-lib/unicore/HangulSyllableType.txt Unicode character database
-lib/unicore/Heavy.pl Unicode character database
+lib/unicore/extracted/DBidiClass.txt Unicode character database
+lib/unicore/extracted/DBinaryProperties.txt Unicode character database
+lib/unicore/extracted/DCombiningClass.txt Unicode character database
+lib/unicore/extracted/DDecompositionType.txt Unicode character database
+lib/unicore/extracted/DEastAsianWidth.txt Unicode character database
+lib/unicore/extracted/DGeneralCategory.txt Unicode character database
+lib/unicore/extracted/DJoinGroup.txt Unicode character database
+lib/unicore/extracted/DJoinType.txt Unicode character database
+lib/unicore/extracted/DLineBreak.txt Unicode character database
+lib/unicore/extracted/DNumType.txt Unicode character database
+lib/unicore/extracted/DNumValues.txt Unicode character database
+lib/unicore/HangulSyllableType.txt Unicode character database
lib/unicore/Index.txt Unicode character database
-lib/unicore/IndicMatraCategory.txt Unicode character database
-lib/unicore/IndicSyllabicCategory.txt Unicode character database
+lib/unicore/IndicMatraCategory.txt Unicode character database
+lib/unicore/IndicSyllabicCategory.txt Unicode character database
lib/unicore/Jamo.txt Unicode character database
-lib/unicore/lib/Age/NA.pl Unicode character database
-lib/unicore/lib/Age/V11.pl Unicode character database
-lib/unicore/lib/Age/V20.pl Unicode character database
-lib/unicore/lib/Age/V30.pl Unicode character database
-lib/unicore/lib/Age/V31.pl Unicode character database
-lib/unicore/lib/Age/V32.pl Unicode character database
-lib/unicore/lib/Age/V40.pl Unicode character database
-lib/unicore/lib/Age/V41.pl Unicode character database
-lib/unicore/lib/Age/V50.pl Unicode character database
-lib/unicore/lib/Age/V51.pl Unicode character database
-lib/unicore/lib/Age/V52.pl Unicode character database
-lib/unicore/lib/Age/V60.pl Unicode character database
-lib/unicore/lib/Age/V61.pl Unicode character database
-lib/unicore/lib/Alpha/Y.pl Unicode character database
-lib/unicore/lib/Bc/AL.pl Unicode character database
-lib/unicore/lib/Bc/AN.pl Unicode character database
-lib/unicore/lib/Bc/BN.pl Unicode character database
-lib/unicore/lib/Bc/B.pl Unicode character database
-lib/unicore/lib/Bc/CS.pl Unicode character database
-lib/unicore/lib/Bc/EN.pl Unicode character database
-lib/unicore/lib/Bc/ES.pl Unicode character database
-lib/unicore/lib/Bc/ET.pl Unicode character database
-lib/unicore/lib/Bc/L.pl Unicode character database
-lib/unicore/lib/Bc/NSM.pl Unicode character database
-lib/unicore/lib/Bc/ON.pl Unicode character database
-lib/unicore/lib/Bc/R.pl Unicode character database
-lib/unicore/lib/Bc/WS.pl Unicode character database
-lib/unicore/lib/BidiC/Y.pl Unicode character database
-lib/unicore/lib/BidiM/Y.pl Unicode character database
-lib/unicore/lib/Blk/NB.pl Unicode character database
-lib/unicore/lib/Bpt/C.pl Unicode character database
-lib/unicore/lib/Bpt/N.pl Unicode character database
-lib/unicore/lib/Bpt/O.pl Unicode character database
-lib/unicore/lib/Cased/Y.pl Unicode character database
-lib/unicore/lib/Ccc/A.pl Unicode character database
-lib/unicore/lib/Ccc/AR.pl Unicode character database
-lib/unicore/lib/Ccc/ATAR.pl Unicode character database
-lib/unicore/lib/Ccc/B.pl Unicode character database
-lib/unicore/lib/Ccc/BR.pl Unicode character database
-lib/unicore/lib/Ccc/DB.pl Unicode character database
-lib/unicore/lib/Ccc/NK.pl Unicode character database
-lib/unicore/lib/Ccc/NR.pl Unicode character database
-lib/unicore/lib/Ccc/OV.pl Unicode character database
-lib/unicore/lib/Ccc/VR.pl Unicode character database
-lib/unicore/lib/CE/Y.pl Unicode character database
-lib/unicore/lib/CI/Y.pl Unicode character database
-lib/unicore/lib/CompEx/Y.pl Unicode character database
-lib/unicore/lib/CWCF/Y.pl Unicode character database
-lib/unicore/lib/CWCM/Y.pl Unicode character database
-lib/unicore/lib/CWKCF/Y.pl Unicode character database
-lib/unicore/lib/CWL/Y.pl Unicode character database
-lib/unicore/lib/CWT/Y.pl Unicode character database
-lib/unicore/lib/CWU/Y.pl Unicode character database
-lib/unicore/lib/Dash/Y.pl Unicode character database
-lib/unicore/lib/Dep/Y.pl Unicode character database
-lib/unicore/lib/Dia/Y.pl Unicode character database
-lib/unicore/lib/DI/Y.pl Unicode character database
-lib/unicore/lib/Dt/Com.pl Unicode character database
-lib/unicore/lib/Dt/Enc.pl Unicode character database
-lib/unicore/lib/Dt/Fin.pl Unicode character database
-lib/unicore/lib/Dt/Font.pl Unicode character database
-lib/unicore/lib/Dt/Init.pl Unicode character database
-lib/unicore/lib/Dt/Iso.pl Unicode character database
-lib/unicore/lib/Dt/Med.pl Unicode character database
-lib/unicore/lib/Dt/Nar.pl Unicode character database
-lib/unicore/lib/Dt/Nb.pl Unicode character database
-lib/unicore/lib/Dt/NonCanon.pl Unicode character database
-lib/unicore/lib/Dt/Sqr.pl Unicode character database
-lib/unicore/lib/Dt/Sub.pl Unicode character database
-lib/unicore/lib/Dt/Sup.pl Unicode character database
-lib/unicore/lib/Dt/Vert.pl Unicode character database
-lib/unicore/lib/Ea/A.pl Unicode character database
-lib/unicore/lib/Ea/H.pl Unicode character database
-lib/unicore/lib/Ea/Na.pl Unicode character database
-lib/unicore/lib/Ea/N.pl Unicode character database
-lib/unicore/lib/Ea/W.pl Unicode character database
-lib/unicore/lib/Ext/Y.pl Unicode character database
-lib/unicore/lib/GCB/CN.pl Unicode character database
-lib/unicore/lib/GCB/EX.pl Unicode character database
-lib/unicore/lib/GCB/LV.pl Unicode character database
-lib/unicore/lib/GCB/LVT.pl Unicode character database
-lib/unicore/lib/GCB/SM.pl Unicode character database
-lib/unicore/lib/GCB/XX.pl Unicode character database
-lib/unicore/lib/Gc/Cf.pl Unicode character database
-lib/unicore/lib/Gc/Cn.pl Unicode character database
-lib/unicore/lib/Gc/C.pl Unicode character database
-lib/unicore/lib/Gc/LC.pl Unicode character database
-lib/unicore/lib/Gc/Ll.pl Unicode character database
-lib/unicore/lib/Gc/Lm.pl Unicode character database
-lib/unicore/lib/Gc/Lo.pl Unicode character database
-lib/unicore/lib/Gc/L.pl Unicode character database
-lib/unicore/lib/Gc/Lt.pl Unicode character database
-lib/unicore/lib/Gc/Lu.pl Unicode character database
-lib/unicore/lib/Gc/Mc.pl Unicode character database
-lib/unicore/lib/Gc/Me.pl Unicode character database
-lib/unicore/lib/Gc/Mn.pl Unicode character database
-lib/unicore/lib/Gc/M.pl Unicode character database
-lib/unicore/lib/Gc/Nd.pl Unicode character database
-lib/unicore/lib/Gc/Nl.pl Unicode character database
-lib/unicore/lib/Gc/No.pl Unicode character database
-lib/unicore/lib/Gc/N.pl Unicode character database
-lib/unicore/lib/Gc/Pd.pl Unicode character database
-lib/unicore/lib/Gc/Pe.pl Unicode character database
-lib/unicore/lib/Gc/Pf.pl Unicode character database
-lib/unicore/lib/Gc/Pi.pl Unicode character database
-lib/unicore/lib/Gc/Po.pl Unicode character database
-lib/unicore/lib/Gc/P.pl Unicode character database
-lib/unicore/lib/Gc/Ps.pl Unicode character database
-lib/unicore/lib/Gc/Sc.pl Unicode character database
-lib/unicore/lib/Gc/Sk.pl Unicode character database
-lib/unicore/lib/Gc/Sm.pl Unicode character database
-lib/unicore/lib/Gc/So.pl Unicode character database
-lib/unicore/lib/Gc/S.pl Unicode character database
-lib/unicore/lib/Gc/Z.pl Unicode character database
-lib/unicore/lib/Gc/Zs.pl Unicode character database
-lib/unicore/lib/GrBase/Y.pl Unicode character database
-lib/unicore/lib/Hex/Y.pl Unicode character database
-lib/unicore/lib/Hst/NA.pl Unicode character database
-lib/unicore/lib/Hyphen/Y.pl Unicode character database
-lib/unicore/lib/IDC/Y.pl Unicode character database
-lib/unicore/lib/Ideo/Y.pl Unicode character database
-lib/unicore/lib/IDS/Y.pl Unicode character database
-lib/unicore/lib/In/2_0.pl Unicode character database
-lib/unicore/lib/In/2_1.pl Unicode character database
-lib/unicore/lib/In/3_0.pl Unicode character database
-lib/unicore/lib/In/3_1.pl Unicode character database
-lib/unicore/lib/In/3_2.pl Unicode character database
-lib/unicore/lib/In/4_0.pl Unicode character database
-lib/unicore/lib/In/4_1.pl Unicode character database
-lib/unicore/lib/In/5_0.pl Unicode character database
-lib/unicore/lib/In/5_1.pl Unicode character database
-lib/unicore/lib/In/5_2.pl Unicode character database
-lib/unicore/lib/In/6_0.pl Unicode character database
-lib/unicore/lib/In/6_1.pl Unicode character database
-lib/unicore/lib/In/6_2.pl Unicode character database
-lib/unicore/lib/In/6_3.pl Unicode character database
-lib/unicore/lib/Jg/Ain.pl Unicode character database
-lib/unicore/lib/Jg/Alef.pl Unicode character database
-lib/unicore/lib/Jg/Beh.pl Unicode character database
-lib/unicore/lib/Jg/Dal.pl Unicode character database
-lib/unicore/lib/Jg/FarsiYeh.pl Unicode character database
-lib/unicore/lib/Jg/Feh.pl Unicode character database
-lib/unicore/lib/Jg/Gaf.pl Unicode character database
-lib/unicore/lib/Jg/Hah.pl Unicode character database
-lib/unicore/lib/Jg/Lam.pl Unicode character database
-lib/unicore/lib/Jg/NoJoinin.pl Unicode character database
-lib/unicore/lib/Jg/Qaf.pl Unicode character database
-lib/unicore/lib/Jg/Reh.pl Unicode character database
-lib/unicore/lib/Jg/Seen.pl Unicode character database
-lib/unicore/lib/Jg/Waw.pl Unicode character database
-lib/unicore/lib/Jg/Yeh.pl Unicode character database
-lib/unicore/lib/Jt/C.pl Unicode character database
-lib/unicore/lib/Jt/D.pl Unicode character database
-lib/unicore/lib/Jt/R.pl Unicode character database
-lib/unicore/lib/Jt/T.pl Unicode character database
-lib/unicore/lib/Jt/U.pl Unicode character database
-lib/unicore/lib/Lb/AI.pl Unicode character database
-lib/unicore/lib/Lb/AL.pl Unicode character database
-lib/unicore/lib/Lb/BA.pl Unicode character database
-lib/unicore/lib/Lb/BB.pl Unicode character database
-lib/unicore/lib/Lb/CJ.pl Unicode character database
-lib/unicore/lib/Lb/CL.pl Unicode character database
-lib/unicore/lib/Lb/CM.pl Unicode character database
-lib/unicore/lib/Lb/EX.pl Unicode character database
-lib/unicore/lib/Lb/GL.pl Unicode character database
-lib/unicore/lib/Lb/ID.pl Unicode character database
-lib/unicore/lib/Lb/IS.pl Unicode character database
-lib/unicore/lib/Lb/NS.pl Unicode character database
-lib/unicore/lib/Lb/OP.pl Unicode character database
-lib/unicore/lib/Lb/PO.pl Unicode character database
-lib/unicore/lib/Lb/PR.pl Unicode character database
-lib/unicore/lib/Lb/QU.pl Unicode character database
-lib/unicore/lib/Lb/SA.pl Unicode character database
-lib/unicore/lib/Lb/XX.pl Unicode character database
-lib/unicore/lib/LOE/Y.pl Unicode character database
-lib/unicore/lib/Lower/Y.pl Unicode character database
-lib/unicore/lib/Math/Y.pl Unicode character database
-lib/unicore/lib/NChar/Y.pl Unicode character database
-lib/unicore/lib/NFCQC/M.pl Unicode character database
-lib/unicore/lib/NFCQC/Y.pl Unicode character database
-lib/unicore/lib/NFDQC/N.pl Unicode character database
-lib/unicore/lib/NFDQC/Y.pl Unicode character database
-lib/unicore/lib/NFKCQC/N.pl Unicode character database
-lib/unicore/lib/NFKCQC/Y.pl Unicode character database
-lib/unicore/lib/NFKDQC/N.pl Unicode character database
-lib/unicore/lib/NFKDQC/Y.pl Unicode character database
-lib/unicore/lib/Nt/Di.pl Unicode character database
-lib/unicore/lib/Nt/None.pl Unicode character database
-lib/unicore/lib/Nt/Nu.pl Unicode character database
-lib/unicore/lib/Nv/0.pl Unicode character database
-lib/unicore/lib/Nv/10000.pl Unicode character database
-lib/unicore/lib/Nv/1000.pl Unicode character database
-lib/unicore/lib/Nv/100.pl Unicode character database
-lib/unicore/lib/Nv/10.pl Unicode character database
-lib/unicore/lib/Nv/11.pl Unicode character database
-lib/unicore/lib/Nv/12.pl Unicode character database
-lib/unicore/lib/Nv/1_2.pl Unicode character database
-lib/unicore/lib/Nv/13.pl Unicode character database
-lib/unicore/lib/Nv/1_3.pl Unicode character database
-lib/unicore/lib/Nv/14.pl Unicode character database
-lib/unicore/lib/Nv/1_4.pl Unicode character database
-lib/unicore/lib/Nv/15.pl Unicode character database
-lib/unicore/lib/Nv/16.pl Unicode character database
-lib/unicore/lib/Nv/17.pl Unicode character database
-lib/unicore/lib/Nv/18.pl Unicode character database
-lib/unicore/lib/Nv/1_8.pl Unicode character database
-lib/unicore/lib/Nv/19.pl Unicode character database
-lib/unicore/lib/Nv/1.pl Unicode character database
-lib/unicore/lib/Nv/20.pl Unicode character database
-lib/unicore/lib/Nv/2_3.pl Unicode character database
-lib/unicore/lib/Nv/2.pl Unicode character database
-lib/unicore/lib/Nv/30.pl Unicode character database
-lib/unicore/lib/Nv/3_4.pl Unicode character database
-lib/unicore/lib/Nv/3.pl Unicode character database
-lib/unicore/lib/Nv/40.pl Unicode character database
-lib/unicore/lib/Nv/4.pl Unicode character database
-lib/unicore/lib/Nv/50000.pl Unicode character database
-lib/unicore/lib/Nv/5000.pl Unicode character database
-lib/unicore/lib/Nv/500.pl Unicode character database
-lib/unicore/lib/Nv/50.pl Unicode character database
-lib/unicore/lib/Nv/5.pl Unicode character database
-lib/unicore/lib/Nv/60.pl Unicode character database
-lib/unicore/lib/Nv/6.pl Unicode character database
-lib/unicore/lib/Nv/70.pl Unicode character database
-lib/unicore/lib/Nv/7.pl Unicode character database
-lib/unicore/lib/Nv/80.pl Unicode character database
-lib/unicore/lib/Nv/8.pl Unicode character database
-lib/unicore/lib/Nv/90.pl Unicode character database
-lib/unicore/lib/Nv/9.pl Unicode character database
-lib/unicore/lib/PatSyn/Y.pl Unicode character database
-lib/unicore/lib/PatWS/Y.pl Unicode character database
-lib/unicore/lib/Perl/Alnum.pl Unicode character database
-lib/unicore/lib/Perl/Assigned.pl Unicode character database
-lib/unicore/lib/Perl/Blank.pl Unicode character database
-lib/unicore/lib/Perl/Graph.pl Unicode character database
-lib/unicore/lib/Perl/_PerlAny.pl Unicode character database
-lib/unicore/lib/Perl/_PerlCh2.pl Unicode character database
-lib/unicore/lib/Perl/_PerlCha.pl Unicode character database
-lib/unicore/lib/Perl/_PerlFol.pl Unicode character database
-lib/unicore/lib/Perl/_PerlIDC.pl Unicode character database
-lib/unicore/lib/Perl/_PerlIDS.pl Unicode character database
-lib/unicore/lib/Perl/_PerlPr2.pl Unicode character database
-lib/unicore/lib/Perl/_PerlPro.pl Unicode character database
-lib/unicore/lib/Perl/_PerlQuo.pl Unicode character database
-lib/unicore/lib/Perl/PerlWord.pl Unicode character database
-lib/unicore/lib/Perl/PosixPun.pl Unicode character database
-lib/unicore/lib/Perl/Print.pl Unicode character database
-lib/unicore/lib/Perl/Word.pl Unicode character database
-lib/unicore/lib/Perl/_XExtend.pl Unicode character database
-lib/unicore/lib/Perl/XPosixPu.pl Unicode character database
-lib/unicore/lib/Perl/_XRegula.pl Unicode character database
-lib/unicore/lib/Perl/_XSpecia.pl Unicode character database
-lib/unicore/lib/QMark/Y.pl Unicode character database
-lib/unicore/lib/SB/AT.pl Unicode character database
-lib/unicore/lib/SB/CL.pl Unicode character database
-lib/unicore/lib/SB/EX.pl Unicode character database
-lib/unicore/lib/SB/FO.pl Unicode character database
-lib/unicore/lib/SB/LE.pl Unicode character database
-lib/unicore/lib/SB/LO.pl Unicode character database
-lib/unicore/lib/SB/NU.pl Unicode character database
-lib/unicore/lib/SB/SC.pl Unicode character database
-lib/unicore/lib/SB/Sp.pl Unicode character database
-lib/unicore/lib/SB/ST.pl Unicode character database
-lib/unicore/lib/SB/UP.pl Unicode character database
-lib/unicore/lib/SB/XX.pl Unicode character database
-lib/unicore/lib/Sc/Arab.pl Unicode character database
-lib/unicore/lib/Sc/Armn.pl Unicode character database
-lib/unicore/lib/Sc/Beng.pl Unicode character database
-lib/unicore/lib/Sc/Cham.pl Unicode character database
-lib/unicore/lib/Sc/Cprt.pl Unicode character database
-lib/unicore/lib/Sc/Cyrl.pl Unicode character database
-lib/unicore/lib/Sc/Deva.pl Unicode character database
-lib/unicore/lib/Sc/Ethi.pl Unicode character database
-lib/unicore/lib/Sc/Geor.pl Unicode character database
-lib/unicore/lib/Sc/Grek.pl Unicode character database
-lib/unicore/lib/Sc/Gujr.pl Unicode character database
-lib/unicore/lib/Sc/Guru.pl Unicode character database
-lib/unicore/lib/Sc/Hang.pl Unicode character database
-lib/unicore/lib/Sc/Han.pl Unicode character database
-lib/unicore/lib/Sc/Hebr.pl Unicode character database
-lib/unicore/lib/Sc/Hira.pl Unicode character database
-lib/unicore/lib/Sc/Kana.pl Unicode character database
-lib/unicore/lib/Sc/Khar.pl Unicode character database
-lib/unicore/lib/Sc/Khmr.pl Unicode character database
-lib/unicore/lib/Sc/Knda.pl Unicode character database
-lib/unicore/lib/Sc/Lana.pl Unicode character database
-lib/unicore/lib/Sc/Lao.pl Unicode character database
-lib/unicore/lib/Sc/Latn.pl Unicode character database
-lib/unicore/lib/Sc/Limb.pl Unicode character database
-lib/unicore/lib/Sc/Linb.pl Unicode character database
-lib/unicore/lib/Sc/Mlym.pl Unicode character database
-lib/unicore/lib/Sc/Mong.pl Unicode character database
-lib/unicore/lib/Sc/Orya.pl Unicode character database
-lib/unicore/lib/Sc/Sinh.pl Unicode character database
-lib/unicore/lib/Sc/Talu.pl Unicode character database
-lib/unicore/lib/Sc/Taml.pl Unicode character database
-lib/unicore/lib/Sc/Telu.pl Unicode character database
-lib/unicore/lib/Sc/Tibt.pl Unicode character database
-lib/unicore/lib/Scx/Arab.pl Unicode character database
-lib/unicore/lib/Scx/Armn.pl Unicode character database
-lib/unicore/lib/Scx/Beng.pl Unicode character database
-lib/unicore/lib/Scx/Bopo.pl Unicode character database
-lib/unicore/lib/Scx/Cakm.pl Unicode character database
-lib/unicore/lib/Scx/Cprt.pl Unicode character database
-lib/unicore/lib/Scx/Cyrl.pl Unicode character database
-lib/unicore/lib/Scx/Deva.pl Unicode character database
-lib/unicore/lib/Scx/Geor.pl Unicode character database
-lib/unicore/lib/Scx/Grek.pl Unicode character database
-lib/unicore/lib/Scx/Gujr.pl Unicode character database
-lib/unicore/lib/Scx/Guru.pl Unicode character database
-lib/unicore/lib/Scx/Hang.pl Unicode character database
-lib/unicore/lib/Scx/Han.pl Unicode character database
-lib/unicore/lib/Scx/Hira.pl Unicode character database
-lib/unicore/lib/Scx/Kana.pl Unicode character database
-lib/unicore/lib/Scx/Latn.pl Unicode character database
-lib/unicore/lib/Scx/Linb.pl Unicode character database
-lib/unicore/lib/Scx/Mong.pl Unicode character database
-lib/unicore/lib/Scx/Orya.pl Unicode character database
-lib/unicore/lib/Scx/Syrc.pl Unicode character database
-lib/unicore/lib/Scx/Tagb.pl Unicode character database
-lib/unicore/lib/Scx/Takr.pl Unicode character database
-lib/unicore/lib/Scx/Thaa.pl Unicode character database
-lib/unicore/lib/Scx/Yi.pl Unicode character database
-lib/unicore/lib/Scx/Zinh.pl Unicode character database
-lib/unicore/lib/Scx/Zyyy.pl Unicode character database
-lib/unicore/lib/Sc/Zinh.pl Unicode character database
-lib/unicore/lib/Sc/Zyyy.pl Unicode character database
-lib/unicore/lib/Sc/Zzzz.pl Unicode character database
-lib/unicore/lib/SD/Y.pl Unicode character database
-lib/unicore/lib/Space/Y.pl Unicode character database
-lib/unicore/lib/STerm/Y.pl Unicode character database
-lib/unicore/lib/Term/Y.pl Unicode character database
-lib/unicore/lib/UIdeo/Y.pl Unicode character database
-lib/unicore/lib/Upper/Y.pl Unicode character database
-lib/unicore/lib/WB/EX.pl Unicode character database
-lib/unicore/lib/WB/FO.pl Unicode character database
-lib/unicore/lib/WB/HL.pl Unicode character database
-lib/unicore/lib/WB/KA.pl Unicode character database
-lib/unicore/lib/WB/LE.pl Unicode character database
-lib/unicore/lib/WB/MB.pl Unicode character database
-lib/unicore/lib/WB/ML.pl Unicode character database
-lib/unicore/lib/WB/MN.pl Unicode character database
-lib/unicore/lib/WB/NU.pl Unicode character database
-lib/unicore/lib/WB/XX.pl Unicode character database
-lib/unicore/lib/XIDC/Y.pl Unicode character database
-lib/unicore/lib/XIDS/Y.pl Unicode character database
lib/unicore/LineBreak.txt Unicode character database
lib/unicore/Makefile Unicode character database
lib/unicore/mktables Unicode character database generator
-lib/unicore/mktables.lst Unicode character database
lib/unicore/NameAliases.txt Unicode character database
lib/unicore/NamedSequences.txt Unicode character database
lib/unicore/NamedSqProv.txt Unicode character database
-lib/unicore/Name.pl Unicode character database
-lib/unicore/Name.pm Unicode character database
lib/unicore/NamesList.txt Unicode character database
-lib/unicore/NormalizationCorrections.txt Unicode character database
+lib/unicore/NormalizationCorrections.txt Unicode character database
lib/unicore/PropertyAliases.txt Unicode character database
lib/unicore/PropList.txt Unicode character database
-lib/unicore/PropValueAliases.txt Unicode character database
+lib/unicore/PropValueAliases.txt Unicode character database
lib/unicore/README.perl Unicode character database
lib/unicore/ReadMe.txt Unicode character database info
-lib/unicore/ScriptExtensions.txt Unicode character database
+lib/unicore/ScriptExtensions.txt Unicode character database
lib/unicore/Scripts.txt Unicode character database
lib/unicore/SpecialCasing.txt Unicode character database
-lib/unicore/StandardizedVariants.txt Unicode character database
-lib/unicore/TestProp.pl Unicode character database
-lib/unicore/To/Age.pl Unicode character database
-lib/unicore/To/Bc.pl Unicode character database
-lib/unicore/To/Bmg.pl Unicode character database
-lib/unicore/To/Bpb.pl Unicode character database
-lib/unicore/To/Bpt.pl Unicode character database
-lib/unicore/To/Cf.pl Unicode character database
-lib/unicore/To/Digit.pl Unicode character database
-lib/unicore/To/Ea.pl Unicode character database
-lib/unicore/To/Fold.pl Unicode character database
-lib/unicore/To/GCB.pl Unicode character database
-lib/unicore/To/Gc.pl Unicode character database
-lib/unicore/To/Hst.pl Unicode character database
-lib/unicore/To/Isc.pl Unicode character database
-lib/unicore/To/Jg.pl Unicode character database
-lib/unicore/To/Jt.pl Unicode character database
-lib/unicore/To/Lb.pl Unicode character database
-lib/unicore/To/Lc.pl Unicode character database
-lib/unicore/To/Lower.pl Unicode character database
-lib/unicore/To/Na1.pl Unicode character database
-lib/unicore/To/NameAlia.pl Unicode character database
-lib/unicore/To/NFCQC.pl Unicode character database
-lib/unicore/To/NFDQC.pl Unicode character database
-lib/unicore/To/NFKCCF.pl Unicode character database
-lib/unicore/To/NFKCQC.pl Unicode character database
-lib/unicore/To/NFKDQC.pl Unicode character database
-lib/unicore/To/Nt.pl Unicode character database
-lib/unicore/To/Nv.pl Unicode character database
-lib/unicore/To/PerlDeci.pl Unicode character database
-lib/unicore/To/SB.pl Unicode character database
-lib/unicore/To/Sc.pl Unicode character database
-lib/unicore/To/Scx.pl Unicode character database
-lib/unicore/To/Tc.pl Unicode character database
-lib/unicore/To/Title.pl Unicode character database
-lib/unicore/To/Uc.pl Unicode character database
-lib/unicore/To/Upper.pl Unicode character database
-lib/unicore/To/WB.pl Unicode character database
-lib/unicore/UCD.pl Unicode character database
+lib/unicore/StandardizedVariants.txt Unicode character database
lib/unicore/UnicodeData.txt Unicode character database
lib/unicore/version The version of the Unicode
lib/UNIVERSAL.pm Base class for ALL classes
@@ -4996,7 +4599,9 @@ pod/perl5163delta.pod Perl changes in version 5.16.3
pod/perl5180delta.pod Perl changes in version 5.18.0
pod/perl5181delta.pod Perl changes in version 5.18.1
pod/perl5182delta.pod Perl changes in version 5.18.2
+pod/perl5184delta.pod Perl changes in version 5.18.4
pod/perl5200delta.pod Perl changes in version 5.20.0
+pod/perl5201delta.pod Perl changes in version 5.20.1
pod/perl561delta.pod Perl changes in version 5.6.1
pod/perl56delta.pod Perl changes in version 5.6
pod/perl581delta.pod Perl changes in version 5.8.1
@@ -5092,9 +4697,9 @@ pod/perltooc.pod
pod/perltoot.pod
pod/perltrap.pod Perl traps for the unwary
pod/perlunicode.pod Perl Unicode support
+pod/perlunicook.pod Perl Unicode cookbook
pod/perlunifaq.pod Perl Unicode FAQ
pod/perluniintro.pod Perl Unicode introduction
-pod/perluniprops.pod Index of Unicode properties in Perl
pod/perlunitut.pod Perl Unicode tutorial
pod/perlutil.pod utilities packaged with the Perl distribution
pod/perlvar.pod Perl predefined variables
@@ -5831,6 +5436,7 @@ t/re/reg_nc_tie.t Test the tied methods of Tie::Hash::NamedCapture
t/re/reg_pmod.t See if regexp /p modifier works as expected
t/re/reg_posixcc.t See if posix character classes behave consistently
t/re/re_tests Regular expressions for regexp.t
+t/re/rt122747.t Test rt122747 assert faile (requires DEBUGGING)
t/re/rxcode.t See if /(?{ code })/ works
t/re/subst_amp.t See if $&-related substitution works
t/re/subst.t See if substitution works
diff --git a/gnu/usr.bin/perl/Makefile.SH b/gnu/usr.bin/perl/Makefile.SH
index f06473763ea..a2e6034037a 100644
--- a/gnu/usr.bin/perl/Makefile.SH
+++ b/gnu/usr.bin/perl/Makefile.SH
@@ -491,7 +491,7 @@ mini_obj = $(minindt_obj) $(MINIDTRACE_O)
ndt_obj = $(obj0) $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
obj = $(ndt_obj) $(DTRACE_O)
-perltoc_pod_prereqs = extra.pods pod/perl5201delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod
+perltoc_pod_prereqs = extra.pods pod/perl5202delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs)
generated_headers = uudmap.h bitcount.h mg_data.h
@@ -571,13 +571,12 @@ all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafile
.PHONY: all translators utilities
-# OpenBSD uses pre-generated lib/Config_git.pl and git_version.h files
# Both git_version.h and lib/Config_git.pl are built
# by make_patchnum.pl.
-#git_version.h: lib/Config_git.pl
-#
-#lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl
-# $(MINIPERL) make_patchnum.pl
+git_version.h: lib/Config_git.pl
+
+lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl
+ $(MINIPERL) make_patchnum.pl
# make sure that we recompile perl.c if the git version changes
perl$(OBJ_EXT): git_version.h
@@ -729,14 +728,6 @@ case "$osname" in
esac
case "$osname" in
-openbsd)
- $spitshell >>$Makefile <<!GROK!THIS!
-# When building Perl itself, link with the thread library,
-# so that extensions can use thread functions even though Perl
-# is not threaded
-CCDLFLAGS = $ccdlflags -lpthread
-!GROK!THIS!
- ;;
aix)
$spitshell >>$Makefile <<!GROK!THIS!
LIBS = $perllibs
@@ -753,11 +744,11 @@ CCDLFLAGS = `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
LIBPERL_NONSHR = libperl_nonshr$(LIB_EXT)
MINIPERL_NONSHR = miniperl_nonshr$(EXE_EXT)
-#$(LIBPERL_NONSHR): $(obj)
-# $(RMS) $(LIBPERL_NONSHR)
-# $(AR) rcu $(LIBPERL_NONSHR) $(obj)
+$(LIBPERL_NONSHR): $(obj)
+ $(RMS) $(LIBPERL_NONSHR)
+ $(AR) rcu $(LIBPERL_NONSHR) $(obj)
-$(MINIPERL_NONSHR): miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT)
+$(MINIPERL_NONSHR): $(LIBPERL_NONSHR) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT)
$(CC) $(LDFLAGS) -o $(MINIPERL_NONSHR) miniperlmain$(OBJ_EXT) \
opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(LIBPERL_NONSHR) $(LIBS)
@@ -841,33 +832,33 @@ $(MINIDTRACE_O): perldtrace.d $(minindt_obj) perlmini$(OBJ_EXT)
;;
esac
$spitshell >>$Makefile <<'!NO!SUBS!'
-#$(LIBPERL): $& $(obj) $(DYNALOADER) $(LIBPERLEXPORT)
-#!NO!SUBS!
-# case "$useshrplib" in
-# true)
-# $spitshell >>$Makefile <<'!NO!SUBS!'
-# rm -f $@
-# $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
-#!NO!SUBS!
-# case "$osname" in
-# aix)
-# $spitshell >>$Makefile <<'!NO!SUBS!'
-# rm -f libperl$(OBJ_EXT)
-# mv $@ libperl$(OBJ_EXT)
-# $(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
-#!NO!SUBS!
-# ;;
-# esac
-# ;;
-# *)
-# $spitshell >>$Makefile <<'!NO!SUBS!'
-# rm -f $(LIBPERL)
-# $(AR) rcu $(LIBPERL) $(obj) $(DYNALOADER)
-# @$(ranlib) $(LIBPERL)
-#!NO!SUBS!
-# ;;
-# esac
-# $spitshell >>$Makefile <<'!NO!SUBS!'
+$(LIBPERL): $& $(obj) $(DYNALOADER) $(LIBPERLEXPORT)
+!NO!SUBS!
+ case "$useshrplib" in
+ true)
+ $spitshell >>$Makefile <<'!NO!SUBS!'
+ rm -f $@
+ $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
+!NO!SUBS!
+ case "$osname" in
+ aix)
+ $spitshell >>$Makefile <<'!NO!SUBS!'
+ rm -f libperl$(OBJ_EXT)
+ mv $@ libperl$(OBJ_EXT)
+ $(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
+!NO!SUBS!
+ ;;
+ esac
+ ;;
+ *)
+ $spitshell >>$Makefile <<'!NO!SUBS!'
+ rm -f $(LIBPERL)
+ $(AR) rcu $(LIBPERL) $(obj) $(DYNALOADER)
+ @$(ranlib) $(LIBPERL)
+!NO!SUBS!
+ ;;
+ esac
+ $spitshell >>$Makefile <<'!NO!SUBS!'
# How to build executables.
@@ -942,6 +933,10 @@ lib/buildcustomize.pl: \$& \$(mini_obj) write_buildcustomize.pl
else
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl
+ -@rm -f miniperl.xok
+ $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
+ $(mini_obj) $(libs)
+ $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
fi
@@ -1002,7 +997,10 @@ $(CONFIGPOD): config.sh $(MINIPERL_EXE) configpm Porting/Glossary lib/Config_git
unidatafiles $(unidatafiles) pod/perluniprops.pod: uni.data
uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
- touch uni.data
+ $(MINIPERL) lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
+# Commented out so always runs, mktables looks at far more files than we
+# can in this makefile to decide if needs to run or not
+# touch uni.data
# $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5
# But also this ensures that all extensions are built before we try to scan
@@ -1018,9 +1016,9 @@ pod/perlintern.pod: $(MINIPERL_EXE) autodoc.pl embed.fnc
pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
$(MINIPERL) pod/perlmodlib.PL -q
-pod/perl5201delta.pod: pod/perldelta.pod
- $(RMS) pod/perl5201delta.pod
- $(LNS) perldelta.pod pod/perl5201delta.pod
+pod/perl5202delta.pod: pod/perldelta.pod
+ $(RMS) pod/perl5202delta.pod
+ $(LNS) perldelta.pod pod/perl5202delta.pod
extra.pods: $(MINIPERL_EXE)
-@test ! -f extra.pods || rm -f `cat extra.pods`
@@ -1265,13 +1263,14 @@ _mopup:
-rm -f *perl.xok
-rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
-rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
- -rm -f $(DTRACE_H)
+ -rm -f config.arch config.over $(DTRACE_H)
# Do not 'make _tidy' directly.
_tidy:
-cd pod; $(LDLIBPTH) $(MAKE) clean
-cd utils; $(LDLIBPTH) $(MAKE) clean
-cd x2p; $(LDLIBPTH) $(MAKE) clean
+ -rm -f lib/Config_git.pl git_version.h
-@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
$(MINIPERL) make_ext.pl --target=clean $$x MAKE=$(MAKE) ; \
done
@@ -1325,7 +1324,7 @@ _cleaner2:
-rmdir lib/TAP/Formatter lib/TAP lib/Sys/Syslog lib/Sys lib/Search
-rmdir lib/Scalar lib/Pod/Text lib/Pod/Simple lib/Pod/Perldoc
-rmdir lib/PerlIO/via lib/PerlIO lib/Perl lib/Parse/CPAN lib/Parse
- -rmdir lib/Params lib/Package lib/OpenBSD lib/Net/FTP lib/Module/Load
+ -rmdir lib/Params lib/Package lib/Net/FTP lib/Module/Load
-rmdir lib/Module/CoreList lib/Module/Build/Platform lib/Module/Build
-rmdir lib/Module lib/Memoize lib/Math/BigInt lib/Math/BigFloat
-rmdir lib/Math lib/MIME lib/Locale/Maketext lib/Locale/Codes
diff --git a/gnu/usr.bin/perl/NetWare/config.wc b/gnu/usr.bin/perl/NetWare/config.wc
index 7f2ab6d6e59..5ad00a8d724 100644
--- a/gnu/usr.bin/perl/NetWare/config.wc
+++ b/gnu/usr.bin/perl/NetWare/config.wc
@@ -285,7 +285,6 @@ d_isinf='undef'
d_isnan='undef'
d_isnanl='undef'
d_killpg='undef'
-d_lc_monetary_2008='undef'
d_lchown='undef'
d_ldbl_dig='define'
d_libm_lib_version='undef'
diff --git a/gnu/usr.bin/perl/Porting/Maintainers.pl b/gnu/usr.bin/perl/Porting/Maintainers.pl
index 89411796608..8ad84f9a15c 100644
--- a/gnu/usr.bin/perl/Porting/Maintainers.pl
+++ b/gnu/usr.bin/perl/Porting/Maintainers.pl
@@ -290,6 +290,18 @@ use File::Glob qw(:case);
t/yaml_code.yml
),
],
+ # Waiting to be merged upstream: see pull request #83
+ 'CUSTOMIZED' => [
+ qw( lib/CPAN/Author.pm
+ lib/CPAN/CacheMgr.pm
+ lib/CPAN/FTP.pm
+ lib/CPAN/HTTP/Client.pm
+ lib/CPAN/HandleConfig.pm
+ lib/CPAN/Index.pm
+ lib/CPAN/LWP/UserAgent.pm
+ lib/CPAN/Mirrors.pm
+ ),
+ ],
},
# Note: When updating CPAN-Meta the META.* files will need to be regenerated
@@ -948,6 +960,8 @@ use File::Glob qw(:case);
'Pod::Parser' => {
'DISTRIBUTION' => 'MAREKR/Pod-Parser-1.62.tar.gz',
'FILES' => q[cpan/Pod-Parser],
+ # Waiting to be merged upstream: see CPAN RT#101847
+ 'CUSTOMIZED' => [ qw( lib/Pod/PlainText.pm) ],
},
'Pod::Perldoc' => {
@@ -1493,9 +1507,6 @@ use File::Glob qw(:case);
lib/vmsish.{pm,t}
],
},
- 'openbsd' => {
- 'FILES' => q[lib/Config_git.pl],
- },
);
# legacy CPAN flag
diff --git a/gnu/usr.bin/perl/Porting/config.sh b/gnu/usr.bin/perl/Porting/config.sh
index 61cc8ad34bc..a9e84aa6628 100644
--- a/gnu/usr.bin/perl/Porting/config.sh
+++ b/gnu/usr.bin/perl/Porting/config.sh
@@ -41,10 +41,10 @@ aphostname='/bin/hostname'
api_revision='5'
api_subversion='0'
api_version='20'
-api_versionstring='5.20.1'
+api_versionstring='5.20.2'
ar='ar'
-archlib='/pro/lib/perl5/5.20.1/i686-linux-64int'
-archlibexp='/pro/lib/perl5/5.20.1/i686-linux-64int'
+archlib='/pro/lib/perl5/5.20.2/i686-linux-64int'
+archlibexp='/pro/lib/perl5/5.20.2/i686-linux-64int'
archname64='64int'
archname='i686-linux-64int'
archobjs=''
@@ -305,7 +305,6 @@ d_isinf='define'
d_isnan='define'
d_isnanl='define'
d_killpg='define'
-d_lc_monetary_2008='undef'
d_lchown='define'
d_ldbl_dig='define'
d_libm_lib_version='define'
@@ -746,7 +745,7 @@ incpath=''
incpth='/usr/lib/gcc/i586-suse-linux/4.8/include /usr/local/include /usr/lib/gcc/i586-suse-linux/4.8/include-fixed /usr/lib/gcc/i586-suse-linux/4.8/../../../../i586-suse-linux/include /usr/include'
inews=''
initialinstalllocation='/pro/bin'
-installarchlib='/pro/lib/perl5/5.20.1/i686-linux-64int'
+installarchlib='/pro/lib/perl5/5.20.2/i686-linux-64int'
installbin='/pro/bin'
installhtml1dir=''
installhtml3dir=''
@@ -754,13 +753,13 @@ installman1dir='/pro/local/man/man1'
installman3dir='/pro/local/man/man3'
installprefix='/pro'
installprefixexp='/pro'
-installprivlib='/pro/lib/perl5/5.20.1'
+installprivlib='/pro/lib/perl5/5.20.2'
installscript='/pro/bin'
-installsitearch='/pro/lib/perl5/site_perl/5.20.1/i686-linux-64int'
+installsitearch='/pro/lib/perl5/site_perl/5.20.2/i686-linux-64int'
installsitebin='/pro/bin'
installsitehtml1dir=''
installsitehtml3dir=''
-installsitelib='/pro/lib/perl5/site_perl/5.20.1'
+installsitelib='/pro/lib/perl5/site_perl/5.20.2'
installsiteman1dir='/pro/local/man/man1'
installsiteman3dir='/pro/local/man/man3'
installsitescript='/pro/bin'
@@ -884,7 +883,7 @@ perl_patchlevel=''
perl_static_inline='static __inline__'
perladmin='hmbrand@cpan.org'
perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc'
-perlpath='/pro/bin/perl5.20.1'
+perlpath='/pro/bin/perl5.20.2'
pg='pg'
phostname='hostname'
pidtype='pid_t'
@@ -893,8 +892,8 @@ pmake=''
pr=''
prefix='/pro'
prefixexp='/pro'
-privlib='/pro/lib/perl5/5.20.1'
-privlibexp='/pro/lib/perl5/5.20.1'
+privlib='/pro/lib/perl5/5.20.2'
+privlibexp='/pro/lib/perl5/5.20.2'
procselfexe='"/proc/self/exe"'
prototype='define'
ptrsize='4'
@@ -960,17 +959,17 @@ sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 6, 17, 29, 31, 0'
sig_size='69'
signal_t='void'
-sitearch='/pro/lib/perl5/site_perl/5.20.1/i686-linux-64int'
-sitearchexp='/pro/lib/perl5/site_perl/5.20.1/i686-linux-64int'
+sitearch='/pro/lib/perl5/site_perl/5.20.2/i686-linux-64int'
+sitearchexp='/pro/lib/perl5/site_perl/5.20.2/i686-linux-64int'
sitebin='/pro/bin'
sitebinexp='/pro/bin'
sitehtml1dir=''
sitehtml1direxp=''
sitehtml3dir=''
sitehtml3direxp=''
-sitelib='/pro/lib/perl5/site_perl/5.20.1'
+sitelib='/pro/lib/perl5/site_perl/5.20.2'
sitelib_stem='/pro/lib/perl5/site_perl'
-sitelibexp='/pro/lib/perl5/site_perl/5.20.1'
+sitelibexp='/pro/lib/perl5/site_perl/5.20.2'
siteman1dir='/pro/local/man/man1'
siteman1direxp='/pro/local/man/man1'
siteman3dir='/pro/local/man/man3'
@@ -996,7 +995,7 @@ src='.'
ssizetype='ssize_t'
st_ino_sign='1'
st_ino_size='8'
-startperl='#!/pro/bin/perl5.20.1'
+startperl='#!/pro/bin/perl5.20.2'
startsh='#!/bin/sh'
static_ext=' '
stdchar='char'
@@ -1009,7 +1008,7 @@ stdio_stream_array=''
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
-subversion='1'
+subversion='2'
sysman='/usr/share/man/man1'
sysroot=''
tail=''
@@ -1106,8 +1105,8 @@ vendorprefix=''
vendorprefixexp=''
vendorscript=''
vendorscriptexp=''
-version='5.20.1'
-version_patchlevel_string='version 20 subversion 1'
+version='5.20.2'
+version_patchlevel_string='version 20 subversion 2'
versiononly='define'
vi=''
xlibpth='/usr/lib/386 /lib/386'
@@ -1117,7 +1116,7 @@ zcat=''
zip='zip'
PERL_REVISION=5
PERL_VERSION=20
-PERL_SUBVERSION=1
+PERL_SUBVERSION=2
PERL_API_REVISION=5
PERL_API_VERSION=20
PERL_API_SUBVERSION=0
diff --git a/gnu/usr.bin/perl/Porting/config_H b/gnu/usr.bin/perl/Porting/config_H
index d1e17c73156..e7eb91b806c 100644
--- a/gnu/usr.bin/perl/Porting/config_H
+++ b/gnu/usr.bin/perl/Porting/config_H
@@ -960,8 +960,8 @@
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define ARCHLIB "/pro/lib/perl5/5.20.1/i686-linux-64int-ld" /**/
-#define ARCHLIB_EXP "/pro/lib/perl5/5.20.1/i686-linux-64int-ld" /**/
+#define ARCHLIB "/pro/lib/perl5/5.20.2/i686-linux-64int-ld" /**/
+#define ARCHLIB_EXP "/pro/lib/perl5/5.20.2/i686-linux-64int-ld" /**/
/* ARCHNAME:
* This symbol holds a string representing the architecture name.
@@ -2068,8 +2068,8 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "/pro/lib/perl5/5.20.1" /**/
-#define PRIVLIB_EXP "/pro/lib/perl5/5.20.1" /**/
+#define PRIVLIB "/pro/lib/perl5/5.20.2" /**/
+#define PRIVLIB_EXP "/pro/lib/perl5/5.20.2" /**/
/* PTRSIZE:
* This symbol contains the size of a pointer, so that the C preprocessor
@@ -2119,8 +2119,8 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "/pro/lib/perl5/site_perl/5.20.1/i686-linux-64int-ld" /**/
-#define SITEARCH_EXP "/pro/lib/perl5/site_perl/5.20.1/i686-linux-64int-ld" /**/
+#define SITEARCH "/pro/lib/perl5/site_perl/5.20.2/i686-linux-64int-ld" /**/
+#define SITEARCH_EXP "/pro/lib/perl5/site_perl/5.20.2/i686-linux-64int-ld" /**/
/* SITELIB:
* This symbol contains the name of the private library for this package.
@@ -2142,8 +2142,8 @@
* removed. The elements in inc_version_list (inc_version_list.U) can
* be tacked onto this variable to generate a list of directories to search.
*/
-#define SITELIB "/pro/lib/perl5/site_perl/5.20.1" /**/
-#define SITELIB_EXP "/pro/lib/perl5/site_perl/5.20.1" /**/
+#define SITELIB "/pro/lib/perl5/site_perl/5.20.2" /**/
+#define SITELIB_EXP "/pro/lib/perl5/site_perl/5.20.2" /**/
#define SITELIB_STEM "/pro/lib/perl5/site_perl" /**/
/* SSize_t:
@@ -4332,7 +4332,7 @@
* script to make sure (one hopes) that it runs with perl and not
* some shell.
*/
-#define STARTPERL "#!/pro/bin/perl5.20.1" /**/
+#define STARTPERL "#!/pro/bin/perl5.20.2" /**/
/* HAS_STDIO_STREAM_ARRAY:
* This symbol, if defined, tells that there is an array
diff --git a/gnu/usr.bin/perl/Porting/pumpkin.pod b/gnu/usr.bin/perl/Porting/pumpkin.pod
index 40fda825935..a8c8fb0efdd 100644
--- a/gnu/usr.bin/perl/Porting/pumpkin.pod
+++ b/gnu/usr.bin/perl/Porting/pumpkin.pod
@@ -540,9 +540,9 @@ Here's how I generate a new patch. I'll use the hypothetical
5.004_07 to 5.004_08 patch as an example.
# unpack perl5.004_07/
- gzip -d -c perl5.004_07.tar.gz | tar -xf -
+ gzip -d -c perl5.004_07.tar.gz | tar -xof -
# unpack perl5.004_08/
- gzip -d -c perl5.004_08.tar.gz | tar -xf -
+ gzip -d -c perl5.004_08.tar.gz | tar -xof -
makepatch perl5.004_07 perl5.004_08 > perl5.004_08.pat
Makepatch will automatically generate appropriate B<rm> commands to remove
diff --git a/gnu/usr.bin/perl/README b/gnu/usr.bin/perl/README
index 804d41d0f30..e69b0ecf845 100644
--- a/gnu/usr.bin/perl/README
+++ b/gnu/usr.bin/perl/README
@@ -1,6 +1,6 @@
Perl is Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
-2013, 2014 by Larry Wall and others. All rights reserved.
+2013, 2014, 2015 by Larry Wall and others. All rights reserved.
diff --git a/gnu/usr.bin/perl/README.os2 b/gnu/usr.bin/perl/README.os2
index 146c96582a5..86324c19b44 100644
--- a/gnu/usr.bin/perl/README.os2
+++ b/gnu/usr.bin/perl/README.os2
@@ -619,7 +619,7 @@ C<set PERLLIB_PREFIX> in F<Config.sys>, see L<"PERLLIB_PREFIX">.
=item Additional Perl modules
- unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.20.1/
+ unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.20.2/
Same remark as above applies. Additionally, if this directory is not
one of directories on @INC (and @INC is influenced by C<PERLLIB_PREFIX>), you
diff --git a/gnu/usr.bin/perl/README.vms b/gnu/usr.bin/perl/README.vms
index e0e0d91df74..365705fe716 100644
--- a/gnu/usr.bin/perl/README.vms
+++ b/gnu/usr.bin/perl/README.vms
@@ -142,11 +142,11 @@ You may need to set up a foreign symbol for the unpacking utility of
choice. Once you have done so, use a command like the following to
unpack the archive:
- vmstar -xvf perl-5^.20^.1.tar
+ vmstar -xvf perl-5^.20^.2.tar
Then set default to the top-level source directory like so:
- set default [.perl-5^.20^.1]
+ set default [.perl-5^.20^.2]
and proceed with configuration as described in the next section.
diff --git a/gnu/usr.bin/perl/README.win32 b/gnu/usr.bin/perl/README.win32
index e4d457a8929..d697459aa03 100644
--- a/gnu/usr.bin/perl/README.win32
+++ b/gnu/usr.bin/perl/README.win32
@@ -120,10 +120,20 @@ build usually works in this circumstance, but some tests will fail.
=item Microsoft Visual C++
-The nmake that comes with Visual C++ will suffice for building.
-You will need to run the VCVARS32.BAT file, usually found somewhere
-like C:\Program Files\Microsoft Visual Studio\VC98\Bin.
-This will set your build environment.
+The nmake that comes with Visual C++ will suffice for building. Visual C
+requires that certain things be set up in the console before Visual C will
+sucessfully run. To make a console box be able to run the C compiler, you will
+need to beforehand, run the C<vcvars32.bat> file to compile for x86-32 and for
+x86-64 C<vcvarsall.bat x64> or C<vcvarsamd64.bat>. On a typical install of a
+Microsoft C compiler product, these batch files will already be in your C<PATH>
+environment variable so you may just type them without an absolute path into
+your console. If you need to find the absolute path to the batch file, it is
+usually found somewhere like C:\Program Files\Microsoft Visual Studio\VC98\Bin.
+With some newer Micrsoft C products (released after ~2004), the installer will
+put a shortcut in the start menu to launch a new console window with the
+console already set up for your target architecture (x86-32 or x86-64 or IA64).
+With the newer compilers, you may also use the older batch files if you choose
+so.
You can also use dmake to build using Visual C++; provided, however,
you set OSRELEASE to "microsft" (or whatever the directory name
@@ -387,6 +397,13 @@ perl520.dll at the perl toplevel, and various other extension dll's
under the lib\auto directory. If the build fails for any reason, make
sure you have done the previous steps correctly.
+If you are advanced enough with building C code, here is a suggestion to speed
+up building perl, and the later C<make test>. Try to keep your PATH enviromental
+variable with the least number of folders possible (remember to keep your C
+compiler's folders there). C<C:\WINDOWS\system32> or C<C:\WINNT\system32>
+depending on your OS version should be first folder in PATH, since "cmd.exe"
+is the most commonly launched program during the build and later testing.
+
=back
=head2 Testing Perl on Windows
@@ -588,7 +605,7 @@ Look in L<http://www.cpan.org/> for more information on CPAN.
Note that not all of the extensions available from CPAN may work
in the Windows environment; you should check the information at
-L<http://testers.cpan.org/> before investing too much effort into
+L<http://www.cpantesters.org/> before investing too much effort into
porting modules that don't readily build.
Most extensions (whether they require a C compiler or not) can
@@ -632,7 +649,8 @@ edit Config.pm to fix it.
If a module implements XSUBs, you will need one of the supported
C compilers. You must make sure you have set up the environment for
-the compiler for command-line compilation.
+the compiler for command-line compilation before running C<perl Makefile.PL>
+or any invocation of make.
If a module does not build for some reason, look carefully for
why it failed, and report problems to the module author. If
@@ -846,6 +864,14 @@ updating it). The build does complete with
but that may be just luck. Other AntiVirus software may have similar issues.
+A git GUI shell extension for Windows such as TortoiseGit will cause the build
+and later C<make test> to run much slower since every file is checked for its
+git status as soon as it is created and/or modified. TortoiseGit doesn't cause
+any test failures or build problems unlike the antivirus software described
+above, but it does cause similar slowness. It is suggested to use Task Manager
+to look for background processes which use high CPU amounts during the building
+process.
+
Some of the built-in functions do not act exactly as documented in
L<perlfunc>, and a few are not implemented at all. To avoid
surprises, particularly if you have had prior exposure to Perl
@@ -915,6 +941,6 @@ Win9x support was added in 5.6 (Benjamin Stuhl).
Support for 64-bit Windows added in 5.8 (ActiveState Corp).
-Last updated: 22 October 2013
+Last updated: 07 October 2014
=cut
diff --git a/gnu/usr.bin/perl/config_h.SH b/gnu/usr.bin/perl/config_h.SH
index 5bdd95e9d0a..fd46735ad8f 100644
--- a/gnu/usr.bin/perl/config_h.SH
+++ b/gnu/usr.bin/perl/config_h.SH
@@ -261,12 +261,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$d_locconv HAS_LOCALECONV /**/
-/* HAS_LC_MONETARY_2008:
- * This symbol, if defined, indicates that the localeconv routine is
- * available and has the additional members added in POSIX 1003.1-2008.
- */
-#$d_lc_monetary_2008 HAS_LC_MONETARY_2008 /**/
-
/* HAS_LOCKF:
* This symbol, if defined, indicates that the lockf routine is
* available to do file locking.
diff --git a/gnu/usr.bin/perl/configpm b/gnu/usr.bin/perl/configpm
index 39743d65ed3..d5bf5f26a83 100644
--- a/gnu/usr.bin/perl/configpm
+++ b/gnu/usr.bin/perl/configpm
@@ -87,11 +87,6 @@ $header_files =~ s/(?=.{64}) # If line is still overlength
(.{1,64})\ # Split at the last convenient space
/$1\n /gx;
-# libpaths that should be truncated after the first path element
-my %Libpathtrunc = map {($_,$_)}
- qw(archlib archlibexp privlib privlibexp sitearch sitearchexp
- sitelib sitelibexp);
-
# allowed opts as well as specifies default and initial values
my %Allowed_Opts = (
'glossary' => 1, # --no-glossary - no glossary file inclusion,
@@ -257,9 +252,6 @@ my %seen_quotes;
$in_v = $val !~ /$quote\n/;
next if $in_v;
- # XXX - should use PERLLIB_SEP, not hard-code ':'
- $val =~ s/^([^:]+).*${quote}\w*$/$1${quote}/ if $Libpathtrunc{$name};
-
s,/,::,g if $Extensions{$name};
$val =~ s/$quote\n?\z//;
diff --git a/gnu/usr.bin/perl/configure.com b/gnu/usr.bin/perl/configure.com
index 49b14f064cf..34f3309ac29 100644
--- a/gnu/usr.bin/perl/configure.com
+++ b/gnu/usr.bin/perl/configure.com
@@ -5407,7 +5407,6 @@ $ d_wctomb="define"
$ i_locale="define"
$ i_langinfo="define"
$ d_locconv="define"
-$ d_lc_monetary_2008="define"
$ d_nl_langinfo="define"
$ d_setlocale="define"
$ vms_cc_type="decc"
@@ -5428,7 +5427,6 @@ $ d_wctomb="undef"
$ i_locale="undef"
$ i_langinfo="undef"
$ d_locconv="undef"
-$ d_lc_monetary_2008="undef"
$ d_nl_langinfo="undef"
$ d_setlocale="undef"
$ ENDIF
@@ -6101,7 +6099,6 @@ $ WC "d_link='" + d_link + "'"
$ WC "d_llseek='undef'"
$ WC "d_localtime64='undef'"
$ WC "d_locconv='" + d_locconv + "'"
-$ WC "d_lc_monetary_2008='" + d_lc_monetary_2008 + "'"
$ WC "d_lockf='undef'"
$ WC "d_longdbl='" + d_longdbl + "'"
$ WC "d_longlong='" + d_longlong + "'"
diff --git a/gnu/usr.bin/perl/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm b/gnu/usr.bin/perl/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm
index 9d7e5ed262d..47aebd60743 100644
--- a/gnu/usr.bin/perl/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm
+++ b/gnu/usr.bin/perl/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm
@@ -35,8 +35,7 @@ sub MY::libscan
my $path = shift;
return undef
- if $path =~ /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ ||
- $path =~ /(~|\.bak|_bak)$/ ||
+ if $path =~ /(~|\.bak|_bak)$/ ||
$path =~ /\..*\.sw(o|p)$/ ||
$path =~ /\B\.svn\b/;
diff --git a/gnu/usr.bin/perl/cpan/Compress-Raw-Zlib/private/MakeUtil.pm b/gnu/usr.bin/perl/cpan/Compress-Raw-Zlib/private/MakeUtil.pm
index 9d7e5ed262d..47aebd60743 100644
--- a/gnu/usr.bin/perl/cpan/Compress-Raw-Zlib/private/MakeUtil.pm
+++ b/gnu/usr.bin/perl/cpan/Compress-Raw-Zlib/private/MakeUtil.pm
@@ -35,8 +35,7 @@ sub MY::libscan
my $path = shift;
return undef
- if $path =~ /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ ||
- $path =~ /(~|\.bak|_bak)$/ ||
+ if $path =~ /(~|\.bak|_bak)$/ ||
$path =~ /\..*\.sw(o|p)$/ ||
$path =~ /\B\.svn\b/;
diff --git a/gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs b/gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs
index e3696a43564..f3b58f7eeee 100644
--- a/gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs
+++ b/gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs
@@ -39,8 +39,6 @@ extern "C" {
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-#include <sys/types.h>
-#include <md5.h>
#ifdef __cplusplus
}
#endif
@@ -90,6 +88,61 @@ static MAGIC *THX_sv_magicext(pTHX_ SV *sv, SV *obj, int type,
# define SvPVbyte(sv, lp) (sv_utf8_downgrade((sv), 0), SvPV((sv), (lp)))
#endif
+/* Perl does not guarantee that U32 is exactly 32 bits. Some system
+ * has no integral type with exactly 32 bits. For instance, A Cray has
+ * short, int and long all at 64 bits so we need to apply this macro
+ * to reduce U32 values to 32 bits at appropriate places. If U32
+ * really does have 32 bits then this is a no-op.
+ */
+#if BYTEORDER > 0x4321 || defined(TRUNCATE_U32)
+ #define TO32(x) ((x) & 0xFFFFffff)
+ #define TRUNC32(x) ((x) &= 0xFFFFffff)
+#else
+ #define TO32(x) (x)
+ #define TRUNC32(x) /*nothing*/
+#endif
+
+/* The MD5 algorithm is defined in terms of little endian 32-bit
+ * values. The following macros (and functions) allow us to convert
+ * between native integers and such values.
+ */
+#undef BYTESWAP
+#ifndef U32_ALIGNMENT_REQUIRED
+ #if BYTEORDER == 0x1234 /* 32-bit little endian */
+ #define BYTESWAP(x) (x) /* no-op */
+
+ #elif BYTEORDER == 0x4321 /* 32-bit big endian */
+ #define BYTESWAP(x) ((((x)&0xFF)<<24) \
+ |(((x)>>24)&0xFF) \
+ |(((x)&0x0000FF00)<<8) \
+ |(((x)&0x00FF0000)>>8) )
+ #endif
+#endif
+
+#ifndef BYTESWAP
+static void u2s(U32 u, U8* s)
+{
+ *s++ = (U8)(u & 0xFF);
+ *s++ = (U8)((u >> 8) & 0xFF);
+ *s++ = (U8)((u >> 16) & 0xFF);
+ *s = (U8)((u >> 24) & 0xFF);
+}
+
+#define s2u(s,u) ((u) = (U32)(*s) | \
+ ((U32)(*(s+1)) << 8) | \
+ ((U32)(*(s+2)) << 16) | \
+ ((U32)(*(s+3)) << 24))
+#endif
+
+/* This structure keeps the current state of algorithm.
+ */
+typedef struct {
+ U32 A, B, C, D; /* current digest */
+ U32 bytes_low; /* counts bytes in message */
+ U32 bytes_high; /* turn it into a 64-bit counter */
+ U8 buffer[128]; /* collect complete 64 byte blocks */
+} MD5_CTX;
+
#if defined(USE_ITHREADS) && defined(MGf_DUP)
STATIC int dup_md5_ctx(pTHX_ MAGIC *mg, CLONE_PARAMS *params)
{
@@ -123,6 +176,325 @@ STATIC MGVTBL vtbl_md5 = {
#endif
};
+
+/* Padding is added at the end of the message in order to fill a
+ * complete 64 byte block (- 8 bytes for the message length). The
+ * padding is also the reason the buffer in MD5_CTX have to be
+ * 128 bytes.
+ */
+static const unsigned char PADDING[64] = {
+ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/* Constants for MD5Transform routine.
+ */
+#define S11 7
+#define S12 12
+#define S13 17
+#define S14 22
+#define S21 5
+#define S22 9
+#define S23 14
+#define S24 20
+#define S31 4
+#define S32 11
+#define S33 16
+#define S34 23
+#define S41 6
+#define S42 10
+#define S43 15
+#define S44 21
+
+/* F, G, H and I are basic MD5 functions.
+ */
+#define F(x, y, z) ((((x) & ((y) ^ (z))) ^ (z)))
+#define G(x, y, z) F(z, x, y)
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+#define I(x, y, z) ((y) ^ ((x) | (~z)))
+
+/* ROTATE_LEFT rotates x left n bits.
+ */
+#define ROTATE_LEFT(x, n) (((x) << (n) | ((x) >> (32-(n)))))
+
+/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
+ * Rotation is separate from addition to prevent recomputation.
+ */
+#define FF(a, b, c, d, s, ac) \
+ (a) += F ((b), (c), (d)) + (NEXTx) + (U32)(ac); \
+ TRUNC32((a)); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+ TRUNC32((a));
+
+#define GG(a, b, c, d, x, s, ac) \
+ (a) += G ((b), (c), (d)) + X[x] + (U32)(ac); \
+ TRUNC32((a)); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+ TRUNC32((a));
+
+#define HH(a, b, c, d, x, s, ac) \
+ (a) += H ((b), (c), (d)) + X[x] + (U32)(ac); \
+ TRUNC32((a)); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+ TRUNC32((a));
+
+#define II(a, b, c, d, x, s, ac) \
+ (a) += I ((b), (c), (d)) + X[x] + (U32)(ac); \
+ TRUNC32((a)); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+ TRUNC32((a));
+
+
+static void
+MD5Init(MD5_CTX *ctx)
+{
+ /* Start state */
+ ctx->A = 0x67452301;
+ ctx->B = 0xefcdab89;
+ ctx->C = 0x98badcfe;
+ ctx->D = 0x10325476;
+
+ /* message length */
+ ctx->bytes_low = ctx->bytes_high = 0;
+}
+
+
+static void
+MD5Transform(MD5_CTX* ctx, const U8* buf, STRLEN blocks)
+{
+#ifdef MD5_DEBUG
+ static int tcount = 0;
+#endif
+
+ U32 A = ctx->A;
+ U32 B = ctx->B;
+ U32 C = ctx->C;
+ U32 D = ctx->D;
+
+#ifndef U32_ALIGNMENT_REQUIRED
+ const U32 *x = (U32*)buf; /* really just type casting */
+#endif
+
+ do {
+ U32 a = A;
+ U32 b = B;
+ U32 c = C;
+ U32 d = D;
+
+#if BYTEORDER == 0x1234 && !defined(U32_ALIGNMENT_REQUIRED)
+ const U32 *X = x;
+ #define NEXTx (*x++)
+#else
+ U32 X[16]; /* converted values, used in round 2-4 */
+ U32 *uptr = X;
+ U32 tmp;
+ #ifdef BYTESWAP
+ #define NEXTx (tmp=*x++, *uptr++ = BYTESWAP(tmp))
+ #else
+ #define NEXTx (s2u(buf,tmp), buf += 4, *uptr++ = tmp)
+ #endif
+#endif
+
+#ifdef MD5_DEBUG
+ if (buf == ctx->buffer)
+ fprintf(stderr,"%5d: Transform ctx->buffer", ++tcount);
+ else
+ fprintf(stderr,"%5d: Transform %p (%d)", ++tcount, buf, blocks);
+
+ {
+ int i;
+ fprintf(stderr,"[");
+ for (i = 0; i < 16; i++) {
+ fprintf(stderr,"%x,", x[i]);
+ }
+ fprintf(stderr,"]\n");
+ }
+#endif
+
+ /* Round 1 */
+ FF (a, b, c, d, S11, 0xd76aa478); /* 1 */
+ FF (d, a, b, c, S12, 0xe8c7b756); /* 2 */
+ FF (c, d, a, b, S13, 0x242070db); /* 3 */
+ FF (b, c, d, a, S14, 0xc1bdceee); /* 4 */
+ FF (a, b, c, d, S11, 0xf57c0faf); /* 5 */
+ FF (d, a, b, c, S12, 0x4787c62a); /* 6 */
+ FF (c, d, a, b, S13, 0xa8304613); /* 7 */
+ FF (b, c, d, a, S14, 0xfd469501); /* 8 */
+ FF (a, b, c, d, S11, 0x698098d8); /* 9 */
+ FF (d, a, b, c, S12, 0x8b44f7af); /* 10 */
+ FF (c, d, a, b, S13, 0xffff5bb1); /* 11 */
+ FF (b, c, d, a, S14, 0x895cd7be); /* 12 */
+ FF (a, b, c, d, S11, 0x6b901122); /* 13 */
+ FF (d, a, b, c, S12, 0xfd987193); /* 14 */
+ FF (c, d, a, b, S13, 0xa679438e); /* 15 */
+ FF (b, c, d, a, S14, 0x49b40821); /* 16 */
+
+ /* Round 2 */
+ GG (a, b, c, d, 1, S21, 0xf61e2562); /* 17 */
+ GG (d, a, b, c, 6, S22, 0xc040b340); /* 18 */
+ GG (c, d, a, b, 11, S23, 0x265e5a51); /* 19 */
+ GG (b, c, d, a, 0, S24, 0xe9b6c7aa); /* 20 */
+ GG (a, b, c, d, 5, S21, 0xd62f105d); /* 21 */
+ GG (d, a, b, c, 10, S22, 0x2441453); /* 22 */
+ GG (c, d, a, b, 15, S23, 0xd8a1e681); /* 23 */
+ GG (b, c, d, a, 4, S24, 0xe7d3fbc8); /* 24 */
+ GG (a, b, c, d, 9, S21, 0x21e1cde6); /* 25 */
+ GG (d, a, b, c, 14, S22, 0xc33707d6); /* 26 */
+ GG (c, d, a, b, 3, S23, 0xf4d50d87); /* 27 */
+ GG (b, c, d, a, 8, S24, 0x455a14ed); /* 28 */
+ GG (a, b, c, d, 13, S21, 0xa9e3e905); /* 29 */
+ GG (d, a, b, c, 2, S22, 0xfcefa3f8); /* 30 */
+ GG (c, d, a, b, 7, S23, 0x676f02d9); /* 31 */
+ GG (b, c, d, a, 12, S24, 0x8d2a4c8a); /* 32 */
+
+ /* Round 3 */
+ HH (a, b, c, d, 5, S31, 0xfffa3942); /* 33 */
+ HH (d, a, b, c, 8, S32, 0x8771f681); /* 34 */
+ HH (c, d, a, b, 11, S33, 0x6d9d6122); /* 35 */
+ HH (b, c, d, a, 14, S34, 0xfde5380c); /* 36 */
+ HH (a, b, c, d, 1, S31, 0xa4beea44); /* 37 */
+ HH (d, a, b, c, 4, S32, 0x4bdecfa9); /* 38 */
+ HH (c, d, a, b, 7, S33, 0xf6bb4b60); /* 39 */
+ HH (b, c, d, a, 10, S34, 0xbebfbc70); /* 40 */
+ HH (a, b, c, d, 13, S31, 0x289b7ec6); /* 41 */
+ HH (d, a, b, c, 0, S32, 0xeaa127fa); /* 42 */
+ HH (c, d, a, b, 3, S33, 0xd4ef3085); /* 43 */
+ HH (b, c, d, a, 6, S34, 0x4881d05); /* 44 */
+ HH (a, b, c, d, 9, S31, 0xd9d4d039); /* 45 */
+ HH (d, a, b, c, 12, S32, 0xe6db99e5); /* 46 */
+ HH (c, d, a, b, 15, S33, 0x1fa27cf8); /* 47 */
+ HH (b, c, d, a, 2, S34, 0xc4ac5665); /* 48 */
+
+ /* Round 4 */
+ II (a, b, c, d, 0, S41, 0xf4292244); /* 49 */
+ II (d, a, b, c, 7, S42, 0x432aff97); /* 50 */
+ II (c, d, a, b, 14, S43, 0xab9423a7); /* 51 */
+ II (b, c, d, a, 5, S44, 0xfc93a039); /* 52 */
+ II (a, b, c, d, 12, S41, 0x655b59c3); /* 53 */
+ II (d, a, b, c, 3, S42, 0x8f0ccc92); /* 54 */
+ II (c, d, a, b, 10, S43, 0xffeff47d); /* 55 */
+ II (b, c, d, a, 1, S44, 0x85845dd1); /* 56 */
+ II (a, b, c, d, 8, S41, 0x6fa87e4f); /* 57 */
+ II (d, a, b, c, 15, S42, 0xfe2ce6e0); /* 58 */
+ II (c, d, a, b, 6, S43, 0xa3014314); /* 59 */
+ II (b, c, d, a, 13, S44, 0x4e0811a1); /* 60 */
+ II (a, b, c, d, 4, S41, 0xf7537e82); /* 61 */
+ II (d, a, b, c, 11, S42, 0xbd3af235); /* 62 */
+ II (c, d, a, b, 2, S43, 0x2ad7d2bb); /* 63 */
+ II (b, c, d, a, 9, S44, 0xeb86d391); /* 64 */
+
+ A += a; TRUNC32(A);
+ B += b; TRUNC32(B);
+ C += c; TRUNC32(C);
+ D += d; TRUNC32(D);
+
+ } while (--blocks);
+ ctx->A = A;
+ ctx->B = B;
+ ctx->C = C;
+ ctx->D = D;
+}
+
+
+#ifdef MD5_DEBUG
+static char*
+ctx_dump(MD5_CTX* ctx)
+{
+ static char buf[1024];
+ sprintf(buf, "{A=%x,B=%x,C=%x,D=%x,%d,%d(%d)}",
+ ctx->A, ctx->B, ctx->C, ctx->D,
+ ctx->bytes_low, ctx->bytes_high, (ctx->bytes_low&0x3F));
+ return buf;
+}
+#endif
+
+
+static void
+MD5Update(MD5_CTX* ctx, const U8* buf, STRLEN len)
+{
+ STRLEN blocks;
+ STRLEN fill = ctx->bytes_low & 0x3F;
+
+#ifdef MD5_DEBUG
+ static int ucount = 0;
+ fprintf(stderr,"%5i: Update(%s, %p, %d)\n", ++ucount, ctx_dump(ctx),
+ buf, len);
+#endif
+
+ ctx->bytes_low += len;
+ if (ctx->bytes_low < len) /* wrap around */
+ ctx->bytes_high++;
+
+ if (fill) {
+ STRLEN missing = 64 - fill;
+ if (len < missing) {
+ Copy(buf, ctx->buffer + fill, len, U8);
+ return;
+ }
+ Copy(buf, ctx->buffer + fill, missing, U8);
+ MD5Transform(ctx, ctx->buffer, 1);
+ buf += missing;
+ len -= missing;
+ }
+
+ blocks = len >> 6;
+ if (blocks)
+ MD5Transform(ctx, buf, blocks);
+ if ( (len &= 0x3F)) {
+ Copy(buf + (blocks << 6), ctx->buffer, len, U8);
+ }
+}
+
+
+static void
+MD5Final(U8* digest, MD5_CTX *ctx)
+{
+ STRLEN fill = ctx->bytes_low & 0x3F;
+ STRLEN padlen = (fill < 56 ? 56 : 120) - fill;
+ U32 bits_low, bits_high;
+#ifdef MD5_DEBUG
+ fprintf(stderr," Final: %s\n", ctx_dump(ctx));
+#endif
+ Copy(PADDING, ctx->buffer + fill, padlen, U8);
+ fill += padlen;
+
+ bits_low = ctx->bytes_low << 3;
+ bits_high = (ctx->bytes_high << 3) | (ctx->bytes_low >> 29);
+#ifdef BYTESWAP
+ *(U32*)(ctx->buffer + fill) = BYTESWAP(bits_low); fill += 4;
+ *(U32*)(ctx->buffer + fill) = BYTESWAP(bits_high); fill += 4;
+#else
+ u2s(bits_low, ctx->buffer + fill); fill += 4;
+ u2s(bits_high, ctx->buffer + fill); fill += 4;
+#endif
+
+ MD5Transform(ctx, ctx->buffer, fill >> 6);
+#ifdef MD5_DEBUG
+ fprintf(stderr," Result: %s\n", ctx_dump(ctx));
+#endif
+
+#ifdef BYTESWAP
+ *(U32*)digest = BYTESWAP(ctx->A); digest += 4;
+ *(U32*)digest = BYTESWAP(ctx->B); digest += 4;
+ *(U32*)digest = BYTESWAP(ctx->C); digest += 4;
+ *(U32*)digest = BYTESWAP(ctx->D);
+#else
+ u2s(ctx->A, digest);
+ u2s(ctx->B, digest+4);
+ u2s(ctx->C, digest+8);
+ u2s(ctx->D, digest+12);
+#endif
+}
+
+#ifndef INT2PTR
+#define INT2PTR(any,d) (any)(d)
+#endif
+
static MD5_CTX* get_md5_ctx(pTHX_ SV* sv)
{
MAGIC *mg;
@@ -302,7 +674,7 @@ addfile(self, fh)
InputStream fh
PREINIT:
MD5_CTX* context = get_md5_ctx(aTHX_ self);
- STRLEN fill = (context->count >> 3) & (MD5_BLOCK_LENGTH - 1);
+ STRLEN fill = context->bytes_low & 0x3F;
#ifdef USE_HEAP_INSTEAD_OF_STACK
unsigned char* buffer;
#else
diff --git a/gnu/usr.bin/perl/cpan/Digest-MD5/t/files.t b/gnu/usr.bin/perl/cpan/Digest-MD5/t/files.t
index 4a454214dd4..60d284756d7 100755
--- a/gnu/usr.bin/perl/cpan/Digest-MD5/t/files.t
+++ b/gnu/usr.bin/perl/cpan/Digest-MD5/t/files.t
@@ -21,7 +21,7 @@ EOT
# This is the output of: 'md5sum README MD5.xs rfc1321.txt'
$EXPECT = <<EOT;
2f93400875dbb56f36691d5f69f3eba5 README
-1d2a7c4f7a6180a7f3369d703ffe7cd0 MD5.xs
+f908acbcf6bd32042f282b0deed61264 MD5.xs
754b9db19f79dbc4992f7166eb0f37ce rfc1321.txt
EOT
}
diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index da9e0f79ff3..4140432bc8a 100644
--- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -911,7 +911,7 @@ OTHERLDFLAGS = '.$ld_opt.$otherldflags.'
INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
INST_DYNAMIC_FIX = '.$ld_fix.'
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
+$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
');
if ($armaybe ne ':'){
$ldfrom = 'tmp$(LIB_EXT)';
@@ -963,7 +963,7 @@ MAKE
push @m, <<'MAKE';
$(CHMOD) $(PERM_RWX) $@
- $(NOECHO) $(RM_RF) $(INST_BOOT)
+ $(NOECHO) $(RM_RF) $(BOOTSTRAP)
- $(CP_NONEMPTY) $(BOOTSTRAP) $(INST_BOOT) $(PERM_RW)
MAKE
diff --git a/gnu/usr.bin/perl/cpan/IO-Compress/private/MakeUtil.pm b/gnu/usr.bin/perl/cpan/IO-Compress/private/MakeUtil.pm
index 9d7e5ed262d..47aebd60743 100644
--- a/gnu/usr.bin/perl/cpan/IO-Compress/private/MakeUtil.pm
+++ b/gnu/usr.bin/perl/cpan/IO-Compress/private/MakeUtil.pm
@@ -35,8 +35,7 @@ sub MY::libscan
my $path = shift;
return undef
- if $path =~ /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ ||
- $path =~ /(~|\.bak|_bak)$/ ||
+ if $path =~ /(~|\.bak|_bak)$/ ||
$path =~ /\..*\.sw(o|p)$/ ||
$path =~ /\B\.svn\b/;
diff --git a/gnu/usr.bin/perl/cpan/NEXT/lib/NEXT.pm b/gnu/usr.bin/perl/cpan/NEXT/lib/NEXT.pm
index 72dbee8c51c..a77bb387433 100644
--- a/gnu/usr.bin/perl/cpan/NEXT/lib/NEXT.pm
+++ b/gnu/usr.bin/perl/cpan/NEXT/lib/NEXT.pm
@@ -190,7 +190,7 @@ __END__
=head1 NAME
-NEXT - Provide a pseudo-class NEXT (et al) that allows method redispatch
+NEXT.pm - Provide a pseudo-class NEXT (et al) that allows method redispatch
=head1 SYNOPSIS
diff --git a/gnu/usr.bin/perl/cpan/Pod-Parser/lib/Pod/PlainText.pm b/gnu/usr.bin/perl/cpan/Pod-Parser/lib/Pod/PlainText.pm
index 67bca0afb17..3db4d903cd6 100644
--- a/gnu/usr.bin/perl/cpan/Pod-Parser/lib/Pod/PlainText.pm
+++ b/gnu/usr.bin/perl/cpan/Pod-Parser/lib/Pod/PlainText.pm
@@ -29,7 +29,7 @@ use vars qw(@ISA %ESCAPES $VERSION);
# by Pod::Usage.
@ISA = qw(Pod::Select);
-$VERSION = '2.06';
+$VERSION = '2.07';
BEGIN {
if ($] < 5.006) {
@@ -596,11 +596,6 @@ sub pod2text {
}
}
-sub begin_pod {
- my $self = shift;
- $$self{EXCLUDE} = 0;
- $$self{VERBATIM} = 0;
-}
############################################################################
# Module return value and documentation
diff --git a/gnu/usr.bin/perl/cpan/Text-Balanced/lib/Text/Balanced.pm b/gnu/usr.bin/perl/cpan/Text-Balanced/lib/Text/Balanced.pm
index 3f2f98369cf..07d956735c2 100644
--- a/gnu/usr.bin/perl/cpan/Text-Balanced/lib/Text/Balanced.pm
+++ b/gnu/usr.bin/perl/cpan/Text-Balanced/lib/Text/Balanced.pm
@@ -1508,7 +1508,7 @@ C<extract_tagged> returns the complete text up to the point of failure.
If the string is "PARA", C<extract_tagged> returns only the first paragraph
after the tag (up to the first line that is either empty or contains
only whitespace characters).
-If the string is "", the default behaviour (i.e. failure) is reinstated.
+If the string is "", the the default behaviour (i.e. failure) is reinstated.
For example, suppose the start tag "/para" introduces a paragraph, which then
continues until the next "/endpara" tag or until another "/para" tag is
diff --git a/gnu/usr.bin/perl/cpan/autodie/t/truncate.t b/gnu/usr.bin/perl/cpan/autodie/t/truncate.t
index df6270e6f45..2472139a1a0 100755
--- a/gnu/usr.bin/perl/cpan/autodie/t/truncate.t
+++ b/gnu/usr.bin/perl/cpan/autodie/t/truncate.t
@@ -6,12 +6,13 @@ use File::Temp qw(tempfile);
use IO::Handle;
use File::Spec;
use FindBin qw($Bin);
+use constant TRUNCATE_ME => File::Spec->catfile($Bin,'truncate_me');
-my ($truncate_status, $tmpfh, $tmpfile);
+my ($truncate_status, $tmpfh);
# Some systems have a screwy tempfile. We don't run our tests there.
eval {
- ($tmpfh, $tmpfile) = tempfile();
+ $tmpfh = tempfile();
};
if ($@ or !defined $tmpfh) {
@@ -79,7 +80,7 @@ isa_ok($@, 'autodie::exception', "Truncating unopened file (TRUNCATE_FH)");
# wrong with our tests, or autodie...
{
use autodie qw(open);
- open(TRUNCATE_FH, '+<', $tmpfile);
+ open(TRUNCATE_FH, '+<', TRUNCATE_ME);
}
# Now try truncating the filehandle. This should succeed.
diff --git a/gnu/usr.bin/perl/cpan/podlators/lib/Pod/Man.pm b/gnu/usr.bin/perl/cpan/podlators/lib/Pod/Man.pm
index c1e5afcecbc..72ca9ff1da9 100644
--- a/gnu/usr.bin/perl/cpan/podlators/lib/Pod/Man.pm
+++ b/gnu/usr.bin/perl/cpan/podlators/lib/Pod/Man.pm
@@ -857,9 +857,7 @@ sub devise_title {
$cut = $i + 1;
$cut++ if ($dirs[$i + 1] && $dirs[$i + 1] eq 'lib');
last;
- } elsif ($dirs[$i] eq 'lib' && $dirs[$i + 1] && $dirs[0] eq 'ext') {
- $cut = $i + 1;
- }
+ }
}
if ($cut > 0) {
splice (@dirs, 0, $cut);
diff --git a/gnu/usr.bin/perl/deb.c b/gnu/usr.bin/perl/deb.c
index f2ad660dc86..d16103eb1e7 100644
--- a/gnu/usr.bin/perl/deb.c
+++ b/gnu/usr.bin/perl/deb.c
@@ -236,7 +236,7 @@ Perl_deb_stack_all(pTHX)
PerlIO_printf(Perl_debug_log, "\n");
else {
- /* Find the current context's stack range by searching
+ /* Find the the current context's stack range by searching
* forward for any higher contexts using this stack; failing
* that, it will be equal to the size of the stack for old
* stacks, or PL_stack_sp for the current stack
diff --git a/gnu/usr.bin/perl/dist/Data-Dumper/Dumper.pm b/gnu/usr.bin/perl/dist/Data-Dumper/Dumper.pm
index 588c727d4ee..a084712bde9 100644
--- a/gnu/usr.bin/perl/dist/Data-Dumper/Dumper.pm
+++ b/gnu/usr.bin/perl/dist/Data-Dumper/Dumper.pm
@@ -1421,9 +1421,7 @@ modify it under the same terms as Perl itself.
=head1 VERSION
-Version 2.151 (March 7 2014)
-
-Plus fix for CVS-2014-4330
+Version 2.151_01 (January 8 2015)
=head1 SEE ALSO
diff --git a/gnu/usr.bin/perl/dist/Data-Dumper/Dumper.xs b/gnu/usr.bin/perl/dist/Data-Dumper/Dumper.xs
index a7bb124275b..49937be69c0 100644
--- a/gnu/usr.bin/perl/dist/Data-Dumper/Dumper.xs
+++ b/gnu/usr.bin/perl/dist/Data-Dumper/Dumper.xs
@@ -28,8 +28,7 @@ static I32 DD_dump (pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval,
SV *pad, SV *xpad, SV *apad, SV *sep, SV *pair,
SV *freezer, SV *toaster,
I32 purity, I32 deepcopy, I32 quotekeys, SV *bless,
- I32 maxdepth, SV *sortkeys, int use_sparse_seen_hash, I32 useqq,
- IV maxrecurse);
+ I32 maxdepth, SV *sortkeys, int use_sparse_seen_hash, I32 useqq, IV maxrecurse);
#ifndef HvNAME_get
#define HvNAME_get HvNAME
@@ -679,7 +678,8 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
DD_dump(aTHX_ ival, SvPVX_const(namesv), SvCUR(namesv), retval, seenhv,
postav, levelp, indent, pad, xpad, apad, sep, pair,
freezer, toaster, purity, deepcopy, quotekeys, bless,
- maxdepth, sortkeys, use_sparse_seen_hash, useqq, maxrecurse);
+ maxdepth, sortkeys, use_sparse_seen_hash, useqq,
+ maxrecurse);
sv_catpvn(retval, ")}", 2);
} /* plain */
else {
@@ -687,7 +687,8 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
DD_dump(aTHX_ ival, SvPVX_const(namesv), SvCUR(namesv), retval, seenhv,
postav, levelp, indent, pad, xpad, apad, sep, pair,
freezer, toaster, purity, deepcopy, quotekeys, bless,
- maxdepth, sortkeys, use_sparse_seen_hash, useqq, maxrecurse);
+ maxdepth, sortkeys, use_sparse_seen_hash, useqq,
+ maxrecurse);
}
SvREFCNT_dec(namesv);
}
@@ -699,7 +700,8 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
DD_dump(aTHX_ ival, SvPVX_const(namesv), SvCUR(namesv), retval, seenhv,
postav, levelp, indent, pad, xpad, apad, sep, pair,
freezer, toaster, purity, deepcopy, quotekeys, bless,
- maxdepth, sortkeys, use_sparse_seen_hash, useqq, maxrecurse);
+ maxdepth, sortkeys, use_sparse_seen_hash, useqq,
+ maxrecurse);
SvREFCNT_dec(namesv);
}
else if (realtype == SVt_PVAV) {
@@ -772,7 +774,8 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
DD_dump(aTHX_ elem, iname, ilen, retval, seenhv, postav,
levelp, indent, pad, xpad, apad, sep, pair,
freezer, toaster, purity, deepcopy, quotekeys, bless,
- maxdepth, sortkeys, use_sparse_seen_hash, useqq, maxrecurse);
+ maxdepth, sortkeys, use_sparse_seen_hash,
+ useqq, maxrecurse);
if (ix < ixmax)
sv_catpvn(retval, ",", 1);
}
@@ -975,7 +978,8 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
DD_dump(aTHX_ hval, SvPVX_const(sname), SvCUR(sname), retval, seenhv,
postav, levelp, indent, pad, xpad, newapad, sep, pair,
freezer, toaster, purity, deepcopy, quotekeys, bless,
- maxdepth, sortkeys, use_sparse_seen_hash, useqq, maxrecurse);
+ maxdepth, sortkeys, use_sparse_seen_hash, useqq,
+ maxrecurse);
SvREFCNT_dec(sname);
Safefree(nkey_buffer);
if (indent >= 2)
@@ -1184,7 +1188,8 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
seenhv, postav, &nlevel, indent, pad, xpad,
newapad, sep, pair, freezer, toaster, purity,
deepcopy, quotekeys, bless, maxdepth,
- sortkeys, use_sparse_seen_hash, useqq, maxrecurse);
+ sortkeys, use_sparse_seen_hash, useqq,
+ maxrecurse);
SvREFCNT_dec(e);
}
}
@@ -1442,8 +1447,8 @@ Data_Dumper_Dumpxs(href, ...)
DD_dump(aTHX_ val, SvPVX_const(name), SvCUR(name), valstr, seenhv,
postav, &level, indent, pad, xpad, newapad, sep, pair,
freezer, toaster, purity, deepcopy, quotekeys,
- bless, maxdepth, sortkeys, use_sparse_seen_hash, useqq,
- maxrecurse);
+ bless, maxdepth, sortkeys, use_sparse_seen_hash,
+ useqq, maxrecurse);
SPAGAIN;
if (indent >= 2 && !terse)
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
index 8fb3492090b..ae384fd5b58 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
+++ b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
@@ -3,6 +3,7 @@ use strict;
use warnings;
use Exporter;
use File::Spec;
+use lib qw( lib );
use ExtUtils::ParseXS::Constants ();
our $VERSION = '3.24';
diff --git a/gnu/usr.bin/perl/dist/Math-BigInt/lib/Math/BigInt.pm b/gnu/usr.bin/perl/dist/Math-BigInt/lib/Math/BigInt.pm
index a2aabc18648..eff27b95a97 100644
--- a/gnu/usr.bin/perl/dist/Math-BigInt/lib/Math/BigInt.pm
+++ b/gnu/usr.bin/perl/dist/Math-BigInt/lib/Math/BigInt.pm
@@ -2677,12 +2677,11 @@ sub objectify {
next;
}
-# # Don't do anything with undefs.
-#
-# unless (defined($a[$i])) {
-# next;
-# }
- $a[$i] //= 0;
+ # Don't do anything with undefs.
+
+ unless (defined($a[$i])) {
+ next;
+ }
# Perl scalars are fed to the appropriate constructor.
diff --git a/gnu/usr.bin/perl/dist/Module-CoreList/t/corevers.t b/gnu/usr.bin/perl/dist/Module-CoreList/t/corevers.t
deleted file mode 100644
index 09d5d72da04..00000000000
--- a/gnu/usr.bin/perl/dist/Module-CoreList/t/corevers.t
+++ /dev/null
@@ -1,21 +0,0 @@
-#!perl -w
-use strict;
-use Test::More;
-
-plan skip_all => 'This is perl core-only test' unless $ENV{PERL_CORE};
-plan skip_all => 'Special case v5.21.1 because rjbs' if sprintf("v%vd", $^V) eq 'v5.21.1';
-
-my @modules = qw[
- Module::CoreList
- Module::CoreList::Utils
- Module::CoreList::TieHashDelta
-];
-
-plan tests => scalar @modules;
-
-foreach my $mod ( @modules ) {
- eval "require $mod";
- my $vers = eval $mod->VERSION;
- ok( !( $vers < $] || $vers > $] ), "$mod version should match perl version in core" )
- or diag("$mod $vers doesn't match $]");
-}
diff --git a/gnu/usr.bin/perl/dist/threads-shared/t/stress.t b/gnu/usr.bin/perl/dist/threads-shared/t/stress.t
index e3c1441288e..1dd95e39595 100755
--- a/gnu/usr.bin/perl/dist/threads-shared/t/stress.t
+++ b/gnu/usr.bin/perl/dist/threads-shared/t/stress.t
@@ -83,7 +83,7 @@ use threads::shared;
print "# Looping for $busycount iterations should take about 0.025s\n";
}
- my $TIMEOUT = 600;
+ my $TIMEOUT = 60;
my $mutex = 1;
share($mutex);
diff --git a/gnu/usr.bin/perl/ext/DynaLoader/Makefile.PL b/gnu/usr.bin/perl/ext/DynaLoader/Makefile.PL
index a0f83b6e674..76c3bc0c7eb 100644
--- a/gnu/usr.bin/perl/ext/DynaLoader/Makefile.PL
+++ b/gnu/usr.bin/perl/ext/DynaLoader/Makefile.PL
@@ -64,8 +64,8 @@ sub MY::static {
return "
$object : \$(FIRST_MAKEFILE) \$(OBJECT)
- #\$(RM_RF) $object
- #\$(CP) \$(OBJECT) $object
+ \$(RM_RF) $object
+ \$(CP) \$(OBJECT) $object
static :: $object
";
diff --git a/gnu/usr.bin/perl/ext/DynaLoader/dl_dlopen.xs b/gnu/usr.bin/perl/ext/DynaLoader/dl_dlopen.xs
index 96d30dea243..cb513ab9d36 100644
--- a/gnu/usr.bin/perl/ext/DynaLoader/dl_dlopen.xs
+++ b/gnu/usr.bin/perl/ext/DynaLoader/dl_dlopen.xs
@@ -170,8 +170,8 @@ dl_load_file(filename, flags=0)
char pathbuf[PATH_MAX + 2];
if (*filename != '/' && strchr(filename, '/')) {
if (getcwd(pathbuf, PATH_MAX - strlen(filename))) {
- my_strlcat(pathbuf, "/", sizeof(pathbuf));
- my_strlcat(pathbuf, filename, sizeof(pathbuf));
+ strcat(pathbuf, "/");
+ strcat(pathbuf, filename);
filename = pathbuf;
}
}
diff --git a/gnu/usr.bin/perl/ext/NDBM_File/Makefile.PL b/gnu/usr.bin/perl/ext/NDBM_File/Makefile.PL
index a48c039fa88..a8adbf01218 100644
--- a/gnu/usr.bin/perl/ext/NDBM_File/Makefile.PL
+++ b/gnu/usr.bin/perl/ext/NDBM_File/Makefile.PL
@@ -1,7 +1,7 @@
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'NDBM_File',
- #LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb"],
+ LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb"],
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'NDBM_File.pm',
INC => ($^O eq "MacOS" ? "-i ::::db:include" : "")
diff --git a/gnu/usr.bin/perl/ext/POSIX/POSIX.xs b/gnu/usr.bin/perl/ext/POSIX/POSIX.xs
index 307d5bf5368..de0300cbfa3 100644
--- a/gnu/usr.bin/perl/ext/POSIX/POSIX.xs
+++ b/gnu/usr.bin/perl/ext/POSIX/POSIX.xs
@@ -309,22 +309,14 @@ const struct lconv_offset lconv_strings[] = {
};
const struct lconv_offset lconv_integers[] = {
- {"int_frac_digits", offsetof(struct lconv, int_frac_digits)},
- {"frac_digits", offsetof(struct lconv, frac_digits)},
- {"p_cs_precedes", offsetof(struct lconv, p_cs_precedes)},
- {"p_sep_by_space", offsetof(struct lconv, p_sep_by_space)},
- {"n_cs_precedes", offsetof(struct lconv, n_cs_precedes)},
- {"n_sep_by_space", offsetof(struct lconv, n_sep_by_space)},
- {"p_sign_posn", offsetof(struct lconv, p_sign_posn)},
- {"n_sign_posn", offsetof(struct lconv, n_sign_posn)},
-#ifdef HAS_LC_MONETARY_2008
- {"int_p_cs_precedes", offsetof(struct lconv, int_p_cs_precedes)},
- {"int_p_sep_by_space", offsetof(struct lconv, int_p_sep_by_space)},
- {"int_n_cs_precedes", offsetof(struct lconv, int_n_cs_precedes)},
- {"int_n_sep_by_space", offsetof(struct lconv, int_n_sep_by_space)},
- {"int_p_sign_posn", offsetof(struct lconv, int_p_sign_posn)},
- {"int_n_sign_posn", offsetof(struct lconv, int_n_sign_posn)},
-#endif
+ {"int_frac_digits", offsetof(struct lconv, int_frac_digits)},
+ {"frac_digits", offsetof(struct lconv, frac_digits)},
+ {"p_cs_precedes", offsetof(struct lconv, p_cs_precedes)},
+ {"p_sep_by_space", offsetof(struct lconv, p_sep_by_space)},
+ {"n_cs_precedes", offsetof(struct lconv, n_cs_precedes)},
+ {"n_sep_by_space", offsetof(struct lconv, n_sep_by_space)},
+ {"p_sign_posn", offsetof(struct lconv, p_sign_posn)},
+ {"n_sign_posn", offsetof(struct lconv, n_sign_posn)},
{NULL, 0}
};
diff --git a/gnu/usr.bin/perl/ext/POSIX/lib/POSIX.pod b/gnu/usr.bin/perl/ext/POSIX/lib/POSIX.pod
index f72beb6aa5b..94a5f9dcd97 100644
--- a/gnu/usr.bin/perl/ext/POSIX/lib/POSIX.pod
+++ b/gnu/usr.bin/perl/ext/POSIX/lib/POSIX.pod
@@ -848,12 +848,6 @@ Here is how to query the database for the B<de> (Deutsch or German) locale.
n_sep_by_space
p_sign_posn
n_sign_posn
- int_p_cs_precedes
- int_p_sep_by_space
- int_n_cs_precedes
- int_n_sep_by_space
- int_p_sign_posn
- int_n_sign_posn
))
{
printf qq(%s: "%s",\n),
diff --git a/gnu/usr.bin/perl/ext/POSIX/t/posix.t b/gnu/usr.bin/perl/ext/POSIX/t/posix.t
index cd46485d9bf..c2e4abe736e 100644
--- a/gnu/usr.bin/perl/ext/POSIX/t/posix.t
+++ b/gnu/usr.bin/perl/ext/POSIX/t/posix.t
@@ -8,7 +8,7 @@ BEGIN {
}
}
-use Test::More tests => 115;
+use Test::More tests => 109;
use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write
errno localeconv dup dup2 lseek access);
@@ -343,24 +343,8 @@ SKIP: {
}
}
- my @lconv = qw(
- int_frac_digits frac_digits
- p_cs_precedes p_sep_by_space
- n_cs_precedes n_sep_by_space
- p_sign_posn n_sign_posn
- );
-
- SKIP: {
- skip('No HAS_LC_MONETARY_2008', 6) unless $Config{d_lc_monetary_2008};
-
- push @lconv, qw(
- int_p_cs_precedes int_p_sep_by_space
- int_n_cs_precedes int_n_sep_by_space
- int_p_sign_posn int_n_sign_posn
- );
- }
-
- foreach (@lconv) {
+ foreach (qw(int_frac_digits frac_digits p_cs_precedes p_sep_by_space
+ n_cs_precedes n_sep_by_space p_sign_posn n_sign_posn)) {
SKIP: {
skip("localeconv has no result for $_", 1)
unless exists $conv->{$_};
diff --git a/gnu/usr.bin/perl/ext/re/t/reflags.t b/gnu/usr.bin/perl/ext/re/t/reflags.t
index 85bbdb45ec1..482b2c8066d 100644
--- a/gnu/usr.bin/perl/ext/re/t/reflags.t
+++ b/gnu/usr.bin/perl/ext/re/t/reflags.t
@@ -56,7 +56,7 @@ ok 'f r e l p' =~ /f r e l p/,
SKIP: {
if (
!$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
+ || $Config::Config{ccflags} =~ /\bD?NO_LOCALE\b/
) {
skip "no locale support", 7
}
diff --git a/gnu/usr.bin/perl/gv.c b/gnu/usr.bin/perl/gv.c
index e402f6bf72f..ce6847842c7 100644
--- a/gnu/usr.bin/perl/gv.c
+++ b/gnu/usr.bin/perl/gv.c
@@ -1202,7 +1202,7 @@ Perl_gv_autoload_pvn(pTHX_ HV *stash, const char *name, STRLEN len, U32 flags)
* use that, but for lack of anything better we will use the sub's
* original package to look up $AUTOLOAD.
*/
- varstash = GvSTASH(CvGV(cv));
+ varstash = CvNAMED(cv) ? CvSTASH(cv) : GvSTASH(CvGV(cv));
vargv = *(GV**)hv_fetch(varstash, S_autoload, S_autolen, TRUE);
ENTER;
@@ -2544,7 +2544,7 @@ Perl_Gv_AMupdate(pTHX_ HV *stash, bool destructing)
numifying instead of C's "+0". */
gv = Perl_gv_fetchmeth_pvn(aTHX_ stash, cooky, l, -1, 0);
cv = 0;
- if (gv && (cv = GvCV(gv))) {
+ if (gv && (cv = GvCV(gv)) && CvGV(cv)) {
if(GvNAMELEN(CvGV(cv)) == 3 && strEQ(GvNAME(CvGV(cv)), "nil")){
const char * const hvname = HvNAME_get(GvSTASH(CvGV(cv)));
if (hvname && HEK_LEN(HvNAME_HEK(GvSTASH(CvGV(cv)))) == 8
diff --git a/gnu/usr.bin/perl/hints/dec_osf.sh b/gnu/usr.bin/perl/hints/dec_osf.sh
index 98569616e63..1897d6b91b6 100644
--- a/gnu/usr.bin/perl/hints/dec_osf.sh
+++ b/gnu/usr.bin/perl/hints/dec_osf.sh
@@ -528,7 +528,6 @@ gcc) ;;
# -readonly_strings moves string constants into read-only section
# which hopefully means that modifying them leads into segmentation
# faults.
- #
for i in -trapuv -readonly_strings
do
case "$ccflags" in
@@ -539,6 +538,25 @@ gcc) ;;
;;
esac
+# In Tru64 several slightly incompatible socket APIs are supported,
+# which one applies is chosen with a set of defines:
+# -D_SOCKADDR_LEN enables 4.4BSD and IPv6 interfaces
+# -D_POSIX_PII_SOCKET enables socklen_t instead of size_t
+for i in -D_SOCKADDR_LEN -D_POSIX_PII_SOCKET
+do
+ case "$ccflags" in
+ *$i*) ;;
+ *) ccflags="$ccflags $i" ;;
+ esac
+done
+# For OSF/1 3.2, however, defining _SOCKADDR_LEN would be
+# a bad idea since it breaks send() and recv().
+case "$ccflags" in
+*DEC_OSF1_3_X*SOCKADDR_LEN*)
+ ccflags=`echo " $ccflags " | sed -e 's/ -D_SOCKADDR_LEN / /'`
+ ;;
+esac
+
#
# Unset temporary variables no more needed.
#
diff --git a/gnu/usr.bin/perl/hints/irix_6.sh b/gnu/usr.bin/perl/hints/irix_6.sh
index e36d6430196..97146116ed4 100644
--- a/gnu/usr.bin/perl/hints/irix_6.sh
+++ b/gnu/usr.bin/perl/hints/irix_6.sh
@@ -102,7 +102,12 @@ $cat > UU/cc.cbu <<'EOCCBU'
# has prompted the user for the C compiler to use.
case "$cc" in
-*gcc*) ;;
+*gcc*)
+ # With cc we can use -c99, but with gcc we just can't use C99 headers.
+ # (There is a hidden define __c99 that cc uses, but trying to use that
+ # with gcc leads into magnificent explosions.)
+ i_stdint='undef'
+ ;;
*) ccversion=`cc -version 2>&1` ;;
esac
@@ -237,6 +242,7 @@ case "$cc" in
# Warnings to turn off because the source code hasn't
# been cleaned up enough yet to satisfy the IRIX cc.
+ # 1047: macro redefinitions (in IRIX' own system headers!)
# 1184: "=" is used where where "==" may have been intended.
# 1552: The variable "foobar" is set but never used.
woff=1184,1552
@@ -284,6 +290,9 @@ case "$cc" in
'-O') optimize='-O3 -OPT:Olimit=0:space=ON' ;;
*) ;;
esac
+ # Perl source has just grown too chummy with c99
+ # (headerwise, not code-wise: we use <stdint.h> and such)
+ ccflags="$ccflags -c99"
;;
*6.2*) # Ragnarok 6.2
ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff"
@@ -351,6 +360,26 @@ case "$ccversion" in
;;
esac
+# There is a devious bug in the MIPSpro 7.4 compiler:
+# memcmp() is an inlined intrinsic, and "sometimes" it gets compiled wrong.
+#
+# In Perl the most obvious hit is regcomp.c:S_regpposixcc(),
+# causing bus errors when compiling the POSIX character classes like
+# /[[:digit:]], which means that miniperl cannot build perl.
+# (That is almost only the one victim: one single test in re/pat fails, also.)
+#
+# Therefore let's turn the inline intrinsics off and let the normal
+# libc versions be used instead. This may cause a performance hit
+# but a little slower is better than zero speed.
+#
+# MIPSpro C 7.4.1m is supposed to have fixed this bug.
+#
+case "$ccversion" in
+"MIPSpro Compilers: Version 7.4")
+ ccflags="$ccflags -U__INLINE_INTRINSICS"
+ ;;
+esac
+
EOCCBU
# End of cc.cbu callback unit. - Allen
@@ -645,3 +674,8 @@ EOCBU
# Helmut Jarausch reports that Perl's malloc is rather unusable
# with IRIX, and SGI confirms the problem.
usemymalloc=${usemymalloc:-false}
+
+# Configure finds <fcntl.h> but then thinks it can use <sys/file.h>
+# instead; in IRIX this is not true because the prototype of fcntl()
+# requires explicit include of <fcntl.h>
+i_fcntl=define
diff --git a/gnu/usr.bin/perl/hints/netbsd.sh b/gnu/usr.bin/perl/hints/netbsd.sh
index 17a4ff67510..6f0dd742503 100644
--- a/gnu/usr.bin/perl/hints/netbsd.sh
+++ b/gnu/usr.bin/perl/hints/netbsd.sh
@@ -89,7 +89,9 @@ case "$osvers" in
;;
esac
case "$osvers" in
-0.9*|1.*|2.*|3.*|4.*|5.*|6.*)
+0.8*)
+ ;;
+*)
d_getprotoent_r="$undef"
d_getprotobyname_r="$undef"
d_getprotobynumber_r="$undef"
@@ -100,6 +102,12 @@ case "$osvers" in
d_getservbyport_r="$undef"
d_setservent_r="$undef"
d_endservent_r="$undef"
+ d_gethostbyname_r="$undef"
+ d_gethostbyaddr2_r="$undef"
+ d_gethostbyaddr_r="$undef"
+ d_sethostent_r="$undef"
+ d_gethostent_r="$undef"
+ d_endhostent_r="$undef"
d_getprotoent_r_proto="0"
d_getprotobyname_r_proto="0"
d_getprotobynumber_r_proto="0"
@@ -110,6 +118,12 @@ case "$osvers" in
d_getservbyport_r_proto="0"
d_setservent_r_proto="0"
d_endservent_r_proto="0"
+ d_gethostbyname_r_proto="0"
+ d_gethostbyaddr2_r_proto="0"
+ d_gethostbyaddr_r_proto="0"
+ d_sethostent_r_proto="0"
+ d_endhostent_r_proto="0"
+ d_gethostent_r_proto="0"
;;
esac
diff --git a/gnu/usr.bin/perl/hints/openbsd.sh b/gnu/usr.bin/perl/hints/openbsd.sh
index a81b82a26e9..2c24c23fae7 100644
--- a/gnu/usr.bin/perl/hints/openbsd.sh
+++ b/gnu/usr.bin/perl/hints/openbsd.sh
@@ -8,8 +8,12 @@
# ./Configure -des -Dopenbsd_distribution=defined
#
-# OpenBSD has a better malloc than perl...
-test "$usemymalloc" || usemymalloc='n'
+# In OpenBSD > 3.7, use perl's malloc [perl #75742]
+case "$osvers" in
+3.[89]*|[4-9]*)
+ test "$usemymalloc" || usemymalloc=y
+ ;;
+esac
# malloc wrap works
case "$usemallocwrap" in
@@ -101,13 +105,6 @@ m88k-3.4)
;;
esac
-# Special per-arch specific ccflags
-case "${ARCH}-${osvers}" in
- vax-*)
- ccflags="-DUSE_PERL_ATOF=0 $ccflags"
- ;;
-esac
-
# This script UU/usethreads.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use threads.
cat > UU/usethreads.cbu <<'EOCBU'
@@ -147,16 +144,13 @@ case "$openbsd_distribution" in
siteprefix='/usr/local'
siteprefixexp='/usr/local'
# Ports installs non-std libs in /usr/local/lib so look there too
- locincpth=''
- loclibpth=''
+ locincpth='/usr/local/include'
+ loclibpth='/usr/local/lib'
# Link perl with shared libperl
- if [ "$usedl" = "$define" -a -r $src/shlib_version ]; then
+ if [ "$usedl" = "$define" -a -r shlib_version ]; then
useshrplib=true
- libperl=`. $src/shlib_version; echo libperl.so.${major}.${minor}`
+ libperl=`. ./shlib_version; echo libperl.so.${major}.${minor}`
fi
-
- # Don't support DBM not in base
- i_gdbm='undef'
;;
esac
diff --git a/gnu/usr.bin/perl/installperl b/gnu/usr.bin/perl/installperl
index 7c20ba8ad86..594f0453f40 100644
--- a/gnu/usr.bin/perl/installperl
+++ b/gnu/usr.bin/perl/installperl
@@ -146,7 +146,7 @@ if ((-e "testcompile") && (defined($ENV{'COMPILE'}))) {
}
# Exclude nonxs extensions that are not architecture dependent
-my @nonxs = grep(!/^(Errno|IO\/Compress)$/, split(' ', $Config{'nonxs_ext'}));
+my @nonxs = grep(!/^Errno$/, split(' ', $Config{'nonxs_ext'}));
my @ext_dirs = qw(cpan dist ext);
foreach my $ext_dir (@ext_dirs) {
@@ -192,7 +192,7 @@ my $installprivlib = "$opts{destdir}$Config{installprivlib}";
my $installarchlib = "$opts{destdir}$Config{installarchlib}";
my $installsitelib = "$opts{destdir}$Config{installsitelib}";
my $installsitearch = "$opts{destdir}$Config{installsitearch}";
-my $installman1dir = "none";
+my $installman1dir = "$opts{destdir}$Config{installman1dir}";
my $man1ext = $Config{man1ext};
my $libperl = $Config{libperl};
# Shared library and dynamic loading suffixes.
@@ -246,9 +246,9 @@ else {
}
}
-#-f 't/rantests' || $Is_W32
-# || warn "WARNING: You've never run 'make test' or",
-# " some tests failed! (Installing anyway.)\n";
+-f 't/rantests' || $Is_W32
+ || warn "WARNING: You've never run 'make test' or",
+ " some tests failed! (Installing anyway.)\n";
} #if (!$Is_NetWare)
# This will be used to store the packlist
@@ -260,7 +260,7 @@ if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin) {
if ($Is_Cygwin) {
$perldll = $libperl;
} else {
- $perldll = 'perl5'.$Config{patchlevel}.'.'.$dlext;
+ $perldll = 'perl5'.$Config{patchlevel}.'.'.$so;
}
if ($dlsrc ne "dl_none.xs") {
@@ -274,10 +274,6 @@ if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin) {
$packlist->{"$Config{installbin}/$perldll"} = { type => 'file' };
} # if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin)
-# Get the install command and flags from the environment
-my @installcmd = $ENV{"INSTALL"} || "install";
-push(@installcmd, $ENV{"INSTALL_COPY"} || "-c");
-
# First we install the version-numbered executables.
if ($Is_VMS) {
@@ -301,7 +297,10 @@ if ($Is_VMS) {
}
elsif ($^O ne 'dos') {
if (!$Is_NetWare) {
- install("perl$exe_ext", "$installbin/$perl_verbase$ver$exe_ext", "0755");
+ safe_unlink("$installbin/$perl_verbase$ver$exe_ext");
+ copy("perl$exe_ext", "$installbin/$perl_verbase$ver$exe_ext");
+ strip("$installbin/$perl_verbase$ver$exe_ext");
+ chmod(0755, "$installbin/$perl_verbase$ver$exe_ext");
}
else {
# If installing onto a NetWare server
@@ -373,9 +372,7 @@ elsif ($Is_Cygwin) { # On Cygwin symlink it to CORE to make Makefile happy
)
} else {
# [als] hard-coded 'libperl' name... not good!
- #@corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
- @corefiles = <*.h *.inc perl*$Config{lib_ext}>;
- push(@corefiles,<libperl*.*>) unless defined($ENV{"NOLIBINSTALL"});
+ @corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
# AIX needs perl.exp installed as well.
push(@corefiles,'perl.exp') if $^O eq 'aix';
@@ -639,21 +636,6 @@ sub copy {
$packlist->{$xto} = { type => 'file' };
}
-sub install {
- my($from,$to,$mode) = @_;
-
- my $xto = $to;
- my $cmd = join(' ', @installcmd);
- $cmd .= " -m $mode" if $mode;
- $cmd .= " -s" if $opts{strip};
- $cmd .= " $from $to";
- $xto =~ s/^\Q$opts{destdir}\E// if $opts{destdir};
- print $opts{verbose} ? " install $from $xto\n" : " $xto\n" unless $opts{silent};
- system($cmd);
- warn "Couldn't $cmd\n" if $?;
- $packlist->{$xto} = { type => 'file' };
-}
-
sub installlib {
my $dir = $File::Find::dir;
$dir =~ s!\Alib/?!!;
@@ -751,19 +733,6 @@ sub installlib {
return unless $do_installprivlib;
}
- if ($name eq 'Config_heavy.pl') {
- open my $ifh, '<', $_ or die $!;
- $_ = "$_.orig";
- open my $ofh, '>', $_ or die $!;
- while (my $l = <$ifh>) {
- $l =~ s,^(ccflags|cppflags)[^=]*='[^']+,$& -I/usr/local/include,;
- $l =~ s,^(ldflags|lddlflags)[^=]*='[^']+,$& -L/usr/local/lib,;
- print $ofh $l;
- }
- close $ifh;
- close $ofh;
- }
-
if ($Is_NetWare && !$opts{netware} && /\.(?:nlp|nlm|bs)$/) {
# Don't copy .nlp,.nlm files, doesn't make sense on Windows and also
# if copied will give problems when building new extensions.
diff --git a/gnu/usr.bin/perl/lib/AnyDBM_File.pm b/gnu/usr.bin/perl/lib/AnyDBM_File.pm
index 3b41a4a100b..4153af2de2d 100644
--- a/gnu/usr.bin/perl/lib/AnyDBM_File.pm
+++ b/gnu/usr.bin/perl/lib/AnyDBM_File.pm
@@ -22,6 +22,8 @@ __END__
AnyDBM_File - provide framework for multiple DBMs
+NDBM_File, DB_File, GDBM_File, SDBM_File, ODBM_File - various DBM implementations
+
=head1 SYNOPSIS
use AnyDBM_File;
diff --git a/gnu/usr.bin/perl/lib/Config.t b/gnu/usr.bin/perl/lib/Config.t
index 09e45a1751e..ee2eaea99a2 100644
--- a/gnu/usr.bin/perl/lib/Config.t
+++ b/gnu/usr.bin/perl/lib/Config.t
@@ -271,8 +271,8 @@ foreach my $lib (qw(applibexp archlibexp privlibexp sitearchexp sitelibexp
}
# So we expect to find it in @INC
- ok (exists $orig_inc{$_}, "Expect $lib '$_' to be in \@INC")
- or $failed++ for split ':', $dir;
+ ok (exists $orig_inc{$dir}, "Expect $lib '$dir' to be in \@INC")
+ or $failed++;
}
}
_diag ('@INC is:', @orig_inc) if $failed;
diff --git a/gnu/usr.bin/perl/lib/Getopt/Std.pm b/gnu/usr.bin/perl/lib/Getopt/Std.pm
index fb7f2d3d194..ecb7ebbf971 100644
--- a/gnu/usr.bin/perl/lib/Getopt/Std.pm
+++ b/gnu/usr.bin/perl/lib/Getopt/Std.pm
@@ -4,7 +4,7 @@ require Exporter;
=head1 NAME
-Getopt::Std, getopt, getopts - Process single-character switches with switch clustering
+getopt, getopts - Process single-character switches with switch clustering
=head1 SYNOPSIS
diff --git a/gnu/usr.bin/perl/lib/locale.t b/gnu/usr.bin/perl/lib/locale.t
index 5e24e9b257e..eea92e00e02 100644
--- a/gnu/usr.bin/perl/lib/locale.t
+++ b/gnu/usr.bin/perl/lib/locale.t
@@ -15,7 +15,7 @@ BEGIN {
@INC = '../lib';
unshift @INC, '.';
require Config; import Config;
- if (!$Config{d_setlocale} || $Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/) {
+ if (!$Config{d_setlocale} || $Config{ccflags} =~ /\bD?NO_LOCALE\b/) {
print "1..0\n";
exit;
}
diff --git a/gnu/usr.bin/perl/makedef.pl b/gnu/usr.bin/perl/makedef.pl
index 8b972a4c67d..a44c014e26a 100644
--- a/gnu/usr.bin/perl/makedef.pl
+++ b/gnu/usr.bin/perl/makedef.pl
@@ -420,6 +420,158 @@ unless ($define{'PERL_IMPLICIT_CONTEXT'}) {
Perl_my_cxt_index
);
}
+if ($define{'NO_MATHOMS'}) {
+ ++$skip{$_} foreach qw(
+ ASCII_TO_NEED
+ NATIVE_TO_NEED
+ Perl_custom_op_desc
+ Perl_custom_op_name
+ Perl_do_aexec
+ Perl_do_binmode
+ Perl_do_open
+ Perl_do_open9
+ Perl_fprintf_nocontext
+ Perl_gv_AVadd
+ Perl_gv_HVadd
+ Perl_gv_IOadd
+ Perl_gv_SVadd
+ Perl_gv_efullname
+ Perl_gv_efullname3
+ Perl_gv_fetchmethod
+ Perl_gv_fullname
+ Perl_gv_fullname3
+ Perl_hv_delete
+ Perl_hv_delete_ent
+ Perl_hv_exists
+ Perl_hv_exists_ent
+ Perl_hv_fetch
+ Perl_hv_fetch_ent
+ Perl_hv_iternext
+ Perl_hv_magic
+ Perl_hv_store
+ Perl_hv_store_ent
+ Perl_hv_store_flags
+ Perl_init_i18nl14n
+ Perl_isALNUM_lazy
+ Perl_isIDFIRST_lazy
+ Perl_is_uni_alnum
+ Perl_is_uni_alnum_lc
+ Perl_is_uni_alnumc
+ Perl_is_uni_alnumc_lc
+ Perl_is_uni_alpha
+ Perl_is_uni_alpha_lc
+ Perl_is_uni_ascii
+ Perl_is_uni_ascii_lc
+ Perl_is_uni_blank
+ Perl_is_uni_blank_lc
+ Perl_is_uni_cntrl
+ Perl_is_uni_cntrl_lc
+ Perl_is_uni_digit
+ Perl_is_uni_digit_lc
+ Perl_is_uni_graph
+ Perl_is_uni_graph_lc
+ Perl_is_uni_idfirst
+ Perl_is_uni_idfirst_lc
+ Perl_is_uni_lower
+ Perl_is_uni_lower_lc
+ Perl_is_uni_print
+ Perl_is_uni_print_lc
+ Perl_is_uni_punct
+ Perl_is_uni_punct_lc
+ Perl_is_uni_space
+ Perl_is_uni_space_lc
+ Perl_is_uni_upper
+ Perl_is_uni_upper_lc
+ Perl_is_uni_xdigit
+ Perl_is_uni_xdigit_lc
+ Perl_is_utf8_alnum
+ Perl_is_utf8_alnumc
+ Perl_is_utf8_alpha
+ Perl_is_utf8_ascii
+ Perl_is_utf8_blank
+ Perl_is_utf8_char
+ Perl_is_utf8_cntrl
+ Perl_is_utf8_digit
+ Perl_is_utf8_graph
+ Perl_is_utf8_idcont
+ Perl_is_utf8_idfirst
+ Perl_is_utf8_lower
+ Perl_is_utf8_mark
+ Perl_is_utf8_perl_space
+ Perl_is_utf8_perl_word
+ Perl_is_utf8_posix_digit
+ Perl_is_utf8_print
+ Perl_is_utf8_punct
+ Perl_is_utf8_space
+ Perl_is_utf8_string_loc
+ Perl_is_utf8_upper
+ Perl_is_utf8_xdigit
+ Perl_is_utf8_xidcont
+ Perl_is_utf8_xidfirst
+ Perl_my_lstat
+ Perl_my_stat
+ Perl_newAV
+ Perl_newHV
+ Perl_newIO
+ Perl_newSUB
+ Perl_pack_cat
+ Perl_printf_nocontext
+ Perl_ref
+ Perl_save_freeop
+ Perl_save_freepv
+ Perl_save_freesv
+ Perl_save_iv
+ Perl_save_list
+ Perl_save_long
+ Perl_save_mortalizesv
+ Perl_save_nogv
+ Perl_save_op
+ Perl_save_re_context
+ Perl_sv_2iv
+ Perl_sv_2pv
+ Perl_sv_2pv_nolen
+ Perl_sv_2pvbyte_nolen
+ Perl_sv_2pvutf8_nolen
+ Perl_sv_2uv
+ Perl_sv_catpvn
+ Perl_sv_catpvn_mg
+ Perl_sv_catsv
+ Perl_sv_catsv_mg
+ Perl_sv_force_normal
+ Perl_sv_insert
+ Perl_sv_iv
+ Perl_sv_mortalcopy
+ Perl_sv_nolocking
+ Perl_sv_nounlocking
+ Perl_sv_nv
+ Perl_sv_pv
+ Perl_sv_pvbyte
+ Perl_sv_pvbyten
+ Perl_sv_pvn
+ Perl_sv_pvn_force
+ Perl_sv_pvn_nomg
+ Perl_sv_pvutf8
+ Perl_sv_pvutf8n
+ Perl_sv_setsv
+ Perl_sv_taint
+ Perl_sv_unref
+ Perl_sv_usepvn
+ Perl_sv_usepvn_mg
+ Perl_sv_utf8_upgrade
+ Perl_sv_uv
+ Perl_to_uni_lower_lc
+ Perl_to_uni_title_lc
+ Perl_to_uni_upper_lc
+ Perl_to_utf8_fold
+ Perl_to_utf8_lower
+ Perl_to_utf8_title
+ Perl_to_utf8_upper
+ Perl_unpack_str
+ Perl_utf8_to_uvchr
+ Perl_utf8_to_uvuni
+ Perl_valid_utf8_to_uvuni
+ );
+}
unless ($define{'PERL_NEED_APPCTX'}) {
++$skip{PL_appctx};
diff --git a/gnu/usr.bin/perl/mg.c b/gnu/usr.bin/perl/mg.c
index c18d4b7573d..4158f1a25ac 100644
--- a/gnu/usr.bin/perl/mg.c
+++ b/gnu/usr.bin/perl/mg.c
@@ -2270,7 +2270,7 @@ Perl_magic_gettaint(pTHX_ SV *sv, MAGIC *mg)
PERL_UNUSED_ARG(mg);
#endif
- TAINT_IF((PL_localizing != 1) && (mg->mg_len & 1));
+ TAINT_IF((PL_localizing != 1) && (mg->mg_len & 1) && IN_PERL_RUNTIME);
return 0;
}
diff --git a/gnu/usr.bin/perl/op.c b/gnu/usr.bin/perl/op.c
index 796cb0346ce..7337f23c8eb 100644
--- a/gnu/usr.bin/perl/op.c
+++ b/gnu/usr.bin/perl/op.c
@@ -4805,7 +4805,10 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg, I32 floor)
/* for s/// and tr///, last element in list is the replacement; pop it */
- if (is_trans || o->op_type == OP_SUBST) {
+ /* If we have a syntax error causing tokens to be popped and the parser
+ to see PMFUNC '(' expr ')' with no commas in it; e.g., s/${<>{})//,
+ then expr will not be of type OP_LIST, there being no repl. */
+ if ((is_trans || o->op_type == OP_SUBST) && expr->op_type == OP_LIST) {
OP* kid;
repl = cLISTOPx(expr)->op_last;
kid = cLISTOPx(expr)->op_first;
@@ -4930,8 +4933,17 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg, I32 floor)
* were wrong (e.g. /[(?{}]/ ). Throw away the PL_compcv
* that isn't required now. Note that we have to be pretty
* confident that nothing used that CV's pad while the
- * regex was parsed */
- assert(AvFILLp(PL_comppad) == 0); /* just @_ */
+ * regex was parsed, except maybe op targets for \Q etc.
+ * If there were any op targets, though, they should have
+ * been stolen by constant folding.
+ */
+#ifdef DEBUGGING
+ PADOFFSET i = 0;
+ assert(PadnamelistMAXNAMED(PL_comppad_name) == 0);
+ while (++i <= AvFILLp(PL_comppad)) {
+ assert(!PL_curpad[i]);
+ }
+#endif
/* But we know that one op is using this CV's slab. */
cv_forget_slab(PL_compcv);
LEAVE_SCOPE(floor);
@@ -5045,6 +5057,7 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg, I32 floor)
*/
SvREFCNT_inc_simple_void(PL_compcv);
+ CvLVALUE_on(PL_compcv);
/* these lines are just an unrolled newANONATTRSUB */
expr = newSVOP(OP_ANONCODE, 0,
MUTABLE_SV(newATTRSUB(floor, 0, NULL, NULL, expr)));
@@ -11251,19 +11264,11 @@ S_inplace_aassign(pTHX_ OP *o) {
STATIC void
S_null_listop_in_list_context(pTHX_ OP *o)
{
- OP *kid;
-
PERL_ARGS_ASSERT_NULL_LISTOP_IN_LIST_CONTEXT;
/* This is an OP_LIST in list context. That means we
* can ditch the OP_LIST and the OP_PUSHMARK within. */
- kid = cLISTOPo->op_first;
- /* Find the end of the chain of OPs executed within the OP_LIST. */
- while (kid->op_next != o)
- kid = kid->op_next;
-
- kid->op_next = o->op_next; /* patch list out of exec chain */
op_null(cUNOPo->op_first); /* NULL the pushmark */
op_null(o); /* NULL the list */
}
@@ -12006,7 +12011,9 @@ Perl_rpeep(pTHX_ OP *o)
* altering the basic op_first/op_sibling layout. */
kid = kLISTOP->op_first;
assert(
- (kid->op_type == OP_NULL && kid->op_targ == OP_NEXTSTATE)
+ (kid->op_type == OP_NULL
+ && ( kid->op_targ == OP_NEXTSTATE
+ || kid->op_targ == OP_DBSTATE ))
|| kid->op_type == OP_STUB
|| kid->op_type == OP_ENTER);
nullop->op_next = kLISTOP->op_next;
diff --git a/gnu/usr.bin/perl/op.h b/gnu/usr.bin/perl/op.h
index a1c3c593408..9d9dd58d8fa 100644
--- a/gnu/usr.bin/perl/op.h
+++ b/gnu/usr.bin/perl/op.h
@@ -957,7 +957,7 @@ typedef enum {
XOPe_xop_name = XOPf_xop_name,
XOPe_xop_desc = XOPf_xop_desc,
XOPe_xop_class = XOPf_xop_class,
- XOPe_xop_peep = XOPf_xop_peep,
+ XOPe_xop_peep = XOPf_xop_peep
} xop_flags_enum;
#define XOPd_xop_name PL_op_name[OP_CUSTOM]
diff --git a/gnu/usr.bin/perl/patchlevel.h b/gnu/usr.bin/perl/patchlevel.h
index b8a58f70655..07e1217e991 100644
--- a/gnu/usr.bin/perl/patchlevel.h
+++ b/gnu/usr.bin/perl/patchlevel.h
@@ -15,7 +15,7 @@
#define PERL_REVISION 5 /* age */
#define PERL_VERSION 20 /* epoch */
-#define PERL_SUBVERSION 1 /* generation */
+#define PERL_SUBVERSION 2 /* generation */
/* The following numbers describe the earliest compatible version of
Perl ("compatibility" here being defined as sufficient binary/API
@@ -134,7 +134,6 @@ hunk.
static const char * const local_patches[] = {
NULL
#ifdef PERL_GIT_UNCOMMITTED_CHANGES
- ,"CVE-2014-4330"
,"uncommitted-changes"
#endif
PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */
diff --git a/gnu/usr.bin/perl/perl.c b/gnu/usr.bin/perl/perl.c
index 0fb87dcbc22..5000d7981bb 100644
--- a/gnu/usr.bin/perl/perl.c
+++ b/gnu/usr.bin/perl/perl.c
@@ -2925,7 +2925,7 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags)
/*
=for apidoc p||eval_pv
-Tells Perl to C<eval> the given string and return an SV* result.
+Tells Perl to C<eval> the given string in scalar context and return an SV* result.
=cut
*/
@@ -3514,7 +3514,7 @@ S_minus_v(pTHX)
#endif
PerlIO_printf(PIO_stdout,
- "\n\nCopyright 1987-2014, Larry Wall\n");
+ "\n\nCopyright 1987-2015, Larry Wall\n");
#ifdef MSDOS
PerlIO_printf(PIO_stdout,
"\nMS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n");
diff --git a/gnu/usr.bin/perl/perl.h b/gnu/usr.bin/perl/perl.h
index 3b76389dfed..1325de9b9d0 100644
--- a/gnu/usr.bin/perl/perl.h
+++ b/gnu/usr.bin/perl/perl.h
@@ -681,6 +681,15 @@
# endif
#endif
+/* EVC 4 SDK headers includes a bad definition of MB_CUR_MAX in stdlib.h
+ which is included from stdarg.h. Bad definition not present in SD 2008
+ SDK headers. wince.h is not yet included, so we cant fix this from there
+ since by then MB_CUR_MAX will be defined from stdlib.h.
+ cewchar.h includes a correct definition of MB_CUR_MAX and it is copied here
+ since cewchar.h can't be included this early */
+#if defined(UNDER_CE) && (_MSC_VER < 1300)
+# define MB_CUR_MAX 1
+#endif
#ifdef I_STDARG
# include <stdarg.h>
#else
@@ -1107,14 +1116,6 @@ EXTERN_C int usleep(unsigned int);
# define WIN32SCK_IS_STDSCK /* don't pull in custom wsock layer */
#endif
-/* In Tru64 use the 4.4BSD struct msghdr, not the 4.3 one.
- * This is important for using IPv6.
- * For OSF/1 3.2, however, defining _SOCKADDR_LEN would be
- * a bad idea since it breaks send() and recv(). */
-#if defined(__osf__) && defined(__alpha) && !defined(_SOCKADDR_LEN) && !defined(DEC_OSF1_3_X)
-# define _SOCKADDR_LEN
-#endif
-
#if defined(HAS_SOCKET) && !defined(WIN32) /* WIN32 handles sockets via win32.h */
# include <sys/socket.h>
# if defined(USE_SOCKS) && defined(I_SOCKS)
@@ -1797,6 +1798,16 @@ typedef NVTYPE NV;
# include <ieeefp.h>
#endif
+#ifdef USING_MSVC6
+/* VC6 has broken NaN semantics: NaN == NaN returns true instead of false,
+ * and for example NaN < IV_MIN. */
+# define NAN_COMPARE_BROKEN
+#endif
+#if defined(__DECC) && defined(__osf__)
+/* Also Tru64 cc has broken NaN comparisons. */
+# define NAN_COMPARE_BROKEN
+#endif
+
#ifdef USE_LONG_DOUBLE
# ifdef I_SUNMATH
# include <sunmath.h>
diff --git a/gnu/usr.bin/perl/plan9/config.plan9 b/gnu/usr.bin/perl/plan9/config.plan9
index e3c525e2fd1..7f860f9a885 100644
--- a/gnu/usr.bin/perl/plan9/config.plan9
+++ b/gnu/usr.bin/perl/plan9/config.plan9
@@ -3373,8 +3373,8 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "/sys/lib/perl/5.20.1" /**/
-#define PRIVLIB_EXP "/sys/lib/perl/5.20.1" /**/
+#define PRIVLIB "/sys/lib/perl/5.20.2" /**/
+#define PRIVLIB_EXP "/sys/lib/perl/5.20.2" /**/
/* PTRSIZE:
* This symbol contains the size of a pointer, so that the C preprocessor
@@ -3501,9 +3501,9 @@
* removed. The elements in inc_version_list (inc_version_list.U) can
* be tacked onto this variable to generate a list of directories to search.
*/
-#define SITELIB "/sys/lib/perl/5.20.1/site_perl" /**/
-#define SITELIB_EXP "/sys/lib/perl/5.20.1/site_perl" /**/
-#define SITELIB_STEM "/sys/lib/perl/5.20.1/site_perl" /**/
+#define SITELIB "/sys/lib/perl/5.20.2/site_perl" /**/
+#define SITELIB_EXP "/sys/lib/perl/5.20.2/site_perl" /**/
+#define SITELIB_STEM "/sys/lib/perl/5.20.2/site_perl" /**/
/* Size_t_size:
* This symbol holds the size of a Size_t in bytes.
diff --git a/gnu/usr.bin/perl/plan9/config_sh.sample b/gnu/usr.bin/perl/plan9/config_sh.sample
index 8c1c4109d51..57992ff4742 100644
--- a/gnu/usr.bin/perl/plan9/config_sh.sample
+++ b/gnu/usr.bin/perl/plan9/config_sh.sample
@@ -34,10 +34,10 @@ aphostname='/bin/uname -n'
api_revision='5'
api_subversion='0'
api_version='20'
-api_versionstring='5.20.1'
+api_versionstring='5.20.2'
ar='ar'
-archlib='/sys/lib/perl5/5.20.1/386'
-archlibexp='/sys/lib/perl5/5.20.1/386'
+archlib='/sys/lib/perl5/5.20.2/386'
+archlibexp='/sys/lib/perl5/5.20.2/386'
archname64=''
archname='386'
archobjs=''
@@ -296,7 +296,6 @@ d_isinf='undef'
d_isnan='undef'
d_isnanl='undef'
d_killpg='undef'
-d_lc_monetary_2008='undef'
d_lchown='undef'
d_ldbl_dig='define'
d_libm_lib_version='0'
@@ -723,17 +722,17 @@ inc_version_list=' '
inc_version_list_init='0'
incpath=''
inews=''
-installarchlib='/sys/lib/perl/5.20.1/386'
+installarchlib='/sys/lib/perl/5.20.2/386'
installbin='/usr/bin'
installman1dir='/sys/man/1pub'
installman3dir='/sys/man/2pub'
installprefix='/usr'
installprefixexp='/usr'
-installprivlib='/sys/lib/perl/5.20.1'
+installprivlib='/sys/lib/perl/5.20.2'
installscript='/usr/bin'
-installsitearch='/sys/lib/perl/5.20.1/site_perl/386'
+installsitearch='/sys/lib/perl/5.20.2/site_perl/386'
installsitebin='/usr/bin'
-installsitelib='/sys/lib/perl/5.20.1/site_perl'
+installsitelib='/sys/lib/perl/5.20.2/site_perl'
installstyle='lib/perl5'
installusrbinperl='undef'
installvendorarch=''
@@ -853,8 +852,8 @@ pmake=''
pr=''
prefix='/usr'
prefixexp='/usr'
-privlib='/sys/lib/perl/5.20.1'
-privlibexp='/sys/lib/perl/5.20.1'
+privlib='/sys/lib/perl/5.20.2'
+privlibexp='/sys/lib/perl/5.20.2'
procselfexe=''
prototype='define'
ptrsize='4'
@@ -919,13 +918,13 @@ sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 0'
sig_size='50'
signal_t='void'
-sitearch='/sys/lib/perl/5.20.1/site_perl/386'
+sitearch='/sys/lib/perl/5.20.2/site_perl/386'
sitearchexp='/sys/lib/perl/site_perl/386'
sitebin='/usr/bin'
sitebinexp='/usr/bin'
-sitelib='/sys/lib/perl/5.20.1/site_perl'
-sitelib_stem='/sys/lib/perl/5.20.1/site_perl'
-sitelibexp='/sys/lib/perl/5.20.1/site_perl'
+sitelib='/sys/lib/perl/5.20.2/site_perl'
+sitelib_stem='/sys/lib/perl/5.20.2/site_perl'
+sitelibexp='/sys/lib/perl/5.20.2/site_perl'
siteprefix='/usr'
siteprefixexp='/usr'
sizesize='4'
@@ -958,7 +957,7 @@ stdio_stream_array=''
strerror_r_proto='0'
strings='/sys/include/ape/string.h'
submit=''
-subversion='1'
+subversion='2'
sysman='/sys/man/1pub'
tail=''
tar=''
@@ -1038,8 +1037,8 @@ vendorlib_stem=''
vendorlibexp=''
vendorprefix=''
vendorprefixexp=''
-version='5.20.1'
-version_patchlevel_string='version 20 subversion 1'
+version='5.20.2'
+version_patchlevel_string='version 20 subversion 2'
versiononly='undef'
vi=''
xlibpth=''
@@ -1053,7 +1052,7 @@ config_args=''
config_argc=0
PERL_REVISION=5
PERL_VERSION=20
-PERL_SUBVERSION=1
+PERL_SUBVERSION=2
PERL_API_REVISION=5
PERL_API_VERSION=20
PERL_API_SUBVERSION=0
diff --git a/gnu/usr.bin/perl/plan9/mkfile b/gnu/usr.bin/perl/plan9/mkfile
index 28d290b5e32..cf2153ed6b2 100644
--- a/gnu/usr.bin/perl/plan9/mkfile
+++ b/gnu/usr.bin/perl/plan9/mkfile
@@ -22,7 +22,7 @@ installman3dir = /sys/man/2
podnames = perl perlbook perldata perldebtut perldiag perldsc perlform perlfunc perlipc perllexwarn perllol perlmod perlmodlib perlmodinstall perlnewmod perlop perlootut perlopentut perlpacktut perlpod perlport perlrequick perlretut perlref perlreftut perlrequick perlrun perlsec perlstyle perlsub perlsyn perltie perltrap perlutil perlunifaq perluniintro perlvar
faqpodnames = perlfaq perlfaq1 perlfaq2 perlfaq3 perlfaq4 perlfaq5 perlfaq6 perlfaq7 perlfaq8 perlfaq9
-advpodnames = perlapi perlapio perlcall perlclib perlcompile perldebguts perldbmfilter perldebug perldelta perldiag perlebcdic perlembed perlfilter perlfork perlguts perlhack perlintern perliol perllocale perlnumber perlobj perlpodspec perlre perlthrtut perltodo perlunicode perlxs perlxs perlxstut
+advpodnames = perlapi perlapio perlcall perlclib perlcompile perldebguts perldbmfilter perldebug perldelta perldiag perlebcdic perlembed perlfilter perlfork perlguts perlhack perlintern perliol perllocale perlnumber perlobj perlpodspec perlre perlthrtut perltodo perlunicode perlunicook perlxs perlxs perlxstut
archpodnames = perlaix perlamiga perlbeos perlbs2000 perlce perlcygwin perldgux perldos perlfreebsd perlhpux perlhurd perlirix perlmacos perlmpeix perlnetware perlos2 perlos390 perlos400 perlplan9 perlqnx perlsolaris perltru64 perlvms perlvos perlwin32
histpods = perl5004delta perl5005delta perl561delta perl56delta perl570delta perl571delta perl572delta perl573delta perl58delta perlhist
diff --git a/gnu/usr.bin/perl/pod/perl.pod b/gnu/usr.bin/perl/pod/perl.pod
index 08d7916a899..9473daffa16 100644
--- a/gnu/usr.bin/perl/pod/perl.pod
+++ b/gnu/usr.bin/perl/pod/perl.pod
@@ -34,7 +34,7 @@ For ease of access, the Perl manual has been split up into several sections.
# This section is parsed by Porting/pod_lib.pl for use by pod/buildtoc etc
-flag =g perlmodlib perlapi perlintern
+flag =g perluniprops perlmodlib perlapi perlintern
flag =go perltoc
flag =ro perlcn perljp perlko perltw
flag = perlvms
@@ -121,6 +121,7 @@ aux a2p c2ph h2ph h2xs perlbug pl2pm pod2html pod2man s2p splain xsubpp
perllocale Perl locale support
perluniintro Perl Unicode introduction
perlunicode Perl Unicode support
+ perlunicook Perl Unicode cookbook
perlunifaq Perl Unicode FAQ
perluniprops Index of Unicode properties in Perl
perlunitut Perl Unicode tutorial
@@ -179,13 +180,15 @@ aux a2p c2ph h2ph h2xs perlbug pl2pm pod2html pod2man s2p splain xsubpp
perlhist Perl history records
perldelta Perl changes since previous version
+ perl5201delta Perl changes in version 5.20.1
perl5200delta Perl changes in version 5.20.0
+ perl5184delta Perl changes in version 5.18.4
perl5182delta Perl changes in version 5.18.2
perl5181delta Perl changes in version 5.18.1
perl5180delta Perl changes in version 5.18.0
- perl5161delta Perl changes in version 5.16.1
- perl5162delta Perl changes in version 5.16.2
perl5163delta Perl changes in version 5.16.3
+ perl5162delta Perl changes in version 5.16.2
+ perl5161delta Perl changes in version 5.16.1
perl5160delta Perl changes in version 5.16.0
perl5144delta Perl changes in version 5.14.4
perl5143delta Perl changes in version 5.14.3
diff --git a/gnu/usr.bin/perl/pod/perldelta.pod b/gnu/usr.bin/perl/pod/perldelta.pod
index 92133e26dd2..a339f3d3bd1 100644
--- a/gnu/usr.bin/perl/pod/perldelta.pod
+++ b/gnu/usr.bin/perl/pod/perldelta.pod
@@ -2,365 +2,370 @@
=head1 NAME
-perldelta - what is new for perl v5.20.1
+perldelta - what is new for perl v5.20.2
=head1 DESCRIPTION
-This document describes differences between the 5.20.0 release and the 5.20.1
+This document describes differences between the 5.20.1 release and the 5.20.2
release.
-If you are upgrading from an earlier release such as 5.18.0, first read
-L<perl5200delta>, which describes differences between 5.18.0 and 5.20.0.
+If you are upgrading from an earlier release such as 5.20.0, first read
+L<perl5201delta>, which describes differences between 5.20.0 and 5.20.1.
=head1 Incompatible Changes
-There are no changes intentionally incompatible with 5.20.0. If any exist,
+There are no changes intentionally incompatible with 5.20.1. If any exist,
they are bugs, and we request that you submit a report. See L</Reporting Bugs>
below.
-=head1 Performance Enhancements
-
-=over 4
+=head1 Modules and Pragmata
-=item *
+=head2 Updated Modules and Pragmata
-An optimization to avoid problems with COW and deliberately overallocated PVs
-has been disabled because it interfered with another, more important,
-optimization, causing a slowdown on some platforms.
-L<[perl #121975]|https://rt.perl.org/Ticket/Display.html?id=121975>
+=over 4
=item *
-Returning a string from a lexical variable could be slow in some cases. This
-has now been fixed.
-L<[perl #121977]|https://rt.perl.org/Ticket/Display.html?id=121977>
+L<attributes> has been upgraded from version 0.22 to 0.23.
-=back
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules and Pragmata
-
-=over 4
+The usage of C<memEQs> in the XS has been corrected.
+L<[perl #122701]|https://rt.perl.org/Ticket/Display.html?id=122701>
=item *
-L<Config::Perl::V> has been upgraded from version 0.20 to 0.22.
+L<Data::Dumper> has been upgraded from version 2.151 to 2.151_01.
-The list of Perl versions covered has been updated and some flaws in the
-parsing have been fixed.
+Fixes CVE-2014-4330 by adding a configuration variable/option to limit
+recursion when dumping deep data structures.
=item *
-L<Exporter> has been upgraded from version 5.70 to 5.71.
+L<Errno> has been upgraded from version 1.20_03 to 1.20_05.
-Illegal POD syntax in the documentation has been corrected.
+Warnings when building the XS on Windows with the Visual C++ compiler are now
+avoided.
=item *
-L<ExtUtils::CBuilder> has been upgraded from version 0.280216 to 0.280217.
+L<feature> has been upgraded from version 1.36 to 1.36_01.
-Android builds now link to both B<-lperl> and C<$Config::Config{perllibs}>.
+The C<postderef> feature has now been documented. This feature was actually
+added in Perl 5.20.0 but was accidentally omitted from the feature
+documentation until now.
=item *
-L<File::Copy> has been upgraded from version 2.29 to 2.30.
+L<IO::Socket> has been upgraded from version 1.37 to 1.38.
-The documentation now notes that C<copy> will not overwrite read-only files.
+Document the limitations of the connected() method.
+L<[perl #123096]|https://rt.perl.org/Ticket/Display.html?id=123096>
=item *
-L<Module::CoreList> has been upgraded from version 3.11 to 5.020001.
+L<Module::CoreList> has been upgraded from version 5.020001 to 5.20150214.
The list of Perl versions covered has been updated.
=item *
-The PathTools module collection has been upgraded from version 3.47 to 3.48.
+PathTools has been upgraded from version 3.48 to 3.48_01.
-Fallbacks are now in place when cross-compiling for Android and
-C<$Config::Config{sh}> is not yet defined.
-L<[perl #121963]|https://rt.perl.org/Ticket/Display.html?id=121963>
+A warning from the B<gcc> compiler is now avoided when building the XS.
=item *
-L<PerlIO::via> has been upgraded from version 0.14 to 0.15.
+L<PerlIO::scalar> has been upgraded from version 0.18 to 0.18_01.
+
+Reading from a position well past the end of the scalar now correctly returns
+end of file.
+L<[perl #123443]|https://rt.perl.org/Ticket/Display.html?id=123443>
+
+Seeking to a negative position still fails, but no longer leaves the file
+position set to a negation location.
-A minor portability improvement has been made to the XS implementation.
+C<eof()> on a C<PerlIO::scalar> handle now properly returns true when the file
+position is past the 2GB mark on 32-bit systems.
=item *
-L<Unicode::UCD> has been upgraded from version 0.57 to 0.58.
+L<Storable> has been upgraded from version 2.49 to 2.49_01.
-The documentation includes many clarifications and fixes.
+Minor grammatical change to the documentation only.
=item *
-L<utf8> has been upgraded from version 1.13 to 1.13_01.
+L<VMS::DCLsym> has been upgraded from version 1.05 to 1.05_01.
-The documentation has some minor formatting improvements.
+Minor formatting change to the documentation only.
=item *
-L<version> has been upgraded from version 0.9908 to 0.9909.
+L<VMS::Stdio> has been upgraded from version 2.4 to 2.41.
-External libraries and Perl may have different ideas of what the locale is.
-This is problematic when parsing version strings if the locale's numeric
-separator has been changed. Version parsing has been patched to ensure it
-handles the locales correctly.
-L<[perl #121930]|https://rt.perl.org/Ticket/Display.html?id=121930>
+Minor formatting change to the documentation only.
=back
=head1 Documentation
+=head2 New Documentation
+
+=head3 L<perlunicook>
+
+This document, by Tom Christiansen, provides examples of handling Unicode in
+Perl.
+
=head2 Changes to Existing Documentation
-=head3 L<perlapi>
+=head3 L<perlexperiment>
=over 4
=item *
-C<av_len> - Emphasize that this returns the highest index in the array, not the
-size of the array.
-L<[perl #120386]|https://rt.perl.org/Ticket/Display.html?id=120386>
+Added reference to subroutine signatures. This feature was actually added in
+Perl 5.20.0 but was accidentally omitted from the experimental feature
+documentation until now.
-=item *
-
-Note that C<SvSetSV> doesn't do set magic.
+=back
-=item *
+=head3 L<perlpolicy>
-C<sv_usepvn_flags> - Fix documentation to mention the use of C<NewX> instead of
-C<malloc>.
-L<[perl #121869]|https://rt.perl.org/Ticket/Display.html?id=121869>
+=over 4
=item *
-Clarify where C<NUL> may be embedded or is required to terminate a string.
+The process whereby features may graduate from experimental status has now been
+formally documented.
=back
-=head3 L<perlfunc>
+=head3 L<perlsyn>
=over 4
=item *
-Clarify the meaning of C<-B> and C<-T>.
+An ambiguity in the documentation of the ellipsis statement has been corrected.
+L<[perl #122661]|https://rt.perl.org/Ticket/Display.html?id=122661>
-=item *
+=back
-C<-l> now notes that it will return false if symlinks aren't supported by the
-file system.
-L<[perl #121523]|https://rt.perl.org/Ticket/Display.html?id=121523>
+=head1 Diagnostics
-=item *
+The following additions or changes have been made to diagnostic output,
+including warnings and fatal error messages. For the complete list of
+diagnostic messages, see L<perldiag>.
-Note that C<each>, C<keys> and C<values> may produce different orderings for
-tied hashes compared to other perl hashes.
-L<[perl #121404]|https://rt.perl.org/Ticket/Display.html?id=121404>
+=head2 Changes to Existing Diagnostics
+
+=over 4
=item *
-Note that C<exec LIST> and C<system LIST> may fall back to the shell on Win32.
-Only C<exec PROGRAM LIST> and C<system PROGRAM LIST> indirect object syntax
-will reliably avoid using the shell. This has also been noted in L<perlport>.
-L<[perl #122046]|https://rt.perl.org/Ticket/Display.html?id=122046>
+L<Bad symbol for scalar|perldiag/"Bad symbol for scalar"> is now documented.
+This error is not new, but was not previously documented here.
=item *
-Clarify the meaning of C<our>.
-L<[perl #122132]|https://rt.perl.org/Ticket/Display.html?id=122132>
+L<Missing right brace on \N{}|perldiag/"Missing right brace on \N{}"> is now
+documented. This error is not new, but was not previously documented here.
=back
-=head3 L<perlguts>
+=head1 Testing
=over 4
=item *
-Explain various ways of modifying an existing SV's buffer.
-L<[perl #116925]|https://rt.perl.org/Ticket/Display.html?id=116925>
+The test script F<re/rt122747.t> has been added to verify that
+L<perl #122747|https://rt.perl.org/Ticket/Display.html?id=122747> remains
+fixed.
=back
-=head3 L<perlpolicy>
-
-=over 4
-
-=item *
+=head1 Platform Support
-We now have a code of conduct for the I<< p5p >> mailing list, as documented in
-L<< perlpolicy/STANDARDS OF CONDUCT >>.
+=head2 Regained Platforms
-=back
+IRIX and Tru64 platforms are working again. (Some C<make test> failures
+remain.)
-=head3 L<perlre>
+=head1 Selected Bug Fixes
=over 4
=item *
-The C</x> modifier has been clarified to note that comments cannot be continued
-onto the next line by escaping them.
-
-=back
+AIX now sets the length in C<< getsockopt >> correctly.
+L<[perl #120835]|https://rt.perl.org/Ticket/Display.html?id=120835>,
+L<[cpan #91183]|https://rt.cpan.org/Ticket/Display.html?id=91183>,
+L<[cpan #85570]|https://rt.cpan.org/Ticket/Display.html?id=85570>
-=head3 L<perlsyn>
+=item *
-=over 4
+In Perl 5.20.0, C<$^N> accidentally had the internal UTF8 flag turned off if
+accessed from a code block within a regular expression, effectively
+UTF8-encoding the value. This has been fixed.
+L<[perl #123135]|https://rt.perl.org/Ticket/Display.html?id=123135>
=item *
-Mention the use of empty conditionals in C<for>/C<while> loops for infinite
-loops.
+Various cases where the name of a sub is used (autoload, overloading, error
+messages) used to crash for lexical subs, but have been fixed.
-=back
-
-=head3 L<perlxs>
+=item *
-=over 4
+An assertion failure when parsing C<sort> with debugging enabled has been
+fixed.
+L<[perl #122771]|https://rt.perl.org/Ticket/Display.html?id=122771>
=item *
-Added a discussion of locale issues in XS code.
+Loading UTF8 tables during a regular expression match could cause assertion
+failures under debugging builds if the previous match used the very same
+regular expression.
+L<[perl #122747]|https://rt.perl.org/Ticket/Display.html?id=122747>
-=back
+=item *
-=head1 Diagnostics
+Due to a mistake in the string-copying logic, copying the value of a state
+variable could instead steal the value and undefine the variable. This bug,
+introduced in Perl 5.20, would happen mostly for long strings (1250 chars or
+more), but could happen for any strings under builds with copy-on-write
+disabled.
+L<[perl #123029]|https://rt.perl.org/Ticket/Display.html?id=123029>
-The following additions or changes have been made to diagnostic output,
-including warnings and fatal error messages. For the complete list of
-diagnostic messages, see L<perldiag>.
-
-=head2 Changes to Existing Diagnostics
+=item *
-=over 4
+Fixed a bug that could cause perl to execute an infinite loop during
+compilation.
+L<[perl #122995]|https://rt.perl.org/Ticket/Display.html?id=122995>
=item *
-L<Variable length lookbehind not implemented in regex mE<sol>%sE<sol>|perldiag/"Variable length lookbehind not implemented in regex m/%s/">
+On Win32, restoring in a child pseudo-process a variable that was C<local()>ed
+in a parent pseudo-process before the C<fork> happened caused memory corruption
+and a crash in the child pseudo-process (and therefore OS process).
+L<[perl #40565]|https://rt.perl.org/Ticket/Display.html?id=40565>
-Information about Unicode behaviour has been added.
+=item *
-=back
+Tainted constants evaluated at compile time no longer cause unrelated
+statements to become tainted.
+L<[perl #122669]|https://rt.perl.org/Ticket/Display.html?id=122669>
-=head1 Configuration and Compilation
+=item *
-=over 4
+Calling C<write> on a format with a C<^**> field could produce a panic in
+sv_chop() if there were insufficient arguments or if the variable used to fill
+the field was empty.
+L<[perl #123245]|https://rt.perl.org/Ticket/Display.html?id=123245>
=item *
-Building Perl no longer writes to the source tree when configured with
-F<Configure>'s B<-Dmksymlinks> option.
-L<[perl #121585]|https://rt.perl.org/Ticket/Display.html?id=121585>
+In Perl 5.20.0, C<sort CORE::fake> where 'fake' is anything other than a
+keyword started chopping of the last 6 characters and treating the result as a
+sort sub name. The previous behaviour of treating "CORE::fake" as a sort sub
+name has been restored.
+L<[perl #123410]|https://rt.perl.org/Ticket/Display.html?id=123410>
-=back
+=item *
-=head1 Platform Support
+A bug in regular expression patterns that could lead to segfaults and other
+crashes has been fixed. This occurred only in patterns compiled with C<"/i">,
+while taking into account the current POSIX locale (this usually means they
+have to be compiled within the scope of C<S<"use locale">>), and there must be
+a string of at least 128 consecutive bytes to match.
+L<[perl #123539]|https://rt.perl.org/Ticket/Display.html?id=123539>
-=head2 Platform-Specific Notes
+=item *
-=over 4
+C<qr/@array(?{block})/> no longer dies with "Bizarre copy of ARRAY".
+L<[perl #123344]|https://rt.perl.org/Ticket/Display.html?id=123344>
-=item Android
+=item *
-Build support has been improved for cross-compiling in general and for Android
-in particular.
+C<gmtime> no longer crashes with not-a-number values.
+L<[perl #123495]|https://rt.perl.org/Ticket/Display.html?id=123495>
-=item OpenBSD
+=item *
-Corrected architectures and version numbers used in configuration hints when
-building Perl.
+Certain syntax errors in substitutions, such as C<< s/${<>{})// >>, would
+crash, and had done so since Perl 5.10. (In some cases the crash did not start
+happening until Perl 5.16.) The crash has, of course, been fixed.
+L<[perl #123542]|https://rt.perl.org/Ticket/Display.html?id=123542>
-=item Solaris
+=item *
-B<c99> options have been cleaned up, hints look for B<solstudio> as well as
-B<SUNWspro>, and support for native C<setenv> has been added.
+A memory leak in some regular expressions, introduced in Perl 5.20.1, has been
+fixed.
+L<[perl #123198]|https://rt.perl.org/Ticket/Display.html?id=123198>
-=item VMS
+=item *
-An old bug in feature checking, mainly affecting pre-7.3 systems, has been
+C<< formline("@...", "a"); >> would crash. The C<FF_CHECKNL> case in
+pp_formline() didn't set the pointer used to mark the chop position, which led
+to the C<FF_MORE> case crashing with a segmentation fault. This has been
fixed.
+L<[perl #123538]|https://rt.perl.org/Ticket/Display.html?id=123538>
+L<[perl #123622]|https://rt.perl.org/Ticket/Display.html?id=123622>
-=item Windows
+=item *
-C<%I64d> is now being used instead of C<%lld> for MinGW.
+A possible buffer overrun and crash when parsing a literal pattern during
+regular expression compilation has been fixed.
+L<[perl #123604]|https://rt.perl.org/Ticket/Display.html?id=123604>
=back
-=head1 Internal Changes
+=head1 Known Problems
=over 4
=item *
-Added L<perlapi/sync_locale>.
-Changing the program's locale should be avoided by XS code. Nevertheless,
-certain non-Perl libraries called from XS, such as C<Gtk> do so. When this
-happens, Perl needs to be told that the locale has changed. Use this function
-to do so, before returning to Perl.
+It is a known bug that lexical subroutines cannot be used as the C<SUBNAME>
+argument to C<sort>. This will be fixed in a future version of Perl.
=back
-=head1 Selected Bug Fixes
+=head1 Errata From Previous Releases
=over 4
=item *
-A bug has been fixed where zero-length assertions and code blocks inside of a
-regex could cause C<pos> to see an incorrect value.
-L<[perl #122460]|https://rt.perl.org/Ticket/Display.html?id=122460>
-
-=item *
-
-Using C<s///e> on tainted utf8 strings could issue bogus "Malformed UTF-8
-character (unexpected end of string)" warnings. This has now been fixed.
-L<[perl #122148]|https://rt.perl.org/Ticket/Display.html?id=122148>
-
-=item *
-
-C<system> and friends should now work properly on more Android builds.
-
-Due to an oversight, the value specified through B<-Dtargetsh> to F<Configure>
-would end up being ignored by some of the build process. This caused perls
-cross-compiled for Android to end up with defective versions of C<system>,
-C<exec> and backticks: the commands would end up looking for F</bin/sh> instead
-of F</system/bin/sh>, and so would fail for the vast majority of devices,
-leaving C<$!> as C<ENOENT>.
-
-=item *
-
-Many issues have been detected by L<Coverity|http://www.coverity.com/> and
-fixed.
+A regression has been fixed that was introduced in Perl 5.20.0 (fixed in Perl
+5.20.1 as well as here) in which a UTF-8 encoded regular expression pattern
+that contains a single ASCII lowercase letter does not match its uppercase
+counterpart.
+L<[perl #122655]|https://rt.perl.org/Ticket/Display.html?id=122655>
=back
=head1 Acknowledgements
-Perl 5.20.1 represents approximately 4 months of development since Perl 5.20.0
-and contains approximately 12,000 lines of changes across 170 files from 36
+Perl 5.20.2 represents approximately 5 months of development since Perl 5.20.1
+and contains approximately 6,300 lines of changes across 170 files from 34
authors.
Excluding auto-generated files, documentation and release tools, there were
-approximately 2,600 lines of changes to 110 .pm, .t, .c and .h files.
+approximately 1,900 lines of changes to 80 .pm, .t, .c and .h files.
Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed
-the improvements that became Perl 5.20.1:
-
-Aaron Crane, Abigail, Alberto Simões, Alexandr Ciornii, Alexandre (Midnite)
-Jousset, Andrew Fresh, Andy Dougherty, Brian Fraser, Chris 'BinGOs' Williams,
-Craig A. Berry, Daniel Dragan, David Golden, David Mitchell, H.Merijn Brand,
-James E Keenan, Jan Dubois, Jarkko Hietaniemi, John Peacock, kafka, Karen
-Etheridge, Karl Williamson, Lukas Mai, Matthew Horsfall, Michael Bunk, Peter
-Martini, Rafael Garcia-Suarez, Reini Urban, Ricardo Signes, Shirakata Kentaro,
-Smylers, Steve Hay, Thomas Sibley, Todd Rinaldo, Tony Cook, Vladimir Marek,
-Yves Orton.
+the improvements that became Perl 5.20.2:
+
+Aaron Crane, Abigail, Andreas Voegele, Andy Dougherty, Anthony Heading,
+Aristotle Pagaltzis, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan,
+Doug Bell, Ed J, Father Chrysostomos, Glenn D. Golden, H.Merijn Brand, Hugo van
+der Sanden, James E Keenan, Jarkko Hietaniemi, Jim Cromie, Karen Etheridge,
+Karl Williamson, kmx, Matthew Horsfall, Max Maischein, Peter Martini, Rafael
+Garcia-Suarez, Ricardo Signes, Shlomi Fish, Slaven Rezic, Steffen Müller,
+Steve Hay, Tadeusz Sośnierz, Tony Cook, Yves Orton, Ævar Arnfjörð
+Bjarmason.
The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
diff --git a/gnu/usr.bin/perl/pod/perldiag.pod b/gnu/usr.bin/perl/pod/perldiag.pod
index e4b861b1e33..9f3996f8f78 100644
--- a/gnu/usr.bin/perl/pod/perldiag.pod
+++ b/gnu/usr.bin/perl/pod/perldiag.pod
@@ -440,6 +440,11 @@ that wasn't a symbol table entry.
(P) An internal request asked to add a hash entry to something that
wasn't a symbol table entry.
+=item Bad symbol for scalar
+
+(P) An internal request asked to add a scalar entry to something that
+wasn't a symbol table entry.
+
=item Bareword found in conditional
(W bareword) The compiler found a bareword where it expected a
@@ -970,6 +975,13 @@ unable to locate this library. See L<DynaLoader>.
functioning as a class, but that package doesn't define that particular
method, nor does any of its base classes. See L<perlobj>.
+=item Can't locate object method "%s" via package "%s" (perhaps you forgot
+to load "%s"?)
+
+(F) You called a method on a class that did not exist, and the method
+could not be found in UNIVERSAL. This often means that a method
+requires a package that has not been loaded.
+
=item Can't locate package %s for @%s::ISA
(W syntax) The @ISA array contained the name of another package that
@@ -1391,9 +1403,10 @@ uses the character values modulus 256 instead, as if you had provided:
=item "\c%c" is more clearly written simply as "%s"
(W syntax) The C<\cI<X>> construct is intended to be a way to specify
-non-printable characters. You used it for a printable one, which is better
-written as simply itself, perhaps preceded by a backslash for non-word
-characters.
+non-printable characters. You used it for a printable one, which
+is better written as simply itself, perhaps preceded by a backslash
+for non-word characters. Doing it the way you did is not portable
+between ASCII and EBCDIC platforms.
=item Cloning substitution context is unimplemented
@@ -2202,7 +2215,7 @@ of Perl are likely to eliminate these arbitrary limitations.
=item Ignoring zero length \N{} in character class in regex; marked by
S<<-- HERE> in m/%s/
-(W regexp) Named Unicode character escapes C<(\N{...})> may return a
+(W regexp) Named Unicode character escapes (C<\N{...}>) may return a
zero-length sequence. When such an escape is used in a character class
its behaviour is not well defined. Check that the correct escape has
been used, and the correct charname handler is in scope.
@@ -2563,7 +2576,7 @@ a module that is a MRO plugin. See L<mro> and L<perlmroapi>.
=item Invalid negative number (%s) in chr
(W utf8) You passed a negative number to C<chr>. Negative numbers are
-not valid characters numbers, so it return the Unicode replacement
+not valid character numbers, so it returns the Unicode replacement
character (U+FFFD).
=item invalid option -D%c, use -D'' to see choices
@@ -3082,6 +3095,8 @@ can vary from one line to the next.
(F) Missing right brace in C<\x{...}>, C<\p{...}>, C<\P{...}>, or C<\N{...}>.
+=item Missing right brace on \N{}
+
=item Missing right brace on \N{} or unescaped left brace after \N
(F) C<\N> has two meanings.
@@ -3305,7 +3320,7 @@ probably not what you want.
=item \N{} in character class restricted to one character in regex; marked
by S<<-- HERE> in m/%s/
-(F) Named Unicode character escapes C<(\N{...})> may return a
+(F) Named Unicode character escapes (C<\N{...}>) may return a
multi-character sequence. Such an escape may not be used in
a character class, because character classes always match one
character of input. Check that the correct escape has been used,
@@ -4149,12 +4164,6 @@ the nesting limit is exceeded.
command-line switch. (This output goes to STDOUT unless you've
redirected it with select().)
-=item (perhaps you forgot to load "%s"?)
-
-(F) This is an educated guess made in conjunction with the message
-"Can't locate object method \"%s\" via package \"%s\"". It often means
-that a method requires a package that has not been loaded.
-
=item Perl folding rules are not up-to-date for 0x%X; please use the perlbug
utility to report; in regex; marked by S<<-- HERE> in m/%s/
@@ -6754,7 +6763,7 @@ Something Very Wrong.
=item Zero length \N{} in regex; marked by S<<-- HERE> in m/%s/
-(F) Named Unicode character escapes C<(\N{...})> may return a zero-length
+(F) Named Unicode character escapes (C<\N{...}>) may return a zero-length
sequence. Such an escape was used in an extended character class, i.e.
C<(?[...])>, which is not permitted. Check that the correct escape has
been used, and the correct charnames handler is in scope. The S<<-- HERE>
diff --git a/gnu/usr.bin/perl/pod/perlfunc.pod b/gnu/usr.bin/perl/pod/perlfunc.pod
index 7713f540aed..802b9908068 100644
--- a/gnu/usr.bin/perl/pod/perlfunc.pod
+++ b/gnu/usr.bin/perl/pod/perlfunc.pod
@@ -458,7 +458,7 @@ characters are strange, it's a C<-B> file; otherwise it's a C<-T> file.
Also, any file containing a zero byte in the examined portion is
considered a binary file. (If executed within the scope of a L<S<use
locale>|perllocale> which includes C<LC_CTYPE>, odd characters are
-anything that isn't a printable nor space in the current locale.) If
+anything that isn't a printable nor space in the current locale.) If
C<-T> or C<-B> is used on a filehandle, the current IO buffer is
examined
rather than the first block. Both C<-T> and C<-B> return true on an empty
@@ -744,7 +744,8 @@ Returns the context of the current pure perl subroutine call. In scalar
context, returns the caller's package name if there I<is> a caller (that is, if
we're in a subroutine or C<eval> or C<require>) and the undefined value
otherwise. caller never returns XS subs and they are skipped. The next pure
-perl sub will appear instead of the XS sub in caller's return values. In list
+perl sub will appear instead of the XS
+sub in caller's return values. In list
context, caller returns
# 0 1 2
@@ -762,7 +763,7 @@ to go back before the current one.
= caller($i);
Here, $subroutine is the function that the caller called (rather than the
-function containing the caller). Note that $subroutine may be C<(eval)> if
+function containing the caller). Note that $subroutine may be C<(eval)> if
the frame is not a subroutine call, but an C<eval>. In such a case
additional elements $evaltext and
C<$is_require> are set: C<$is_require> is true if the frame is created by a
@@ -1380,11 +1381,12 @@ straightforward. Although exists() will return false for deleted entries,
deleting array elements never changes indices of existing values; use shift()
or splice() for that. However, if any deleted elements fall at the end of an
array, the array's size shrinks to the position of the highest element that
-still tests true for exists(), or to 0 if none do. In other words, an
+still tests true for exists(), or to 0 if none do. In other words, an
array won't have trailing nonexistent elements after a delete.
-B<WARNING:> Calling delete on array values is deprecated and likely to
-be removed in a future version of Perl.
+B<WARNING:> Calling C<delete> on array values is strongly discouraged. The
+notion of deleting or checking the existence of Perl array elements is not
+conceptually coherent, and can lead to surprising behavior.
Deleting from C<%ENV> modifies the environment. Deleting from a hash tied to
a DBM file deletes the entry from the DBM file. Deleting from a C<tied> hash
@@ -2061,9 +2063,11 @@ corresponding value is undefined.
print "True\n" if $hash{$key};
exists may also be called on array elements, but its behavior is much less
-obvious and is strongly tied to the use of L</delete> on arrays. B<Be aware>
-that calling exists on array values is deprecated and likely to be removed in
-a future version of Perl.
+obvious and is strongly tied to the use of L</delete> on arrays.
+
+B<WARNING:> Calling C<exists> on array values is strongly discouraged. The
+notion of deleting or checking the existence of Perl array elements is not
+conceptually coherent, and can lead to surprising behavior.
print "Exists\n" if exists $array[$index];
print "Defined\n" if defined $array[$index];
@@ -3358,7 +3362,7 @@ Respects current LC_CTYPE locale for code points < 256; and uses Unicode
rules for the remaining code points (this last can only happen if
the UTF8 flag is also set). See L<perllocale>.
-Starting in v5.20, Perl wil use full Unicode rules if the locale is
+Starting in v5.20, Perl uses full Unicode rules if the locale is
UTF-8. Otherwise, there is a deficiency in this scheme, which is that
case changes that cross the 255/256
boundary are not well-defined. For example, the lower case of LATIN CAPITAL
@@ -3673,12 +3677,13 @@ C<{>. Usually it gets it right, but if it
doesn't it won't realize something is wrong until it gets to the C<}> and
encounters the missing (or unexpected) comma. The syntax error will be
reported close to the C<}>, but you'll need to change something near the C<{>
-such as using a unary C<+> to give Perl some help:
+such as using a unary C<+> or semicolon to give Perl some help:
%hash = map { "\L$_" => 1 } @array # perl guesses EXPR. wrong
%hash = map { +"\L$_" => 1 } @array # perl guesses BLOCK. right
- %hash = map { ("\L$_" => 1) } @array # this also works
- %hash = map { lc($_) => 1 } @array # as does this.
+ %hash = map {; "\L$_" => 1 } @array # this also works
+ %hash = map { ("\L$_" => 1) } @array # as does this
+ %hash = map { lc($_) => 1 } @array # and this.
%hash = map +( lc($_) => 1 ), @array # this is EXPR and works!
%hash = map ( lc($_), 1 ), @array # evaluates to (1, @array)
@@ -4362,7 +4367,8 @@ existing variable: a package variable of the same name.
This means that when C<use strict 'vars'> is in effect, C<our> lets you use
a package variable without qualifying it with the package name, but only within
-the lexical scope of the C<our> declaration.
+the lexical scope of the C<our> declaration. This applies immediately--even
+within the same statement.
package Foo;
use strict;
@@ -4388,6 +4394,16 @@ package variables spring into existence when first used.
print $Foo::foo; # prints 23
+Because the variable becomes legal immediately under C<use strict 'vars'>, so
+long as there is no variable with that name is already in scope, you can then
+reference the package variable again even within the same statement.
+
+ package Foo;
+ use strict;
+
+ my $foo = $foo; # error, undeclared $foo on right-hand side
+ our $foo = $foo; # no errors
+
If more than one variable is listed, the list must be placed
in parentheses.
@@ -7645,7 +7661,8 @@ list context is currently not possible this would serve no purpose.
C<state> variables are enabled only when the C<use feature "state"> pragma
is in effect, unless the keyword is written as C<CORE::state>.
-See also L<feature>.
+See also L<feature>. Alternately, include a C<use v5.10> or later to the
+current scope.
=item study SCALAR
X<study>
@@ -8602,15 +8619,19 @@ This is often useful if you need to check the current Perl version before
C<use>ing library modules that won't work with older versions of Perl.
(We try not to do this more than we have to.)
-C<use VERSION> also enables all features available in the requested
+C<use VERSION> also lexically enables all features available in the requested
version as defined by the C<feature> pragma, disabling any features
not in the requested version's feature bundle. See L<feature>.
Similarly, if the specified Perl version is greater than or equal to
5.12.0, strictures are enabled lexically as
with C<use strict>. Any explicit use of
C<use strict> or C<no strict> overrides C<use VERSION>, even if it comes
-before it. In both cases, the F<feature.pm> and F<strict.pm> files are
-not actually loaded.
+before it. Later use of C<use VERSION>
+will override all behavior of a previous
+C<use VERSION>, possibly removing the C<strict> and C<feature> added by
+C<use VERSION>. C<use VERSION> does not
+load the F<feature.pm> or F<strict.pm>
+files.
The C<BEGIN> forces the C<require> and C<import> to happen at compile time. The
C<require> makes sure the module is loaded into memory if it hasn't been
@@ -9045,8 +9066,8 @@ and C<${^CHILD_ERROR_NATIVE}>.
Note that a return value of C<-1> could mean that child processes are
being automatically reaped, as described in L<perlipc>.
-If you use wait in your handler for $SIG{CHLD} it may accidentally for the
-child created by qx() or system(). See L<perlipc> for details.
+If you use C<wait> in your handler for $SIG{CHLD}, it may accidentally wait
+for the child created by qx() or system(). See L<perlipc> for details.
Portability issues: L<perlport/wait>.
@@ -9280,8 +9301,6 @@ This keyword is documented in L<perlsub/"Autoloading">.
=item else
-=item elseif
-
=item elsif
=item for
@@ -9298,6 +9317,15 @@ This keyword is documented in L<perlsub/"Autoloading">.
These flow-control keywords are documented in L<perlsyn/"Compound Statements">.
+=item elseif
+
+The "else if" keyword is spelled C<elsif> in Perl. There's no C<elif>
+or C<else if> either. It does parse C<elseif>, but only to warn you
+about not using it.
+
+See the documentation for flow-control keywords in L<perlsyn/"Compound
+Statements">.
+
=back
=over
diff --git a/gnu/usr.bin/perl/pod/perlguts.pod b/gnu/usr.bin/perl/pod/perlguts.pod
index 90ab2041bc7..d845010e7b2 100644
--- a/gnu/usr.bin/perl/pod/perlguts.pod
+++ b/gnu/usr.bin/perl/pod/perlguts.pod
@@ -1766,7 +1766,7 @@ A scratchpad keeps SVs which are lexicals for the current unit and are
targets for opcodes. A previous version of this document
stated that one can deduce that an SV lives on a scratchpad
by looking on its flags: lexicals have C<SVs_PADMY> set, and
-I<target>s have C<SVs_PADTMP> set. But this have never been fully true.
+I<target>s have C<SVs_PADTMP> set. But this has never been fully true.
C<SVs_PADMY> could be set on a variable that no longer resides in any pad.
While I<target>s do have C<SVs_PADTMP> set, it can also be set on variables
that have never resided in a pad, but nonetheless act like I<target>s.
diff --git a/gnu/usr.bin/perl/pod/perlhist.pod b/gnu/usr.bin/perl/pod/perlhist.pod
index 2cf9c58ff0e..7afc2fc4d3e 100644
--- a/gnu/usr.bin/perl/pod/perlhist.pod
+++ b/gnu/usr.bin/perl/pod/perlhist.pod
@@ -515,6 +515,10 @@ the strings?).
Ricardo 5.18.1-RC3 2013-Aug-08
Ricardo 5.18.1 2013-Aug-12
Ricardo 5.18.2 2014-Jan-06
+ Ricardo 5.18.3-RC1 2014-Sep-17
+ Ricardo 5.18.3-RC2 2014-Sep-27
+ Ricardo 5.18.3 2014-Oct-01
+ Ricardo 5.18.4 2014-Oct-01
Ricardo 5.19.0 2013-May-20 The 5.19 development track
David G 5.19.1 2013-Jun-21
@@ -534,11 +538,18 @@ the strings?).
Steve 5.20.1-RC1 2014-Aug-25
Steve 5.20.1-RC2 2014-Sep-07
Steve 5.20.1 2014-Sep-14
+ Steve 5.20.2-RC1 2015-Jan-31
+ Steve 5.20.2 2015-Feb-14
Ricardo 5.21.0 2014-May-27 The 5.21 development track
Matthew H 5.21.1 2014-Jun-20
Abigail 5.21.2 2014-Jul-20
Peter 5.21.3 2014-Aug-20
+ Steve 5.21.4 2014-Sep-20
+ Abigail 5.21.5 2014-Oct-20
+ BinGOs 5.21.6 2014-Nov-20
+ Max M 5.21.7 2014-Dec-20
+ Matthew H 5.21.8 2015-Jan-20
=head2 SELECTED RELEASE SIZES
diff --git a/gnu/usr.bin/perl/pod/perlipc.pod b/gnu/usr.bin/perl/pod/perlipc.pod
index 0e00d18ad45..49c605b638e 100644
--- a/gnu/usr.bin/perl/pod/perlipc.pod
+++ b/gnu/usr.bin/perl/pod/perlipc.pod
@@ -28,7 +28,7 @@ For example, to trap an interrupt signal, set up a handler like this:
$shucks++;
die "Somebody sent me a SIG$signame";
}
- $SIG{INT} = __PACKAGE__ . "::catch_zap";
+ $SIG{INT} = __PACKAGE__ . "::catch_zap";
$SIG{INT} = \&catch_zap; # best strategy
Prior to Perl 5.8.0 it was necessary to do as little as you possibly
@@ -61,7 +61,7 @@ have to use POSIX' sigprocmask.
Sending a signal to a negative process ID means that you send the signal
to the entire Unix process group. This code sends a hang-up signal to all
-processes in the current process group, and also sets $SIG{HUP} to C<"IGNORE">
+processes in the current process group, and also sets $SIG{HUP} to C<"IGNORE">
so it doesn't kill itself:
# block scope for local
@@ -188,12 +188,15 @@ itself every time the C<SIGHUP> signal is received. The actual code is
located in the subroutine C<code()>, which just prints some debugging
info to show that it works; it should be replaced with the real code.
- #!/usr/bin/perl -w
+ #!/usr/bin/perl
+
+ use strict;
+ use warnings;
use POSIX ();
use FindBin ();
use File::Basename ();
- use File::Spec::Functions;
+ use File::Spec::Functions qw(catfile);
$| = 1;
@@ -214,9 +217,9 @@ info to show that it works; it should be replaced with the real code.
print "PID: $$\n";
print "ARGV: @ARGV\n";
my $count = 0;
- while (++$count) {
+ while (1) {
sleep 2;
- print "$count\n";
+ print ++$count, "\n";
}
}
@@ -263,7 +266,7 @@ to execute a new opcode, a signal that arrives during a long-running
opcode (e.g. a regular expression operation on a very large string) will
not be seen until the current opcode completes.
-If a signal of any given type fires multiple times during an opcode
+If a signal of any given type fires multiple times during an opcode
(such as from a fine-grained timer), the handler for that signal will
be called only once, after the opcode completes; all other
instances will be discarded. Furthermore, if your system's signal queue
@@ -327,12 +330,12 @@ On systems that supported it, older versions of Perl used the
SA_RESTART flag when installing %SIG handlers. This meant that
restartable system calls would continue rather than returning when
a signal arrived. In order to deliver deferred signals promptly,
-Perl 5.8.0 and later do I<not> use SA_RESTART. Consequently,
+Perl 5.8.0 and later do I<not> use SA_RESTART. Consequently,
restartable system calls can fail (with $! set to C<EINTR>) in places
where they previously would have succeeded.
The default C<:perlio> layer retries C<read>, C<write>
-and C<close> as described above; interrupted C<wait> and
+and C<close> as described above; interrupted C<wait> and
C<waitpid> calls will always be retried.
=item Signals as "faults"
@@ -469,7 +472,7 @@ to bogus commands will get hit with a signal, which they'd best be prepared
to handle. Consider:
open(FH, "|bogus") || die "can't fork: $!";
- print FH "bang\n"; # neither necessary nor sufficient
+ print FH "bang\n"; # neither necessary nor sufficient
# to check print retval!
close(FH) || die "can't close: $!";
@@ -529,7 +532,7 @@ process group leader; the setsid() will fail if you are. If your
system doesn't have the setsid() function, open F</dev/tty> and use the
C<TIOCNOTTY> ioctl() on it instead. See tty(4) for details.
-Non-Unix users should check their C<< I<Your_OS>::Process >> module for
+Non-Unix users should check their C<< I<Your_OS>::Process >> module for
other possible solutions.
=head2 Safe Pipe Opens
@@ -559,13 +562,13 @@ you opened whatever your kid writes to I<his> STDOUT.
}
} until defined $pid;
- if ($pid) { # I am the parent
+ if ($pid) { # I am the parent
print KID_TO_WRITE @some_data;
close(KID_TO_WRITE) || warn "kid exited $?";
} else { # I am the child
# drop permissions in setuid and/or setgid programs:
- ($EUID, $EGID) = ($UID, $GID);
- open (OUTFILE, "> $PRECIOUS")
+ ($EUID, $EGID) = ($UID, $GID);
+ open (OUTFILE, "> $PRECIOUS")
|| die "can't open $PRECIOUS: $!";
while (<STDIN>) {
print OUTFILE; # child's STDIN is parent's KID_TO_WRITE
@@ -617,7 +620,7 @@ And here's a safe pipe open for writing:
}
It is very easy to dead-lock a process using this form of open(), or
-indeed with any use of pipe() with multiple subprocesses. The
+indeed with any use of pipe() with multiple subprocesses. The
example above is "safe" because it is simple and calls exec(). See
L</"Avoiding Pipe Deadlocks"> for general safety principles, but there
are extra gotchas with Safe Pipe Opens.
@@ -696,7 +699,7 @@ So for example, instead of using:
One would use either of these:
- open(PS_PIPE, "-|", "ps", "aux")
+ open(PS_PIPE, "-|", "ps", "aux")
|| die "can't open ps pipe: $!";
@ps_args = qw[ ps aux ];
@@ -706,7 +709,7 @@ One would use either of these:
Because there are more than three arguments to open(), forks the ps(1)
command I<without> spawning a shell, and reads its standard output via the
C<PS_PIPE> filehandle. The corresponding syntax to I<write> to command
-pipes is to use C<"|-"> in place of C<"-|">.
+pipes is to use C<"|-"> in place of C<"-|">.
This was admittedly a rather silly example, because you're using string
literals whose content is perfectly safe. There is therefore no cause to
@@ -774,7 +777,7 @@ except on a Unix system, or at least one purporting POSIX compliance.
=for TODO
Hold on, is this even true? First it says that socketpair() is avoided
-for portability, but then it says it probably won't work except on
+for portability, but then it says it probably won't work except on
Unixy systems anyway. Which one of those is true?
Here's an example of using open2():
@@ -819,7 +822,7 @@ reopen the appropriate handles to STDIN and STDOUT and call other processes.
PARENT_WTR->autoflush(1);
if ($pid = fork()) {
- close PARENT_RDR;
+ close PARENT_RDR;
close PARENT_WTR;
print CHILD_WTR "Parent Pid $$ is sending this\n";
chomp($line = <CHILD_RDR>);
@@ -828,12 +831,12 @@ reopen the appropriate handles to STDIN and STDOUT and call other processes.
waitpid($pid, 0);
} else {
die "cannot fork: $!" unless defined $pid;
- close CHILD_RDR;
+ close CHILD_RDR;
close CHILD_WTR;
chomp($line = <PARENT_RDR>);
print "Child Pid $$ just read this: '$line'\n";
print PARENT_WTR "Child Pid $$ is sending this\n";
- close PARENT_RDR;
+ close PARENT_RDR;
close PARENT_WTR;
exit(0);
}
@@ -892,7 +895,7 @@ don't need to pass that information.
One of the major problems with ancient, antemillennial socket code in Perl
was that it used hard-coded values for some of the constants, which
severely hurt portability. If you ever see code that does anything like
-explicitly setting C<$AF_INET = 2>, you know you're in for big trouble.
+explicitly setting C<$AF_INET = 2>, you know you're in for big trouble.
An immeasurably superior approach is to use the C<Socket> module, which more
reliably grants access to the various constants and functions you'll need.
@@ -913,7 +916,7 @@ completely different. The standards specify writing "\015\012" to be
conformant (be strict in what you provide), but they also recommend
accepting a lone "\012" on input (be lenient in what you require).
We haven't always been very good about that in the code in this manpage,
-but unless you're on a Mac from way back in its pre-Unix dark ages, you'll
+but unless you're on a Mac from way back in its pre-Unix dark ages, you'll
probably be ok.
=head2 Internet TCP Clients and Servers
@@ -966,7 +969,7 @@ or firewall machine), fill this in with your real address instead.
my $proto = getprotobyname("tcp");
socket(Server, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
- setsockopt(Server, SOL_SOCKET, SO_REUSEADDR, pack("l", 1))
+ setsockopt(Server, SOL_SOCKET, SO_REUSEADDR, pack("l", 1))
|| die "setsockopt: $!";
bind(Server, sockaddr_in($port, INADDR_ANY)) || die "bind: $!";
listen(Server, SOMAXCONN) || die "listen: $!";
@@ -1010,7 +1013,7 @@ go back to service a new client.
my $proto = getprotobyname("tcp");
socket(Server, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
- setsockopt(Server, SOL_SOCKET, SO_REUSEADDR, pack("l", 1))
+ setsockopt(Server, SOL_SOCKET, SO_REUSEADDR, pack("l", 1))
|| die "setsockopt: $!";
bind(Server, sockaddr_in($port, INADDR_ANY)) || die "bind: $!";
listen(Server, SOMAXCONN) || die "listen: $!";
@@ -1066,7 +1069,7 @@ go back to service a new client.
unless (defined($pid = fork())) {
logmsg "cannot fork: $!";
return;
- }
+ }
elsif ($pid) {
logmsg "begat $pid";
return; # I'm the parent
@@ -1096,15 +1099,15 @@ to be reported. However, the introduction of safe signals (see
L</Deferred Signals (Safe Signals)> above) in Perl 5.8.0 means that
accept() might also be interrupted when the process receives a signal.
This typically happens when one of the forked subprocesses exits and
-notifies the parent process with a CHLD signal.
+notifies the parent process with a CHLD signal.
If accept() is interrupted by a signal, $! will be set to EINTR.
If this happens, we can safely continue to the next iteration of
the loop and another call to accept(). It is important that your
-signal handling code not modify the value of $!, or else this test
+signal handling code not modify the value of $!, or else this test
will likely fail. In the REAPER subroutine we create a local version
of $! before calling waitpid(). When waitpid() sets $! to ECHILD as
-it inevitably does when it has no more children waiting, it
+it inevitably does when it has no more children waiting, it
updates the local copy and leaves the original unchanged.
You should use the B<-T> flag to enable taint checking (see L<perlsec>)
@@ -1137,7 +1140,7 @@ differ from the system on which it's being run:
printf "%-24s ", $host;
my $hisiaddr = inet_aton($host) || die "unknown host";
my $hispaddr = sockaddr_in($port, $hisiaddr);
- socket(SOCKET, PF_INET, SOCK_STREAM, $proto)
+ socket(SOCKET, PF_INET, SOCK_STREAM, $proto)
|| die "socket: $!";
connect(SOCKET, $hispaddr) || die "connect: $!";
my $rtime = pack("C4", ());
@@ -1240,11 +1243,11 @@ to be on the localhost, and thus everything works right.
unless (defined($pid = fork())) {
logmsg "cannot fork: $!";
return;
- }
+ }
elsif ($pid) {
logmsg "begat $pid";
return; # I'm the parent
- }
+ }
else {
# I'm the child -- go spawn
}
@@ -1815,9 +1818,9 @@ The IO::Socket(3) manpage describes the object library, and the Socket(3)
manpage describes the low-level interface to sockets. Besides the obvious
functions in L<perlfunc>, you should also check out the F<modules> file at
your nearest CPAN site, especially
-L<http://www.cpan.org/modules/00modlist.long.html#ID5_Networking_>.
+L<http://www.cpan.org/modules/00modlist.long.html#ID5_Networking_>.
See L<perlmodlib> or best yet, the F<Perl FAQ> for a description
-of what CPAN is and where to get it if the previous link doesn't work
+of what CPAN is and where to get it if the previous link doesn't work
for you.
Section 5 of CPAN's F<modules> file is devoted to "Networking, Device
diff --git a/gnu/usr.bin/perl/pod/perllocale.pod b/gnu/usr.bin/perl/pod/perllocale.pod
index 1d7e4e42ead..40fc3e64054 100644
--- a/gnu/usr.bin/perl/pod/perllocale.pod
+++ b/gnu/usr.bin/perl/pod/perllocale.pod
@@ -373,6 +373,10 @@ C<POSIX::setlocale()> function:
# restore the old locale
setlocale(LC_CTYPE, $old_locale);
+This simultaneously affects all threads of the program, so it may be
+problematic to use locales in threaded applications except where there
+is a single locale applicable to all threads.
+
The first argument of C<setlocale()> gives the B<category>, the second the
B<locale>. The category tells in what aspect of data processing you
want to apply locale-specific rules. Category names are discussed in
@@ -539,7 +543,7 @@ alphabetically in your system is called).
You can test out changing these variables temporarily, and if the
new settings seem to help, put those settings into your shell startup
-files. Consult your local documentation for the exact details. For in
+files. Consult your local documentation for the exact details. For
Bourne-like shells (B<sh>, B<ksh>, B<bash>, B<zsh>):
LC_ALL=en_US.ISO8859-1
@@ -551,7 +555,7 @@ locale "En_US"--and in Cshish shells (B<csh>, B<tcsh>)
setenv LC_ALL en_US.ISO8859-1
-or if you have the "env" application you can do in any shell
+or if you have the "env" application you can do (in any shell)
env LC_ALL=en_US.ISO8859-1 perl ...
@@ -712,7 +716,7 @@ alphabets, but where do "E<aacute>" and "E<aring>" belong? And while
"color" follows "chocolate" in English, what about in traditional Spanish?
The following collations all make sense and you may meet any of them
-if you "use locale".
+if you C<"use locale">.
A B C D E a b c d e
A a B b C c D d E e
@@ -749,7 +753,7 @@ C<$equal_in_locale> will be true if the collation locale specifies a
dictionary-like ordering that ignores space characters completely and
which folds case.
-Perl only supports single-byte locales for C<LC_COLLATE>. This means
+Perl currently only supports single-byte locales for C<LC_COLLATE>. This means
that a UTF-8 locale likely will just give you machine-native ordering.
Use L<Unicode::Collate> for the full implementation of the Unicode
Collation Algorithm.
@@ -808,15 +812,16 @@ information on all these.)
The C<LC_CTYPE> locale also provides the map used in transliterating
characters between lower and uppercase. This affects the case-mapping
-functions--C<fc()>, C<lc()>, C<lcfirst()>, C<uc()>, and C<ucfirst()>; case-mapping
+functions--C<fc()>, C<lc()>, C<lcfirst()>, C<uc()>, and C<ucfirst()>;
+case-mapping
interpolation with C<\F>, C<\l>, C<\L>, C<\u>, or C<\U> in double-quoted
strings and C<s///> substitutions; and case-independent regular expression
pattern matching using the C<i> modifier.
Finally, C<LC_CTYPE> affects the (deprecated) POSIX character-class test
functions--C<POSIX::isalpha()>, C<POSIX::islower()>, and so on. For
-example, if you move from the "C" locale to a 7-bit Scandinavian one,
-you may find--possibly to your surprise--that "|" moves from the
+example, if you move from the "C" locale to a 7-bit ISO 646 one,
+you may find--possibly to your surprise--that C<"|"> moves from the
C<POSIX::ispunct()> class to C<POSIX::isalpha()>.
Unfortunately, this creates big problems for regular expressions. "|" still
means alternation even though it matches C<\w>.
@@ -824,7 +829,7 @@ means alternation even though it matches C<\w>.
Starting in v5.20, Perl supports UTF-8 locales for C<LC_CTYPE>, but
otherwise Perl only supports single-byte locales, such as the ISO 8859
series. This means that wide character locales, for example for Asian
-languages, are not supported. The UTF-8 locale support is actually a
+languages, are not well-supported. The UTF-8 locale support is actually a
superset of POSIX locales, because it is really full Unicode behavior
as if no locale were in effect at all (except for tainting; see
L</SECURITY>). POSIX locales, even UTF-8 ones,
@@ -837,7 +842,11 @@ For releases v5.16 and v5.18, C<S<use locale 'not_characters>> could be
used as a workaround for this (see L</Unicode and UTF-8>).
Note that there are quite a few things that are unaffected by the
-current locale. All the escape sequences for particular characters,
+current locale. Any literal character is the native character for the
+given platform. Hence 'A' means the character at code point 65 on ASCII
+platforms, and 193 on EBCDIC. That may or may not be an 'A' in the
+current locale, if that locale even has an 'A'.
+Similarly, all the escape sequences for particular characters,
C<\n> for example, always mean the platform's native one. This means,
for example, that C<\N> in regular expressions (every character
but new-line) works on the platform character set.
@@ -940,7 +949,7 @@ results. Here are a few possibilities:
Regular expression checks for safe file names or mail addresses using
C<\w> may be spoofed by an C<LC_CTYPE> locale that claims that
-characters such as "E<gt>" and "|" are alphanumeric.
+characters such as C<"E<gt>"> and C<"|"> are alphanumeric.
=item *
@@ -1397,9 +1406,10 @@ the characters in the upper half of the Latin-1 range (128 - 255)
properly under C<LC_CTYPE>. To see if a character is a particular type
under a locale, Perl uses the functions like C<isalnum()>. Your C
library may not work for UTF-8 locales with those functions, instead
-only working under the newer wide library functions like C<iswalnum()>.
-However, they are treated like single-byte locales, and will have the
-restrictions described below.
+only working under the newer wide library functions like C<iswalnum()>,
+which Perl does not use.
+These multi-byte locales are treated like single-byte locales, and will
+have the restrictions described below.
For single-byte locales,
Perl generally takes the tack to use locale rules on code points that can fit
@@ -1419,7 +1429,7 @@ Unicode, C<\p{Alpha}> will never match it, regardless of locale. A similar
issue occurs with C<\N{...}>. Prior to v5.20, It is therefore a bad
idea to use C<\p{}> or
C<\N{}> under plain C<use locale>--I<unless> you can guarantee that the
-locale will be a ISO8859-1. Use POSIX character classes instead.
+locale will be ISO8859-1. Use POSIX character classes instead.
Another problem with this approach is that operations that cross the
single byte/multiple byte boundary are not well-defined, and so are
@@ -1471,9 +1481,9 @@ byte, and Unicode rules for those that can't is not uniformly applied.
Pre-v5.12, it was somewhat haphazard; in v5.12 it was applied fairly
consistently to regular expression matching except for bracketed
character classes; in v5.14 it was extended to all regex matches; and in
-v5.16 to the casing operations such as C<"\L"> and C<uc()>. For
-collation, in all releases, the system's C<strxfrm()> function is called,
-and whatever it does is what you get.
+v5.16 to the casing operations such as C<\L> and C<uc()>. For
+collation, in all releases so far, the system's C<strxfrm()> function is
+called, and whatever it does is what you get.
=head1 BUGS
diff --git a/gnu/usr.bin/perl/pod/perlmod.pod b/gnu/usr.bin/perl/pod/perlmod.pod
index f708cc0de5b..0ed4bd91347 100644
--- a/gnu/usr.bin/perl/pod/perlmod.pod
+++ b/gnu/usr.bin/perl/pod/perlmod.pod
@@ -4,6 +4,27 @@ perlmod - Perl modules (packages and symbol tables)
=head1 DESCRIPTION
+=head2 Is this the document you were after?
+
+There are other documents which might contain the information that you're
+looking for:
+
+=over 2
+
+=item This doc
+
+Perl's packages, namespaces, and some info on classes.
+
+=item L<perlnewmod>
+
+Tutorial on making a new module.
+
+=item L<perlmodstyle>
+
+Best practices for making a new module.
+
+=back
+
=head2 Packages
X<package> X<namespace> X<variable, global> X<global variable> X<global>
diff --git a/gnu/usr.bin/perl/pod/perlmodinstall.pod b/gnu/usr.bin/perl/pod/perlmodinstall.pod
index 9a2634e9ab3..f92620c6d61 100644
--- a/gnu/usr.bin/perl/pod/perlmodinstall.pod
+++ b/gnu/usr.bin/perl/pod/perlmodinstall.pod
@@ -79,11 +79,11 @@ You can get gzip from ftp://prep.ai.mit.edu/pub/gnu/
Or, you can combine this step with the next to save disk space:
- gzip -dc yourmodule.tar.gz | tar -xf -
+ gzip -dc yourmodule.tar.gz | tar -xof -
B. UNPACK
-Unpack the result with C<tar -xf yourmodule.tar>
+Unpack the result with C<tar -xof yourmodule.tar>
C. BUILD
diff --git a/gnu/usr.bin/perl/pod/perlop.pod b/gnu/usr.bin/perl/pod/perlop.pod
index 4bcdcbf52f0..56d463a332b 100644
--- a/gnu/usr.bin/perl/pod/perlop.pod
+++ b/gnu/usr.bin/perl/pod/perlop.pod
@@ -6,15 +6,15 @@ perlop - Perl operators and precedence
=head1 DESCRIPTION
In Perl, the operator determines what operation is performed,
-independent of the type of the operands. For example C<$a + $b>
-is always a numeric addition, and if C<$a> or C<$b> do not contain
+independent of the type of the operands. For example C<$x + $y>
+is always a numeric addition, and if C<$x> or C<$y> do not contain
numbers, an attempt is made to convert them to numbers first.
This is in contrast to many other dynamic languages, where the
-operation is determined by the type of the first argument. It also
+operation is determined by the type of the first argument. It also
means that Perl has two versions of some operators, one for numeric
-and one for string comparison. For example C<$a == $b> compares
-two numbers for equality, and C<$a eq $b> compares two strings.
+and one for string comparison. For example C<$x == $y> compares
+two numbers for equality, and C<$x eq $y> compares two strings.
There are a few exceptions though: C<x> can be either string
repetition or list repetition, depending on the type of the left
@@ -170,8 +170,8 @@ value.
print ++$j; # prints 1
Note that just as in C, Perl doesn't define B<when> the variable is
-incremented or decremented. You just know it will be done sometime
-before or after the value is returned. This also means that modifying
+incremented or decremented. You just know it will be done sometime
+before or after the value is returned. This also means that modifying
a variable twice in the same statement will lead to undefined behavior.
Avoid statements like:
@@ -203,7 +203,7 @@ The auto-decrement operator is not magical.
X<**> X<exponentiation> X<power>
Binary "**" is the exponentiation operator. It binds even more
-tightly than unary minus, so -2**4 is -(2**4), not (-2)**4. (This is
+tightly than unary minus, so -2**4 is -(2**4), not (-2)**4. (This is
implemented using C's pow(3) function, which actually works on doubles
internally.)
@@ -222,7 +222,7 @@ with a plus or minus, a string starting with the opposite sign is
returned. One effect of these rules is that -bareword is equivalent
to the string "-bareword". If, however, the string begins with a
non-alphabetic character (excluding "+" or "-"), Perl will attempt to convert
-the string to a numeric and the arithmetic negation is performed. If the
+the string to a numeric and the arithmetic negation is performed. If the
string cannot be cleanly converted to a numeric, Perl will give the warning
B<Argument "the string" isn't numeric in negation (-) at ...>.
X<-> X<negation, arithmetic>
@@ -271,7 +271,8 @@ examples using these operators.
If the right argument is an expression rather than a search pattern,
substitution, or transliteration, it is interpreted as a search pattern at run
-time. Note that this means that its contents will be interpolated twice, so
+time. Note that this means that its
+contents will be interpolated twice, so
'\\' =~ q'\\';
@@ -296,21 +297,21 @@ X</> X<slash>
Binary "%" is the modulo operator, which computes the division
remainder of its first argument with respect to its second argument.
Given integer
-operands C<$a> and C<$b>: If C<$b> is positive, then C<$a % $b> is
-C<$a> minus the largest multiple of C<$b> less than or equal to
-C<$a>. If C<$b> is negative, then C<$a % $b> is C<$a> minus the
-smallest multiple of C<$b> that is not less than C<$a> (that is, the
+operands C<$m> and C<$n>: If C<$n> is positive, then C<$m % $n> is
+C<$m> minus the largest multiple of C<$n> less than or equal to
+C<$m>. If C<$n> is negative, then C<$m % $n> is C<$m> minus the
+smallest multiple of C<$n> that is not less than C<$m> (that is, the
result will be less than or equal to zero). If the operands
-C<$a> and C<$b> are floating point values and the absolute value of
-C<$b> (that is C<abs($b)>) is less than C<(UV_MAX + 1)>, only
-the integer portion of C<$a> and C<$b> will be used in the operation
+C<$m> and C<$n> are floating point values and the absolute value of
+C<$n> (that is C<abs($n)>) is less than C<(UV_MAX + 1)>, only
+the integer portion of C<$m> and C<$n> will be used in the operation
(Note: here C<UV_MAX> means the maximum of the unsigned integer type).
-If the absolute value of the right operand (C<abs($b)>) is greater than
+If the absolute value of the right operand (C<abs($n)>) is greater than
or equal to C<(UV_MAX + 1)>, "%" computes the floating-point remainder
-C<$r> in the equation C<($r = $a - $i*$b)> where C<$i> is a certain
+C<$r> in the equation C<($r = $m - $i*$n)> where C<$i> is a certain
integer that makes C<$r> have the same sign as the right operand
-C<$b> (B<not> as the left operand C<$a> like C function C<fmod()>)
-and the absolute value less than that of C<$b>.
+C<$n> (B<not> as the left operand C<$m> like C function C<fmod()>)
+and the absolute value less than that of C<$n>.
Note that when C<use integer> is in scope, "%" gives you direct access
to the modulo operator as implemented by your C compiler. This
operator is not as well defined for negative operands, but it will
@@ -475,15 +476,15 @@ Binary "<=>" returns -1, 0, or 1 depending on whether the left
argument is numerically less than, equal to, or greater than the right
argument. If your platform supports NaNs (not-a-numbers) as numeric
values, using them with "<=>" returns undef. NaN is not "<", "==", ">",
-"<=" or ">=" anything (even NaN), so those 5 return false. NaN != NaN
-returns true, as does NaN != anything else. If your platform doesn't
+"<=" or ">=" anything (even NaN), so those 5 return false. NaN != NaN
+returns true, as does NaN != anything else. If your platform doesn't
support NaNs then NaN is just a string with numeric value 0.
X<< <=> >> X<spaceship>
- $ perl -le '$a = "NaN"; print "No NaN support here" if $a == $a'
- $ perl -le '$a = "NaN"; print "NaN support here" if $a != $a'
+ $ perl -le '$x = "NaN"; print "No NaN support here" if $x == $x'
+ $ perl -le '$x = "NaN"; print "NaN support here" if $x != $x'
-(Note that the L<bigint>, L<bigrat>, and L<bignum> pragmas all
+(Note that the L<bigint>, L<bigrat>, and L<bignum> pragmas all
support "NaN".)
Binary "eq" returns true if the left argument is stringwise equal to
@@ -724,7 +725,7 @@ That because the corresponding position in C<@a> contains an array that
(eventually) has a 4 in it.
Smartmatching one hash against another reports whether both contain the
-same keys, no more and no less. This could be used to see whether two
+same keys, no more and no less. This could be used to see whether two
records have the same field names, without caring what values those fields
might have. For example:
@@ -762,8 +763,8 @@ C<when> clause. See the section on "Switch Statements" in L<perlsyn>.
To avoid relying on an object's underlying representation, if the
smartmatch's right operand is an object that doesn't overload C<~~>,
it raises the exception "C<Smartmatching a non-overloaded object
-breaks encapsulation>". That's because one has no business digging
-around to see whether something is "in" an object. These are all
+breaks encapsulation>". That's because one has no business digging
+around to see whether something is "in" an object. These are all
illegal on objects without a C<~~> overload:
%hash ~~ $object
@@ -771,7 +772,8 @@ illegal on objects without a C<~~> overload:
"fred" ~~ $object
However, you can change the way an object is smartmatched by overloading
-the C<~~> operator. This is allowed to extend the usual smartmatch semantics.
+the C<~~> operator. This is allowed to
+extend the usual smartmatch semantics.
For objects that do have an C<~~> overload, see L<overload>.
Using an object as the left operand is allowed, although not very useful.
@@ -857,16 +859,17 @@ Although it has no direct equivalent in C, Perl's C<//> operator is related
to its C-style or. In fact, it's exactly the same as C<||>, except that it
tests the left hand side's definedness instead of its truth. Thus,
C<< EXPR1 // EXPR2 >> returns the value of C<< EXPR1 >> if it's defined,
-otherwise, the value of C<< EXPR2 >> is returned. (C<< EXPR1 >> is evaluated
-in scalar context, C<< EXPR2 >> in the context of C<< // >> itself). Usually,
+otherwise, the value of C<< EXPR2 >> is returned.
+(C<< EXPR1 >> is evaluated in scalar context, C<< EXPR2 >>
+in the context of C<< // >> itself). Usually,
this is the same result as C<< defined(EXPR1) ? EXPR1 : EXPR2 >> (except that
the ternary-operator form can be used as a lvalue, while C<< EXPR1 // EXPR2 >>
-cannot). This is very useful for
+cannot). This is very useful for
providing default values for variables. If you actually want to test if
-at least one of C<$a> and C<$b> is defined, use C<defined($a // $b)>.
+at least one of C<$x> and C<$y> is defined, use C<defined($x // $y)>.
The C<||>, C<//> and C<&&> operators return the last value evaluated
-(unlike C's C<||> and C<&&>, which return 0 or 1). Thus, a reasonably
+(unlike C's C<||> and C<&&>, which return 0 or 1). Thus, a reasonably
portable way to find out the home directory might be:
$home = $ENV{HOME}
@@ -912,7 +915,7 @@ operators depending on the context. In list context, it returns a
list of values counting (up by ones) from the left value to the right
value. If the left value is greater than the right value then it
returns the empty list. The range operator is useful for writing
-C<foreach (1..10)> loops and for doing slice operations on arrays. In
+C<foreach (1..10)> loops and for doing slice operations on arrays. In
the current implementation, no temporary array is created when the
range operator is used as the expression in C<foreach> loops, but older
versions of Perl might burn a lot of memory when you write something
@@ -927,15 +930,15 @@ auto-increment, see below.
In scalar context, ".." returns a boolean value. The operator is
bistable, like a flip-flop, and emulates the line-range (comma)
-operator of B<sed>, B<awk>, and various editors. Each ".." operator
+operator of B<sed>, B<awk>, and various editors. Each ".." operator
maintains its own boolean state, even across calls to a subroutine
-that contains it. It is false as long as its left operand is false.
+that contains it. It is false as long as its left operand is false.
Once the left operand is true, the range operator stays true until the
right operand is true, I<AFTER> which the range operator becomes false
again. It doesn't become false till the next time the range operator
is evaluated. It can test the right operand and become false on the
same evaluation it became true (as in B<awk>), but it still returns
-true once. If you don't want it to test the right operand until the
+true once. If you don't want it to test the right operand until the
next evaluation, as in B<sed>, just use three dots ("...") instead of
two. In all other regards, "..." behaves just like ".." does.
@@ -1003,7 +1006,7 @@ the two range operators:
}
}
-This program will print only the line containing "Bar". If
+This program will print only the line containing "Bar". If
the range operator is changed to C<...>, it will also print the
"Baz" line.
@@ -1076,31 +1079,31 @@ is returned. For example:
Scalar or list context propagates downward into the 2nd
or 3rd argument, whichever is selected.
- $a = $ok ? $b : $c; # get a scalar
- @a = $ok ? @b : @c; # get an array
- $a = $ok ? @b : @c; # oops, that's just a count!
+ $x = $ok ? $y : $z; # get a scalar
+ @x = $ok ? @y : @z; # get an array
+ $x = $ok ? @y : @z; # oops, that's just a count!
The operator may be assigned to if both the 2nd and 3rd arguments are
legal lvalues (meaning that you can assign to them):
- ($a_or_b ? $a : $b) = $c;
+ ($x_or_y ? $x : $y) = $z;
Because this operator produces an assignable result, using assignments
without parentheses will get you in trouble. For example, this:
- $a % 2 ? $a += 10 : $a += 2
+ $x % 2 ? $x += 10 : $x += 2
Really means this:
- (($a % 2) ? ($a += 10) : $a) += 2
+ (($x % 2) ? ($x += 10) : $x) += 2
Rather than this:
- ($a % 2) ? ($a += 10) : ($a += 2)
+ ($x % 2) ? ($x += 10) : ($x += 2)
That should probably be written more simply as:
- $a += ($a % 2) ? 10 : 2;
+ $x += ($x % 2) ? 10 : 2;
=head2 Assignment Operators
X<assignment> X<operator, assignment> X<=> X<**=> X<+=> X<*=> X<&=>
@@ -1111,11 +1114,11 @@ X<%=> X<^=> X<x=>
Assignment operators work as in C. That is,
- $a += 2;
+ $x += 2;
is equivalent to
- $a = $a + 2;
+ $x = $x + 2;
although without duplicating any side effects that dereferencing the lvalue
might trigger, such as from tie(). Other assignment operators work similarly.
@@ -1143,12 +1146,12 @@ Although as of 5.14, that can be also be accomplished this way:
Likewise,
- ($a += 2) *= 3;
+ ($x += 2) *= 3;
is equivalent to
- $a += 2;
- $a *= 3;
+ $x += 2;
+ $x *= 3;
Similarly, a list assignment in list context produces the list of
lvalues assigned to, and a list assignment in scalar context returns
@@ -1170,7 +1173,7 @@ The C<< => >> operator is a synonym for the comma except that it causes a
word on its left to be interpreted as a string if it begins with a letter
or underscore and is composed only of letters, digits and underscores.
This includes operands that might otherwise be interpreted as operators,
-constants, single number v-strings or function calls. If in doubt about
+constants, single number v-strings or function calls. If in doubt about
this behavior, the left operand can be quoted explicitly.
Otherwise, the C<< => >> operator behaves exactly as the comma operator
@@ -1257,9 +1260,9 @@ only if the left expression is false. Due to its precedence, you must
be careful to avoid using it as replacement for the C<||> operator.
It usually works out better for flow control than in assignments:
- $a = $b or $c; # bug: this is wrong
- ($a = $b) or $c; # really means this
- $a = $b || $c; # better written this way
+ $x = $y or $z; # bug: this is wrong
+ ($x = $y) or $z; # really means this
+ $x = $y || $z; # better written this way
However, when it's a list-context assignment and you're trying to use
C<||> for control flow, you probably need "or" so that the assignment
@@ -1289,7 +1292,7 @@ Address-of operator. (But see the "\" operator for taking a reference.)
=item unary *
-Dereference-address operator. (Perl's prefix dereferencing
+Dereference-address operator. (Perl's prefix dereferencing
operators are typed: $, @, %, and &.)
=item (TYPE)
@@ -1336,9 +1339,9 @@ is the same as
Note, however, that this does not always work for quoting Perl code:
- $s = q{ if($a eq "}") ... }; # WRONG
+ $s = q{ if($x eq "}") ... }; # WRONG
-is a syntax error. The C<Text::Balanced> module (standard as of v5.8,
+is a syntax error. The C<Text::Balanced> module (standard as of v5.8,
and from CPAN before then) is able to do this properly.
There can be whitespace between the operator and the quoting
@@ -1378,7 +1381,7 @@ X<\o{}>
The result is the character specified by the hexadecimal number between
the braces. See L</[8]> below for details on which character.
-Only hexadecimal digits are valid between the braces. If an invalid
+Only hexadecimal digits are valid between the braces. If an invalid
character is encountered, a warning will be issued and the invalid
character and all subsequent characters (valid or invalid) within the
braces will be discarded.
@@ -1568,7 +1571,7 @@ and although they often accept just C<"\012">, they seldom tolerate just
C<"\015">. If you get in the habit of using C<"\n"> for networking,
you may be burned some day.
X<newline> X<line terminator> X<eol> X<end of line>
-X<\r>
+X<\n> X<\r> X<\r\n>
For constructs that do interpolate, variables beginning with "C<$>"
or "C<@>" are interpolated. Subscripted variables such as C<$a[3]> or
@@ -1592,8 +1595,8 @@ is equivalent to
For the pattern of regex operators (C<qr//>, C<m//> and C<s///>),
the quoting from C<\Q> is applied after interpolation is processed,
-but before escapes are processed. This allows the pattern to match
-literally (except for C<$> and C<@>). For example, the following matches:
+but before escapes are processed. This allows the pattern to match
+literally (except for C<$> and C<@>). For example, the following matches:
'\s\t' =~ /\Q\s\t/
@@ -1627,8 +1630,8 @@ This operator quotes (and possibly compiles) its I<STRING> as a regular
expression. I<STRING> is interpolated the same way as I<PATTERN>
in C<m/PATTERN/>. If "'" is used as the delimiter, no interpolation
is done. Returns a Perl value which may be used instead of the
-corresponding C</STRING/msixpodual> expression. The returned value is a
-normalized version of the original pattern. It magically differs from
+corresponding C</STRING/msixpodual> expression. The returned value is a
+normalized version of the original pattern. It magically differs from
a string containing the same characters: C<ref(qr/x/)> returns "Regexp";
however, dereferencing it is not well defined (you currently get the
normalized version of the original pattern, but this may change).
@@ -1732,7 +1735,7 @@ you can use any pair of non-whitespace (ASCII) characters
as delimiters. This is particularly useful for matching path names
that contain "/", to avoid LTS (leaning toothpick syndrome). If "?" is
the delimiter, then a match-only-once rule applies,
-described in C<m?PATTERN?> below. If "'" (single quote) is the delimiter,
+described in C<m?PATTERN?> below. If "'" (single quote) is the delimiter,
no interpolation is performed on the PATTERN.
When using a character valid in an identifier, whitespace is required
after the C<m>.
@@ -1785,16 +1788,16 @@ The bottom line is that using C</o> is almost never a good idea.
=item The empty pattern //
If the PATTERN evaluates to the empty string, the last
-I<successfully> matched regular expression is used instead. In this
+I<successfully> matched regular expression is used instead. In this
case, only the C<g> and C<c> flags on the empty pattern are honored;
-the other flags are taken from the original pattern. If no match has
+the other flags are taken from the original pattern. If no match has
previously succeeded, this will (silently) act instead as a genuine
empty pattern (which will always match).
Note that it's possible to confuse Perl into thinking C<//> (the empty
regex) is really C<//> (the defined-or operator). Perl is usually pretty
good about this, but some pathological cases might trigger this, such as
-C<$a///> (is that C<($a) / (//)> or C<$a // />?) and C<print $fh //>
+C<$x///> (is that C<($x) / (//)> or C<$x // />?) and C<print $fh //>
(C<print $fh(//> or C<print($fh //>?). In all of these examples, Perl
will assume you meant defined-or. If you meant the empty regex, just
use parentheses or spaces to disambiguate, or even prefix the empty
@@ -1834,29 +1837,29 @@ $Etc. The conditional is true if any variables were assigned; that is,
if the pattern matched.
The C</g> modifier specifies global pattern matching--that is,
-matching as many times as possible within the string. How it behaves
-depends on the context. In list context, it returns a list of the
+matching as many times as possible within the string. How it behaves
+depends on the context. In list context, it returns a list of the
substrings matched by any capturing parentheses in the regular
-expression. If there are no parentheses, it returns a list of all
+expression. If there are no parentheses, it returns a list of all
the matched strings, as if there were parentheses around the whole
pattern.
In scalar context, each execution of C<m//g> finds the next match,
returning true if it matches, and false if there is no further match.
The position after the last match can be read or set using the C<pos()>
-function; see L<perlfunc/pos>. A failed match normally resets the
+function; see L<perlfunc/pos>. A failed match normally resets the
search position to the beginning of the string, but you can avoid that
-by adding the C</c> modifier (for example, C<m//gc>). Modifying the target
+by adding the C</c> modifier (for example, C<m//gc>). Modifying the target
string also resets the search position.
=item \G assertion
You can intermix C<m//g> matches with C<m/\G.../g>, where C<\G> is a
zero-width assertion that matches the exact position where the
-previous C<m//g>, if any, left off. Without the C</g> modifier, the
+previous C<m//g>, if any, left off. Without the C</g> modifier, the
C<\G> assertion still anchors at C<pos()> as it was at the start of
the operation (see L<perlfunc/pos>), but the match is of course only
-attempted once. Using C<\G> without C</g> on a target string that has
+attempted once. Using C<\G> without C</g> on a target string that has
not previously had a C</g> match applied to it is the same as using
the C<\A> assertion to match the beginning of the string. Note also
that, currently, C<\G> is only properly supported when anchored at the
@@ -1927,8 +1930,8 @@ The last example should print:
Final: 'q', pos=8
Notice that the final match matched C<q> instead of C<p>, which a match
-without the C<\G> anchor would have done. Also note that the final match
-did not update C<pos>. C<pos> is only updated on a C</g> match. If the
+without the C<\G> anchor would have done. Also note that the final match
+did not update C<pos>. C<pos> is only updated on a C</g> match. If the
final match did indeed match C<p>, it's a good bet that you're running a
very old (pre-5.6.0) version of Perl.
@@ -2045,7 +2048,7 @@ its own pair of quotes, which may or may not be bracketing quotes, for example,
C<s(foo)(bar)> or C<< s<foo>/bar/ >>. A C</e> will cause the
replacement portion to be treated as a full-fledged Perl expression
and evaluated right then and there. It is, however, syntax checked at
-compile-time. A second C<e> modifier will cause the replacement portion
+compile-time. A second C<e> modifier will cause the replacement portion
to be C<eval>ed before being run as a Perl expression.
Examples:
@@ -2079,7 +2082,7 @@ Examples:
s/^=(\w+)/pod($1)/ge; # use function call
$_ = 'abc123xyz';
- $a = s/abc/def/r; # $a is 'def123xyz' and
+ $x = s/abc/def/r; # $x is 'def123xyz' and
# $_ remains 'abc123xyz'.
# expand variables in $_, but dynamics only, using
@@ -2336,7 +2339,7 @@ is complemented. If the C</d> modifier is specified, any characters
specified by SEARCHLIST not found in REPLACEMENTLIST are deleted.
(Note that this is slightly more flexible than the behavior of some
B<tr> programs, which delete anything they find in the SEARCHLIST,
-period.) If the C</s> modifier is specified, sequences of characters
+period.) If the C</s> modifier is specified, sequences of characters
that were transliterated to the same character are squashed down
to a single instance of the character.
@@ -2428,7 +2431,7 @@ the same rules as normal double quoted strings.
=item Single Quotes
Single quotes indicate the text is to be treated literally with no
-interpolation of its content. This is similar to single quoted
+interpolation of its content. This is similar to single quoted
strings except that backslashes have no special meaning, with C<\\>
being treated as two backslashes and not one as they would in every
other quoting construct.
@@ -2451,7 +2454,7 @@ can and do make good use of.
=item Backticks
The content of the here doc is treated just as it would be if the
-string were embedded in backticks. Thus the content is interpolated
+string were embedded in backticks. Thus the content is interpolated
as though it were double quoted and then executed via the shell, with
the results of the execution returned.
@@ -2521,7 +2524,7 @@ you would have to write
outside of string evals.
Additionally, quoting rules for the end-of-string identifier are
-unrelated to Perl's quoting rules. C<q()>, C<qq()>, and the like are not
+unrelated to Perl's quoting rules. C<q()>, C<qq()>, and the like are not
supported in place of C<''> and C<"">, and the only interpolation is for
backslashing the quoting character:
@@ -2569,24 +2572,24 @@ one to four, but these passes are always performed in the same order.
The first pass is finding the end of the quoted construct, where
the information about the delimiters is used in parsing.
During this search, text between the starting and ending delimiters
-is copied to a safe location. The text copied gets delimiter-independent.
+is copied to a safe location. The text copied gets delimiter-independent.
If the construct is a here-doc, the ending delimiter is a line
-that has a terminating string as the content. Therefore C<<<EOF> is
+that has a terminating string as the content. Therefore C<<<EOF> is
terminated by C<EOF> immediately followed by C<"\n"> and starting
from the first column of the terminating line.
When searching for the terminating line of a here-doc, nothing
-is skipped. In other words, lines after the here-doc syntax
+is skipped. In other words, lines after the here-doc syntax
are compared with the terminating string line by line.
For the constructs except here-docs, single characters are used as starting
-and ending delimiters. If the starting delimiter is an opening punctuation
+and ending delimiters. If the starting delimiter is an opening punctuation
(that is C<(>, C<[>, C<{>, or C<< < >>), the ending delimiter is the
corresponding closing punctuation (that is C<)>, C<]>, C<}>, or C<< > >>).
If the starting delimiter is an unpaired character like C</> or a closing
punctuation, the ending delimiter is same as the starting delimiter.
Therefore a C</> terminates a C<qq//> construct, while a C<]> terminates
-C<qq[]> and C<qq]]> constructs.
+both C<qq[]> and C<qq]]> constructs.
When searching for single-character delimiters, escaped delimiters
and C<\\> are skipped. For example, while searching for terminating C</>,
@@ -2602,13 +2605,14 @@ safe location).
For constructs with three-part delimiters (C<s///>, C<y///>, and
C<tr///>), the search is repeated once more.
-If the first delimiter is not an opening punctuation, three delimiters must
-be same such as C<s!!!> and C<tr)))>, in which case the second delimiter
+If the first delimiter is not an opening punctuation, the three delimiters must
+be the same, such as C<s!!!> and C<tr)))>,
+in which case the second delimiter
terminates the left part and starts the right part at once.
If the left part is delimited by bracketing punctuation (that is C<()>,
C<[]>, C<{}>, or C<< <> >>), the right part needs another pair of
delimiters such as C<s(){}> and C<tr[]//>. In these cases, whitespace
-and comments are allowed between both parts, though the comment must follow
+and comments are allowed between the two parts, though the comment must follow
at least one whitespace character; otherwise a character expected as the
start of the comment may be regarded as the starting delimiter of the right part.
@@ -2630,7 +2634,7 @@ the example above is not C<m//x>, but rather C<m//> with no C</x>
modifier. So the embedded C<#> is interpreted as a literal C<#>.
Also no attention is paid to C<\c\> (multichar control char syntax) during
-this search. Thus the second C<\> in C<qq/\c\/> is interpreted as a part
+this search. Thus the second C<\> in C<qq/\c\/> is interpreted as a part
of C<\/>, and the following C</> is not recognized as a delimiter.
Instead, use C<\034> or C<\x1c> at the end of quoted constructs.
@@ -2707,13 +2711,13 @@ scalar.
Note also that the interpolation code needs to make a decision on
where the interpolated scalar ends. For instance, whether
-C<< "a $b -> {c}" >> really means:
+C<< "a $x -> {c}" >> really means:
- "a " . $b . " -> {c}";
+ "a " . $x . " -> {c}";
or:
- "a " . $b -> {c};
+ "a " . $x -> {c};
Most of the time, the longest possible text that does not include
spaces between components and which contains matching braces or
@@ -2959,7 +2963,7 @@ is equivalent to the following Perl-like pseudo code:
except that it isn't so cumbersome to say, and will actually work.
It really does shift the @ARGV array and put the current filename
into the $ARGV variable. It also uses filehandle I<ARGV>
-internally. <> is just a synonym for <ARGV>, which
+internally. <> is just a synonym for <ARGV>, which
is magical. (The pseudo code above doesn't work because it treats
<ARGV> as non-magical.)
@@ -3229,7 +3233,7 @@ X<number, arbitrary precision>
The standard C<Math::BigInt>, C<Math::BigRat>, and C<Math::BigFloat> modules,
along with the C<bignum>, C<bigint>, and C<bigrat> pragmas, provide
variable-precision arithmetic and overloaded operators, although
-they're currently pretty slow. At the cost of some space and
+they're currently pretty slow. At the cost of some space and
considerable speed, they avoid the normal pitfalls associated with
limited-precision representations.
@@ -3241,17 +3245,18 @@ limited-precision representations.
Or with rationals:
- use 5.010;
- use bigrat;
- $a = 3/22;
- $b = 4/6;
- say "a/b is ", $a/$b;
- say "a*b is ", $a*$b;
- a/b is 9/44
- a*b is 1/11
+ use 5.010;
+ use bigrat;
+ $x = 3/22;
+ $y = 4/6;
+ say "x/y is ", $x/$y;
+ say "x*y is ", $x*$y;
+ x/y is 9/44
+ x*y is 1/11
Several modules let you calculate with (bound only by memory and CPU time)
-unlimited or fixed precision. There are also some non-standard modules that
+unlimited or fixed precision. There
+are also some non-standard modules that
provide faster implementations via external C libraries.
Here is a short, but incomplete summary:
diff --git a/gnu/usr.bin/perl/pod/perlref.pod b/gnu/usr.bin/perl/pod/perlref.pod
index 6c5a7e12348..f57ed3d1e49 100644
--- a/gnu/usr.bin/perl/pod/perlref.pod
+++ b/gnu/usr.bin/perl/pod/perlref.pod
@@ -69,7 +69,7 @@ References can be created in several ways.
X<\> X<backslash>
By using the backslash operator on a variable, subroutine, or value.
-(This works much like the & (address-of) operator in C.)
+(This works much like the & (address-of) operator in C.)
This typically creates I<another> reference to a variable, because
there's already a reference to the variable in the symbol table. But
the symbol table reference might go away, and you'll still have the
@@ -107,7 +107,7 @@ as using square brackets--instead it's the same as creating
a list of references!
@list = (\$a, \@b, \%c);
- @list = \($a, @b, %c); # same thing!
+ @list = \($a, @b, %c); # same thing!
As a special case, C<\(@foo)> returns a list of references to the contents
of C<@foo>, not a reference to C<@foo> itself. Likewise for C<%foo>,
@@ -122,8 +122,8 @@ A reference to an anonymous hash can be created using curly
brackets:
$hashref = {
- 'Adam' => 'Eve',
- 'Clyde' => 'Bonnie',
+ 'Adam' => 'Eve',
+ 'Clyde' => 'Bonnie',
};
Anonymous hash and array composers like these can be intermixed freely to
@@ -190,8 +190,8 @@ template without using eval(). Here's a small example of how
closures work:
sub newprint {
- my $x = shift;
- return sub { my $y = shift; print "$x, $y!\n"; };
+ my $x = shift;
+ return sub { my $y = shift; print "$x, $y!\n"; };
}
$h = newprint("Howdy");
$g = newprint("Greetings");
@@ -297,20 +297,20 @@ and directory handles, though.) However, if you assign the incoming
value to a scalar instead of a typeglob as we do in the examples
below, there's no risk of that happening.
- splutter(*STDOUT); # pass the whole glob
- splutter(*STDOUT{IO}); # pass both file and dir handles
+ splutter(*STDOUT); # pass the whole glob
+ splutter(*STDOUT{IO}); # pass both file and dir handles
sub splutter {
- my $fh = shift;
- print $fh "her um well a hmmm\n";
+ my $fh = shift;
+ print $fh "her um well a hmmm\n";
}
- $rec = get_rec(*STDIN); # pass the whole glob
+ $rec = get_rec(*STDIN); # pass the whole glob
$rec = get_rec(*STDIN{IO}); # pass both file and dir handles
sub get_rec {
- my $fh = shift;
- return scalar <$fh>;
+ my $fh = shift;
+ return scalar <$fh>;
}
=back
@@ -365,7 +365,7 @@ Admittedly, it's a little silly to use the curlies in this case, but
the BLOCK can contain any arbitrary expression, in particular,
subscripted expressions:
- &{ $dispatch{$index} }(1,2,3); # call correct routine
+ &{ $dispatch{$index} }(1,2,3); # call correct routine
Because of being able to omit the curlies for the simple case of C<$$x>,
people often make the mistake of viewing the dereferencing symbols as
@@ -374,10 +374,10 @@ though, you could use parentheses instead of braces. That's not the case.
Consider the difference below; case 0 is a short-hand version of case 1,
I<not> case 2:
- $$hashref{"KEY"} = "VALUE"; # CASE 0
- ${$hashref}{"KEY"} = "VALUE"; # CASE 1
- ${$hashref{"KEY"}} = "VALUE"; # CASE 2
- ${$hashref->{"KEY"}} = "VALUE"; # CASE 3
+ $$hashref{"KEY"} = "VALUE"; # CASE 0
+ ${$hashref}{"KEY"} = "VALUE"; # CASE 1
+ ${$hashref{"KEY"}} = "VALUE"; # CASE 2
+ ${$hashref->{"KEY"}} = "VALUE"; # CASE 3
Case 2 is also deceptive in that you're accessing a variable
called %hashref, not dereferencing through $hashref to the hash
@@ -440,7 +440,7 @@ numerically to see whether they refer to the same location.
X<reference, numeric context>
if ($ref1 == $ref2) { # cheap numeric compare of references
- print "refs 1 and 2 refer to the same thing\n";
+ print "refs 1 and 2 refer to the same thing\n";
}
Using a reference as a string produces both its referent's type,
@@ -543,14 +543,14 @@ value.
People frequently expect it to work like this. So it does.
$name = "foo";
- $$name = 1; # Sets $foo
- ${$name} = 2; # Sets $foo
- ${$name x 2} = 3; # Sets $foofoo
- $name->[0] = 4; # Sets $foo[0]
- @$name = (); # Clears @foo
- &$name(); # Calls &foo()
+ $$name = 1; # Sets $foo
+ ${$name} = 2; # Sets $foo
+ ${$name x 2} = 3; # Sets $foofoo
+ $name->[0] = 4; # Sets $foo[0]
+ @$name = (); # Clears @foo
+ &$name(); # Calls &foo()
$pack = "THAT";
- ${"${pack}::$name"} = 5; # Sets $THAT::foo without eval
+ ${"${pack}::$name"} = 5; # Sets $THAT::foo without eval
This is powerful, and slightly dangerous, in that it's possible
to intend (with the utmost sincerity) to use a hard reference, and
@@ -571,8 +571,8 @@ a symbol table, and thus are invisible to this mechanism. For example:
local $value = 10;
$ref = "value";
{
- my $value = 20;
- print $$ref;
+ my $value = 20;
+ print $$ref;
}
This will still print 10, not 20. Remember that local() affects package
@@ -602,8 +602,8 @@ construct is I<not> considered to be a symbolic reference when you're
using strict refs:
use strict 'refs';
- ${ bareword }; # Okay, means $bareword.
- ${ "bareword" }; # Error, symbolic reference.
+ ${ bareword }; # Okay, means $bareword.
+ ${ "bareword" }; # Error, symbolic reference.
Similarly, because of all the subscripting that is done using single words,
the same rule applies to any bareword that is used for subscripting a hash.
@@ -655,13 +655,13 @@ that generated HTML font changes for the various colors:
The red() and green() functions would be similar. To create these,
we'll assign a closure to a typeglob of the name of the function we're
-trying to build.
+trying to build.
@colors = qw(red blue green yellow orange purple violet);
for my $name (@colors) {
- no strict 'refs'; # allow symbol table manipulation
+ no strict 'refs'; # allow symbol table manipulation
*$name = *{uc $name} = sub { "<FONT COLOR='$name'>@_</FONT>" };
- }
+ }
Now all those different functions appear to exist independently. You can
call red(), RED(), blue(), BLUE(), green(), etc. This technique saves on
@@ -699,7 +699,7 @@ operator, as they are created on the fly. If you are accustomed to using
nested subroutines in other programming languages with their own private
variables, you'll have to work at it a bit in Perl. The intuitive coding
of this type of thing incurs mysterious warnings about "will not stay
-shared" due to the reasons explained above.
+shared" due to the reasons explained above.
For example, this won't work:
sub outer {
diff --git a/gnu/usr.bin/perl/pod/perlsec.pod b/gnu/usr.bin/perl/pod/perlsec.pod
index b6474e6c966..75ce3fd99d9 100644
--- a/gnu/usr.bin/perl/pod/perlsec.pod
+++ b/gnu/usr.bin/perl/pod/perlsec.pod
@@ -28,9 +28,9 @@ Perl automatically enables a set of special security checks, called I<taint
mode>, when it detects its program running with differing real and effective
user or group IDs. The setuid bit in Unix permissions is mode 04000, the
setgid bit mode 02000; either or both may be set. You can also enable taint
-mode explicitly by using the B<-T> command line flag. This flag is
+mode explicitly by using the B<-T> command line flag. This flag is
I<strongly> suggested for server programs and any program run on behalf of
-someone else, such as a CGI script. Once taint mode is on, it's on for
+someone else, such as a CGI script. Once taint mode is on, it's on for
the remainder of your script.
While in this mode, Perl takes special precautions called I<taint
@@ -234,9 +234,9 @@ Unix-like environments that support #! and setuid or setgid scripts.)
When the taint mode (C<-T>) is in effect, the "." directory is removed
from C<@INC>, and the environment variables C<PERL5LIB> and C<PERLLIB>
-are ignored by Perl. You can still adjust C<@INC> from outside the
+are ignored by Perl. You can still adjust C<@INC> from outside the
program by using the C<-I> command line option as explained in
-L<perlrun>. The two environment variables are ignored because
+L<perlrun>. The two environment variables are ignored because
they are obscured, and a user running a program could be unaware that
they are set, whereas the C<-I> option is clearly visible and
therefore permitted.
@@ -247,7 +247,7 @@ the C<lib> pragma, e.g.:
perl -Mlib=/foo program
The benefit of using C<-Mlib=/foo> over C<-I/foo>, is that the former
-will automagically remove any duplicated directories, while the later
+will automagically remove any duplicated directories, while the latter
will not.
Note that if a tainted string is added to C<@INC>, the following
@@ -271,7 +271,7 @@ your PATH, it makes sure you set the PATH.
The PATH isn't the only environment variable which can cause problems.
Because some shells may use the variables IFS, CDPATH, ENV, and
BASH_ENV, Perl checks that those are either empty or untainted when
-starting subprocesses. You may wish to add something like this to your
+starting subprocesses. You may wish to add something like this to your
setid and taint-checking scripts.
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer
@@ -280,7 +280,8 @@ It's also possible to get into trouble with other operations that don't
care whether they use tainted values. Make judicious use of the file
tests in dealing with any user-supplied filenames. When possible, do
opens and such B<after> properly dropping any special user (or group!)
-privileges. Perl doesn't prevent you from opening tainted filenames for reading,
+privileges. Perl doesn't prevent you from
+opening tainted filenames for reading,
so be careful what you print out. The tainting mechanism is intended to
prevent stupid mistakes, not to remove the need for thought.
@@ -353,7 +354,7 @@ are trapped and namespace access is carefully controlled. Safe should
not be considered bullet-proof, though: it will not prevent the foreign
code to set up infinite loops, allocate gigabytes of memory, or even
abusing perl bugs to make the host interpreter crash or behave in
-unpredictable ways. In any case it's better avoided completely if you're
+unpredictable ways. In any case it's better avoided completely if you're
really concerned about security.
=head2 Security Bugs
@@ -458,17 +459,17 @@ I<Denial of Service> (DoS) attacks.
Hash Algorithm - Hash algorithms like the one used in Perl are well
known to be vulnerable to collision attacks on their hash function.
Such attacks involve constructing a set of keys which collide into
-the same bucket producing inefficient behavior. Such attacks often
+the same bucket producing inefficient behavior. Such attacks often
depend on discovering the seed of the hash function used to map the
-keys to buckets. That seed is then used to brute-force a key set which
-can be used to mount a denial of service attack. In Perl 5.8.1 changes
+keys to buckets. That seed is then used to brute-force a key set which
+can be used to mount a denial of service attack. In Perl 5.8.1 changes
were introduced to harden Perl to such attacks, and then later in
Perl 5.18.0 these features were enhanced and additional protections
added.
At the time of this writing, Perl 5.18.0 is considered to be
well-hardened against algorithmic complexity attacks on its hash
-implementation. This is largely owed to the following measures
+implementation. This is largely owed to the following measures
mitigate attacks:
=over 4
@@ -476,9 +477,9 @@ mitigate attacks:
=item Hash Seed Randomization
In order to make it impossible to know what seed to generate an attack
-key set for, this seed is randomly initialized at process start. This
+key set for, this seed is randomly initialized at process start. This
may be overridden by using the PERL_HASH_SEED environment variable, see
-L<perlrun/PERL_HASH_SEED>. This environment variable controls how
+L<perlrun/PERL_HASH_SEED>. This environment variable controls how
items are actually stored, not how they are presented via
C<keys>, C<values> and C<each>.
@@ -489,14 +490,15 @@ C<values>, and C<each> return items in a per-hash randomized order.
Modifying a hash by insertion will change the iteration order of that hash.
This behavior can be overridden by using C<hash_traversal_mask()> from
L<Hash::Util> or by using the PERL_PERTURB_KEYS environment variable,
-see L<perlrun/PERL_PERTURB_KEYS>. Note that this feature controls the
+see L<perlrun/PERL_PERTURB_KEYS>. Note that this feature controls the
"visible" order of the keys, and not the actual order they are stored in.
=item Bucket Order Perturbance
When items collide into a given hash bucket the order they are stored in
-the chain is no longer predictable in Perl 5.18. This has the intention
-to make it harder to observe a collisions. This behavior can be overridden by using
+the chain is no longer predictable in Perl 5.18. This
+has the intention to make it harder to observe a
+collision. This behavior can be overridden by using
the PERL_PERTURB_KEYS environment variable, see L<perlrun/PERL_PERTURB_KEYS>.
=item New Default Hash Function
@@ -508,16 +510,16 @@ it harder to infer the hash seed.
The source code includes multiple hash algorithms to choose from. While we
believe that the default perl hash is robust to attack, we have included the
-hash function Siphash as a fall-back option. At the time of release of
+hash function Siphash as a fall-back option. At the time of release of
Perl 5.18.0 Siphash is believed to be of cryptographic strength. This is
not the default as it is much slower than the default hash.
=back
Without compiling a special Perl, there is no way to get the exact same
-behavior of any versions prior to Perl 5.18.0. The closest one can get
+behavior of any versions prior to Perl 5.18.0. The closest one can get
is by setting PERL_PERTURB_KEYS to 0 and setting the PERL_HASH_SEED
-to a known value. We do not advise those settings for production use
+to a known value. We do not advise those settings for production use
due to the above security considerations.
B<Perl has never guaranteed any ordering of the hash keys>, and
diff --git a/gnu/usr.bin/perl/pod/perlsub.pod b/gnu/usr.bin/perl/pod/perlsub.pod
index aeced63527d..1ba5186761c 100644
--- a/gnu/usr.bin/perl/pod/perlsub.pod
+++ b/gnu/usr.bin/perl/pod/perlsub.pod
@@ -89,8 +89,8 @@ aggregates (arrays and hashes), these will be flattened together into
one large indistinguishable list.
If no C<return> is found and if the last statement is an expression, its
-value is returned. If the last statement is a loop control structure
-like a C<foreach> or a C<while>, the returned value is unspecified. The
+value is returned. If the last statement is a loop control structure
+like a C<foreach> or a C<while>, the returned value is unspecified. The
empty sub returns the empty list.
X<subroutine, return value> X<return value> X<return>
@@ -247,7 +247,7 @@ core, as are modules whose names are in all lower case. A subroutine in
all capitals is a loosely-held convention meaning it will be called
indirectly by the run-time system itself, usually due to a triggered event.
Subroutines whose name start with a left parenthesis are also reserved the
-same way. The following is a list of some subroutines that currently do
+same way. The following is a list of some subroutines that currently do
special, pre-defined things.
=over
@@ -699,7 +699,7 @@ this.
X<state> X<state variable> X<static> X<variable, persistent> X<variable, static> X<closure>
There are two ways to build persistent private variables in Perl 5.10.
-First, you can simply use the C<state> feature. Or, you can use closures,
+First, you can simply use the C<state> feature. Or, you can use closures,
if you want to stay compatible with releases older than 5.10.
=head3 Persistent variables via state()
@@ -924,7 +924,7 @@ X<local, composite type element> X<local, array element> X<local, hash element>
It's also worth taking a moment to explain what happens when you
C<local>ize a member of a composite type (i.e. an array or hash element).
-In this case, the element is C<local>ized I<by name>. This means that
+In this case, the element is C<local>ized I<by name>. This means that
when the scope of the C<local()> ends, the saved value will be
restored to the hash element whose key was named in the C<local()>, or
the array element whose index was named in the C<local()>. If that
@@ -967,7 +967,7 @@ X<delete> X<local, composite type element> X<local, array element> X<local, hash
You can use the C<delete local $array[$idx]> and C<delete local $hash{key}>
constructs to delete a composite type entry for the current block and restore
-it when it ends. They return the array/hash value before the localization,
+it when it ends. They return the array/hash value before the localization,
which means that they are respectively equivalent to
do {
@@ -986,7 +986,8 @@ and
$val
}
-except that for those the C<local> is scoped to the C<do> block. Slices are
+except that for those the C<local> is
+scoped to the C<do> block. Slices are
also accepted.
my %hash = (
@@ -1030,7 +1031,7 @@ To do this, you have to declare the subroutine to return an lvalue.
The scalar/list context for the subroutine and for the right-hand
side of assignment is determined as if the subroutine call is replaced
-by a scalar. For example, consider:
+by a scalar. For example, consider:
data(2,3) = get_data(3,4);
@@ -1045,9 +1046,9 @@ and in:
all the subroutines are called in a list context.
Lvalue subroutines are convenient, but you have to keep in mind that,
-when used with objects, they may violate encapsulation. A normal
+when used with objects, they may violate encapsulation. A normal
mutator can check the supplied argument before setting the attribute
-it is protecting, an lvalue subroutine cannot. If you require any
+it is protecting, an lvalue subroutine cannot. If you require any
special processing when storing and retrieving the values, consider
using the CPAN module Sentinel or something similar.
@@ -1090,6 +1091,9 @@ any previous C<my sub;> or C<state sub;> declaration.
baz(); # recursive call
}
+It is a known bug that lexical subroutines cannot be used as the C<SUBNAME>
+argument to C<sort>. This will be fixed in a future version of Perl.
+
=head3 C<state sub> vs C<my sub>
What is the difference between "state" subs and "my" subs? Each time that
@@ -1445,12 +1449,12 @@ Any backslashed prototype character represents an actual argument
that must start with that character (optionally preceded by C<my>,
C<our> or C<local>), with the exception of C<$>, which will
accept any scalar lvalue expression, such as C<$foo = 7> or
-C<< my_function()->[0] >>. The value passed as part of C<@_> will be a
+C<< my_function()->[0] >>. The value passed as part of C<@_> will be a
reference to the actual argument given in the subroutine call,
obtained by applying C<\> to that argument.
You can use the C<\[]> backslash group notation to specify more than one
-allowed argument type. For example:
+allowed argument type. For example:
sub myref (\[$@%&*])
@@ -1655,7 +1659,7 @@ the constant folding doesn't reduce them to a single constant:
As alluded to earlier you can also declare inlined subs dynamically at
BEGIN time if their body consists of a lexically-scoped scalar which
-has no other references. Only the first example here will be inlined:
+has no other references. Only the first example here will be inlined:
BEGIN {
my $var = 1;
@@ -1711,7 +1715,7 @@ without (with deparse output truncated for clarity):
};
If you redefine a subroutine that was eligible for inlining, you'll
-get a warning by default. You can use this warning to tell whether or
+get a warning by default. You can use this warning to tell whether or
not a particular subroutine is considered inlinable, since it's
different than the warning for overriding non-inlined subroutines:
@@ -1850,7 +1854,7 @@ And, as you'll have noticed from the previous example, if you override
C<glob>, the C<< <*> >> glob operator is overridden as well.
In a similar fashion, overriding the C<readline> function also overrides
-the equivalent I/O operator C<< <FILEHANDLE> >>. Also, overriding
+the equivalent I/O operator C<< <FILEHANDLE> >>. Also, overriding
C<readpipe> also overrides the operators C<``> and C<qx//>.
Finally, some built-ins (e.g. C<exists> or C<grep>) can't be overridden.
diff --git a/gnu/usr.bin/perl/pod/perlsyn.pod b/gnu/usr.bin/perl/pod/perlsyn.pod
index 8bbca75328b..46c95271429 100644
--- a/gnu/usr.bin/perl/pod/perlsyn.pod
+++ b/gnu/usr.bin/perl/pod/perlsyn.pod
@@ -68,7 +68,7 @@ subroutine without defining it by saying C<sub name>, thus:
X<subroutine, declaration>
sub myname;
- $me = myname $0 or die "can't get myname";
+ $me = myname $0 or die "can't get myname";
A bare declaration like that declares the function to be a list operator,
not a unary operator, so you have to be careful to use parentheses (or
@@ -174,8 +174,8 @@ evaluated.
This is so that you can write loops like:
do {
- $line = <STDIN>;
- ...
+ $line = <STDIN>;
+ ...
} until !defined($line) || $line eq ".\n"
See L<perlfunc/do>. Note also that the loop control statements described
@@ -186,18 +186,18 @@ For C<next>, just double the braces:
X<next> X<last> X<redo>
do {{
- next if $x == $y;
- # do something here
+ next if $x == $y;
+ # do something here
}} until $x++ > $z;
For C<last>, you have to be more elaborate:
X<last>
- LOOP: {
- do {
- last if $x = $y**2;
- # do something here
- } while $x++ <= $z;
+ LOOP: {
+ do {
+ last if $x = $y**2;
+ # do something here
+ } while $x++ <= $z;
}
B<NOTE:> The behaviour of a C<my>, C<state>, or
@@ -267,7 +267,7 @@ The following compound statements may be used to control flow:
PHASE BLOCK
-The experimental C<given> statement is I<not automatically enabled>; see
+The experimental C<given> statement is I<not automatically enabled>; see
L</"Switch Statements"> below for how to do so, and the attendant caveats.
Unlike in C and Pascal, in Perl these are all defined in terms of BLOCKs,
@@ -280,7 +280,7 @@ all do the same thing:
die "Can't open $FOO: $!" unless open(FOO);
open(FOO) || die "Can't open $FOO: $!";
open(FOO) ? () : die "Can't open $FOO: $!";
- # a bit exotic, that last one
+ # a bit exotic, that last one
The C<if> statement is straightforward. Because BLOCKs are always
bounded by curly brackets, there is never any ambiguity about which
@@ -327,16 +327,16 @@ X<loop control> X<loop, control> X<next> X<last> X<redo> X<continue>
The C<next> command starts the next iteration of the loop:
LINE: while (<STDIN>) {
- next LINE if /^#/; # discard comments
- ...
+ next LINE if /^#/; # discard comments
+ ...
}
The C<last> command immediately exits the loop in question. The
C<continue> block, if any, is not executed:
LINE: while (<STDIN>) {
- last LINE if /^$/; # exit when done with header
- ...
+ last LINE if /^$/; # exit when done with header
+ ...
}
The C<redo> command restarts the loop block without evaluating the
@@ -349,23 +349,23 @@ If your input lines might end in backslashes to indicate continuation, you
want to skip ahead and get the next record.
while (<>) {
- chomp;
- if (s/\\$//) {
- $_ .= <>;
- redo unless eof();
- }
- # now process $_
+ chomp;
+ if (s/\\$//) {
+ $_ .= <>;
+ redo unless eof();
+ }
+ # now process $_
}
which is Perl shorthand for the more explicitly written version:
LINE: while (defined($line = <ARGV>)) {
- chomp($line);
- if ($line =~ s/\\$//) {
- $line .= <ARGV>;
- redo LINE unless eof(); # not eof(ARGV)!
- }
- # now process $line
+ chomp($line);
+ if ($line =~ s/\\$//) {
+ $line .= <ARGV>;
+ redo LINE unless eof(); # not eof(ARGV)!
+ }
+ # now process $line
}
Note that if there were a C<continue> block on the above code, it would
@@ -375,13 +375,13 @@ or C<m?pat?> one-time matches:
# inspired by :1,$g/fred/s//WILMA/
while (<>) {
- m?(fred)? && s//WILMA $1 WILMA/;
- m?(barney)? && s//BETTY $1 BETTY/;
- m?(homer)? && s//MARGE $1 MARGE/;
+ m?(fred)? && s//WILMA $1 WILMA/;
+ m?(barney)? && s//BETTY $1 BETTY/;
+ m?(homer)? && s//MARGE $1 MARGE/;
} continue {
- print "$ARGV $.: $_";
- close ARGV if eof; # reset $.
- reset if eof; # reset ?pat?
+ print "$ARGV $.: $_";
+ close ARGV if eof; # reset $.
+ reset if eof; # reset ?pat?
}
If the word C<while> is replaced by the word C<until>, the sense of the
@@ -392,10 +392,10 @@ Loop control statements don't work in an C<if> or C<unless>, since
they aren't loops. You can double the braces to make them such, though.
if (/pattern/) {{
- last if /fred/;
- next if /barney/; # same effect as "last",
- # but doesn't document as well
- # do something here
+ last if /fred/;
+ next if /barney/; # same effect as "last",
+ # but doesn't document as well
+ # do something here
}}
This is caused by the fact that a block by itself acts as a loop that
@@ -411,16 +411,16 @@ Perl's C-style C<for> loop works like the corresponding C<while> loop;
that means that this:
for ($i = 1; $i < 10; $i++) {
- ...
+ ...
}
is the same as this:
$i = 1;
while ($i < 10) {
- ...
+ ...
} continue {
- $i++;
+ $i++;
}
There is one minor difference: if variables are declared with C<my>
@@ -433,13 +433,13 @@ As a special case, if the test in the C<for> loop (or the corresponding
C<while> loop) is empty, it is treated as true. That is, both
for (;;) {
- ...
+ ...
}
and
while () {
- ...
+ ...
}
are treated as infinite loops.
@@ -454,7 +454,7 @@ X<eof> X<end-of-file> X<end of file>
$on_a_tty = -t STDIN && -t STDOUT;
sub prompt { print "yes? " if $on_a_tty }
for ( prompt(); <STDIN>; prompt() ) {
- # do something
+ # do something
}
Using C<readline> (or the operator form, C<< <EXPR> >>) as the
@@ -504,30 +504,30 @@ Examples:
for (@ary) { s/foo/bar/ }
for my $elem (@elements) {
- $elem *= 2;
+ $elem *= 2;
}
for $count (reverse(1..10), "BOOM") {
- print $count, "\n";
- sleep(1);
+ print $count, "\n";
+ sleep(1);
}
for (1..15) { print "Merry Christmas\n"; }
foreach $item (split(/:[\\\n:]*/, $ENV{TERMCAP})) {
- print "Item: $item\n";
+ print "Item: $item\n";
}
Here's how a C programmer might code up a particular algorithm in Perl:
for (my $i = 0; $i < @ary1; $i++) {
- for (my $j = 0; $j < @ary2; $j++) {
- if ($ary1[$i] > $ary2[$j]) {
- last; # can't go to outer :-(
- }
- $ary1[$i] += $ary2[$j];
- }
- # this is where that last takes me
+ for (my $j = 0; $j < @ary2; $j++) {
+ if ($ary1[$i] > $ary2[$j]) {
+ last; # can't go to outer :-(
+ }
+ $ary1[$i] += $ary2[$j];
+ }
+ # this is where that last takes me
}
Whereas here's how a Perl programmer more comfortable with the idiom might
@@ -535,10 +535,10 @@ do it:
OUTER: for my $wid (@ary1) {
INNER: for my $jet (@ary2) {
- next OUTER if $wid > $jet;
- $wid += $jet;
- }
- }
+ next OUTER if $wid > $jet;
+ $wid += $jet;
+ }
+ }
See how much easier this is? It's cleaner, safer, and faster. It's
cleaner because it's less noisy. It's safer because if code gets added
@@ -567,10 +567,10 @@ block is optional.
The BLOCK construct can be used to emulate case structures.
SWITCH: {
- if (/^abc/) { $abc = 1; last SWITCH; }
- if (/^def/) { $def = 1; last SWITCH; }
- if (/^xyz/) { $xyz = 1; last SWITCH; }
- $nothing = 1;
+ if (/^abc/) { $abc = 1; last SWITCH; }
+ if (/^def/) { $def = 1; last SWITCH; }
+ if (/^xyz/) { $xyz = 1; last SWITCH; }
+ $nothing = 1;
}
You'll also find that C<foreach> loop used to create a topicalizer
@@ -578,10 +578,10 @@ and a switch:
SWITCH:
for ($var) {
- if (/^abc/) { $abc = 1; last SWITCH; }
- if (/^def/) { $def = 1; last SWITCH; }
- if (/^xyz/) { $xyz = 1; last SWITCH; }
- $nothing = 1;
+ if (/^abc/) { $abc = 1; last SWITCH; }
+ if (/^def/) { $def = 1; last SWITCH; }
+ if (/^xyz/) { $xyz = 1; last SWITCH; }
+ $nothing = 1;
}
Such constructs are quite frequently used, both because older versions of
@@ -616,10 +616,10 @@ rewritten as
use v5.10.1;
for ($var) {
- when (/^abc/) { $abc = 1 }
- when (/^def/) { $def = 1 }
- when (/^xyz/) { $xyz = 1 }
- default { $nothing = 1 }
+ when (/^abc/) { $abc = 1 }
+ when (/^def/) { $def = 1 }
+ when (/^xyz/) { $xyz = 1 }
+ default { $nothing = 1 }
}
The C<foreach> is the non-experimental way to set a topicalizer.
@@ -628,30 +628,30 @@ written like this:
use v5.10.1;
given ($var) {
- when (/^abc/) { $abc = 1 }
- when (/^def/) { $def = 1 }
- when (/^xyz/) { $xyz = 1 }
- default { $nothing = 1 }
+ when (/^abc/) { $abc = 1 }
+ when (/^def/) { $def = 1 }
+ when (/^xyz/) { $xyz = 1 }
+ default { $nothing = 1 }
}
As of 5.14, that can also be written this way:
use v5.14;
for ($var) {
- $abc = 1 when /^abc/;
- $def = 1 when /^def/;
- $xyz = 1 when /^xyz/;
- default { $nothing = 1 }
+ $abc = 1 when /^abc/;
+ $def = 1 when /^def/;
+ $xyz = 1 when /^xyz/;
+ default { $nothing = 1 }
}
Or if you don't care to play it safe, like this:
use v5.14;
given ($var) {
- $abc = 1 when /^abc/;
- $def = 1 when /^def/;
- $xyz = 1 when /^xyz/;
- default { $nothing = 1 }
+ $abc = 1 when /^abc/;
+ $def = 1 when /^def/;
+ $xyz = 1 when /^xyz/;
+ default { $nothing = 1 }
}
The arguments to C<given> and C<when> are in scalar context,
@@ -746,7 +746,7 @@ throws an exception with the text C<Unimplemented>:
sub unimplemented { ... }
eval { unimplemented() };
if ($@ =~ /^Unimplemented at /) {
- say "I found an ellipsis!";
+ say "I found an ellipsis!";
}
You can only use the elliptical statement to stand in for a
@@ -758,14 +758,14 @@ complete statement. These examples of how the ellipsis works:
...;
eval { ... };
sub somemeth {
- my $self = shift;
- ...;
+ my $self = shift;
+ ...;
}
$x = do {
- my $n;
- ...;
- say "Hurrah!";
- $n;
+ my $n;
+ ...;
+ say "Hurrah!";
+ $n;
};
The elliptical statement cannot stand in for an expression that
@@ -788,20 +788,17 @@ syntax error if Perl doesn't guess that the C<{ ... }> is a block. In that
case, it doesn't think the C<...> is an ellipsis because it's expecting an
expression instead of a statement:
- @transformed = map { ... } @input; # syntax error
-
-You can use a C<;> inside your block to denote that the C<{ ... }> is a
-block and not a hash reference constructor. Now the ellipsis works:
+ @transformed = map { ... } @input; # syntax error
- @transformed = map {; ... } @input; # ; disambiguates
+Inside your block, you can use a C<;> before the ellipsis to denote that the
+C<{ ... }> is a block and not a hash reference constructor. Now the ellipsis
+works:
- @transformed = map { ...; } @input; # ; disambiguates
+ @transformed = map {; ... } @input; # ';' disambiguates
Note: Some folks colloquially refer to this bit of punctuation as a
"yada-yada" or "triple-dot", but its true name
-is actually an ellipsis. Perl does not yet
-accept the Unicode version, U+2026 HORIZONTAL ELLIPSIS, as an alias for
-C<...>, but someday it may.
+is actually an ellipsis.
=head2 PODs: Embedded Documentation
X<POD> X<documentation>
@@ -828,8 +825,8 @@ and your documentation text freely, as in
=cut back to the compiler, nuff of this pod stuff!
sub snazzle($) {
- my $thingie = shift;
- .........
+ my $thingie = shift;
+ .........
}
Note that pod translators should look at only paragraphs beginning
@@ -916,32 +913,32 @@ Here is a longer example of C<given>:
use feature ":5.10";
given ($foo) {
- when (undef) {
- say '$foo is undefined';
- }
- when ("foo") {
- say '$foo is the string "foo"';
- }
- when ([1,3,5,7,9]) {
- say '$foo is an odd digit';
- continue; # Fall through
- }
- when ($_ < 100) {
- say '$foo is numerically less than 100';
- }
- when (\&complicated_check) {
- say 'a complicated check for $foo is true';
- }
- default {
- die q(I don't know what to do with $foo);
- }
+ when (undef) {
+ say '$foo is undefined';
+ }
+ when ("foo") {
+ say '$foo is the string "foo"';
+ }
+ when ([1,3,5,7,9]) {
+ say '$foo is an odd digit';
+ continue; # Fall through
+ }
+ when ($_ < 100) {
+ say '$foo is numerically less than 100';
+ }
+ when (\&complicated_check) {
+ say 'a complicated check for $foo is true';
+ }
+ default {
+ die q(I don't know what to do with $foo);
+ }
}
Before Perl 5.18, C<given(EXPR)> assigned the value of I<EXPR> to
merely a lexically scoped I<B<copy>> (!) of C<$_>, not a dynamically
scoped alias the way C<foreach> does. That made it similar to
- do { my $_ = EXPR; ... }
+ do { my $_ = EXPR; ... }
except that the block was automatically broken out of by a successful
C<when> or an explicit C<break>. Because it was only a copy, and because
@@ -1103,9 +1100,9 @@ You can use the C<continue> keyword to fall through from one
case to the next:
given($foo) {
- when (/x/) { say '$foo contains an x'; continue }
- when (/y/) { say '$foo contains a y' }
- default { say '$foo does not contain a y' }
+ when (/x/) { say '$foo contains an x'; continue }
+ when (/y/) { say '$foo contains a y' }
+ default { say '$foo does not contain a y' }
}
=head3 Return value
@@ -1138,12 +1135,12 @@ Note that, unlike C<if> and C<unless>, failed C<when> statements always
evaluate to an empty list.
my $price = do {
- given ($item) {
- when (["pear", "apple"]) { 1 }
- break when "vote"; # My vote cannot be bought
- 1e10 when /Mona Lisa/;
- "unknown";
- }
+ given ($item) {
+ when (["pear", "apple"]) { 1 }
+ break when "vote"; # My vote cannot be bought
+ 1e10 when /Mona Lisa/;
+ "unknown";
+ }
};
Currently, C<given> blocks can't always
@@ -1159,7 +1156,7 @@ string occurs in an array:
use v5.10.1;
my $count = 0;
for (@array) {
- when ("foo") { ++$count }
+ when ("foo") { ++$count }
}
print "\@array contains $count copies of 'foo'\n";
@@ -1168,7 +1165,7 @@ Or in a more recent version:
use v5.14;
my $count = 0;
for (@array) {
- ++$count when "foo";
+ ++$count when "foo";
}
print "\@array contains $count copies of 'foo'\n";
@@ -1191,7 +1188,7 @@ made optional in Perl 5 without a great deal of potential confusion,
because Perl 5 would parse the expression
given $foo {
- ...
+ ...
}
as though the argument to C<given> were an element of the hash
diff --git a/gnu/usr.bin/perl/pod/perlthrtut.pod b/gnu/usr.bin/perl/pod/perlthrtut.pod
index e885bb23ccd..f5e35a3a5ec 100644
--- a/gnu/usr.bin/perl/pod/perlthrtut.pod
+++ b/gnu/usr.bin/perl/pod/perlthrtut.pod
@@ -302,10 +302,10 @@ automatically.
sleep(15); # Let thread run for awhile
sub sub1 {
- $a = 0;
+ my $count = 0;
while (1) {
- $a++;
- print("\$a is $a\n");
+ $count++;
+ print("\$count is $count\n");
sleep(1);
}
}
@@ -424,22 +424,22 @@ number of pitfalls. One pitfall is the race condition:
use threads;
use threads::shared;
- my $a :shared = 1;
+ my $x :shared = 1;
my $thr1 = threads->create(\&sub1);
my $thr2 = threads->create(\&sub2);
$thr1->join();
$thr2->join();
- print("$a\n");
+ print("$x\n");
- sub sub1 { my $foo = $a; $a = $foo + 1; }
- sub sub2 { my $bar = $a; $a = $bar + 1; }
+ sub sub1 { my $foo = $x; $x = $foo + 1; }
+ sub sub2 { my $bar = $x; $x = $bar + 1; }
-What do you think C<$a> will be? The answer, unfortunately, is I<it
-depends>. Both C<sub1()> and C<sub2()> access the global variable C<$a>, once
+What do you think C<$x> will be? The answer, unfortunately, is I<it
+depends>. Both C<sub1()> and C<sub2()> access the global variable C<$x>, once
to read and once to write. Depending on factors ranging from your
thread implementation's scheduling algorithm to the phase of the moon,
-C<$a> can be 2 or 3.
+C<$x> can be 2 or 3.
Race conditions are caused by unsynchronized access to shared
data. Without explicit synchronization, there's no way to be sure that
@@ -448,19 +448,19 @@ and the time you update it. Even this simple code fragment has the
possibility of error:
use threads;
- my $a :shared = 2;
- my $b :shared;
- my $c :shared;
- my $thr1 = threads->create(sub { $b = $a; $a = $b + 1; });
- my $thr2 = threads->create(sub { $c = $a; $a = $c + 1; });
+ my $x :shared = 2;
+ my $y :shared;
+ my $z :shared;
+ my $thr1 = threads->create(sub { $y = $x; $x = $y + 1; });
+ my $thr2 = threads->create(sub { $z = $x; $x = $z + 1; });
$thr1->join();
$thr2->join();
-Two threads both access C<$a>. Each thread can potentially be interrupted
-at any point, or be executed in any order. At the end, C<$a> could be 3
-or 4, and both C<$b> and C<$c> could be 2 or 3.
+Two threads both access C<$x>. Each thread can potentially be interrupted
+at any point, or be executed in any order. At the end, C<$x> could be 3
+or 4, and both C<$y> and C<$z> could be 2 or 3.
-Even C<$a += 5> or C<$a++> are not guaranteed to be atomic.
+Even C<$x += 5> or C<$x++> are not guaranteed to be atomic.
Whenever your program accesses data or resources that can be accessed
by other threads, you must take steps to coordinate access or risk
@@ -572,17 +572,17 @@ Consider the following code:
use threads;
- my $a :shared = 4;
- my $b :shared = 'foo';
+ my $x :shared = 4;
+ my $y :shared = 'foo';
my $thr1 = threads->create(sub {
- lock($a);
+ lock($x);
sleep(20);
- lock($b);
+ lock($y);
});
my $thr2 = threads->create(sub {
- lock($b);
+ lock($y);
sleep(20);
- lock($a);
+ lock($x);
});
This program will probably hang until you kill it. The only way it
@@ -590,10 +590,10 @@ won't hang is if one of the two threads acquires both locks
first. A guaranteed-to-hang version is more complicated, but the
principle is the same.
-The first thread will grab a lock on C<$a>, then, after a pause during which
+The first thread will grab a lock on C<$x>, then, after a pause during which
the second thread has probably had time to do some work, try to grab a
-lock on C<$b>. Meanwhile, the second thread grabs a lock on C<$b>, then later
-tries to grab a lock on C<$a>. The second lock attempt for both threads will
+lock on C<$y>. Meanwhile, the second thread grabs a lock on C<$y>, then later
+tries to grab a lock on C<$x>. The second lock attempt for both threads will
block, each waiting for the other to release its lock.
This condition is called a deadlock, and it occurs whenever two or
@@ -604,8 +604,8 @@ resource is itself waiting for a lock to be released.
There are a number of ways to handle this sort of problem. The best
way is to always have all threads acquire locks in the exact same
-order. If, for example, you lock variables C<$a>, C<$b>, and C<$c>, always lock
-C<$a> before C<$b>, and C<$b> before C<$c>. It's also best to hold on to locks for
+order. If, for example, you lock variables C<$x>, C<$y>, and C<$z>, always lock
+C<$x> before C<$y>, and C<$y> before C<$z>. It's also best to hold on to locks for
as short a period of time to minimize the risks of deadlock.
The other synchronization primitives described below can suffer from
@@ -961,9 +961,9 @@ though, regardless of how many CPUs a system might have.
Since kernel threading can interrupt a thread at any time, they will
uncover some of the implicit locking assumptions you may make in your
-program. For example, something as simple as C<$a = $a + 2> can behave
-unpredictably with kernel threads if C<$a> is visible to other
-threads, as another thread may have changed C<$a> between the time it
+program. For example, something as simple as C<$x = $x + 2> can behave
+unpredictably with kernel threads if C<$x> is visible to other
+threads, as another thread may have changed C<$x> between the time it
was fetched on the right hand side and the time the new value is
stored.
diff --git a/gnu/usr.bin/perl/pod/perlvar.pod b/gnu/usr.bin/perl/pod/perlvar.pod
index 4b6bb74cf56..e980e95e6b1 100644
--- a/gnu/usr.bin/perl/pod/perlvar.pod
+++ b/gnu/usr.bin/perl/pod/perlvar.pod
@@ -14,7 +14,8 @@ C<::> or C<'>. In this case, the part before the last C<::> or
C<'> is taken to be a I<package qualifier>; see L<perlmod>.
Perl variable names may also be a sequence of digits or a single
-punctuation or control character. These names are all reserved for
+punctuation or control character (with the literal control character
+form deprecated). These names are all reserved for
special uses by Perl; for example, the all-digits names are used
to hold data captured by backreferences after a regular expression
match. Perl has a special syntax for the single-control-character
@@ -370,19 +371,19 @@ X<$;> X<$SUBSEP> X<SUBSCRIPT_SEPARATOR>
The subscript separator for multidimensional array emulation. If you
refer to a hash element as
- $foo{$a,$b,$c}
+ $foo{$x,$y,$z}
it really means
- $foo{join($;, $a, $b, $c)}
+ $foo{join($;, $x, $y, $z)}
But don't put
- @foo{$a,$b,$c} # a slice--note the @
+ @foo{$x,$y,$z} # a slice--note the @
which means
- ($foo{$a},$foo{$b},$foo{$c})
+ ($foo{$x},$foo{$y},$foo{$z})
Default is "\034", the same as SUBSEP in B<awk>. If your keys contain
binary data there might not be any safe value for C<$;>.
diff --git a/gnu/usr.bin/perl/pp.c b/gnu/usr.bin/perl/pp.c
index 79abdb01f89..4ec6887dfd6 100644
--- a/gnu/usr.bin/perl/pp.c
+++ b/gnu/usr.bin/perl/pp.c
@@ -2785,12 +2785,9 @@ PP(pp_srand)
}
}
else {
- anum = 0;
+ anum = seed();
}
- if (anum)
- (void)srand48_deterministic((Rand_seed_t)anum);
- else
(void)seedDrand01((Rand_seed_t)anum);
PL_srand_called = TRUE;
if (anum)
diff --git a/gnu/usr.bin/perl/pp_ctl.c b/gnu/usr.bin/perl/pp_ctl.c
index 39b7941f0cc..11314eceaa3 100644
--- a/gnu/usr.bin/perl/pp_ctl.c
+++ b/gnu/usr.bin/perl/pp_ctl.c
@@ -590,6 +590,7 @@ PP(pp_formline)
break;
}
itembytes = s - item;
+ chophere = s;
break;
}
@@ -678,7 +679,7 @@ PP(pp_formline)
goto append;
case FF_CHOP: /* (for ^*) chop the current item */
- {
+ if (sv != &PL_sv_no) {
const char *s = chophere;
if (chopspace) {
while (isSPACE(*s))
@@ -704,11 +705,11 @@ PP(pp_formline)
const char *const send = s + len;
item_is_utf8 = DO_UTF8(sv);
+ chophere = s + len;
if (!len)
break;
trans = 0;
gotsome = TRUE;
- chophere = s + len;
source = (U8 *) s;
to_copy = len;
while (s < send) {
diff --git a/gnu/usr.bin/perl/pp_sys.c b/gnu/usr.bin/perl/pp_sys.c
index 43d64733024..9de4dfff79c 100644
--- a/gnu/usr.bin/perl/pp_sys.c
+++ b/gnu/usr.bin/perl/pp_sys.c
@@ -2617,6 +2617,11 @@ PP(pp_ssockopt)
len = SvCUR(sv);
if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0)
goto nuts2;
+#if defined(_AIX)
+ /* XXX Configure test: does getsockopt set the length properly? */
+ if (len == 256)
+ len = sizeof(int);
+#endif
SvCUR_set(sv, len);
*SvEND(sv) ='\0';
PUSHs(sv);
@@ -4455,11 +4460,16 @@ PP(pp_gmtime)
}
else {
NV input = Perl_floor(POPn);
+ const bool pl_isnan = Perl_isnan(input);
when = (Time64_T)input;
- if (when != input) {
+ if (UNLIKELY(pl_isnan || when != input)) {
/* diag_listed_as: gmtime(%f) too large */
Perl_ck_warner(aTHX_ packWARN(WARN_OVERFLOW),
"%s(%.0" NVff ") too large", opname, input);
+ if (pl_isnan) {
+ err = NULL;
+ goto failed;
+ }
}
}
@@ -4485,6 +4495,7 @@ PP(pp_gmtime)
if (err == NULL) {
/* diag_listed_as: gmtime(%f) failed */
/* XXX %lld broken for quads */
+ failed:
Perl_ck_warner(aTHX_ packWARN(WARN_OVERFLOW),
"%s(%.0" NVff ") failed", opname, when);
}
diff --git a/gnu/usr.bin/perl/regcomp.c b/gnu/usr.bin/perl/regcomp.c
index e991999d7b1..573072aa28d 100644
--- a/gnu/usr.bin/perl/regcomp.c
+++ b/gnu/usr.bin/perl/regcomp.c
@@ -4806,7 +4806,7 @@ PerlIO_printf(Perl_debug_log, "LHS=%"UVdf" RHS=%"UVdf"\n",
min++;
if (flags & SCF_DO_STCLASS) {
bool invert = 0;
- SV* my_invlist = sv_2mortal(_new_invlist(0));
+ SV* my_invlist = NULL;
U8 namedclass;
/* See commit msg 749e076fceedeb708a624933726e7989f2302f6a */
@@ -4905,7 +4905,7 @@ PerlIO_printf(Perl_debug_log, "LHS=%"UVdf" RHS=%"UVdf"\n",
/* FALL THROUGH */
case POSIXA:
if (FLAGS(scan) == _CC_ASCII) {
- my_invlist = PL_XPosix_ptrs[_CC_ASCII];
+ my_invlist = invlist_clone(PL_XPosix_ptrs[_CC_ASCII]);
}
else {
_invlist_intersection(PL_XPosix_ptrs[FLAGS(scan)],
@@ -4942,6 +4942,7 @@ PerlIO_printf(Perl_debug_log, "LHS=%"UVdf" RHS=%"UVdf"\n",
assert(flags & SCF_DO_STCLASS_OR);
ssc_union(data->start_class, my_invlist, invert);
}
+ SvREFCNT_dec(my_invlist);
}
if (flags & SCF_DO_STCLASS_OR)
ssc_and(pRExC_state, data->start_class, (regnode_charclass *) and_withp);
@@ -12000,7 +12001,17 @@ tryagain:
&& is_PROBLEMATIC_LOCALE_FOLD_cp(ender)))
{
if (UTF) {
- const STRLEN unilen = reguni(pRExC_state, ender, s);
+
+ /* Normally, we don't need the representation of the
+ * character in the sizing pass--just its size, but if
+ * folding, we have to actually put the character out
+ * even in the sizing pass, because the size could
+ * change as we juggle things at the end of this loop
+ * to avoid splitting a too-full node in the middle of
+ * a potential multi-char fold [perl #123539] */
+ const STRLEN unilen = (SIZE_ONLY && ! FOLD)
+ ? UNISKIP(ender)
+ : (uvchr_to_utf8((U8*)s, ender) - (U8*)s);
if (unilen > 0) {
s += unilen;
len += unilen;
@@ -12013,6 +12024,10 @@ tryagain:
* cancel out the increment that follows */
len--;
}
+ else if (FOLD) {
+ /* See comment above for [perl #123539] */
+ *(s++) = (char) ender;
+ }
else {
REGC((char)ender, s++);
}
diff --git a/gnu/usr.bin/perl/regexec.c b/gnu/usr.bin/perl/regexec.c
index 362390bd66a..5edac3f4f04 100644
--- a/gnu/usr.bin/perl/regexec.c
+++ b/gnu/usr.bin/perl/regexec.c
@@ -707,6 +707,7 @@ Perl_re_intuit_start(pTHX_
goto fail;
}
+ RX_MATCH_UTF8_set(rx,utf8_target);
reginfo->is_utf8_target = cBOOL(utf8_target);
reginfo->info_aux = NULL;
reginfo->strbeg = strbeg;
@@ -2585,6 +2586,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, char *strend,
}
RX_MATCH_TAINTED_off(rx);
+ RX_MATCH_UTF8_set(rx, utf8_target);
reginfo->prog = rx; /* Yes, sorry that this is confusing. */
reginfo->intuit = 0;
@@ -3105,8 +3107,6 @@ got_it:
if (RXp_PAREN_NAMES(prog))
(void)hv_iterinit(RXp_PAREN_NAMES(prog));
- RX_MATCH_UTF8_set(rx, utf8_target);
-
/* make sure $`, $&, $', and $digit will work later */
if ( !(flags & REXEC_NOT_FIRST) )
S_reg_set_capture_string(aTHX_ rx,
diff --git a/gnu/usr.bin/perl/sv.c b/gnu/usr.bin/perl/sv.c
index e1962cef593..af393bdeabe 100644
--- a/gnu/usr.bin/perl/sv.c
+++ b/gnu/usr.bin/perl/sv.c
@@ -46,25 +46,23 @@
char *gconvert(double, int, int, char *);
#endif
-#ifdef PERL_NEW_COPY_ON_WRITE
-# ifndef SV_COW_THRESHOLD
+#ifndef SV_COW_THRESHOLD
# define SV_COW_THRESHOLD 0 /* COW iff len > K */
-# endif
-# ifndef SV_COWBUF_THRESHOLD
+#endif
+#ifndef SV_COWBUF_THRESHOLD
# define SV_COWBUF_THRESHOLD 1250 /* COW iff len > K */
-# endif
-# ifndef SV_COW_MAX_WASTE_THRESHOLD
+#endif
+#ifndef SV_COW_MAX_WASTE_THRESHOLD
# define SV_COW_MAX_WASTE_THRESHOLD 80 /* COW iff (len - cur) < K */
-# endif
-# ifndef SV_COWBUF_WASTE_THRESHOLD
+#endif
+#ifndef SV_COWBUF_WASTE_THRESHOLD
# define SV_COWBUF_WASTE_THRESHOLD 80 /* COW iff (len - cur) < K */
-# endif
-# ifndef SV_COW_MAX_WASTE_FACTOR_THRESHOLD
+#endif
+#ifndef SV_COW_MAX_WASTE_FACTOR_THRESHOLD
# define SV_COW_MAX_WASTE_FACTOR_THRESHOLD 2 /* COW iff len < (cur * K) */
-# endif
-# ifndef SV_COWBUF_WASTE_FACTOR_THRESHOLD
+#endif
+#ifndef SV_COWBUF_WASTE_FACTOR_THRESHOLD
# define SV_COWBUF_WASTE_FACTOR_THRESHOLD 2 /* COW iff len < (cur * K) */
-# endif
#endif
/* Work around compiler warnings about unsigned >= THRESHOLD when thres-
hold is 0. */
@@ -930,9 +928,9 @@ struct body_details {
? count * body_size \
: FIT_ARENA0 (body_size)
#define FIT_ARENA(count,body_size) \
- count \
+ (U32)(count \
? FIT_ARENAn (count, body_size) \
- : FIT_ARENA0 (body_size)
+ : FIT_ARENA0 (body_size))
/* Calculate the length to copy. Specifically work out the length less any
final padding the compiler needed to add. See the comment in sv_upgrade
@@ -3453,7 +3451,7 @@ must_be_utf8:
* set so starts from there. Otherwise, can use memory copy to
* get up to where we are now, and then start from here */
- if (invariant_head <= 0) {
+ if (invariant_head == 0) {
d = dst;
} else {
Copy(s, dst, invariant_head, char);
@@ -4415,7 +4413,8 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, SV* sstr, const I32 flags)
/* slated for free anyway (and not COW)? */
(sflags & (SVs_TEMP|SVf_IsCOW)) == SVs_TEMP
/* or a swipable TARG */
- || ((sflags & (SVs_PADTMP|SVf_READONLY|SVf_IsCOW))
+ || ((sflags & (SVs_PADTMP|SVs_PADMY|SVf_READONLY
+ |SVf_IsCOW))
== SVs_PADTMP
/* whose buffer is worth stealing */
&& CHECK_COWBUF_THRESHOLD(cur,len)
@@ -4846,10 +4845,10 @@ Perl_sv_sethek(pTHX_ SV *const sv, const HEK *const hek)
Tells an SV to use C<ptr> to find its string value. Normally the
string is stored inside the SV, but sv_usepvn allows the SV to use an
outside string. The C<ptr> should point to memory that was allocated
-by L<Newx|perlclib/Memory Management and String Handling>. It must be
+by L<Newx|perlclib/Memory Management and String Handling>. It must be
the start of a Newx-ed block of memory, and not a pointer to the
middle of it (beware of L<OOK|perlguts/Offsets> and copy-on-write),
-and not be from a non-Newx memory allocator like C<malloc>. The
+and not be from a non-Newx memory allocator like C<malloc>. The
string length, C<len>, must be supplied. By default this function
will C<Renew> (i.e. realloc, move) the memory pointed to by C<ptr>,
so that pointer should not be freed or used by the programmer after
@@ -13094,14 +13093,16 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
case SAVEt_CLEARPADRANGE:
break;
case SAVEt_HELEM: /* hash element */
+ case SAVEt_SV: /* scalar reference */
sv = (const SV *)POPPTR(ss,ix);
- TOPPTR(nss,ix) = sv_dup_inc(sv, param);
+ TOPPTR(nss,ix) = SvREFCNT_inc(sv_dup_inc(sv, param));
/* fall through */
case SAVEt_ITEM: /* normal string */
case SAVEt_GVSV: /* scalar slot in GV */
- case SAVEt_SV: /* scalar reference */
sv = (const SV *)POPPTR(ss,ix);
TOPPTR(nss,ix) = sv_dup_inc(sv, param);
+ if (type == SAVEt_SV)
+ break;
/* fall through */
case SAVEt_FREESV:
case SAVEt_MORTALIZESV:
@@ -13119,6 +13120,8 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
case SAVEt_SVREF: /* scalar reference */
sv = (const SV *)POPPTR(ss,ix);
TOPPTR(nss,ix) = sv_dup_inc(sv, param);
+ if (type == SAVEt_SVREF)
+ SvREFCNT_inc_simple_void((SV *)TOPPTR(nss,ix));
ptr = POPPTR(ss,ix);
TOPPTR(nss,ix) = svp_dup_inc((SV**)ptr, proto_perl);/* XXXXX */
break;
@@ -13271,7 +13274,7 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
break;
case SAVEt_AELEM: /* array element */
sv = (const SV *)POPPTR(ss,ix);
- TOPPTR(nss,ix) = sv_dup_inc(sv, param);
+ TOPPTR(nss,ix) = SvREFCNT_inc(sv_dup_inc(sv, param));
i = POPINT(ss,ix);
TOPINT(nss,ix) = i;
av = (const AV *)POPPTR(ss,ix);
diff --git a/gnu/usr.bin/perl/sv.h b/gnu/usr.bin/perl/sv.h
index 68e5db1b584..b129225bd3c 100644
--- a/gnu/usr.bin/perl/sv.h
+++ b/gnu/usr.bin/perl/sv.h
@@ -1512,7 +1512,7 @@ Returns a pointer to the string in the SV, or a stringified form of
the SV if the SV does not contain a string. The SV may cache the
stringified version becoming C<SvPOK>. Handles 'get' magic. The
C<len> variable will be set to the length of the string (this is a macro, so
-don't use C<&len>). See also C<SvPVx> for a version which guarantees to
+don't use C<&len>). See also C<SvPVx> for a version which guarantees to
evaluate sv only once.
Note that there is no guarantee that the return value of C<SvPV()> is
diff --git a/gnu/usr.bin/perl/symbian/config.sh b/gnu/usr.bin/perl/symbian/config.sh
index bec4eafdfa2..29482a2c50f 100644
--- a/gnu/usr.bin/perl/symbian/config.sh
+++ b/gnu/usr.bin/perl/symbian/config.sh
@@ -242,7 +242,6 @@ d_isinf='undef'
d_isnan='undef'
d_isnanl='undef'
d_killpg='undef'
-d_lc_monetary_2008='undef'
d_lchown='undef'
d_ldbl_dig='undef'
d_libm_lib_version='undef'
diff --git a/gnu/usr.bin/perl/t/lib/h2ph.pht b/gnu/usr.bin/perl/t/lib/h2ph.pht
index cda8d21051c..f068d6dae46 100644
--- a/gnu/usr.bin/perl/t/lib/h2ph.pht
+++ b/gnu/usr.bin/perl/t/lib/h2ph.pht
@@ -90,6 +90,10 @@ unless(defined(&_H2PH_H_)) {
}
eval("sub flim () { 0; }") unless defined(&flim);
eval("sub flam () { 1; }") unless defined(&flam);
+ eval 'sub blli_in_use {
+ my($blli) = @_;
+ eval q({ ($blli->{l2_proto}) || ($blli->{l3_proto}); });
+ }' unless defined(&blli_in_use);
eval 'sub multiline () {"multilinestring";}' unless defined(&multiline);
}
1;
diff --git a/gnu/usr.bin/perl/t/loc_tools.pl b/gnu/usr.bin/perl/t/loc_tools.pl
index 193641d8315..737e870f8a0 100644
--- a/gnu/usr.bin/perl/t/loc_tools.pl
+++ b/gnu/usr.bin/perl/t/loc_tools.pl
@@ -229,8 +229,7 @@ sub is_locale_utf8 ($) { # Return a boolean as to if core Perl thinks the input
# go through testing all the locales on the platform.
if (CORE::fc(chr utf8::unicode_to_native(0xdf)) ne "ss") {
if ($locale =~ /UTF-?8/i) {
- diag("Cannot verify $locale with UTF-8 in name is a UTF-8 locale");
- #ok (0, "Verify $locale with UTF-8 in name is a UTF-8 locale");
+ ok (0, "Verify $locale with UTF-8 in name is a UTF-8 locale");
}
}
else {
diff --git a/gnu/usr.bin/perl/t/op/list.t b/gnu/usr.bin/perl/t/op/list.t
index 0f6e0bcc224..74f256b0a3f 100644
--- a/gnu/usr.bin/perl/t/op/list.t
+++ b/gnu/usr.bin/perl/t/op/list.t
@@ -190,3 +190,7 @@ sub {
)
}
->(("${\''}")[0,0]);
+
+# [perl #122995] Hang when compiling while(1) in a sub-list
+# No ok() or is() necessary.
+sub foo { () = ($a, my $b, ($c, do { while(1) {} })) }
diff --git a/gnu/usr.bin/perl/t/op/quotemeta.t b/gnu/usr.bin/perl/t/op/quotemeta.t
index bb10772c41a..1b8613ac9b9 100644
--- a/gnu/usr.bin/perl/t/op/quotemeta.t
+++ b/gnu/usr.bin/perl/t/op/quotemeta.t
@@ -128,18 +128,10 @@ is(length(quotemeta($char)), 1, "quotemeta '\\N{U+D8}' in UTF-8 length");
is(quotemeta($char), "\\$char", "quotemeta '\\N{U+D7}' locale in UTF-8");
is(length(quotemeta($char)), 2, "quotemeta '\\N{U+D7}' locale in UTF-8 length");
- SKIP: {
- if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
- ) {
- skip "no locale support", 2
- }
- $char = "\N{U+D8}"; # Every non-ASCII Latin1 is quoted in locale.
- utf8::upgrade($char);
- is(quotemeta($char), "\\$char", "quotemeta '\\N{U+D8}' locale in UTF-8");
- is(length(quotemeta($char)), 2, "quotemeta '\\N{U+D8}' locale in UTF-8 length");
- }
+ $char = "\N{U+D8}"; # Every non-ASCII Latin1 is quoted in locale.
+ utf8::upgrade($char);
+ is(quotemeta($char), "\\$char", "quotemeta '\\N{U+D8}' locale in UTF-8");
+ is(length(quotemeta($char)), 2, "quotemeta '\\N{U+D8}' locale in UTF-8 length");
is(quotemeta("\x{263a}"), "\\\x{263a}", "quotemeta locale Unicode quoted");
is(length(quotemeta("\x{263a}")), 2, "quotemeta locale Unicode quoted length");
diff --git a/gnu/usr.bin/perl/t/op/sort.t b/gnu/usr.bin/perl/t/op/sort.t
index dd60f97c22e..151e3eabe0a 100644
--- a/gnu/usr.bin/perl/t/op/sort.t
+++ b/gnu/usr.bin/perl/t/op/sort.t
@@ -6,7 +6,7 @@ BEGIN {
require 'test.pl';
}
use warnings;
-plan( tests => 182 );
+plan( tests => 183 );
# these shouldn't hang
{
@@ -122,6 +122,8 @@ cmp_ok("@b",'eq','1 2 3 4','reverse then sort');
@b = sort CORE::reverse (4,1,3,2);
cmp_ok("@b",'eq','1 2 3 4','CORE::reverse then sort');
+eval { @b = sort CORE::revers (4,1,3,2); };
+like($@, qr/^Undefined sort subroutine "CORE::revers" called at /);
sub twoface { no warnings 'redefine'; *twoface = sub { $a <=> $b }; &twoface }
diff --git a/gnu/usr.bin/perl/t/op/taint.t b/gnu/usr.bin/perl/t/op/taint.t
index f345869bd4a..c3c03baa7ca 100644
--- a/gnu/usr.bin/perl/t/op/taint.t
+++ b/gnu/usr.bin/perl/t/op/taint.t
@@ -17,7 +17,7 @@ BEGIN {
use strict;
use Config;
-plan tests => 816;
+plan tests => 801;
$| = 1;
@@ -298,12 +298,6 @@ my $TEST = 'TEST';
is($res, 1, "$desc: res value");
is($one, 'a', "$desc: \$1 value");
- SKIP: {
- if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
- ) {
- skip "no locale support", 10 }
SKIP: {
skip 'No locale testing without d_setlocale', 10 if(!$Config{d_setlocale});
@@ -323,7 +317,6 @@ my $TEST = 'TEST';
is_tainted($one, "$desc: \$1 tainted");
is($res, 1, "$desc: res value");
is($one, 'abcd', "$desc: \$1 value");
- }
$desc = "match /g with pattern tainted via locale";
@@ -348,13 +341,6 @@ my $TEST = 'TEST';
$s = 'abcd';
($res) = $s =~ /$TAINT(.+)/;
$one = $1;
- SKIP: {
- if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
- ) {
- skip "no locale support", 12
- }
isnt_tainted($s, "$desc: s not tainted");
is_tainted($res, "$desc: res tainted");
is_tainted($one, "$desc: \$1 tainted");
@@ -372,10 +358,9 @@ my $TEST = 'TEST';
is($res, 'a', "$desc: res value");
is($res2,'b', "$desc: res2 value");
is($one, 'd', "$desc: \$1 value");
- }
SKIP: {
- skip 'No locale testing without d_setlocale', 12 if(!$Config{d_setlocale}) || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/;
+ skip 'No locale testing without d_setlocale', 12 if(!$Config{d_setlocale});
$desc = "match with pattern tainted via locale, list cxt";
@@ -494,13 +479,6 @@ my $TEST = 'TEST';
is($one, 'd', "$desc: \$1 value");
$desc = "substitution /ge with pattern tainted";
- SKIP: {
- if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
- ) {
- skip "no locale support", 18
- }
$s = 'abc';
{
@@ -540,10 +518,9 @@ my $TEST = 'TEST';
is($s, 'abcd', "$desc: s value");
is($res, 'xyz', "$desc: res value");
is($one, 'abcd', "$desc: \$1 value");
- }
SKIP: {
- skip 'No locale testing without d_setlocale', 18 if(!$Config{d_setlocale} || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/);
+ skip 'No locale testing without d_setlocale', 18 if(!$Config{d_setlocale});
$desc = "substitution with pattern tainted via locale";
@@ -684,13 +661,6 @@ my $TEST = 'TEST';
$desc = "use re 'taint': match /g with string tainted";
$s = 'abcd' . $TAINT;
- SKIP: {
- if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
- ) {
- skip "no locale support", 10
- }
$res = $s =~ /(.)/g;
$one = $1;
is_tainted($s, "$desc: s tainted");
@@ -698,7 +668,6 @@ my $TEST = 'TEST';
is_tainted($one, "$desc: \$1 tainted");
is($res, 1, "$desc: res value");
is($one, 'a', "$desc: \$1 value");
- }
$desc = "use re 'taint': match with string tainted, list cxt";
@@ -716,13 +685,6 @@ my $TEST = 'TEST';
$s = 'abcd' . $TAINT;
($res, $res2) = $s =~ /(.)/g;
$one = $1;
- SKIP: {
- if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
- ) {
- skip "no locale support", 12
- }
is_tainted($s, "$desc: s tainted");
is_tainted($res, "$desc: res tainted");
is_tainted($res2, "$desc: res2 tainted");
@@ -730,7 +692,6 @@ my $TEST = 'TEST';
is($res, 'a', "$desc: res value");
is($res2,'b', "$desc: res2 value");
is($one, 'd', "$desc: \$1 value");
- }
$desc = "use re 'taint': match with pattern tainted";
@@ -755,7 +716,7 @@ my $TEST = 'TEST';
is($one, 'a', "$desc: \$1 value");
SKIP: {
- skip 'No locale testing without d_setlocale', 10 if(!$Config{d_setlocale} || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/);
+ skip 'No locale testing without d_setlocale', 10 if(!$Config{d_setlocale});
$desc = "use re 'taint': match with pattern tainted via locale";
@@ -816,7 +777,7 @@ my $TEST = 'TEST';
is($one, 'd', "$desc: \$1 value");
SKIP: {
- skip 'No locale testing without d_setlocale', 12 if(!$Config{d_setlocale} || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/);
+ skip 'No locale testing without d_setlocale', 12 if(!$Config{d_setlocale});
$desc = "use re 'taint': match with pattern tainted via locale, list cxt";
@@ -865,13 +826,6 @@ my $TEST = 'TEST';
is_tainted($one, "$desc: \$1 tainted");
is($s, 'xyz', "$desc: s value");
is($res, 1, "$desc: res value");
- SKIP: {
- if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
- ) {
- skip "no locale support", 18
- }
is($one, 'abcd', "$desc: \$1 value");
$desc = "use re 'taint': substitution /g with string tainted";
@@ -897,7 +851,6 @@ my $TEST = 'TEST';
is($s, 'abcd', "$desc: s value");
is($res, 'xyz', "$desc: res value");
is($one, 'abcd', "$desc: \$1 value");
- }
$desc = "use re 'taint': substitution /e with string tainted";
@@ -985,7 +938,8 @@ my $TEST = 'TEST';
is($one, 'abcd', "$desc: \$1 value");
SKIP: {
- skip 'No locale testing without d_setlocale', 18 if(!$Config{d_setlocale} || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/);
+ skip 'No locale testing without d_setlocale', 18 if(!$Config{d_setlocale});
+
$desc = "use re 'taint': substitution with pattern tainted via locale";
$s = 'abcd';
@@ -2257,13 +2211,7 @@ end
isnt_tainted($b, "regex optimization of single char /[]/i doesn't taint");
}
-SKIP: {
- if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
- ) {
- skip "no locale support", 4
- }
+{
# RT 81230: tainted value during FETCH created extra ref to tied obj
package P81230;
@@ -2394,7 +2342,7 @@ pass("no death when TARG of ref is tainted");
}
SKIP: {
- skip 'No locale testing without d_setlocale', 4 if(!$Config{d_setlocale} || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/);
+ skip 'No locale testing without d_setlocale', 4 if(!$Config{d_setlocale});
use feature 'fc';
BEGIN {
@@ -2435,6 +2383,20 @@ $::x = "foo";
$_ = "$TAINT".reset "x";
is eval { eval $::x.1 }, 1, 'reset does not taint undef';
+# [perl #122669]
+{
+ # See the comment above the first formline test.
+ local $ENV{PATH} = $ENV{PATH};
+ $ENV{PATH} = $old_env_path if $Is_MSWin32;
+ is runperl(
+ switches => [ '-T' ],
+ prog => 'use constant K=>$^X; 0 if K; BEGIN{} use strict; '
+ .'print 122669, qq-\n-',
+ stderr => 1,
+ ), "122669\n",
+ 'tainted constant as logop condition should not prevent "use"';
+}
+
# This may bomb out with the alarm signal so keep it last
SKIP: {
skip "No alarm()" unless $Config{d_alarm};
diff --git a/gnu/usr.bin/perl/t/op/time.t b/gnu/usr.bin/perl/t/op/time.t
index 734b838dd8f..5cb9191b6fa 100644
--- a/gnu/usr.bin/perl/t/op/time.t
+++ b/gnu/usr.bin/perl/t/op/time.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 70;
+plan tests => 72;
# These tests make sure, among other things, that we don't end up
# burning tons of CPU for dates far in the future.
@@ -238,3 +238,11 @@ SKIP: { #rt #73040
like $warning, qr/^localtime\($small_time_f\) too small/;
like $warning, qr/^localtime\($small_time_f\) failed/m;
}
+
+{
+ local $^W;
+ scalar gmtime("NaN");
+ pass('[perl #123495] gmtime(NaN) does not crash');
+ scalar localtime("NaN");
+ pass('localtime(NaN) does not crash');
+}
diff --git a/gnu/usr.bin/perl/t/op/write.t b/gnu/usr.bin/perl/t/op/write.t
index 7591cde6aad..7f0e881a25d 100644
--- a/gnu/usr.bin/perl/t/op/write.t
+++ b/gnu/usr.bin/perl/t/op/write.t
@@ -98,7 +98,7 @@ for my $tref ( @NumTests ){
my $bas_tests = 21;
# number of tests in section 3
-my $bug_tests = 66 + 3 * 3 * 5 * 2 * 3 + 2 + 66 + 4 + 2 + 3 + 96 + 11;
+my $bug_tests = 66 + 3 * 3 * 5 * 2 * 3 + 2 + 66 + 4 + 2 + 3 + 96 + 11 + 3;
# number of tests in section 4
my $hmb_tests = 37;
@@ -1935,6 +1935,42 @@ format Potshriggley =
is $x, undef, 'formats in subs do not leak';
}
+fresh_perl_is(<<'EOP', <<'EXPECT',
+use warnings 'syntax' ;
+format STDOUT =
+^*|^*
+my $x = q/dd/, $x
+.
+write;
+EOP
+dd|
+EXPECT
+ { stderr => 1 }, '#123245 panic in sv_chop');
+
+fresh_perl_is(<<'EOP', <<'EXPECT',
+use warnings 'syntax' ;
+format STDOUT =
+^*|^*
+my $x = q/dd/
+.
+write;
+EOP
+Not enough format arguments at - line 4.
+dd|
+EXPECT
+ { stderr => 1 }, '#123245 different panic in sv_chop');
+
+fresh_perl_is(<<'EOP', <<'EXPECT',
+format STDOUT =
+# x at the end to make the spaces visible
+@... x
+q/a/
+.
+write;
+EOP
+a x
+EXPECT
+ { stderr => 1 }, '#123538 crash in FF_MORE');
#############################
## Section 4
diff --git a/gnu/usr.bin/perl/t/porting/customized.dat b/gnu/usr.bin/perl/t/porting/customized.dat
index 3c636c0eda5..04c8db01df7 100644
--- a/gnu/usr.bin/perl/t/porting/customized.dat
+++ b/gnu/usr.bin/perl/t/porting/customized.dat
@@ -1,4 +1,12 @@
-Digest::MD5 cpan/Digest-MD5/t/files.t c1417867017210ce3d199eb9d55d8ef61fdf1a83
+CPAN cpan/CPAN/lib/CPAN/Author.pm 792d7c8fbe6ed45e1244e589a8b712878c5dd2a5
+CPAN cpan/CPAN/lib/CPAN/CacheMgr.pm 132adb7f96014ec7ded45457044ed925d3181475
+CPAN cpan/CPAN/lib/CPAN/FTP.pm 3f0d5fc572c8749a566d73ca892c6c89ce3fb676
+CPAN cpan/CPAN/lib/CPAN/HandleConfig.pm e52052b6ef6d1d664f0ffa6cf01d48a8d1321520
+CPAN cpan/CPAN/lib/CPAN/HTTP/Client.pm 242842ca566fd8e3d776deb549ff758a571ca2e3
+CPAN cpan/CPAN/lib/CPAN/Index.pm 73aee30450127c5ac4dc05abc2c10a8accd4b198
+CPAN cpan/CPAN/lib/CPAN/LWP/UserAgent.pm e09525b0c2377c5ac28b7fad1b6d70c57e343913
+CPAN cpan/CPAN/lib/CPAN/Mirrors.pm 580e74746abaf1628d533015d5b529d82a470af4
+Digest::MD5 cpan/Digest-MD5/t/files.t bdbe05b705d9da305fedce7a9f4b6ba63250c7cf
Encode cpan/Encode/bin/enc2xs f60036fd3574ec05c9aab7f4db00a828d5dea92d
Encode cpan/Encode/Byte/Makefile.PL 0986e25f981a3bf182a13a0060d28d4efedd87e6
Encode cpan/Encode/CN/Makefile.PL 5507a49d822d0c1d14e967f4595e29e9c873540b
@@ -12,6 +20,7 @@ Encode cpan/Encode/Symbol/Makefile.PL 4beddbbd00f638b7de9c6cd0821d9d38020a8218
Encode cpan/Encode/TW/Makefile.PL 0cc44f95e59f45c0fb3b66bde41525f13c19a25c
Module::Build cpan/Module-Build/lib/Module/Build/ConfigData.pm 85eb9656e68d1f256737dc52d86b5d0fed28f832
PerlIO::via::QuotedPrint cpan/PerlIO-via-QuotedPrint/t/QuotedPrint.t ca39f0146e89de02c746e199c45dcb3e5edad691
+Pod::Parser cpan/Pod-Parser/lib/Pod/PlainText.pm f0b490545b4e52e141450d1192d0ca00bd8d7a82
Text::Balanced cpan/Text-Balanced/t/01_compile.t 1598cf491a48fa546260a2ec41142abe84da533d
Text::Balanced cpan/Text-Balanced/t/02_extbrk.t 6ba1b64a4604e822dc2260b8ffcea6b406339ee8
Text::Balanced cpan/Text-Balanced/t/03_extcbk.t 3307c980af28963414cab799c427b359ef3b8657
diff --git a/gnu/usr.bin/perl/t/porting/dual-life.t b/gnu/usr.bin/perl/t/porting/dual-life.t
index 165738ceafb..8d9f070b0aa 100644
--- a/gnu/usr.bin/perl/t/porting/dual-life.t
+++ b/gnu/usr.bin/perl/t/porting/dual-life.t
@@ -23,12 +23,6 @@ use File::Spec::Functions;
# Exceptions that are found in dual-life bin dirs but aren't
# installed by default; some occur only during testing:
my $not_installed = qr{^(?:
- \.\./cpan/Archive-Tar/bin/ptar.*
- |
- \.\./cpan/JSON-PP/bin/json_pp
- |
- \.\./cpan/IO-Compress/bin/zipdetails
- |
\.\./cpan/Encode/bin/u(?:cm(?:2table|lint|sort)|nidump)
|
\.\./cpan/Module-(?:Metadata|Build)
diff --git a/gnu/usr.bin/perl/t/re/pat.t b/gnu/usr.bin/perl/t/re/pat.t
index 65091400a5b..7965f4e67d2 100755
--- a/gnu/usr.bin/perl/t/re/pat.t
+++ b/gnu/usr.bin/perl/t/re/pat.t
@@ -20,7 +20,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 722; # Update this when adding/deleting tests.
+plan tests => 726; # Update this when adding/deleting tests.
run_tests() unless caller;
@@ -509,13 +509,7 @@ sub run_tests {
is(qr/\b\v$/, '(?^:\b\v$)', 'qr/\b\v$/');
}
- SKIP: { # Test that charset modifier work, and are interpolated
- if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
- ) {
- skip "no locale support", 13
- }
+ { # Test that charset modifier work, and are interpolated
is(qr/\b\v$/, '(?^:\b\v$)', 'Verify no locale, no unicode_strings gives default modifier');
is(qr/(?l:\b\v$)/, '(?^:(?l:\b\v$))', 'Verify infix l modifier compiles');
is(qr/(?u:\b\v$)/, '(?^:(?u:\b\v$))', 'Verify infix u modifier compiles');
@@ -1594,6 +1588,20 @@ EOP
like("X", qr/$x/, "UTF-8 of /[x]/i matches upper case");
}
+ { # [perl #123539]
+ like("TffffffffffffTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT5TTTTTTTTTTTTTTTTTTTTTTTTT3TTgTTTTTTTTTTTTTTTTTTTTT2TTTTTTTTTTTTTTTTTTTTTTTHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHiHHHHHHHfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&ffff", qr/TffffffffffffTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT5TTTTTTTTTTTTTTTTTTTTTTTTT3TTgTTTTTTTTTTTTTTTTTTTTT2TTTTTTTTTTTTTTTTTTTTTTTHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHiHHHHHHHfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&ffff/il, "");
+ like("TffffffffffffT\x{100}TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT5TTTTTTTTTTTTTTTTTTTTTTTTT3TTgTTTTTTTTTTTTTTTTTTTTT2TTTTTTTTTTTTTTTTTTTTTTTHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHiHHHHHHHfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&ffff", qr/TffffffffffffT\x{100}TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT5TTTTTTTTTTTTTTTTTTTTTTTTT3TTgTTTTTTTTTTTTTTTTTTTTT2TTTTTTTTTTTTTTTTTTTTTTTHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHiHHHHHHHfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&ffff/il, "");
+ }
+
+ { # [perl #123604]
+ my($s, $x, @x) = ('abc', 'a', 'd');
+ my $long = 'b' x 2000;
+ my $eval = q{$s =~ m{$x[bbb]c} ? 1 : 0};
+ $eval =~ s{bbb}{$long};
+ my $match = eval $eval;
+ ok(1, "did not crash");
+ ok($match, "[bbb...] resolved as character class, not subscript");
+ }
} # End of sub run_tests
1;
diff --git a/gnu/usr.bin/perl/t/uni/fold.t b/gnu/usr.bin/perl/t/uni/fold.t
index a0e1551b6b4..94090e941c0 100644
--- a/gnu/usr.bin/perl/t/uni/fold.t
+++ b/gnu/usr.bin/perl/t/uni/fold.t
@@ -432,7 +432,7 @@ foreach my $test_ref (@CF) {
utf8::upgrade($utf8);
is(fc($latin1), fc($utf8), "fc() gives the same results for \\x{$_} in Latin-1 and UTF-8 under unicode_strings");
SKIP: {
- skip 'No locale testing without d_setlocale', 2 if(!$Config{d_setlocale}) || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/;
+ skip 'No locale testing without d_setlocale', 2 if(!$Config{d_setlocale});
BEGIN {
if($Config{d_setlocale}) {
require locale; import locale;
@@ -441,13 +441,7 @@ foreach my $test_ref (@CF) {
is(fc($latin1), lc($latin1), "use locale; fc(qq{\\x{$_}}), lc(qq{\\x{$_}}) when qq{\\x{$_}} is in latin-1");
is(fc($utf8), lc($utf8), "use locale; fc(qq{\\x{$_}}), lc(qq{\\x{$_}}) when qq{\\x{$_}} is in latin-1");
}
- SKIP: {
- if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
- ) {
- skip "no locale support", 2
- }
+ {
no feature 'unicode_strings';
is(fc($latin1), lc($latin1), "under nothing, fc() for <256 is the same as lc");
}
diff --git a/gnu/usr.bin/perl/t/uni/overload.t b/gnu/usr.bin/perl/t/uni/overload.t
index dbc8e019090..bd87b6665c9 100644
--- a/gnu/usr.bin/perl/t/uni/overload.t
+++ b/gnu/usr.bin/perl/t/uni/overload.t
@@ -101,12 +101,6 @@ eval {
$have_setlocale++;
}
};
-if (
- !$Config::Config{d_setlocale}
- || $Config::Config{ccflags} =~ /\bD?NO_LOCALE(_|\b)/
-) {
- $have_setlocale = 0;
-}
SKIP: {
if (!$have_setlocale) {
diff --git a/gnu/usr.bin/perl/toke.c b/gnu/usr.bin/perl/toke.c
index 0028b18b2f3..906d56c100a 100644
--- a/gnu/usr.bin/perl/toke.c
+++ b/gnu/usr.bin/perl/toke.c
@@ -2268,9 +2268,10 @@ S_force_word(pTHX_ char *start, int token, int check_keyword, int allow_pack)
s = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, allow_pack, &len);
if (check_keyword) {
char *s2 = PL_tokenbuf;
+ STRLEN len2 = len;
if (allow_pack && len > 6 && strnEQ(s2, "CORE::", 6))
- s2 += 6, len -= 6;
- if (keyword(s2, len, 0))
+ s2 += 6, len2 -= 6;
+ if (keyword(s2, len2, 0))
return start;
}
start_force(PL_curforce);
@@ -4071,11 +4072,10 @@ S_intuit_more(pTHX_ char *s)
&& !(last_un_char == '$' || last_un_char == '@'
|| last_un_char == '&')
&& isALPHA(*s) && s[1] && isALPHA(s[1])) {
- char *d = tmpbuf;
+ char *d = s;
while (isALPHA(*s))
- *d++ = *s++;
- *d = '\0';
- if (keyword(tmpbuf, d - tmpbuf, 0))
+ s++;
+ if (keyword(d, s - d, 0))
weight -= 150;
}
if (un_char == last_un_char + 1)
diff --git a/gnu/usr.bin/perl/uconfig.h b/gnu/usr.bin/perl/uconfig.h
index 4056b4b4fac..e5cca088d84 100644
--- a/gnu/usr.bin/perl/uconfig.h
+++ b/gnu/usr.bin/perl/uconfig.h
@@ -226,12 +226,6 @@
*/
/*#define HAS_LOCALECONV / **/
-/* HAS_LC_MONETARY_2008:
- * This symbol, if defined, indicates that the localeconv routine is
- * available and has the additional members added in POSIX 1003.1-2008.
- */
-/*#define HAS_LC_MONETARY_2008 / **/
-
/* HAS_LOCKF:
* This symbol, if defined, indicates that the lockf routine is
* available to do file locking.
@@ -4724,6 +4718,6 @@
#endif
/* Generated from:
- * 1efb97c1f4b2c9e6bb17b9172f43cc7f281124904ecca38fa6561d6800432847 config_h.SH
- * 87143cb3dacf7a54fe1df682d22e85daae58d626055b7bd02efa3d12d3f05c27 uconfig.sh
+ * 7557e985de18f71e80f627226b454bc8eaf20477dcf0c45b5b2c51ec792f5c89 config_h.SH
+ * dbc8d38ba52ae23e5423418bb3f56b1b6fcdaa82cf71ba0be3463e8221bfe0c0 uconfig.sh
* ex: set ro: */
diff --git a/gnu/usr.bin/perl/uconfig.sh b/gnu/usr.bin/perl/uconfig.sh
index f2460959c29..9585636dba1 100644
--- a/gnu/usr.bin/perl/uconfig.sh
+++ b/gnu/usr.bin/perl/uconfig.sh
@@ -235,7 +235,6 @@ d_isinf='undef'
d_isnan='undef'
d_isnanl='undef'
d_killpg='undef'
-d_lc_monetary_2008='undef'
d_lchown='undef'
d_ldbl_dig='undef'
d_libm_lib_version='undef'
diff --git a/gnu/usr.bin/perl/uconfig64.sh b/gnu/usr.bin/perl/uconfig64.sh
index dfff260fff6..98c0195e3cf 100644
--- a/gnu/usr.bin/perl/uconfig64.sh
+++ b/gnu/usr.bin/perl/uconfig64.sh
@@ -236,7 +236,6 @@ d_isinf='undef'
d_isnan='undef'
d_isnanl='undef'
d_killpg='undef'
-d_lc_monetary_2008='undef'
d_lchown='undef'
d_ldbl_dig='undef'
d_libm_lib_version='undef'
diff --git a/gnu/usr.bin/perl/util.c b/gnu/usr.bin/perl/util.c
index 4ae2c64ab9c..5a3c0770262 100644
--- a/gnu/usr.bin/perl/util.c
+++ b/gnu/usr.bin/perl/util.c
@@ -4408,9 +4408,6 @@ Perl_parse_unicode_opts(pTHX_ const char **popt)
U32
Perl_seed(pTHX)
{
-#if defined(__OpenBSD__)
- return arc4random();
-#else
dVAR;
/*
* This is really just a quick hack which grabs various garbage
@@ -4487,7 +4484,6 @@ Perl_seed(pTHX)
u += SEED_C5 * (U32)PTR2UV(&when);
#endif
return u;
-#endif
}
void
@@ -5307,10 +5303,10 @@ Perl_get_db_sub(pTHX_ SV **svp, CV *cv)
if (!PERLDB_SUB_NN) {
GV *gv = CvGV(cv);
- if (!svp) {
+ if (gv && !svp) {
gv_efullname3(dbsv, gv, NULL);
}
- else if ( (CvFLAGS(cv) & (CVf_ANON | CVf_CLONED))
+ else if ( (CvFLAGS(cv) & (CVf_ANON | CVf_CLONED)) || !gv
|| strEQ(GvNAME(gv), "END")
|| ( /* Could be imported, and old sub redefined. */
(GvCV(gv) != cv || !S_gv_has_usable_name(aTHX_ gv))
diff --git a/gnu/usr.bin/perl/utils.lst b/gnu/usr.bin/perl/utils.lst
index 268a04de102..d1e5b8f95c6 100644
--- a/gnu/usr.bin/perl/utils.lst
+++ b/gnu/usr.bin/perl/utils.lst
@@ -11,16 +11,22 @@ utils/enc2xs
utils/h2ph
utils/h2xs
utils/instmodsh
+utils/json_pp
utils/libnetcfg
-utils/perlbug
+utils/perlbug # link = utils/perlthanks
utils/perldoc
utils/perlivp
utils/piconv
utils/pl2pm
utils/pod2html
utils/prove
+utils/ptar
+utils/ptardiff
+utils/ptargrep
+utils/shasum
utils/splain
utils/xsubpp
+utils/zipdetails
x2p/a2p
x2p/find2perl
x2p/s2p # link = x2p/psed
diff --git a/gnu/usr.bin/perl/utils/Makefile.PL b/gnu/usr.bin/perl/utils/Makefile.PL
index d80cfadaf98..8e461d41ebe 100644
--- a/gnu/usr.bin/perl/utils/Makefile.PL
+++ b/gnu/usr.bin/perl/utils/Makefile.PL
@@ -35,9 +35,9 @@ print $fh <<'EOT';
# Files to be built with variable substitution after miniperl is
# available. Dependencies handled manually below (for now).
-pl = c2ph.PL config_data.PL corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL xsubpp.PL pod2html.PL
-plextract = c2ph config_data corelist cpan h2ph h2xs instmodsh perlbug perldoc perlivp pl2pm prove splain libnetcfg piconv enc2xs xsubpp pod2html
-plextractexe = ./c2ph ./config_data ./corelist ./cpan ./h2ph ./h2xs ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./splain ./libnetcfg ./piconv ./enc2xs ./xsubpp ./pod2html
+pl = c2ph.PL config_data.PL corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL json_pp.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL ptargrep.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL xsubpp.PL pod2html.PL zipdetails.PL
+plextract = c2ph config_data corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep shasum splain libnetcfg piconv enc2xs xsubpp pod2html zipdetails
+plextractexe = ./c2ph ./config_data ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./xsubpp ./pod2html ./zipdetails
all: $(plextract)
@@ -58,6 +58,8 @@ h2xs: h2xs.PL ../config.sh
instmodsh: instmodsh.PL ../config.sh
+json_pp: json_pp.PL ../config.sh
+
perlbug: perlbug.PL ../config.sh ../patchlevel.h
perldoc: perldoc.PL ../config.sh
@@ -66,8 +68,16 @@ perlivp: perlivp.PL ../config.sh
prove: prove.PL ../config.sh
+ptar: ptar.PL ../config.sh
+
+ptardiff: ptardiff.PL ../config.sh
+
+ptargrep: ptargrep.PL ../config.sh
+
pl2pm: pl2pm.PL ../config.sh
+shasum: shasum.PL ../config.sh
+
splain: splain.PL ../config.sh ../lib/diagnostics.pm
libnetcfg: libnetcfg.PL ../config.sh
@@ -78,6 +88,8 @@ enc2xs: enc2xs.PL ../config.sh
xsubpp: xsubpp.PL ../config.sh
+zipdetails: zipdetails.PL ../config.sh
+
pod2html: pod2html.PL ../config.sh ../ext/Pod-Html/bin/pod2html
clean:
diff --git a/gnu/usr.bin/perl/utils/h2ph.PL b/gnu/usr.bin/perl/utils/h2ph.PL
index 15a0fe429e4..9a8b14dca8b 100644
--- a/gnu/usr.bin/perl/utils/h2ph.PL
+++ b/gnu/usr.bin/perl/utils/h2ph.PL
@@ -571,7 +571,7 @@ sub next_line
$in =~ s/\?\?</{/g; # | ??<| {|
$in =~ s/\?\?>/}/g; # | ??>| }|
}
- if ($in =~ s/^\#ifdef __LANGUAGE_PASCAL__//) {
+ if ($in =~ /^\#ifdef __LANGUAGE_PASCAL__/) {
# Tru64 disassembler.h evilness: mixed C and Pascal.
while (<IN>) {
last if /^\#endif/;
@@ -579,8 +579,8 @@ sub next_line
$in = "";
next READ;
}
- # Skip inlined functions in headers
- if ($in =~ s/^(extern|static) (__inline__|inline) .*[^;]\s*$//) {
+ if ($in =~ /^extern inline / && # Inlined assembler.
+ $^O eq 'linux' && $file =~ m!(?:^|/)asm/[^/]+\.h$!) {
while (<IN>) {
last if /^}/;
}
diff --git a/gnu/usr.bin/perl/utils/perlbug.PL b/gnu/usr.bin/perl/utils/perlbug.PL
index 093ca96261d..885785ae002 100644
--- a/gnu/usr.bin/perl/utils/perlbug.PL
+++ b/gnu/usr.bin/perl/utils/perlbug.PL
@@ -345,14 +345,15 @@ sub Query {
This program provides an easy way to send a thank-you message back to the
authors and maintainers of perl.
-If you wish to submit a bug report, please run it without the -T flag.
+If you wish to submit a bug report, please run it without the -T flag
+(or run the program perlbug rather than perlthanks)
EOF
} else {
paraprint <<"EOF";
This program provides an easy way to create a message reporting a
bug in the core perl distribution (along with tests or patches)
to the volunteers who maintain perl at $address. To send a thank-you
-note to $thanksaddress instead of a bug report, please use the -T flag.
+note to $thanksaddress instead of a bug report, please run 'perlthanks'.
Please do not use $0 to send test messages, test whether perl
works, or to report bugs in perl modules from CPAN.
@@ -1243,6 +1244,8 @@ S<[ B<-S> ]> S<[ B<-t> ]> S<[ B<-d> ]> S<[ B<-A> ]> S<[ B<-h> ]> S<[ B<-T> ]>
B<perlbug> S<[ B<-v> ]> S<[ B<-r> I<returnaddress> ]>
S<[ B<-A> ]> S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]>
+B<perlthanks>
+
=head1 DESCRIPTION
@@ -1395,8 +1398,8 @@ description of what's wrong is fine.
=item Can you use C<perlbug> to submit a thank-you note?
-Yes, you can do this by using the C<-T> option.
-Thank-you notes are good. It makes people
+Yes, you can do this by either using the C<-T> option, or by invoking
+the program as C<perlthanks>. Thank-you notes are good. It makes people
smile.
=back
diff --git a/gnu/usr.bin/perl/vutil.c b/gnu/usr.bin/perl/vutil.c
index 02b826fef6a..1f26140a4c8 100644
--- a/gnu/usr.bin/perl/vutil.c
+++ b/gnu/usr.bin/perl/vutil.c
@@ -587,11 +587,7 @@ VER_NV:
/* may get too much accuracy */
char tbuf[64];
-#ifdef __vax__
- SV *sv = SvNVX(ver) > 10e37 ? newSV(64) : 0;
-#else
SV *sv = SvNVX(ver) > 10e50 ? newSV(64) : 0;
-#endif
char *buf;
#ifdef USE_LOCALE_NUMERIC
const char * const cur_numeric = setlocale(LC_NUMERIC, NULL);
diff --git a/gnu/usr.bin/perl/win32/Makefile b/gnu/usr.bin/perl/win32/Makefile
index c084e4d0236..aa664ced92a 100644
--- a/gnu/usr.bin/perl/win32/Makefile
+++ b/gnu/usr.bin/perl/win32/Makefile
@@ -37,7 +37,7 @@ INST_TOP = $(INST_DRV)\perl
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-#INST_VER = \5.20.1
+#INST_VER = \5.20.2
#
# Comment this out if you DON'T want your perl installation to have
@@ -1192,7 +1192,7 @@ utils: $(PERLEXE) $(X2P) ..\utils\Makefile
copy ..\README.tw ..\pod\perltw.pod
copy ..\README.vos ..\pod\perlvos.pod
copy ..\README.win32 ..\pod\perlwin32.pod
- copy ..\pod\perldelta.pod ..\pod\perl5201delta.pod
+ copy ..\pod\perldelta.pod ..\pod\perl5202delta.pod
cd ..\win32
$(PERLEXE) $(PL2BAT) $(UTILS)
$(MINIPERL) -I..\lib ..\autodoc.pl ..
@@ -1265,7 +1265,6 @@ distclean: realclean
-if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
-if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
-if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
- -if exist $(LIBDIR)\OpenBSD rmdir /s /q $(LIBDIR)\OpenBSD
-if exist $(LIBDIR)\Package rmdir /s /q $(LIBDIR)\Package
-if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
-if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
@@ -1291,7 +1290,7 @@ distclean: realclean
-if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
-cd $(PODDIR) && del /f *.html *.bat roffitall \
- perl5201delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+ perl5202delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
@@ -1299,7 +1298,8 @@ distclean: realclean
perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \
- perltru64.pod perltw.pod perlvos.pod perlwin32.pod
+ perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
+ perlwin32.pod
-cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \
xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist config_data zipdetails
diff --git a/gnu/usr.bin/perl/win32/config.ce b/gnu/usr.bin/perl/win32/config.ce
index 45ef28265f3..bb87699ef6e 100644
--- a/gnu/usr.bin/perl/win32/config.ce
+++ b/gnu/usr.bin/perl/win32/config.ce
@@ -283,7 +283,6 @@ d_isinf='undef'
d_isnan='define'
d_isnanl='undef'
d_killpg='undef'
-d_lc_monetary_2008='undef'
d_lchown='undef'
d_ldbl_dig='define'
d_libm_lib_version='undef'
@@ -291,7 +290,7 @@ d_link='define'
d_localtime64='undef'
d_localtime_r='undef'
d_localtime_r_needs_tzset='undef'
-d_locconv='define'
+d_locconv='undef'
d_lockf='undef'
d_longdbl='undef'
d_longlong='undef'
@@ -637,7 +636,7 @@ i_inttypes='undef'
i_langinfo='undef'
i_libutil='undef'
i_limits='define'
-i_locale='undef'
+i_locale='define'
i_machcthr='undef'
i_malloc='define'
i_mallocmalloc='undef'
diff --git a/gnu/usr.bin/perl/win32/config.gc b/gnu/usr.bin/perl/win32/config.gc
index 645628a85a3..39cdaefef71 100644
--- a/gnu/usr.bin/perl/win32/config.gc
+++ b/gnu/usr.bin/perl/win32/config.gc
@@ -283,7 +283,6 @@ d_isinf='undef'
d_isnan='define'
d_isnanl='undef'
d_killpg='define'
-d_lc_monetary_2008='undef'
d_lchown='undef'
d_ldbl_dig='define'
d_libm_lib_version='undef'
diff --git a/gnu/usr.bin/perl/win32/config.vc b/gnu/usr.bin/perl/win32/config.vc
index 7444e027bb0..eef02e14535 100644
--- a/gnu/usr.bin/perl/win32/config.vc
+++ b/gnu/usr.bin/perl/win32/config.vc
@@ -283,7 +283,6 @@ d_isinf='undef'
d_isnan='define'
d_isnanl='undef'
d_killpg='define'
-d_lc_monetary_2008='undef'
d_lchown='undef'
d_ldbl_dig='define'
d_libm_lib_version='undef'
diff --git a/gnu/usr.bin/perl/win32/makefile.mk b/gnu/usr.bin/perl/win32/makefile.mk
index 9f6e9feed4f..02231a1565f 100644
--- a/gnu/usr.bin/perl/win32/makefile.mk
+++ b/gnu/usr.bin/perl/win32/makefile.mk
@@ -43,7 +43,7 @@ INST_TOP *= $(INST_DRV)\perl
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-#INST_VER *= \5.20.1
+#INST_VER *= \5.20.2
#
# Comment this out if you DON'T want your perl installation to have
@@ -1391,7 +1391,7 @@ utils: $(PERLEXE) $(X2P) ..\utils\Makefile
copy ..\README.tw ..\pod\perltw.pod
copy ..\README.vos ..\pod\perlvos.pod
copy ..\README.win32 ..\pod\perlwin32.pod
- copy ..\pod\perldelta.pod ..\pod\perl5201delta.pod
+ copy ..\pod\perldelta.pod ..\pod\perl5202delta.pod
$(PERLEXE) $(PL2BAT) $(UTILS)
$(MINIPERL) -I..\lib ..\autodoc.pl ..
$(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
@@ -1463,7 +1463,6 @@ distclean: realclean
-if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
-if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
-if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
- -if exist $(LIBDIR)\OpenBSD rmdir /s /q $(LIBDIR)\OpenBSD
-if exist $(LIBDIR)\Package rmdir /s /q $(LIBDIR)\Package
-if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
-if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
@@ -1489,7 +1488,7 @@ distclean: realclean
-if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
-cd $(PODDIR) && del /f *.html *.bat roffitall \
- perl5201delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+ perl5202delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
@@ -1497,7 +1496,8 @@ distclean: realclean
perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \
- perltru64.pod perltw.pod perlvos.pod perlwin32.pod
+ perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
+ perlwin32.pod
-cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \
xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist config_data zipdetails
diff --git a/gnu/usr.bin/perl/win32/pod.mak b/gnu/usr.bin/perl/win32/pod.mak
index 51c54f4240b..1f9593a529c 100644
--- a/gnu/usr.bin/perl/win32/pod.mak
+++ b/gnu/usr.bin/perl/win32/pod.mak
@@ -35,8 +35,10 @@ POD = perl.pod \
perl5180delta.pod \
perl5181delta.pod \
perl5182delta.pod \
+ perl5184delta.pod \
perl5200delta.pod \
perl5201delta.pod \
+ perl5202delta.pod \
perl561delta.pod \
perl56delta.pod \
perl581delta.pod \
@@ -134,6 +136,7 @@ POD = perl.pod \
perltoot.pod \
perltrap.pod \
perlunicode.pod \
+ perlunicook.pod \
perlunifaq.pod \
perluniintro.pod \
perluniprops.pod \
@@ -165,8 +168,10 @@ MAN = perl.man \
perl5180delta.man \
perl5181delta.man \
perl5182delta.man \
+ perl5184delta.man \
perl5200delta.man \
perl5201delta.man \
+ perl5202delta.man \
perl561delta.man \
perl56delta.man \
perl581delta.man \
@@ -264,6 +269,7 @@ MAN = perl.man \
perltoot.man \
perltrap.man \
perlunicode.man \
+ perlunicook.man \
perlunifaq.man \
perluniintro.man \
perluniprops.man \
@@ -295,8 +301,10 @@ HTML = perl.html \
perl5180delta.html \
perl5181delta.html \
perl5182delta.html \
+ perl5184delta.html \
perl5200delta.html \
perl5201delta.html \
+ perl5202delta.html \
perl561delta.html \
perl56delta.html \
perl581delta.html \
@@ -393,6 +401,7 @@ HTML = perl.html \
perltoot.html \
perltrap.html \
perlunicode.html \
+ perlunicook.html \
perlunifaq.html \
perluniintro.html \
perluniprops.html \
@@ -425,8 +434,10 @@ TEX = perl.tex \
perl5180delta.tex \
perl5181delta.tex \
perl5182delta.tex \
+ perl5184delta.tex \
perl5200delta.tex \
perl5201delta.tex \
+ perl5202delta.tex \
perl561delta.tex \
perl56delta.tex \
perl581delta.tex \
@@ -524,6 +535,7 @@ TEX = perl.tex \
perltoot.tex \
perltrap.tex \
perlunicode.tex \
+ perlunicook.tex \
perlunifaq.tex \
perluniintro.tex \
perluniprops.tex \
diff --git a/gnu/usr.bin/perl/win32/win32.h b/gnu/usr.bin/perl/win32/win32.h
index 8db03039657..735c4503e27 100644
--- a/gnu/usr.bin/perl/win32/win32.h
+++ b/gnu/usr.bin/perl/win32/win32.h
@@ -254,11 +254,6 @@ typedef unsigned short mode_t;
#define snprintf _snprintf
#define vsnprintf _vsnprintf
-#ifdef USING_MSVC6
-/* VC6 has broken NaN semantics: NaN == NaN returns true instead of false */
-#define NAN_COMPARE_BROKEN 1
-#endif
-
/* on VC2003, msvcrt.lib is missing these symbols */
#if _MSC_VER >= 1300 && _MSC_VER < 1400
# pragma intrinsic(_rotl64,_rotr64)
@@ -397,8 +392,8 @@ typedef char * caddr_t; /* In malloc.c (core address). */
#ifdef MYMALLOC
#define EMBEDMYMALLOC /**/
-/* #define USE_PERL_SBRK /**/
-/* #define PERL_SBRK_VIA_MALLOC /**/
+/* #define USE_PERL_SBRK / **/
+/* #define PERL_SBRK_VIA_MALLOC / **/
#endif
#ifdef PERL_TEXTMODE_SCRIPTS