From bd036cc24619a90af40bcc8e795dfff6fe8e237d Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 28 Jun 2017 10:28:22 +0900 Subject: [PATCH] Imported Upstream version 5.20.2 Change-Id: I7c76e059b29c2b82cb61c784e8f4e88eccebd569 Signed-off-by: DongHun Kwak --- AUTHORS | 7 + Configure | 5 +- Cross/config.sh-arm-linux | 36 +- Cross/config.sh-arm-linux-n770 | 36 +- INSTALL | 33 +- MANIFEST | 6 +- META.json | 2 +- META.yml | 2 +- Makefile.SH | 8 +- NetWare/Makefile | 4 +- NetWare/config_H.wc | 10 +- Porting/Maintainers.pl | 14 + Porting/cmpVERSION.pl | 10 +- Porting/config.sh | 38 +- Porting/config_H | 18 +- Porting/corelist.pl | 13 +- Porting/epigraphs.pod | 251 ++++++ Porting/perldelta_template.pod | 2 +- Porting/release_announcement_template.txt | 4 +- Porting/release_managers_guide.pod | 250 +++--- Porting/release_schedule.pod | 77 +- Porting/todo.pod | 21 +- README | 2 +- README.haiku | 4 +- README.macosx | 8 +- README.os2 | 2 +- README.vms | 4 +- README.win32 | 40 +- cpan/CPAN/lib/CPAN/Author.pm | 2 +- cpan/CPAN/lib/CPAN/CacheMgr.pm | 2 +- cpan/CPAN/lib/CPAN/FTP.pm | 2 +- cpan/CPAN/lib/CPAN/HTTP/Client.pm | 2 +- cpan/CPAN/lib/CPAN/HandleConfig.pm | 4 +- cpan/CPAN/lib/CPAN/Index.pm | 2 +- cpan/CPAN/lib/CPAN/LWP/UserAgent.pm | 2 +- cpan/CPAN/lib/CPAN/Mirrors.pm | 2 +- cpan/Pod-Parser/lib/Pod/PlainText.pm | 2 +- dist/Data-Dumper/Dumper.pm | 27 +- dist/Data-Dumper/Dumper.xs | 32 +- dist/Data-Dumper/t/recurse.t | 45 + dist/ExtUtils-CBuilder/t/04-base.t | 8 +- dist/IO/lib/IO/Socket.pm | 21 +- dist/IO/t/io_xs.t | 4 +- dist/Module-CoreList/Changes | 23 +- dist/Module-CoreList/lib/Module/CoreList.pm | 984 ++++++++++++++++++++- dist/Module-CoreList/lib/Module/CoreList.pod | 18 +- .../lib/Module/CoreList/TieHashDelta.pm | 2 +- dist/Module-CoreList/lib/Module/CoreList/Utils.pm | 58 +- dist/Module-CoreList/t/corelist.t | 19 +- dist/Module-CoreList/t/corevers.t | 21 - dist/PathTools/Cwd.pm | 2 +- dist/PathTools/Cwd.xs | 2 +- dist/PathTools/lib/File/Spec.pm | 2 +- dist/PathTools/lib/File/Spec/Cygwin.pm | 2 +- dist/PathTools/lib/File/Spec/Epoc.pm | 2 +- dist/PathTools/lib/File/Spec/Functions.pm | 2 +- dist/PathTools/lib/File/Spec/Mac.pm | 2 +- dist/PathTools/lib/File/Spec/OS2.pm | 2 +- dist/PathTools/lib/File/Spec/Unix.pm | 2 +- dist/PathTools/lib/File/Spec/VMS.pm | 2 +- dist/PathTools/lib/File/Spec/Win32.pm | 2 +- dist/Storable/Storable.pm | 6 +- dist/lib/t/01lib.t | 3 + ext/Errno/Errno_pm.PL | 8 +- ext/PerlIO-scalar/scalar.pm | 2 +- ext/PerlIO-scalar/scalar.xs | 27 +- ext/PerlIO-scalar/t/scalar.t | 21 +- ext/VMS-DCLsym/DCLsym.pm | 4 +- ext/VMS-Stdio/Stdio.pm | 2 +- ext/XS-APItest/t/clone-with-stack.t | 25 +- ext/attributes/attributes.pm | 2 +- ext/attributes/attributes.xs | 2 +- gv.c | 4 +- hints/catamount.sh | 4 +- hints/darwin.sh | 9 +- hints/dec_osf.sh | 20 +- hints/irix_6.sh | 36 +- hints/netbsd.sh | 16 +- installperl | 2 +- intrpvar.h | 2 +- lib/feature.pm | 23 +- make_ext.pl | 6 +- makedef.pl | 152 ++++ mg.c | 2 +- op.c | 31 +- op.h | 2 +- pad.c | 3 +- pad.h | 2 +- patchlevel.h | 2 +- perl.c | 4 +- perl.h | 27 +- plan9/config.plan9 | 10 +- plan9/config_sh.sample | 34 +- plan9/mkfile | 2 +- pod/.gitignore | 2 +- pod/perl.pod | 7 +- pod/perl5184delta.pod | 153 ++++ pod/perl5201delta.pod | 410 +++++++++ pod/perldelta.pod | 365 ++++---- pod/perldiag.pod | 35 +- pod/perlexperiment.pod | 10 + pod/perlfork.pod | 82 +- pod/perlfunc.pod | 72 +- pod/perlgit.pod | 10 +- pod/perlguts.pod | 2 +- pod/perlhack.pod | 3 +- pod/perlhist.pod | 11 + pod/perliol.pod | 2 +- pod/perlipc.pod | 71 +- pod/perllocale.pod | 44 +- pod/perlmod.pod | 21 + pod/perlmodstyle.pod | 39 +- pod/perlnewmod.pod | 3 + pod/perlop.pod | 219 ++--- pod/perlpolicy.pod | 25 +- pod/perlport.pod | 44 +- pod/perlrecharclass.pod | 4 +- pod/perlref.pod | 68 +- pod/perlsec.pod | 42 +- pod/perlsub.pod | 34 +- pod/perlsyn.pod | 263 +++--- pod/perlthrtut.pod | 66 +- pod/perlunicook.pod | 857 ++++++++++++++++++ pod/perluniintro.pod | 14 +- pod/perlvar.pod | 11 +- pp_ctl.c | 5 +- pp_sys.c | 13 +- regcomp.c | 21 +- regen/feature.pl | 23 +- regexec.c | 4 +- sv.c | 47 +- sv.h | 2 +- t/comp/parser.t | 3 + t/io/eintr.t | 9 +- t/lib/warnings/pp_sys | 24 + t/op/lexsub.t | 69 +- t/op/list.t | 4 + t/op/sort.t | 4 +- t/op/state.t | 10 +- t/op/svleak.t | 3 +- t/op/taint.t | 16 +- t/op/time.t | 10 +- t/op/write.t | 38 +- t/op/yadayada.t | 31 +- t/porting/corelist.t | 3 +- t/porting/customized.dat | 9 + t/porting/diag.t | 1 - t/porting/known_pod_issues.dat | 6 + t/porting/podcheck.t | 4 + t/porting/regen.t | 3 + t/re/fold_grind.t | 3 + t/re/pat.t | 16 +- t/re/pat_psycho.t | 4 + t/re/re_tests | 1 + t/re/rt122747.t | 29 + t/re/rxcode.t | 9 +- t/re/uniprops.t | 5 + t/run/switchd.t | 12 +- toke.c | 12 +- utf8.c | 19 +- util.c | 4 +- vms/descrip_mms.template | 2 +- win32/Makefile | 6 +- win32/config.ce | 4 +- win32/config_H.ce | 2 +- win32/makefile.mk | 6 +- win32/pod.mak | 12 + win32/win32.h | 9 +- 168 files changed, 4954 insertions(+), 1258 deletions(-) create mode 100644 dist/Data-Dumper/t/recurse.t delete mode 100644 dist/Module-CoreList/t/corevers.t create mode 100644 pod/perl5184delta.pod create mode 100644 pod/perl5201delta.pod create mode 100644 pod/perlunicook.pod create mode 100644 t/re/rt122747.t diff --git a/AUTHORS b/AUTHORS index 27e0b73..691773e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -79,6 +79,7 @@ Andreas Klussmann Andreas König Andreas Marienborg Andreas Schwab +Andreas Voegele Andrei Yelistratov Andrej Borsenkow Andrew Bettison @@ -101,6 +102,7 @@ Andy Dougherty Andy Lester Anno Siegel Anthony David +Anthony Heading Anton Berezin Anton Nikishaev Anton Tagunov @@ -341,6 +343,7 @@ Dominic Dunlop Dominic Hargreaves Dominique Dumont Dominique Quatravaux +Doug Bell Doug Campbell Doug MacEachern Douglas Christopher Wilson @@ -355,6 +358,7 @@ Duke Leto Duncan Findlay E. Choroba Ed Avis +Ed J Ed Mooring Ed Santiago Eddy Tan @@ -421,6 +425,7 @@ Gerrit P. Haase Gideon Israel Dsouza Giles Lean Gisle Aas +Glenn D. Golden Glenn Linderman Gordon Lack Gordon J. Miller @@ -582,6 +587,7 @@ Joergen Haegg Johan Holtman Johan Vromans Johann Klasek +Johann 'Myrkraverk' Oskarsson Johannes Plunien John Bley John Borwick @@ -1120,6 +1126,7 @@ Sullivan Beck Sven Strickroth Sven Verdoolaege SynaptiCAD, Inc. +Tadeusz Sośnierz Takis Psarogiannakopoulos Taro KAWAGISHI Tassilo von Parseval diff --git a/Configure b/Configure index af2d6c0..2f91ba1 100755 --- a/Configure +++ b/Configure @@ -8542,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}\"" diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index caba29b..a6e2219 100644 --- a/Cross/config.sh-arm-linux +++ b/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' @@ -728,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='' @@ -736,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' @@ -871,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' @@ -937,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' @@ -986,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='' @@ -1076,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' @@ -1091,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/Cross/config.sh-arm-linux-n770 b/Cross/config.sh-arm-linux-n770 index 23e5bf6..8e7a509 100644 --- a/Cross/config.sh-arm-linux-n770 +++ b/Cross/config.sh-arm-linux-n770 @@ -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='' @@ -55,7 +55,7 @@ castflags='0' cat='cat' cc='arm-none-linux-gnueabi-gcc' 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' @@ -699,7 +699,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='' @@ -707,13 +707,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' @@ -841,8 +841,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' @@ -903,17 +903,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' @@ -950,7 +950,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='' @@ -1035,8 +1035,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' @@ -1050,7 +1050,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/INSTALL b/INSTALL index b1028ea..bc2374a 100644 --- a/INSTALL +++ b/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 This version is not binary compatible with prior releases of Perl. +B 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 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/MANIFEST b/MANIFEST index f4f7404..6896854 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2994,6 +2994,7 @@ dist/Data-Dumper/t/perl-74170.t Regression test for stack reallocation dist/Data-Dumper/t/purity_deepcopy_maxdepth.t See if three Data::Dumper functions work dist/Data-Dumper/t/qr.t See if Data::Dumper works with qr|/| dist/Data-Dumper/t/quotekeys.t See if Data::Dumper::Quotekeys works +dist/Data-Dumper/t/recurse.t See if Data::Dumper::Maxrecurse works dist/Data-Dumper/t/seen.t See if Data::Dumper::Seen works dist/Data-Dumper/t/sortkeys.t See if Data::Dumper::Sortkeys works dist/Data-Dumper/t/sparseseen.t See if Data::Dumper::Sparseseen works @@ -3305,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 @@ -4599,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 @@ -4695,6 +4697,7 @@ 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/perlunitut.pod Perl Unicode tutorial @@ -5433,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/META.json b/META.json index 2090c8c..82f25da 100644 --- a/META.json +++ b/META.json @@ -128,5 +128,5 @@ "url" : "http://perl5.git.perl.org/" } }, - "version" : "5.020001" + "version" : "5.020002" } diff --git a/META.yml b/META.yml index 791c91d..5dc17d5 100644 --- a/META.yml +++ b/META.yml @@ -115,4 +115,4 @@ resources: homepage: http://www.perl.org/ license: http://dev.perl.org/licenses/ repository: http://perl5.git.perl.org/ -version: '5.020001' +version: '5.020002' diff --git a/Makefile.SH b/Makefile.SH index 6e43217..a2e6034 100755 --- a/Makefile.SH +++ b/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 pod/perluniprops.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 @@ -1016,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` diff --git a/NetWare/Makefile b/NetWare/Makefile index a734058..71ba0da 100644 --- a/NetWare/Makefile +++ b/NetWare/Makefile @@ -86,7 +86,7 @@ NLM_VERSION = 3,20,0 # Here comes the CW tools - TO BE FILLED TO BUILD WITH CW - -MODULE_DESC = "Perl 5.20.1 for NetWare" +MODULE_DESC = "Perl 5.20.2 for NetWare" CCTYPE = CodeWarrior C_COMPILER = mwccnlm -c CPP_COMPILER = mwccnlm @@ -462,7 +462,7 @@ INST_NW_TOP2 = $(INST_NW_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 diff --git a/NetWare/config_H.wc b/NetWare/config_H.wc index f4ea8d8..8541736 100644 --- a/NetWare/config_H.wc +++ b/NetWare/config_H.wc @@ -1042,7 +1042,7 @@ * 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 "c:\\perl\\5.20.1\\lib\\NetWare-x86-multi-thread" /**/ +#define ARCHLIB "c:\\perl\\5.20.2\\lib\\NetWare-x86-multi-thread" /**/ /*#define ARCHLIB_EXP "" /**/ /* ARCHNAME: @@ -1073,8 +1073,8 @@ * This symbol is the filename expanded version of the BIN symbol, for * programs that do not want to deal with that at run-time. */ -#define BIN "c:\\perl\\5.20.1\\bin\\NetWare-x86-multi-thread" /**/ -#define BIN_EXP "c:\\perl\\5.20.1\\bin\\NetWare-x86-multi-thread" /**/ +#define BIN "c:\\perl\\5.20.2\\bin\\NetWare-x86-multi-thread" /**/ +#define BIN_EXP "c:\\perl\\5.20.2\\bin\\NetWare-x86-multi-thread" /**/ /* BYTEORDER: * This symbol holds the hexadecimal constant defined in byteorder, @@ -3051,7 +3051,7 @@ * 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 "c:\\perl\\site\\5.20.1\\lib\\NetWare-x86-multi-thread" /**/ +#define SITEARCH "c:\\perl\\site\\5.20.2\\lib\\NetWare-x86-multi-thread" /**/ /*#define SITEARCH_EXP "" /**/ /* SITELIB: @@ -3074,7 +3074,7 @@ * 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 "c:\\perl\\site\\5.20.1\\lib" /**/ +#define SITELIB "c:\\perl\\site\\5.20.2\\lib" /**/ /*#define SITELIB_EXP "" /**/ #define SITELIB_STEM "" /**/ diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index fa85183..8ad84f9 100755 --- a/Porting/Maintainers.pl +++ b/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' => { diff --git a/Porting/cmpVERSION.pl b/Porting/cmpVERSION.pl index c92fe78..f583191 100755 --- a/Porting/cmpVERSION.pl +++ b/Porting/cmpVERSION.pl @@ -83,6 +83,11 @@ my %skip; @skip{ 'cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm', # just a test module 'cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/XS.pm', # just a test module + 'cpan/Module-Build/t/lib/DistGen.pm', # just a test module + 'cpan/Module-Build/t/lib/MBTest.pm', # just a test module + 'cpan/Module-Metadata/t/lib/DistGen.pm', # just a test module + 'cpan/Module-Metadata/t/lib/MBTest.pm', # just a test module + 'cpan/Module-Metadata/t/lib/Tie/CPHash.pm', # just a test module 'dist/Attribute-Handlers/demo/MyClass.pm', # it's just demonstration code 'dist/Exporter/lib/Exporter/Heavy.pm', 'lib/Carp/Heavy.pm', @@ -120,6 +125,7 @@ sub pm_file_from_xs { # look for a .pm in lib/ based on that: my ($path) = shift =~ m!^(.*)/!; my ($last) = $path =~ m!([^/]+)\z!; + $last = 'List-Util' if $last eq 'Scalar-List-Utils'; $last =~ tr !-!/!; return "$path/lib/$last"; }) { @@ -189,11 +195,11 @@ foreach my $pm_file (sort keys %module_diffs) { and grep $pm_version eq $_, @{$skip_versions{$pm_file}}) { print "ok $count - SKIP $pm_file version $pm_version\n"; } else { - print "not ok $count - $pm_file\n"; + print "not ok $count - $pm_file version $pm_version\n"; } } else { push @diff, @{$module_diffs{$pm_file}}; - print "$pm_file\n"; + print "$pm_file version $pm_version\n"; } } } diff --git a/Porting/config.sh b/Porting/config.sh index e95b238..a9e84aa 100644 --- a/Porting/config.sh +++ b/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='' @@ -745,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='' @@ -753,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' @@ -883,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' @@ -892,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' @@ -959,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' @@ -995,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' @@ -1008,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='' @@ -1105,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' @@ -1116,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/Porting/config_H b/Porting/config_H index d1e17c7..e7eb91b 100644 --- a/Porting/config_H +++ b/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/Porting/corelist.pl b/Porting/corelist.pl index ab35359..fcca6d4 100755 --- a/Porting/corelist.pl +++ b/Porting/corelist.pl @@ -24,7 +24,6 @@ use IO::Uncompress::Gunzip; my $corelist_file = 'dist/Module-CoreList/lib/Module/CoreList.pm'; my $utils_file = 'dist/Module-CoreList/lib/Module/CoreList/Utils.pm'; -my $pod_file = 'dist/Module-CoreList/lib/Module/CoreList.pod'; my %lines; my %module_to_file; @@ -302,16 +301,6 @@ $corelist =~ s/^%bug_tracker .*? ;/$tracker/eismx; write_corelist($corelist,$corelist_file); -open( my $pod_fh, '<', $pod_file ); -my $pod = join( '', <$pod_fh> ); - -unless ( $pod =~ /and $perl_vstring releases of perl/ ) { - warn "Adding $perl_vstring to the list of perl versions covered by Module::CoreList\n"; - $pod =~ s/(currently\s+covers\s+(?:.*?))\s*and\s+(.*?)\s+releases\s+of\s+perl/$1, $2 and $perl_vstring releases of perl/ism; -} - -write_corelist($pod,$pod_file); - open( my $utils_fh, '<', $utils_file ); my $utils = join( '', <$utils_fh> ); close $utils_fh; @@ -342,7 +331,7 @@ $utils =~ s/^(my %delta\s*=\s*.*?)(^\);)$/$1$utilities_in_release$2/ism; write_corelist($utils,$utils_file); warn "All done. Please check over the following files carefully before committing.\nThanks!\n"; -warn "$corelist_file\n$pod_file\n$utils_file\n"; +warn "$corelist_file\n$utils_file\n"; sub write_corelist { my $content = shift; diff --git a/Porting/epigraphs.pod b/Porting/epigraphs.pod index ffb561f..0299225 100644 --- a/Porting/epigraphs.pod +++ b/Porting/epigraphs.pod @@ -17,6 +17,200 @@ Consult your favorite dictionary for details. =head1 EPIGRAPHS +=head2 v5.20.2-RC1 - Jonathan "Jonti" Picking, L<"Scampi"|http://www.weebls-stuff.com/other-toons/video/scampi.html> + +L + + I've seen things, + I've seen them with my eyes; + I've seen things, + They're often in disguise. + + Like carrots, handbags, cheese, toilets, + Russians, planets, hamsters, weddings, + Poets, Stalin, Kuala Lumpur! + Pygmies, budgies, Kuala Lumpur! + + I've seen things, + I've seen them with my eyes; + I've seen things, + They're often in disguise. + + Like carrots, handbags, cheese... + +=head2 v5.21.8 - Bill Watterson, "Scientific Progress Goes 'Boink': A Calvin and Hobbes Collection" + +L + +Calvin: OK Hobbes, press the button and duplicate me. +Hobbes: Are you sure this is such a good idea? +Calvin: Brother! You doubting Thomases get in the way of more scientific advances with your stupid ethical questions! This is a *BRILLIANT* idea! Hit the button, will ya? +Hobbes: I'd hate to be accused of inhibiting scientific progress... Here you go. +[Box]: *BOINK* +Hobbes: Scientific progress goes "BOINK"? +Calvin?: It worked! It worked! I'm a genius! +Cavlin??: No you're not, you liar! *I* invented this! + +=head2 v5.21.7 - Robert Heinlein, The Number of the Beast + +L + + "Zebadiah, Hilda and I salvaged and put everything into the basket. + Hilda started to put it into our wardrobe-and it was heavy. So + we looked. Packed as tight as when we left Oz. Six bananas-and + everything else. Cross my heart. No, go look." + "Hmmm- Jake, can you write equations for a picnic basket that + refills itself? Will it go on doing so?" + "Zeb, equations can be written to describe anything. The description + would be simpler for a basket that replenishes itself indefinitely + than for one that does it once and stops-I would have to describe + the discontinuity." + +=head2 v5.21.6 - Jeff Noon, Vurt + +L + + GAME CAT + + EXCHANGE MECHANISMS. Sometimes we lose precious + things. Friends and colleagues, fellow travellers in the + Vurt, sometimes we lose them; even lovers we sometimes + lose. And get bad things in exchange: aliens, objects, + snakes, and sometimes even death. Things we don't want. + This is part of the deal, part of the game deal; + all things, in all worlds, must be kept in balance. + Kittlings often ask, who decides on the swappings? Now then, + some say it's all accidental; that some poor Vurt thing + finds himself too close to a door, at too critical a time, + just when something real is being lost. Whoosh! Swap time! + Others say that some kind of overseer is working the + MECHANISMS OF EXCHANGE, deciding the fate of innocents. + The Cat can only tease at this, because of the big secrets + involved, and because of the levels between you, the reader, + and me, the Game Cat. Hey, listen; I've struggled to get + where I am today; why should I give you the easy route? + Get working, kittlings! Reach up higher. Work the Vurt. + +=head2 v5.21.5 - Friso Wiegersma (text), Jean Ferrat (music), Wim Sonneveld (performer), Het Dorp + +L + + Het Dorp + + Thuis heb ik nog een ansichtkaart + waarop een kerk, een kar met paard, + een slagerij J. van der Ven. + Een kroeg, een juffrouw op de fiets + het zegt u hoogstwaarschijnlijk niets, + maar 't is waar ik geboren ben. + Dit dorp, ik weet nog hoe het was, + de boerenkind'ren in de klas, + een kar die ratelt op de keien, + het raadhuis met een pomp ervoor, + een zandweg tussen koren door, + het vee, de boerderijen. + + En langs het tuinpad van m'n vader + zag ik de hoge bomen staan. + Ik was een kind en wist niet beter, + dan dat dat nooit voorbij zou gaan. + + Wat leefden ze eenvoudig toen + in simp'le huizen tussen groen + met boerenbloemen en een heg. + Maar blijkbaar leefden ze verkeerd, + het dorp is gemoderniseerd + en nu zijn ze op de goeie weg. + Want ziet, hoe rijk het leven is, + ze zien de televisiequiz + en wonen in betonnen dozen, + met flink veel glas, dan kun je zien + hoe of het bankstel staat bij Mien + en d'r dressoir met plastic rozen. + + En langs het tuinpad van m'n vader + zag ik de hoge bomen staan. + Ik was een kind en wist niet beter, + dan dat dat nooit voorbij zou gaan. + + De dorpsjeugd klit wat bij elkaar + in minirok en beatle-haar + en joelt wat mee met beat-muziek. + Ik weet wel, het is hun goeie recht, + de nieuwe tijd, net wat u zegt, + maar het maakt me wat melancholiek. + Ik heb hun vaders nog gekend + ze kochten zoethout voor een cent + ik zag hun moeders touwtjespringen. + Dat dorp van toen, het is voorbij, + dit is al wat er bleef voor mij: + een ansicht en herinneringen. + + Toen ik langs het tuinpad van m'n vader + de hoge bomen nog zag staan. + Ik was een kind, hoe kon ik weten + dat dat voorgoed voorbij zou gaan. + +=head2 v5.21.4 - Edgar Allan Poe, The Narrative of Arthur Gordon Pym of Nantucket + +L + + To-day, being in latitude 83° 20', longitude 43° 5' W. (the sea being + of an extraordinarily dark colour), we again saw land from the + masthead, and, upon a closer scrutiny, found it to be one of a group + of very large islands. The shore was precipitous, and the interior + seemed to be well wooded, a circumstance which occasioned us great + joy. In about four hours from our first discovering the land we came + to anchor in ten fathoms, sandy bottom, a league from the coast, as a + high surf, with strong ripples here and there, rendered a nearer + approach of doubtful expediency. The two largest boats were now + ordered out, and a party, well armed (among whome were Peters and + myself), proceeded to look for an opening in the reef which appeared + to encircle the island. After searching about for some time, we + discovered an inlet, which we were entering, when we saw four large + canoes put off from the shore, filled with men who seemed to be well + armed. We waited for them to come up, and, as they moved with great + rapidity, they were soon within hail. Captain Guy now held up a white + handkerchief on the blade of an oar, when the strangers made a full + stop, and commenced a loud jabbering all at once, intermingled with + occasional shouts, in which we could distinguish the words Anamoo-moo! + and Lama-Lama! They continued this for at least half an hour, during + which we had a good opportunity of observing their appearance. + +=head2 v5.20.1 - Lorenzo da Ponte, Così fan tutte + +L + + DORABELLA (as if waking from a daze): Where are they? + DON ALFONSO: They've gone. + FIORDILIGI: Oh, the cruel bitterness of parting! + + DON ALFONSO: + Take heart, my dearest children. + Look, in the distance, your lovers are waving to you. + + FIORDILIGI: Bon voyage, my darling! + DORABELLA: Bon voyage! + + FIORDILIGI: + O heavens! How swiftly the ship is sailing away! + It is disappearing already! + It is no longer in sight! + Oh, may heaven grant it a prosperous voyage! + + DORABELLA: May good luck attend it to the battlefield! + DON ALFONSO: And may your sweethearts and my friends be safe! + + FIORDILIGI, DORABELLA, DON ALFONSO: + May the wind be gentle, + may the sea be calm, + and may the elements + respond kindly + to our wishes. + + -- Lorenzo da Ponte, /Così fan tutte/, + trans. Diana Reed + =head2 v5.20.1-RC2 - Lorenzo da Ponte, Così fan tutte L @@ -511,6 +705,63 @@ L + + Along the shore the cloud waves break, + The twin suns sink beneath the lake, + The shadows lengthen + In Carcosa. + + Strange is the night where black stars rise, + And strange moons circle through the skies + But stranger still is + Lost Carcosa. + + Songs that the Hyades shall sing, + Where flap the tatters of the King, + Must die unheard in + Dim Carcosa. + + Song of my soul, my voice is dead; + Die thou, unsung, as tears unshed + Shall dry and die in + Lost Carcosa. + + -- Cassilda's Song in "The King in Yellow," Act i, Scene 2. + Robert W. Chambers + +=head2 v5.18.3 - (no epigraph) + +(no epigraph) + +=head2 v5.18.3-RC2 - Robert W. Chambers, "The King in Yellow" + +L + +"Ah! I see it now!" I shrieked. "You have seized the throne and the +empire. Woe! woe to you who are crowned with the crown of the King in +Yellow!" + + -- Robert W. Chambers, The King in Yellow, Act I, Scene 2. + +=head2 v5.18.3-RC1 - Robert W. Chambers, "The King in Yellow" + +L + + CAMILLA: You, sir, should unmask. + + STRANGER: Indeed? + + CASSILDA: Indeed it's time. We all have laid aside disguise but you. + + STRANGER: I wear no mask. + + CAMILLA: (Terrified, aside to Cassilda.) No mask? No mask! + + -- Robert W. Chambers, The King in Yellow, Act I, Scene 2. + =head2 v5.18.2 - Miss Manners L diff --git a/Porting/perldelta_template.pod b/Porting/perldelta_template.pod index f3cf1f4..53d4f2d 100644 --- a/Porting/perldelta_template.pod +++ b/Porting/perldelta_template.pod @@ -378,7 +378,7 @@ here. XXX Generate this with: - perl Porting/acknowledgements.pl v5.20.1..HEAD + perl Porting/acknowledgements.pl v5.20.2..HEAD =head1 Reporting Bugs diff --git a/Porting/release_announcement_template.txt b/Porting/release_announcement_template.txt index fbd8d22..9286ec8 100644 --- a/Porting/release_announcement_template.txt +++ b/Porting/release_announcement_template.txt @@ -21,7 +21,7 @@ the "pod" directory inside the release and on the web. [ACKNOWLEDGEMENTS SECTION FROM PERLDELTA] We expect to release version [NEXT BLEAD VERSION.SUBVERSION] on [FUTURE -DATE]. The next major stable release of Perl 5, version 20.0, should -appear in May 2014. +DATE]. The next major stable release of Perl 5, version 22.0, should +appear in May 2015. [YOUR SALUTATION HERE] diff --git a/Porting/release_managers_guide.pod b/Porting/release_managers_guide.pod index 1ab7132..52c9515 100644 --- a/Porting/release_managers_guide.pod +++ b/Porting/release_managers_guide.pod @@ -15,14 +15,14 @@ document that starts with a checklist for your release. This script is run as: - perl Porting/make-rmg-checklist \ - --type [BLEAD-POINT or MAINT or ...] > /tmp/rmg.pod + perl Porting/make-rmg-checklist \ + --type [BLEAD-POINT or MAINT or ...] > /tmp/rmg.pod You can also pass the C<--html> flag to generate an HTML document instead of POD. - perl Porting/make-rmg-checklist --html \ - --type [BLEAD-POINT or MAINT or ...] > /tmp/rmg.html + perl Porting/make-rmg-checklist --html \ + --type [BLEAD-POINT or MAINT or ...] > /tmp/rmg.html =head1 SYNOPSIS @@ -48,7 +48,7 @@ The checklist of a typical release cycle is as follows: a few weeks before the release, a number of steps are performed, including bumping the version to 5.10.2 - ...a few weeks passes... + ...a few weeks pass... perl-5.10.2-RC1 is released @@ -171,14 +171,9 @@ For updating the L web pages, either a Github account or sweet-talking somebody with a Github account into obedience is needed. This is only needed on the day of the release or shortly afterwards. -=for checklist skip RC - =head3 Quotation for release announcement epigraph -I - -For all except an RC release of perl, you will need a quotation -to use as an epigraph to your release announcement. +You will need a quotation to use as an epigraph to your release announcement. =head2 Building a release - advance actions @@ -326,23 +321,23 @@ C instead. Ensure dual-life CPAN modules are stable, which comes down to: - for each module that fails its regression tests on $current - did it fail identically on $previous? - if yes, "SEP" (Somebody Else's Problem) - else work out why it failed (a bisect is useful for this) + for each module that fails its regression tests on $current + did it fail identically on $previous? + if yes, "SEP" (Somebody Else's Problem) + else work out why it failed (a bisect is useful for this) - attempt to group failure causes + attempt to group failure causes - for each failure cause - is that a regression? - if yes, figure out how to fix it - (more code? revert the code that broke it) - else - (presumably) it's relying on something un-or-under-documented - should the existing behaviour stay? - yes - goto "regression" - no - note it in perldelta as a significant bugfix - (also, try to inform the module's author) + for each failure cause + is that a regression? + if yes, figure out how to fix it + (more code? revert the code that broke it) + else + (presumably) it's relying on something un-or-under-documented + should the existing behaviour stay? + yes - goto "regression" + no - note it in perldelta as a significant bugfix + (also, try to inform the module's author) =head3 monitor smoke tests for failures @@ -382,7 +377,7 @@ bump the version further. There is a tool to semi-automate this process: - $ ./perl -Ilib Porting/bump-perl-version -i 5.10.0 5.10.1 + $ ./perl -Ilib Porting/bump-perl-version -i 5.10.0 5.10.1 Remember that this tool is largely just grepping for '5.10.0' or whatever, so it will generate false positives. Be careful not change text like @@ -393,8 +388,11 @@ Use git status and git diff to select changes you want to keep. Be particularly careful with F, which contains a mixture of C<5.10.0>-type strings, some of which need bumping on every release, and some of which need to be left unchanged. -The line in F about "is binary incompatible with" requires a -correct choice of earlier version to declare incompatibility with. +See below in L<"update INSTALL"> for more details. + +For the first RC release leading up to a BLEAD-FINAL release, update the +description of which releases are now "officially" supported in +F. When doing a BLEAD-POINT or BLEAD-FINAL release, also make sure the C constants in F are in sync with the version @@ -406,24 +404,28 @@ to guarantee binary compatibility in maint branches. After editing, regenerate uconfig.h (this must be run on a system with a /bin/sh available): - $ perl regen/uconfig_h.pl + $ perl regen/uconfig_h.pl This might not cause any new changes. +You may have to add stub entries in C<%Module::CoreList::version>, +C<%Module::CoreList::deprecated> and C<%Module::CoreList::Utils::delta>. +If so, you must up their version numbers as well. + Test your changes: - $ git clean -xdf # careful if you don't have local files to keep! - $ ./Configure -des -Dusedevel - $ make - $ make test + $ git clean -xdf # careful if you don't have local files to keep! + $ ./Configure -des -Dusedevel + $ make + $ make test Commit your changes: - $ git status - $ git diff - B + $ git status + $ git diff + B - $ git commit -a -m 'Bump the perl version in various places for 5.x.y' + $ git commit -a -m 'Bump the perl version in various places for 5.x.y' At this point you may want to compare the commit with a previous bump to see if they look similar. See commit f7cf42bb69 for an example of a @@ -435,8 +437,11 @@ version number. =head3 update INSTALL -Review and update INSTALL to account for the change in version number; -in particular, the "Coexistence with earlier versions of perl 5" section. +Review and update INSTALL to account for the change in version number. +The lines in F about "is not binary compatible with" may require a +correct choice of earlier version to declare incompatibility with. These are +in the "Changes and Incompatibilities" and "Coexistence with earlier versions +of perl 5" sections. Be particularly careful with the section "Upgrading from 5.X.Y or earlier". The "X.Y" needs to be changed to the most recent version that we are @@ -453,7 +458,7 @@ release (so for 5.15.3 this would be 5.15.2). Check that the copyright years are up to date by running: - $ ./perl t/porting/copyright.t --now + $ ./perl t/porting/copyright.t --now Remedy any test failures by editing README or perl.c accordingly (search for the "Copyright"). If updating perl.c, check if the file's own copyright date in @@ -514,7 +519,7 @@ need to freeze blead during the release. This is less important for BLEAD-FINAL, MAINT, and RC releases, since blead will already be frozen in those cases. Create the branch by running - git checkout -b release-5.xx.yy + git checkout -b release-5.xx.yy =head3 build a clean perl @@ -528,12 +533,26 @@ then configure and build perl so that you have a Makefile and porting tools: $ ./Configure -Dusedevel -des && make +=head3 Check module versions + +For each Perl release since the previous release of the current branch, check +for modules that have identical version numbers but different contents by +running: + + $ ./perl Porting/cmpVERSION.pl --tag=v5.X.YY + +(This is done automatically by F for the previous +release of the current branch, but not for any releases from other branches.) + +Any modules that fail will need a version bump, plus a nudge to the upstream +maintainer for 'cpan' upstream modules. + =head3 update Module::CoreList =head4 Bump Module::CoreList* $VERSIONs -If necessary, bump C<$Module::CoreList::VERSION> (there's no need to do this for -every RC; in RC1, bump the version to a new clean number that will +If necessary, bump C<$Module::CoreList::VERSION> (there's no need to do this +for every RC; in RC1, bump the version to a new clean number that will appear in the final release, and leave as-is for the later RCs and final). It may also happen that C has been modified in blead, and hence has a new version number already. (But make sure it is not the same @@ -544,6 +563,10 @@ C<$Module::CoreList::Utils::VERSION> should always be equal to C<$Module::CoreList::VERSION>. If necessary, bump those two versions to match before proceeding. +The files to modify are: F, +F and +F. + =head4 Update C with module version data for the new release. Note that if this is a MAINT release, you should run the following actions @@ -588,13 +611,11 @@ This will chug for a while, possibly reporting various warnings about badly-indexed CPAN modules unrelated to the modules actually in core. Assuming all goes well, it will update F and possibly -F and/or F. Check those files over carefully: $ git diff dist/Module-CoreList/lib/Module/CoreList.pm - $ git diff dist/Module-CoreList/lib/Module/CoreList.pod $ git diff dist/Module-CoreList/lib/Module/CoreList/Utils.pm =head4 Bump version in Module::CoreList F @@ -607,23 +628,10 @@ Add a perldelta entry for the new Module::CoreList version. =for checklist skip RC -=head4 Update C<%Module::CoreList::released> and C - -In addition, if this is a final release (rather than a release candidate): - -=over 4 - -=item * +=head4 Update C<%Module::CoreList::released> -Update this version's entry in the C<%released> hash with today's date. - -=item * - -Make sure that the script has correctly updated the C section -(Note, the C section is in -F) - -=back +For any release except an RC: Update this version's entry in the C<%released> +hash with today's date. =head4 Commit Module::CoreList changes @@ -631,23 +639,33 @@ Finally, commit the new version of Module::CoreList: (unless this is for MAINT; in which case commit it to blead first, then cherry-pick it back). - $ git commit -m 'Update Module::CoreList for 5.x.y' dist/Module-CoreList/Changes dist/Module-CoreList/lib/Module/CoreList.pm dist/Module-CoreList/lib/Module/CoreList.pod dist/Module-CoreList/lib/Module/CoreList/Utils.pm + $ git commit -m 'Update Module::CoreList for 5.x.y' \ + dist/Module-CoreList/Changes \ + dist/Module-CoreList/lib/Module/CoreList.pm \ + dist/Module-CoreList/lib/Module/CoreList/Utils.pm =head4 Rebuild and test -Build and test to get the changes into the currently built lib directory and to ensure -all tests are passing. +Build and test to get the changes into the currently built lib directory and to +ensure all tests are passing. =head3 finalize perldelta Finalize the perldelta. In particular, fill in the Acknowledgements section, which can be generated with something like: - $ perl Porting/acknowledgements.pl v5.15.0..HEAD + $ perl Porting/acknowledgements.pl v5.15.0..HEAD + +Fill in the "New/Updated Modules" sections now that Module::CoreList is +updated: + + $ ./perl -Ilib Porting/corelist-perldelta.pl \ + --mode=update pod/perldelta.pod -Fill in the "New/Updated Modules" sections now that Module::CoreList is updated: +For a MAINT release use something like this instead: - $ ./perl -Ilib Porting/corelist-perldelta.pl --mode=update pod/perldelta.pod + $ ./perl -Ilib Porting/corelist-perldelta.pl 5.020001 5.020002 \ + --mode=update pod/perldelta.pod Ideally, also fill in a summary of the major changes to each module for which an entry has been added by F. @@ -663,7 +681,8 @@ run through pod and spell checkers, e.g. Also, you may want to generate and view an HTML version of it to check formatting, e.g. - $ ./perl -Ilib ext/Pod-Html/bin/pod2html pod/perldelta.pod > /tmp/perldelta.html + $ ./perl -Ilib ext/Pod-Html/bin/pod2html pod/perldelta.pod > \ + /tmp/perldelta.html Another good HTML preview option is http://search.cpan.org/pod2html @@ -744,20 +763,15 @@ from blead: $ cp ..../blead/pod/perlhist.pod pod/ $ git commit -m 'sync perlhist from blead' pod/perlhist.pod -=for checklist skip RC - =head3 update perlhist.pod -I - Add an entry to F with the release date, e.g.: David 5.10.1 2009-Aug-06 -Make sure that the correct pumpking is listed in the left-hand column, and -if this is the first release under the stewardship of a new pumpking, make -sure that his or her name is listed in the section entitled -C. +List yourself in the left-hand column, and if this is the first release +that you've ever done, make sure that your name is listed in the section +entitled C. I, also update the "SELECTED RELEASE SIZES" section with the output of @@ -779,7 +793,9 @@ a final release, remove it. For example: static const char * const local_patches[] = { NULL + ,"RC1" - PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */ + #ifdef PERL_GIT_UNCOMMITTED_CHANGES + ,"uncommitted-changes" + #endif Be sure to commit your change: @@ -814,7 +830,7 @@ directory, they will still identify themselves using git tags and commits. (Note that for an odd-numbered version, perl will install itself as C). C will identify itself as: - This is perl 5, version X, subversion Y (v5.X.Y (v5.X.Z-NNN-gdeadbeef)) + This is perl 5, version X, subversion Y (v5.X.Y (v5.X.Z-NNN-gdeadbeef)) where 5.X.Z is the latest tag, NNN the number of commits since this tag, and C<< deadbeef >> commit of that tag. @@ -848,13 +864,14 @@ up. Create a tarball. Use the C<-s> option to specify a suitable suffix for the tarball and directory name: - $ cd root/of/perl/tree - $ make distclean - $ git clean -xdf # make sure perl and git agree on files - $ git status # and there's nothing lying around + $ cd root/of/perl/tree + $ make distclean # make sure distclean works + $ git clean -xdf # make sure perl and git agree on files + # git clean should not output anything! + $ git status # and there's nothing lying around - $ perl Porting/makerel -b -s RC1 # for a release candidate - $ perl Porting/makerel -b # for a final release + $ perl Porting/makerel -b -s RC1 # for a release candidate + $ perl Porting/makerel -b # for a final release This creates the directory F<../perl-x.y.z-RC1> or similar, copies all the MANIFEST files into it, sets the correct permissions on them, then @@ -895,6 +912,9 @@ Check that basic configuration and tests work on each test machine: $ ./Configure -des && make all test + # Or for a development release: + $ ./Configure -Dusedevel -des && make all test + =head4 Run the test harness and install Check that the test harness and install work on each test machine: @@ -940,12 +960,15 @@ Bootstrap the CPAN client on the clean install: $ bin/cpan + # Or, perhaps: + $ bin/cpan5.xx.x + =head4 Install the Inline module with CPAN and test it Try installing a popular CPAN module that's reasonably complex and that has dependencies; for example: - CPAN> install Inline + CPAN> install Inline::C CPAN> quit Check that your perl can run this: @@ -1046,7 +1069,9 @@ Disarm the F change; for example, static const char * const local_patches[] = { NULL - ,"RC1" - PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */ + #ifdef PERL_GIT_UNCOMMITTED_CHANGES + ,"uncommitted-changes" + #endif Be sure to commit your change: @@ -1064,11 +1089,11 @@ Send a carbon copy to C Merge the (local) release branch back into master now, and delete it. - git checkout blead - git pull - git merge release-5.xx.yy - git push - git branch -d release-5.xx.yy + git checkout blead + git pull + git merge release-5.xx.yy + git push + git branch -d release-5.xx.yy Note: The merge will create a merge commit if other changes have been pushed to blead while you've been working on your release branch. Do NOT rebase your @@ -1098,6 +1123,14 @@ why you chose that particular quote for your epigraph. =for checklist skip RC +=head3 Release schedule + +I + +Tick the entry for your release in F. + +=for checklist skip RC + =head3 Module::CoreList nagging I @@ -1176,6 +1209,18 @@ L<"Bump the version number">. After bumping the version, follow the section L<"update INSTALL"> to ensure all version number references are correct. +(Note: The version is NOT bumped immediately after a MAINT release in order +to avoid confusion and wasted time arising from bug reports relating to +"intermediate versions" such as 5.20.1-and-a-bit: If the report is caused +by a bug that gets fixed in 5.20.2 and this intermediate version already +calls itself 5.20.2 then much time can be wasted in figuring out why there +is a failure from something that "should have been fixed". If the bump is +late then there is a much smaller window of time for such confusing bug +reports to arise. (The opposite problem -- trying to figure out why there +*is* a bug in something calling itself 5.20.1 when in fact the bug was +introduced later -- shouldn't arise for MAINT releases since they should, +in theory, only contain bug fixes but never regressions.)) + =head3 clean build and test Run a clean build and test to make sure nothing obvious is broken. @@ -1183,7 +1228,7 @@ Run a clean build and test to make sure nothing obvious is broken. In particular, F is intentionally exempted from podchecker tests, to avoid false positives about placeholder text. However, once it's copied to F the contents can now -cause test failures. Problems should resolved by doing one of the +cause test failures. Problems should be resolved by doing one of the following: =over @@ -1251,9 +1296,9 @@ I Copy the perldelta.pod for this release into blead; for example: - $ cd ..../blead - $ cp -i ../5.10.x/pod/perldelta.pod pod/perl5101delta.pod # for example - $ git add pod/perl5101delta.pod + $ cd ..../blead + $ cp -i ../5.10.x/pod/perldelta.pod pod/perl5101delta.pod # for example + $ git add pod/perl5101delta.pod Don't forget to set the NAME correctly in the new file (e.g. perl5101delta rather than perldelta). @@ -1278,7 +1323,7 @@ Finally, commit and push: Make sure any recent F entries are copied to F on blead. e.g. - 5.8.9 2008-Dec-14 + 5.8.9 2008-Dec-14 =head3 bump RT version number @@ -1301,11 +1346,6 @@ Thanks for releasing perl! =head2 Building a release - the day after -=head3 link announcement in epigraphs.pod - -Add, to your quote to F, a link to the release -announcement in the web-visible mailing list archive. Commit it. - =for checklist skip BLEAD-FINAL, MAINT, RC =head3 update Module::CoreList @@ -1339,8 +1379,7 @@ Otherwise, run: $ ./perl -Ilib Porting/corelist.pl cpan -This will update F, -F and +This will update F and F as it did before, but this time adding new sections for the next BLEAD-POINT release. @@ -1363,7 +1402,8 @@ test_porting makefile target to check that they're ok. Run - $ ./perl -Ilib -MModule::CoreList -le 'print Module::CoreList->find_version($]) ? "ok" : "not ok"' + $ ./perl -Ilib -MModule::CoreList \ + -le 'print Module::CoreList->find_version($]) ? "ok" : "not ok"' and check that it outputs "ok" to prove that Module::CoreList now knows about blead's current version. diff --git a/Porting/release_schedule.pod b/Porting/release_schedule.pod index 0c74d1b..f0c62eb 100644 --- a/Porting/release_schedule.pod +++ b/Porting/release_schedule.pod @@ -8,38 +8,32 @@ release_schedule - Perl 5 release schedule This schedule lists the projected or historical development and release schedules for the next, current and previous stable versions -of Perl. Dates with all question marks will only be releases if +of Perl. Dates with two or more question marks will only be releases if deemed necessary by the Pumpking. -=head2 Perl 5.20 +=head2 Perl 5.22 -Code freezes (which happen in the 5.19.X series) +Code freezes (which happen in the 5.21.X series) - 2014-01-20 5.19.8 Contentious changes freeze - 2014-02-20 5.19.9 User-visible changes freeze - 2014-03-20 5.19.10 Full code freeze - 2014-05-20 5.20.0 Stable release! + 2015-01-20 5.21.8 Contentious changes freeze + 2015-02-20 5.21.9 User-visible changes freeze + 2015-03-20 5.21.10 Full code freeze + 2015-05-20 5.22.0 Stable release! -=head2 Perl 5.18 +=head2 Perl 5.20 -Release schedule (with release manager): + 2014-05-27 5.20.0 ✓ Ricardo Signes + 2014-09-14 5.20.1 ✓ Steve Hay + 2015-01-?? 5.20.2 Steve Hay + +=head2 Perl 5.18 2013-05-18 5.18.0 ✓ Ricardo Signes 2013-08-12 5.18.1 ✓ Ricardo Signes - 2013-11-?? 5.18.2 Ricardo Signes - -(RC0 will be released once we think that all the blockers have been -addressed. This typically means some time in April or May.) - -=head2 Perl 5.16 - -Release schedule (with release managers): - - 2012-05-20 5.16.0 ✓ Ricardo Signes - 2012-08-08 5.16.1 ✓ Ricardo Signes - 2012-11-01 5.16.2 ✓ Ricardo Signes - 2013-03-11 5.16.3 ✓ Ricardo Signes - ????-??-?? 5.16.4 ?? + 2014-01-06 5.18.2 ✓ Ricardo Signes + 2014-10-01 5.18.3 ✓ Ricardo Signes + 2014-10-01 5.18.4 ✓ Ricardo Signes + 2015-??-?? 5.18.5 ?? =head1 DEVELOPMENT RELEASE SCHEDULE @@ -55,36 +49,24 @@ When shipping a release, you should include the schedule for (at least) the next four releases. If a stable version of Perl is released, you should reset the version numbers to the next blead series. -=head2 Perl 5.19 - - 2013-05-20 5.19.0 Ricardo Signes - 2013-06-20 5.19.1 David Golden - 2013-07-20 5.19.2 Aristotle Pagaltzis - 2013-08-20 5.19.3 Steve Hay - 2013-09-20 5.19.4 Steve Hay - 2013-10-20 5.19.5 Steve Hay - 2013-11-20 5.19.6 Chris Williams - 2013-12-20 5.19.7 Abigail - 2014-01-20 5.19.8 Ricardo Signes - 2014-02-20 5.19.9 Tony Cook - 2014-03-20 5.19.10 Aaron Crane - 2014-04-20 5.19.11 Steve Hay - =head2 Perl 5.21 - 2014-05-20 5.21.0 Ricardo Signes - 2014-06-20 5.21.1 Matthew Horsfall - 2014-07-20 5.21.2 Abigail - 2014-08-20 5.21.3 ? - 2014-09-20 5.21.4 ? - 2014-10-20 5.21.5 ? - 2014-11-20 5.21.6 ? - 2014-12-20 5.21.7 ? - 2015-01-20 5.21.8 ? + 2014-05-20 5.21.0 ✓ Ricardo Signes + 2014-06-20 5.21.1 ✓ Matthew Horsfall + 2014-07-20 5.21.2 ✓ Abigail + 2014-08-20 5.21.3 ✓ Peter Martini + 2014-09-20 5.21.4 ✓ Steve Hay + 2014-10-20 5.21.5 ✓ Abigail + 2014-11-20 5.21.6 ✓ Chris "BinGOs" Williams + 2014-12-20 5.21.7 ✓ Max Maischein + 2015-01-20 5.21.8 ✓ Matthew Horsfall 2015-02-20 5.21.9 ? 2015-03-20 5.21.10 ? 2015-04-20 5.21.11 ? +(RC0 for 5.22.0 will be released once we think that all the blockers have been +addressed. This typically means some time in April or May.) + =head1 VICTIMS The following porters have all consented to do at least @@ -106,6 +88,7 @@ Jesse Luehrs Jesse Vincent Leon Brocard Matt Trout +Matthew Horsfall Max Maischein Peter Martini Philippe Bruhat diff --git a/Porting/todo.pod b/Porting/todo.pod index 98ec00c..9b7cfdf 100644 --- a/Porting/todo.pod +++ b/Porting/todo.pod @@ -467,7 +467,7 @@ Natively 64-bit systems need neither -Duse64bitint nor -Duse64bitall. On these systems, it might be the default compilation mode, and there is currently no guarantee that passing no use64bitall option to the Configure process will build a 32bit perl. Implementing -Duse32bit* -options would be nice for perl 5.20.1. +options would be nice for perl 5.20.2. =head2 Profile Perl - am I hot or not? @@ -1023,14 +1023,15 @@ The old perltodo notes "Look at the "reification" code in C". =head2 Virtualize operating system access Implement a set of "vtables" that virtualizes operating system access -(open(), mkdir(), unlink(), readdir(), getenv(), etc.) At the very -least these interfaces should take SVs as "name" arguments instead of -bare char pointers; probably the most flexible and extensible way -would be for the Perl-facing interfaces to accept HVs. The system -needs to be per-operating-system and per-file-system -hookable/filterable, preferably both from XS and Perl level -(L is good reading at this point, -in fact, all of L is.) +(chdir(), chmod(), dbmopen(), getenv(), glob(), link(), mkdir(), open(), +opendir(), readdir(), rename(), rmdir(), stat(), sysopen(), uname(), +unlink(), etc.) At the very least these interfaces should take SVs as +"name" arguments instead of bare char pointers; probably the most +flexible and extensible way would be for the Perl-facing interfaces to +accept HVs. The system needs to be per-operating-system and +per-file-system hookable/filterable, preferably both from XS and Perl +level (L is good reading at this +point, in fact, all of L is.) This has actually already been implemented (but only for Win32), take a look at F and F. While all Win32 @@ -1176,7 +1177,7 @@ L =head1 Big projects Tasks that will get your name mentioned in the description of the "Highlights -of 5.20.1" +of 5.20.2" =head2 make ithreads more robust diff --git a/README b/README index 804d41d..e69b0ec 100644 --- a/README +++ b/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/README.haiku b/README.haiku index 74d14db..ebad8be 100644 --- a/README.haiku +++ b/README.haiku @@ -22,9 +22,9 @@ The build procedure is completely standard: Make perl executable and create a symlink for libperl: chmod a+x /boot/common/bin/perl - cd /boot/common/lib; ln -s perl5/5.20.1/BePC-haiku/CORE/libperl.so . + cd /boot/common/lib; ln -s perl5/5.20.2/BePC-haiku/CORE/libperl.so . -Replace C<5.20.1> with your respective version of Perl. +Replace C<5.20.2> with your respective version of Perl. =head1 KNOWN PROBLEMS diff --git a/README.macosx b/README.macosx index 42cae21..5797303 100644 --- a/README.macosx +++ b/README.macosx @@ -10,9 +10,9 @@ perlmacosx - Perl under Mac OS X This document briefly describes Perl under Mac OS X. - curl -O http://www.cpan.org/src/perl-5.20.1.tar.gz - tar -xzf perl-5.20.1.tar.gz - cd perl-5.20.1 + curl -O http://www.cpan.org/src/perl-5.20.2.tar.gz + tar -xzf perl-5.20.2.tar.gz + cd perl-5.20.2 ./Configure -des -Dprefix=/usr/local/ make make test @@ -20,7 +20,7 @@ This document briefly describes Perl under Mac OS X. =head1 DESCRIPTION -The latest Perl release (5.20.1 as of this writing) builds without changes +The latest Perl release (5.20.2 as of this writing) builds without changes under all versions of Mac OS X from 10.3 "Panther" onwards. In order to build your own version of Perl you will need 'make', diff --git a/README.os2 b/README.os2 index 146c965..86324c1 100644 --- a/README.os2 +++ b/README.os2 @@ -619,7 +619,7 @@ C in F, 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), you diff --git a/README.vms b/README.vms index e0e0d91..365705f 100644 --- a/README.vms +++ b/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/README.win32 b/README.win32 index e4d457a..d697459 100644 --- a/README.win32 +++ b/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 file to compile for x86-32 and for +x86-64 C or C. On a typical install of a +Microsoft C compiler product, these batch files will already be in your C +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. Try to keep your PATH enviromental +variable with the least number of folders possible (remember to keep your C +compiler's folders there). C or C +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 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 before investing too much effort into +L 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 +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 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, 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/cpan/CPAN/lib/CPAN/Author.pm b/cpan/CPAN/lib/CPAN/Author.pm index a8429cf..572f3ab 100644 --- a/cpan/CPAN/lib/CPAN/Author.pm +++ b/cpan/CPAN/lib/CPAN/Author.pm @@ -8,7 +8,7 @@ use CPAN::InfoObj; use vars qw( $VERSION ); -$VERSION = "5.5001"; +$VERSION = "5.5002"; package CPAN::Author; use strict; diff --git a/cpan/CPAN/lib/CPAN/CacheMgr.pm b/cpan/CPAN/lib/CPAN/CacheMgr.pm index d50ed52..144efd6 100644 --- a/cpan/CPAN/lib/CPAN/CacheMgr.pm +++ b/cpan/CPAN/lib/CPAN/CacheMgr.pm @@ -10,7 +10,7 @@ use File::Find; use vars qw( $VERSION ); -$VERSION = "5.5001"; +$VERSION = "5.5002"; package CPAN::CacheMgr; use strict; diff --git a/cpan/CPAN/lib/CPAN/FTP.pm b/cpan/CPAN/lib/CPAN/FTP.pm index 8aaf3d3..831f234 100644 --- a/cpan/CPAN/lib/CPAN/FTP.pm +++ b/cpan/CPAN/lib/CPAN/FTP.pm @@ -14,7 +14,7 @@ use vars qw($connect_to_internet_ok $Ua $Thesite $ThesiteURL $Themethod); use vars qw( $VERSION ); -$VERSION = "5.5005"; +$VERSION = "5.5006"; #-> sub CPAN::FTP::ftp_statistics # if they want to rewrite, they need to pass in a filehandle diff --git a/cpan/CPAN/lib/CPAN/HTTP/Client.pm b/cpan/CPAN/lib/CPAN/HTTP/Client.pm index 8cb1c80..4fc792c 100644 --- a/cpan/CPAN/lib/CPAN/HTTP/Client.pm +++ b/cpan/CPAN/lib/CPAN/HTTP/Client.pm @@ -6,7 +6,7 @@ use vars qw(@ISA); use CPAN::HTTP::Credentials; use HTTP::Tiny 0.005; -$CPAN::HTTP::Client::VERSION = $CPAN::HTTP::Client::VERSION = "1.9600"; +$CPAN::HTTP::Client::VERSION = $CPAN::HTTP::Client::VERSION = "1.9601"; # CPAN::HTTP::Client is adapted from parts of cpanm by Tatsuhiko Miyagawa # and parts of LWP by Gisle Aas diff --git a/cpan/CPAN/lib/CPAN/HandleConfig.pm b/cpan/CPAN/lib/CPAN/HandleConfig.pm index f114321..a138128 100644 --- a/cpan/CPAN/lib/CPAN/HandleConfig.pm +++ b/cpan/CPAN/lib/CPAN/HandleConfig.pm @@ -12,7 +12,7 @@ CPAN::HandleConfig - internal configuration handling for CPAN.pm =cut -$VERSION = "5.5003"; # see also CPAN::Config::VERSION at end of file +$VERSION = "5.5005"; # see also CPAN::Config::VERSION at end of file %can = ( commit => "Commit changes to disk", @@ -768,7 +768,7 @@ sub prefs_lookup { use strict; use vars qw($AUTOLOAD $VERSION); - $VERSION = "5.5002"; + $VERSION = "5.5005"; # formerly CPAN::HandleConfig was known as CPAN::Config sub AUTOLOAD { ## no critic diff --git a/cpan/CPAN/lib/CPAN/Index.pm b/cpan/CPAN/lib/CPAN/Index.pm index f52bf36..8205d78 100644 --- a/cpan/CPAN/lib/CPAN/Index.pm +++ b/cpan/CPAN/lib/CPAN/Index.pm @@ -1,7 +1,7 @@ package CPAN::Index; use strict; use vars qw($LAST_TIME $DATE_OF_02 $DATE_OF_03 $HAVE_REANIMATED $VERSION); -$VERSION = "1.9600"; +$VERSION = "1.9601"; @CPAN::Index::ISA = qw(CPAN::Debug); $LAST_TIME ||= 0; $DATE_OF_03 ||= 0; diff --git a/cpan/CPAN/lib/CPAN/LWP/UserAgent.pm b/cpan/CPAN/lib/CPAN/LWP/UserAgent.pm index 8a59862..fe8bf27 100644 --- a/cpan/CPAN/lib/CPAN/LWP/UserAgent.pm +++ b/cpan/CPAN/lib/CPAN/LWP/UserAgent.pm @@ -6,7 +6,7 @@ use vars qw(@ISA $USER $PASSWD $SETUPDONE); use CPAN::HTTP::Credentials; # we delay requiring LWP::UserAgent and setting up inheritance until we need it -$CPAN::LWP::UserAgent::VERSION = $CPAN::LWP::UserAgent::VERSION = "1.9600"; +$CPAN::LWP::UserAgent::VERSION = $CPAN::LWP::UserAgent::VERSION = "1.9601"; sub config { diff --git a/cpan/CPAN/lib/CPAN/Mirrors.pm b/cpan/CPAN/lib/CPAN/Mirrors.pm index 4304f53..37e7ce0 100644 --- a/cpan/CPAN/lib/CPAN/Mirrors.pm +++ b/cpan/CPAN/lib/CPAN/Mirrors.pm @@ -34,7 +34,7 @@ CPAN::Mirrors - Get CPAN mirror information and select a fast one package CPAN::Mirrors; use strict; use vars qw($VERSION $urllist $silent); -$VERSION = "1.9600"; +$VERSION = "1.9601"; use Carp; use FileHandle; diff --git a/cpan/Pod-Parser/lib/Pod/PlainText.pm b/cpan/Pod-Parser/lib/Pod/PlainText.pm index 5f93b88..3db4d90 100644 --- a/cpan/Pod-Parser/lib/Pod/PlainText.pm +++ b/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) { diff --git a/dist/Data-Dumper/Dumper.pm b/dist/Data-Dumper/Dumper.pm index 7c8a72c..a084712 100644 --- a/dist/Data-Dumper/Dumper.pm +++ b/dist/Data-Dumper/Dumper.pm @@ -10,7 +10,7 @@ package Data::Dumper; BEGIN { - $VERSION = '2.151'; # Don't forget to set version and release + $VERSION = '2.151_01'; # Don't forget to set version and release } # date in POD below! #$| = 1; @@ -56,6 +56,7 @@ $Useperl = 0 unless defined $Useperl; $Sortkeys = 0 unless defined $Sortkeys; $Deparse = 0 unless defined $Deparse; $Sparseseen = 0 unless defined $Sparseseen; +$Maxrecurse = 1000 unless defined $Maxrecurse; # # expects an arrayref of values to be dumped. @@ -92,6 +93,7 @@ sub new { 'bless' => $Bless, # keyword to use for "bless" # expdepth => $Expdepth, # cutoff depth for explicit dumping maxdepth => $Maxdepth, # depth beyond which we give up + maxrecurse => $Maxrecurse, # depth beyond which we abort useperl => $Useperl, # use the pure Perl implementation sortkeys => $Sortkeys, # flag or filter for sorting hash keys deparse => $Deparse, # use B::Deparse for coderefs @@ -350,6 +352,12 @@ sub _dump { return qq['$val']; } + # avoid recursing infinitely [perl #122111] + if ($s->{maxrecurse} > 0 + and $s->{level} >= $s->{maxrecurse}) { + die "Recursion limit of $s->{maxrecurse} exceeded"; + } + # we have a blessed ref my ($blesspad); if ($realpack and !$no_bless) { @@ -680,6 +688,11 @@ sub Maxdepth { defined($v) ? (($s->{'maxdepth'} = $v), return $s) : $s->{'maxdepth'}; } +sub Maxrecurse { + my($s, $v) = @_; + defined($v) ? (($s->{'maxrecurse'} = $v), return $s) : $s->{'maxrecurse'}; +} + sub Useperl { my($s, $v) = @_; defined($v) ? (($s->{'useperl'} = $v), return $s) : $s->{'useperl'}; @@ -1105,6 +1118,16 @@ no maximum depth. =item * +$Data::Dumper::Maxrecurse I $I->Maxrecurse(I<[NEWVAL]>) + +Can be set to a positive integer that specifies the depth beyond which +recursion into a structure will throw an exception. This is intended +as a security measure to prevent perl running out of stack space when +dumping an excessively deep structure. Can be set to 0 to remove the +limit. Default is 1000. + +=item * + $Data::Dumper::Useperl I $I->Useperl(I<[NEWVAL]>) Can be set to a boolean value which controls whether the pure Perl @@ -1398,7 +1421,7 @@ modify it under the same terms as Perl itself. =head1 VERSION -Version 2.151 (March 7 2014) +Version 2.151_01 (January 8 2015) =head1 SEE ALSO diff --git a/dist/Data-Dumper/Dumper.xs b/dist/Data-Dumper/Dumper.xs index 12c4ebd..49937be 100644 --- a/dist/Data-Dumper/Dumper.xs +++ b/dist/Data-Dumper/Dumper.xs @@ -28,7 +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); + I32 maxdepth, SV *sortkeys, int use_sparse_seen_hash, I32 useqq, IV maxrecurse); #ifndef HvNAME_get #define HvNAME_get HvNAME @@ -412,7 +412,7 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv, AV *postav, I32 *levelp, I32 indent, 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) + int use_sparse_seen_hash, I32 useqq, IV maxrecurse) { char tmpbuf[128]; Size_t i; @@ -589,6 +589,10 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv, return 1; } + if (maxrecurse > 0 && *levelp >= maxrecurse) { + croak("Recursion limit of %" IVdf " exceeded", maxrecurse); + } + if (realpack && !no_bless) { /* we have a blessed ref */ STRLEN blesslen; const char * const blessstr = SvPV(bless, blesslen); @@ -674,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); + maxdepth, sortkeys, use_sparse_seen_hash, useqq, + maxrecurse); sv_catpvn(retval, ")}", 2); } /* plain */ else { @@ -682,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); + maxdepth, sortkeys, use_sparse_seen_hash, useqq, + maxrecurse); } SvREFCNT_dec(namesv); } @@ -694,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); + maxdepth, sortkeys, use_sparse_seen_hash, useqq, + maxrecurse); SvREFCNT_dec(namesv); } else if (realtype == SVt_PVAV) { @@ -767,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); + maxdepth, sortkeys, use_sparse_seen_hash, + useqq, maxrecurse); if (ix < ixmax) sv_catpvn(retval, ",", 1); } @@ -970,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); + maxdepth, sortkeys, use_sparse_seen_hash, useqq, + maxrecurse); SvREFCNT_dec(sname); Safefree(nkey_buffer); if (indent >= 2) @@ -1179,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); + sortkeys, use_sparse_seen_hash, useqq, + maxrecurse); SvREFCNT_dec(e); } } @@ -1269,6 +1279,7 @@ Data_Dumper_Dumpxs(href, ...) SV *val, *name, *pad, *xpad, *apad, *sep, *pair, *varname; SV *freezer, *toaster, *bless, *sortkeys; I32 purity, deepcopy, quotekeys, maxdepth = 0; + IV maxrecurse = 1000; char tmpbuf[1024]; I32 gimme = GIMME; int use_sparse_seen_hash = 0; @@ -1355,6 +1366,8 @@ Data_Dumper_Dumpxs(href, ...) bless = *svp; if ((svp = hv_fetch(hv, "maxdepth", 8, FALSE))) maxdepth = SvIV(*svp); + if ((svp = hv_fetch(hv, "maxrecurse", 10, FALSE))) + maxrecurse = SvIV(*svp); if ((svp = hv_fetch(hv, "sortkeys", 8, FALSE))) { sortkeys = *svp; if (! SvTRUE(sortkeys)) @@ -1434,7 +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); + bless, maxdepth, sortkeys, use_sparse_seen_hash, + useqq, maxrecurse); SPAGAIN; if (indent >= 2 && !terse) diff --git a/dist/Data-Dumper/t/recurse.t b/dist/Data-Dumper/t/recurse.t new file mode 100644 index 0000000..275a89d --- /dev/null +++ b/dist/Data-Dumper/t/recurse.t @@ -0,0 +1,45 @@ +#!perl + +# Test the Maxrecurse option + +use strict; +use Test::More tests => 32; +use Data::Dumper; + +SKIP: { + skip "no XS available", 16 + if $Data::Dumper::Useperl; + local $Data::Dumper::Useperl = 1; + test_recursion(); +} + +test_recursion(); + +sub test_recursion { + my $pp = $Data::Dumper::Useperl ? "pure perl" : "XS"; + $Data::Dumper::Purity = 1; # make sure this has no effect + $Data::Dumper::Indent = 0; + $Data::Dumper::Maxrecurse = 1; + is(eval { Dumper([]) }, '$VAR1 = [];', "$pp: maxrecurse 1, []"); + is(eval { Dumper([[]]) }, undef, "$pp: maxrecurse 1, [[]]"); + ok($@, "exception thrown"); + is(eval { Dumper({}) }, '$VAR1 = {};', "$pp: maxrecurse 1, {}"); + is(eval { Dumper({ a => 1 }) }, q($VAR1 = {'a' => 1};), + "$pp: maxrecurse 1, { a => 1 }"); + is(eval { Dumper({ a => {} }) }, undef, "$pp: maxrecurse 1, { a => {} }"); + ok($@, "exception thrown"); + is(eval { Dumper(\1) }, "\$VAR1 = \\1;", "$pp: maxrecurse 1, \\1"); + is(eval { Dumper(\\1) }, undef, "$pp: maxrecurse 1, \\1"); + ok($@, "exception thrown"); + $Data::Dumper::Maxrecurse = 3; + is(eval { Dumper(\1) }, "\$VAR1 = \\1;", "$pp: maxrecurse 3, \\1"); + is(eval { Dumper(\(my $s = {})) }, "\$VAR1 = \\{};", "$pp: maxrecurse 3, \\{}"); + is(eval { Dumper(\(my $s = { a => [] })) }, "\$VAR1 = \\{'a' => []};", + "$pp: maxrecurse 3, \\{ a => [] }"); + is(eval { Dumper(\(my $s = { a => [{}] })) }, undef, + "$pp: maxrecurse 3, \\{ a => [{}] }"); + ok($@, "exception thrown"); + $Data::Dumper::Maxrecurse = 0; + is(eval { Dumper([[[[[]]]]]) }, q($VAR1 = [[[[[]]]]];), + "$pp: check Maxrecurse doesn't set limit to 0 recursion"); +} diff --git a/dist/ExtUtils-CBuilder/t/04-base.t b/dist/ExtUtils-CBuilder/t/04-base.t index beffe7f..1acc3ea 100644 --- a/dist/ExtUtils-CBuilder/t/04-base.t +++ b/dist/ExtUtils-CBuilder/t/04-base.t @@ -264,7 +264,13 @@ is_deeply( \%split_seen, \%exp, touch_file($exporter); $rv = $base->perl_src(); ok( -d $rv, "perl_src(): returned a directory" ); - is( uc($rv), uc(Cwd::realpath($subdir)), "perl_src(): identified directory" ); + my $rp = Cwd::realpath($subdir); + SKIP: { + if ($^O eq 'dec_osf' && $rp =~ m[^/cluster/members/]) { + skip "Tru64 cluster filesystem", 1; + } # SKIP + is( uc($rv), uc($rp), "perl_src(): identified directory" ); + } is( $capture, q{}, "perl_src(): no warning, as expected" ); chdir $cwd diff --git a/dist/IO/lib/IO/Socket.pm b/dist/IO/lib/IO/Socket.pm index 625c71a..c78aeec 100644 --- a/dist/IO/lib/IO/Socket.pm +++ b/dist/IO/lib/IO/Socket.pm @@ -24,7 +24,7 @@ require IO::Socket::UNIX if ($^O ne 'epoc' && $^O ne 'symbian'); @ISA = qw(IO::Handle); -$VERSION = "1.37"; +$VERSION = "1.38"; @EXPORT_OK = qw(sockatmark); @@ -499,8 +499,23 @@ C declaration will fail at compile time. =item connected -If the socket is in a connected state the peer address is returned. -If the socket is not in a connected state then undef will be returned. +If the socket is in a connected state, the peer address is returned. If the +socket is not in a connected state, undef is returned. + +Note that connected() considers a half-open TCP socket to be "in a connected +state". Specifically, connected() does not distinguish between the +B and B TCP states; it returns the peer address, +rather than undef, in either case. Thus, in general, connected() cannot +be used to reliably learn whether the peer has initiated a graceful shutdown +because in most cases (see below) the local TCP state machine remains in +B until the local application calls shutdown() or close(); +only at that point does connected() return undef. + +The "in most cases" hedge is because local TCP state machine behavior may +depend on the peer's socket options. In particular, if the peer socket has +SO_LINGER enabled with a zero timeout, then the peer's close() will generate +a RST segment, upon receipt of which the local TCP transitions immediately to +B, and in that state, connected() I return undef. =item protocol diff --git a/dist/IO/t/io_xs.t b/dist/IO/t/io_xs.t index b731447..8c7b88c 100644 --- a/dist/IO/t/io_xs.t +++ b/dist/IO/t/io_xs.t @@ -43,8 +43,8 @@ SKIP: { # [perl #64772] IO::Handle->sync fails on an O_RDONLY descriptor $Config{d_fsync} or skip "No fsync", 1; - $^O eq 'aix' - and skip "fsync() documented to fail on non-writable handles on AIX", 1; + $^O =~ /^(?:aix|irix)$/ + and skip "fsync() documented to fail on non-writable handles on $^O", 1; $^O eq 'cygwin' and skip "fsync() on cygwin uses FlushFileBuffers which requires a writable handle", 1; open my $fh, "<", "t/io_xs.t" diff --git a/dist/Module-CoreList/Changes b/dist/Module-CoreList/Changes index 15e62a0..323b4c8 100644 --- a/dist/Module-CoreList/Changes +++ b/dist/Module-CoreList/Changes @@ -1,4 +1,25 @@ -5.020001 +5.20150214 + - Updated for v5.20.2 + +5.20150120 + - Updated for v5.21.8 + +5.20141220 + - Updated for v5.21.7 + +5.20141120 + - Updated for v5.21.6 + +5.20141020 + - Updated for v5.21.5 + +5.20141002 + - Updated for v5.18.3 and v5.18.4 + +5.20140920 + - Updated for v5.21.4 + +5.20140914 - Updated for v5.20.1 5.021003 diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm index 8eec969..54725c8 100644 --- a/dist/Module-CoreList/lib/Module/CoreList.pm +++ b/dist/Module-CoreList/lib/Module/CoreList.pm @@ -4,7 +4,7 @@ use vars qw/$VERSION %released %version %families %upstream %bug_tracker %deprecated %delta/; use Module::CoreList::TieHashDelta; use version; -$VERSION = '5.020001'; +$VERSION = '5.20150214'; my $dumpinc = 0; sub import { @@ -28,7 +28,7 @@ sub first_release_raw { my $version = shift; my @perls = $version - ? grep { exists $version{$_}{ $module } && + ? grep { defined $version{$_}{ $module } && $version{$_}{ $module } ge $version } keys %version : grep { exists $version{$_}{ $module } } keys %version; @@ -244,6 +244,8 @@ sub changes_between { 5.019006 => '2013-11-20', 5.019007 => '2013-12-20', 5.018002 => '2014-01-06', + 5.018003 => '2014-10-01', + 5.018004 => '2014-10-01', 5.019008 => '2014-01-20', 5.019009 => '2014-02-20', 5.01901 => '2014-03-20', @@ -254,6 +256,12 @@ sub changes_between { 5.021002 => '2014-07-20', 5.021003 => '2014-08-20', 5.020001 => '2014-09-14', + 5.021004 => '2014-09-20', + 5.021005 => '2014-10-20', + 5.021006 => '2014-11-20', + 5.021007 => '2014-12-20', + 5.021008 => '2015-01-20', + 5.020002 => '2015-02-14', ); for my $version ( sort { $a <=> $b } keys %released ) { @@ -8079,6 +8087,22 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'Module::CoreList::Utils'=> '3.03', }, }, + 5.018003 => { + delta_from => 5.018002, + changed => { + 'Module::CoreList' => '3.12', + 'Module::CoreList::TieHashDelta'=> '3.12', + 'Module::CoreList::Utils'=> '3.12', + }, + }, + 5.018004 => { + delta_from => 5.018003, + changed => { + 'Module::CoreList' => '3.13', + 'Module::CoreList::TieHashDelta'=> '3.13', + 'Module::CoreList::Utils'=> '3.13', + }, + }, 5.019000 => { delta_from => 5.018000, changed => { @@ -10177,6 +10201,894 @@ for my $version ( sort { $a <=> $b } keys %released ) { removed => { } }, + 5.021004 => { + delta_from => 5.021003, + changed => { + 'App::Prove' => '3.33', + 'App::Prove::State' => '3.33', + 'App::Prove::State::Result'=> '3.33', + 'App::Prove::State::Result::Test'=> '3.33', + 'Archive::Tar' => '2.02', + 'Archive::Tar::Constant'=> '2.02', + 'Archive::Tar::File' => '2.02', + 'Attribute::Handlers' => '0.97', + 'B' => '1.51', + 'B::Concise' => '0.993', + 'B::Deparse' => '1.28', + 'B::Op_private' => '5.021004', + 'CPAN::Meta::Requirements'=> '2.128', + 'Config' => '5.021004', + 'Cwd' => '3.50', + 'Data::Dumper' => '2.154', + 'ExtUtils::CBuilder' => '0.280219', + 'ExtUtils::CBuilder::Base'=> '0.280219', + 'ExtUtils::CBuilder::Platform::Unix'=> '0.280219', + 'ExtUtils::CBuilder::Platform::VMS'=> '0.280219', + 'ExtUtils::CBuilder::Platform::Windows'=> '0.280219', + 'ExtUtils::CBuilder::Platform::Windows::BCC'=> '0.280219', + 'ExtUtils::CBuilder::Platform::Windows::GCC'=> '0.280219', + 'ExtUtils::CBuilder::Platform::Windows::MSVC'=> '0.280219', + 'ExtUtils::CBuilder::Platform::aix'=> '0.280219', + 'ExtUtils::CBuilder::Platform::android'=> '0.280219', + 'ExtUtils::CBuilder::Platform::cygwin'=> '0.280219', + 'ExtUtils::CBuilder::Platform::darwin'=> '0.280219', + 'ExtUtils::CBuilder::Platform::dec_osf'=> '0.280219', + 'ExtUtils::CBuilder::Platform::os2'=> '0.280219', + 'ExtUtils::Install' => '2.04', + 'ExtUtils::Installed' => '2.04', + 'ExtUtils::Liblist::Kid'=> '6.98_01', + 'ExtUtils::Manifest' => '1.68', + 'ExtUtils::Packlist' => '2.04', + 'File::Find' => '1.28', + 'File::Spec' => '3.50', + 'File::Spec::Cygwin' => '3.50', + 'File::Spec::Epoc' => '3.50', + 'File::Spec::Functions' => '3.50', + 'File::Spec::Mac' => '3.50', + 'File::Spec::OS2' => '3.50', + 'File::Spec::Unix' => '3.50', + 'File::Spec::VMS' => '3.50', + 'File::Spec::Win32' => '3.50', + 'Getopt::Std' => '1.11', + 'HTTP::Tiny' => '0.049', + 'IO' => '1.34', + 'IO::Socket::IP' => '0.32', + 'List::Util' => '1.41', + 'List::Util::XS' => '1.41', + 'Locale::Codes' => '3.32', + 'Locale::Codes::Constants'=> '3.32', + 'Locale::Codes::Country'=> '3.32', + 'Locale::Codes::Country_Codes'=> '3.32', + 'Locale::Codes::Country_Retired'=> '3.32', + 'Locale::Codes::Currency'=> '3.32', + 'Locale::Codes::Currency_Codes'=> '3.32', + 'Locale::Codes::Currency_Retired'=> '3.32', + 'Locale::Codes::LangExt'=> '3.32', + 'Locale::Codes::LangExt_Codes'=> '3.32', + 'Locale::Codes::LangExt_Retired'=> '3.32', + 'Locale::Codes::LangFam'=> '3.32', + 'Locale::Codes::LangFam_Codes'=> '3.32', + 'Locale::Codes::LangFam_Retired'=> '3.32', + 'Locale::Codes::LangVar'=> '3.32', + 'Locale::Codes::LangVar_Codes'=> '3.32', + 'Locale::Codes::LangVar_Retired'=> '3.32', + 'Locale::Codes::Language'=> '3.32', + 'Locale::Codes::Language_Codes'=> '3.32', + 'Locale::Codes::Language_Retired'=> '3.32', + 'Locale::Codes::Script' => '3.32', + 'Locale::Codes::Script_Codes'=> '3.32', + 'Locale::Codes::Script_Retired'=> '3.32', + 'Locale::Country' => '3.32', + 'Locale::Currency' => '3.32', + 'Locale::Language' => '3.32', + 'Locale::Script' => '3.32', + 'Math::BigFloat' => '1.9997', + 'Math::BigInt' => '1.9997', + 'Math::BigInt::Calc' => '1.9997', + 'Math::BigInt::CalcEmu' => '1.9997', + 'Module::CoreList' => '5.20140920', + 'Module::CoreList::TieHashDelta'=> '5.20140920', + 'Module::CoreList::Utils'=> '5.20140920', + 'POSIX' => '1.43', + 'Pod::Perldoc' => '3.24', + 'Pod::Perldoc::BaseTo' => '3.24', + 'Pod::Perldoc::GetOptsOO'=> '3.24', + 'Pod::Perldoc::ToANSI' => '3.24', + 'Pod::Perldoc::ToChecker'=> '3.24', + 'Pod::Perldoc::ToMan' => '3.24', + 'Pod::Perldoc::ToNroff' => '3.24', + 'Pod::Perldoc::ToPod' => '3.24', + 'Pod::Perldoc::ToRtf' => '3.24', + 'Pod::Perldoc::ToTerm' => '3.24', + 'Pod::Perldoc::ToText' => '3.24', + 'Pod::Perldoc::ToTk' => '3.24', + 'Pod::Perldoc::ToXml' => '3.24', + 'Scalar::Util' => '1.41', + 'Sub::Util' => '1.41', + 'TAP::Base' => '3.33', + 'TAP::Formatter::Base' => '3.33', + 'TAP::Formatter::Color' => '3.33', + 'TAP::Formatter::Console'=> '3.33', + 'TAP::Formatter::Console::ParallelSession'=> '3.33', + 'TAP::Formatter::Console::Session'=> '3.33', + 'TAP::Formatter::File' => '3.33', + 'TAP::Formatter::File::Session'=> '3.33', + 'TAP::Formatter::Session'=> '3.33', + 'TAP::Harness' => '3.33', + 'TAP::Harness::Env' => '3.33', + 'TAP::Object' => '3.33', + 'TAP::Parser' => '3.33', + 'TAP::Parser::Aggregator'=> '3.33', + 'TAP::Parser::Grammar' => '3.33', + 'TAP::Parser::Iterator' => '3.33', + 'TAP::Parser::Iterator::Array'=> '3.33', + 'TAP::Parser::Iterator::Process'=> '3.33', + 'TAP::Parser::Iterator::Stream'=> '3.33', + 'TAP::Parser::IteratorFactory'=> '3.33', + 'TAP::Parser::Multiplexer'=> '3.33', + 'TAP::Parser::Result' => '3.33', + 'TAP::Parser::Result::Bailout'=> '3.33', + 'TAP::Parser::Result::Comment'=> '3.33', + 'TAP::Parser::Result::Plan'=> '3.33', + 'TAP::Parser::Result::Pragma'=> '3.33', + 'TAP::Parser::Result::Test'=> '3.33', + 'TAP::Parser::Result::Unknown'=> '3.33', + 'TAP::Parser::Result::Version'=> '3.33', + 'TAP::Parser::Result::YAML'=> '3.33', + 'TAP::Parser::ResultFactory'=> '3.33', + 'TAP::Parser::Scheduler'=> '3.33', + 'TAP::Parser::Scheduler::Job'=> '3.33', + 'TAP::Parser::Scheduler::Spinner'=> '3.33', + 'TAP::Parser::Source' => '3.33', + 'TAP::Parser::SourceHandler'=> '3.33', + 'TAP::Parser::SourceHandler::Executable'=> '3.33', + 'TAP::Parser::SourceHandler::File'=> '3.33', + 'TAP::Parser::SourceHandler::Handle'=> '3.33', + 'TAP::Parser::SourceHandler::Perl'=> '3.33', + 'TAP::Parser::SourceHandler::RawTAP'=> '3.33', + 'TAP::Parser::YAMLish::Reader'=> '3.33', + 'TAP::Parser::YAMLish::Writer'=> '3.33', + 'Term::ReadLine' => '1.15', + 'Test::Builder' => '1.001006', + 'Test::Builder::Module' => '1.001006', + 'Test::Builder::Tester' => '1.24', + 'Test::Builder::Tester::Color'=> '1.24', + 'Test::Harness' => '3.33', + 'Test::More' => '1.001006', + 'Test::Simple' => '1.001006', + 'Time::Piece' => '1.29', + 'Time::Seconds' => '1.29', + 'XS::APItest' => '0.64', + '_charnames' => '1.42', + 'attributes' => '0.23', + 'bigint' => '0.37', + 'bignum' => '0.38', + 'bigrat' => '0.37', + 'constant' => '1.32', + 'experimental' => '0.010', + 'overload' => '1.23', + 'threads' => '1.96', + 'version' => '0.9909', + 'version::regex' => '0.9909', + 'version::vpp' => '0.9909', + }, + removed => { + } + }, + 5.021005 => { + delta_from => 5.021004, + changed => { + 'B' => '1.52', + 'B::Concise' => '0.994', + 'B::Debug' => '1.22', + 'B::Deparse' => '1.29', + 'B::Op_private' => '5.021005', + 'CPAN::Meta' => '2.142690', + 'CPAN::Meta::Converter' => '2.142690', + 'CPAN::Meta::Feature' => '2.142690', + 'CPAN::Meta::History' => '2.142690', + 'CPAN::Meta::Merge' => '2.142690', + 'CPAN::Meta::Prereqs' => '2.142690', + 'CPAN::Meta::Spec' => '2.142690', + 'CPAN::Meta::Validator' => '2.142690', + 'Compress::Raw::Bzip2' => '2.066', + 'Compress::Raw::Zlib' => '2.066', + 'Compress::Zlib' => '2.066', + 'Config' => '5.021005', + 'Cwd' => '3.51', + 'DynaLoader' => '1.27', + 'Errno' => '1.21', + 'ExtUtils::CBuilder' => '0.280220', + 'ExtUtils::CBuilder::Base'=> '0.280220', + 'ExtUtils::CBuilder::Platform::Unix'=> '0.280220', + 'ExtUtils::CBuilder::Platform::VMS'=> '0.280220', + 'ExtUtils::CBuilder::Platform::Windows'=> '0.280220', + 'ExtUtils::CBuilder::Platform::Windows::BCC'=> '0.280220', + 'ExtUtils::CBuilder::Platform::Windows::GCC'=> '0.280220', + 'ExtUtils::CBuilder::Platform::Windows::MSVC'=> '0.280220', + 'ExtUtils::CBuilder::Platform::aix'=> '0.280220', + 'ExtUtils::CBuilder::Platform::android'=> '0.280220', + 'ExtUtils::CBuilder::Platform::cygwin'=> '0.280220', + 'ExtUtils::CBuilder::Platform::darwin'=> '0.280220', + 'ExtUtils::CBuilder::Platform::dec_osf'=> '0.280220', + 'ExtUtils::CBuilder::Platform::os2'=> '0.280220', + 'ExtUtils::Miniperl' => '1.03', + 'Fcntl' => '1.13', + 'File::Find' => '1.29', + 'File::Spec' => '3.51', + 'File::Spec::Cygwin' => '3.51', + 'File::Spec::Epoc' => '3.51', + 'File::Spec::Functions' => '3.51', + 'File::Spec::Mac' => '3.51', + 'File::Spec::OS2' => '3.51', + 'File::Spec::Unix' => '3.51', + 'File::Spec::VMS' => '3.51', + 'File::Spec::Win32' => '3.51', + 'HTTP::Tiny' => '0.050', + 'IO::Compress::Adapter::Bzip2'=> '2.066', + 'IO::Compress::Adapter::Deflate'=> '2.066', + 'IO::Compress::Adapter::Identity'=> '2.066', + 'IO::Compress::Base' => '2.066', + 'IO::Compress::Base::Common'=> '2.066', + 'IO::Compress::Bzip2' => '2.066', + 'IO::Compress::Deflate' => '2.066', + 'IO::Compress::Gzip' => '2.066', + 'IO::Compress::Gzip::Constants'=> '2.066', + 'IO::Compress::RawDeflate'=> '2.066', + 'IO::Compress::Zip' => '2.066', + 'IO::Compress::Zip::Constants'=> '2.066', + 'IO::Compress::Zlib::Constants'=> '2.066', + 'IO::Compress::Zlib::Extra'=> '2.066', + 'IO::Uncompress::Adapter::Bunzip2'=> '2.066', + 'IO::Uncompress::Adapter::Identity'=> '2.066', + 'IO::Uncompress::Adapter::Inflate'=> '2.066', + 'IO::Uncompress::AnyInflate'=> '2.066', + 'IO::Uncompress::AnyUncompress'=> '2.066', + 'IO::Uncompress::Base' => '2.066', + 'IO::Uncompress::Bunzip2'=> '2.066', + 'IO::Uncompress::Gunzip'=> '2.066', + 'IO::Uncompress::Inflate'=> '2.066', + 'IO::Uncompress::RawInflate'=> '2.066', + 'IO::Uncompress::Unzip' => '2.066', + 'JSON::PP' => '2.27300', + 'Module::CoreList' => '5.20141020', + 'Module::CoreList::TieHashDelta'=> '5.20141020', + 'Module::CoreList::Utils'=> '5.20141020', + 'Net::Cmd' => '3.02', + 'Net::Config' => '3.02', + 'Net::Domain' => '3.02', + 'Net::FTP' => '3.02', + 'Net::FTP::A' => '3.02', + 'Net::FTP::E' => '3.02', + 'Net::FTP::I' => '3.02', + 'Net::FTP::L' => '3.02', + 'Net::FTP::dataconn' => '3.02', + 'Net::NNTP' => '3.02', + 'Net::Netrc' => '3.02', + 'Net::POP3' => '3.02', + 'Net::SMTP' => '3.02', + 'Net::Time' => '3.02', + 'Opcode' => '1.29', + 'POSIX' => '1.45', + 'Socket' => '2.016', + 'Test::Builder' => '1.001008', + 'Test::Builder::Module' => '1.001008', + 'Test::More' => '1.001008', + 'Test::Simple' => '1.001008', + 'XS::APItest' => '0.65', + 'XSLoader' => '0.18', + 'attributes' => '0.24', + 'experimental' => '0.012', + 'feature' => '1.38', + 'perlfaq' => '5.0150046', + 're' => '0.27', + 'threads::shared' => '1.47', + 'warnings' => '1.28', + 'warnings::register' => '1.04', + }, + removed => { + } + }, + 5.021006 => { + delta_from => 5.021005, + changed => { + 'App::Prove' => '3.34', + 'App::Prove::State' => '3.34', + 'App::Prove::State::Result'=> '3.34', + 'App::Prove::State::Result::Test'=> '3.34', + 'B' => '1.53', + 'B::Concise' => '0.995', + 'B::Deparse' => '1.30', + 'B::Op_private' => '5.021006', + 'CPAN::Meta' => '2.143240', + 'CPAN::Meta::Converter' => '2.143240', + 'CPAN::Meta::Feature' => '2.143240', + 'CPAN::Meta::History' => '2.143240', + 'CPAN::Meta::Merge' => '2.143240', + 'CPAN::Meta::Prereqs' => '2.143240', + 'CPAN::Meta::Requirements'=> '2.130', + 'CPAN::Meta::Spec' => '2.143240', + 'CPAN::Meta::Validator' => '2.143240', + 'Config' => '5.021006', + 'Devel::Peek' => '1.19', + 'Digest::SHA' => '5.93', + 'DynaLoader' => '1.28', + 'Encode' => '2.64', + 'Exporter' => '5.72', + 'Exporter::Heavy' => '5.72', + 'ExtUtils::Command::MM' => '7.02', + 'ExtUtils::Liblist' => '7.02', + 'ExtUtils::Liblist::Kid'=> '7.02', + 'ExtUtils::MM' => '7.02', + 'ExtUtils::MM_AIX' => '7.02', + 'ExtUtils::MM_Any' => '7.02', + 'ExtUtils::MM_BeOS' => '7.02', + 'ExtUtils::MM_Cygwin' => '7.02', + 'ExtUtils::MM_DOS' => '7.02', + 'ExtUtils::MM_Darwin' => '7.02', + 'ExtUtils::MM_MacOS' => '7.02', + 'ExtUtils::MM_NW5' => '7.02', + 'ExtUtils::MM_OS2' => '7.02', + 'ExtUtils::MM_QNX' => '7.02', + 'ExtUtils::MM_UWIN' => '7.02', + 'ExtUtils::MM_Unix' => '7.02', + 'ExtUtils::MM_VMS' => '7.02', + 'ExtUtils::MM_VOS' => '7.02', + 'ExtUtils::MM_Win32' => '7.02', + 'ExtUtils::MM_Win95' => '7.02', + 'ExtUtils::MY' => '7.02', + 'ExtUtils::MakeMaker' => '7.02', + 'ExtUtils::MakeMaker::Config'=> '7.02', + 'ExtUtils::MakeMaker::Locale'=> '7.02', + 'ExtUtils::MakeMaker::version'=> '7.02', + 'ExtUtils::MakeMaker::version::regex'=> '7.02', + 'ExtUtils::MakeMaker::version::vpp'=> '7.02', + 'ExtUtils::Manifest' => '1.69', + 'ExtUtils::Mkbootstrap' => '7.02', + 'ExtUtils::Mksymlists' => '7.02', + 'ExtUtils::ParseXS' => '3.26', + 'ExtUtils::ParseXS::Constants'=> '3.26', + 'ExtUtils::ParseXS::CountLines'=> '3.26', + 'ExtUtils::ParseXS::Eval'=> '3.26', + 'ExtUtils::ParseXS::Utilities'=> '3.26', + 'ExtUtils::testlib' => '7.02', + 'File::Spec::VMS' => '3.52', + 'HTTP::Tiny' => '0.051', + 'I18N::Langinfo' => '0.12', + 'IO::Socket' => '1.38', + 'Module::CoreList' => '5.20141120', + 'Module::CoreList::TieHashDelta'=> '5.20141120', + 'Module::CoreList::Utils'=> '5.20141120', + 'POSIX' => '1.46', + 'PerlIO::encoding' => '0.20', + 'PerlIO::scalar' => '0.20', + 'TAP::Base' => '3.34', + 'TAP::Formatter::Base' => '3.34', + 'TAP::Formatter::Color' => '3.34', + 'TAP::Formatter::Console'=> '3.34', + 'TAP::Formatter::Console::ParallelSession'=> '3.34', + 'TAP::Formatter::Console::Session'=> '3.34', + 'TAP::Formatter::File' => '3.34', + 'TAP::Formatter::File::Session'=> '3.34', + 'TAP::Formatter::Session'=> '3.34', + 'TAP::Harness' => '3.34', + 'TAP::Harness::Env' => '3.34', + 'TAP::Object' => '3.34', + 'TAP::Parser' => '3.34', + 'TAP::Parser::Aggregator'=> '3.34', + 'TAP::Parser::Grammar' => '3.34', + 'TAP::Parser::Iterator' => '3.34', + 'TAP::Parser::Iterator::Array'=> '3.34', + 'TAP::Parser::Iterator::Process'=> '3.34', + 'TAP::Parser::Iterator::Stream'=> '3.34', + 'TAP::Parser::IteratorFactory'=> '3.34', + 'TAP::Parser::Multiplexer'=> '3.34', + 'TAP::Parser::Result' => '3.34', + 'TAP::Parser::Result::Bailout'=> '3.34', + 'TAP::Parser::Result::Comment'=> '3.34', + 'TAP::Parser::Result::Plan'=> '3.34', + 'TAP::Parser::Result::Pragma'=> '3.34', + 'TAP::Parser::Result::Test'=> '3.34', + 'TAP::Parser::Result::Unknown'=> '3.34', + 'TAP::Parser::Result::Version'=> '3.34', + 'TAP::Parser::Result::YAML'=> '3.34', + 'TAP::Parser::ResultFactory'=> '3.34', + 'TAP::Parser::Scheduler'=> '3.34', + 'TAP::Parser::Scheduler::Job'=> '3.34', + 'TAP::Parser::Scheduler::Spinner'=> '3.34', + 'TAP::Parser::Source' => '3.34', + 'TAP::Parser::SourceHandler'=> '3.34', + 'TAP::Parser::SourceHandler::Executable'=> '3.34', + 'TAP::Parser::SourceHandler::File'=> '3.34', + 'TAP::Parser::SourceHandler::Handle'=> '3.34', + 'TAP::Parser::SourceHandler::Perl'=> '3.34', + 'TAP::Parser::SourceHandler::RawTAP'=> '3.34', + 'TAP::Parser::YAMLish::Reader'=> '3.34', + 'TAP::Parser::YAMLish::Writer'=> '3.34', + 'Test::Builder' => '1.301001_075', + 'Test::Builder::Module' => '1.301001_075', + 'Test::Builder::Tester' => '1.301001_075', + 'Test::Builder::Tester::Color'=> '1.301001_075', + 'Test::Harness' => '3.34', + 'Test::More' => '1.301001_075', + 'Test::More::DeepCheck' => undef, + 'Test::More::DeepCheck::Strict'=> undef, + 'Test::More::DeepCheck::Tolerant'=> undef, + 'Test::More::Tools' => undef, + 'Test::MostlyLike' => undef, + 'Test::Simple' => '1.301001_075', + 'Test::Stream' => '1.301001_075', + 'Test::Stream::ArrayBase'=> undef, + 'Test::Stream::ArrayBase::Meta'=> undef, + 'Test::Stream::Carp' => undef, + 'Test::Stream::Context' => undef, + 'Test::Stream::Event' => undef, + 'Test::Stream::Event::Bail'=> undef, + 'Test::Stream::Event::Child'=> undef, + 'Test::Stream::Event::Diag'=> undef, + 'Test::Stream::Event::Finish'=> undef, + 'Test::Stream::Event::Note'=> undef, + 'Test::Stream::Event::Ok'=> undef, + 'Test::Stream::Event::Plan'=> undef, + 'Test::Stream::Event::Subtest'=> undef, + 'Test::Stream::ExitMagic'=> undef, + 'Test::Stream::ExitMagic::Context'=> undef, + 'Test::Stream::Exporter'=> undef, + 'Test::Stream::Exporter::Meta'=> undef, + 'Test::Stream::IOSets' => undef, + 'Test::Stream::Meta' => undef, + 'Test::Stream::PackageUtil'=> undef, + 'Test::Stream::Tester' => undef, + 'Test::Stream::Tester::Checks'=> undef, + 'Test::Stream::Tester::Checks::Event'=> undef, + 'Test::Stream::Tester::Events'=> undef, + 'Test::Stream::Tester::Events::Event'=> undef, + 'Test::Stream::Tester::Grab'=> undef, + 'Test::Stream::Threads' => undef, + 'Test::Stream::Toolset' => undef, + 'Test::Stream::Util' => undef, + 'Test::Tester' => '1.301001_075', + 'Test::Tester::Capture' => undef, + 'Test::use::ok' => '1.301001_075', + 'Unicode::UCD' => '0.59', + 'XS::APItest' => '0.68', + 'XSLoader' => '0.19', + 'experimental' => '0.013', + 'locale' => '1.05', + 'ok' => '1.301001_075', + 'overload' => '1.24', + 're' => '0.28', + 'warnings' => '1.29', + }, + removed => { + } + }, + 5.021007 => { + delta_from => 5.021006, + changed => { + 'Archive::Tar' => '2.04', + 'Archive::Tar::Constant'=> '2.04', + 'Archive::Tar::File' => '2.04', + 'B' => '1.54', + 'B::Concise' => '0.996', + 'B::Deparse' => '1.31', + 'B::Op_private' => '5.021007', + 'B::Showlex' => '1.05', + 'Compress::Raw::Bzip2' => '2.067', + 'Compress::Raw::Zlib' => '2.067', + 'Compress::Zlib' => '2.067', + 'Config' => '5.021007', + 'Cwd' => '3.54', + 'DB_File' => '1.834', + 'Data::Dumper' => '2.155', + 'Devel::PPPort' => '3.25', + 'Devel::Peek' => '1.20', + 'DynaLoader' => '1.29', + 'Encode' => '2.67', + 'Errno' => '1.22', + 'ExtUtils::CBuilder' => '0.280221', + 'ExtUtils::CBuilder::Base'=> '0.280221', + 'ExtUtils::CBuilder::Platform::Unix'=> '0.280221', + 'ExtUtils::CBuilder::Platform::VMS'=> '0.280221', + 'ExtUtils::CBuilder::Platform::Windows'=> '0.280221', + 'ExtUtils::CBuilder::Platform::aix'=> '0.280221', + 'ExtUtils::CBuilder::Platform::android'=> '0.280221', + 'ExtUtils::CBuilder::Platform::cygwin'=> '0.280221', + 'ExtUtils::CBuilder::Platform::darwin'=> '0.280221', + 'ExtUtils::CBuilder::Platform::dec_osf'=> '0.280221', + 'ExtUtils::CBuilder::Platform::os2'=> '0.280221', + 'ExtUtils::Command::MM' => '7.04', + 'ExtUtils::Liblist' => '7.04', + 'ExtUtils::Liblist::Kid'=> '7.04', + 'ExtUtils::MM' => '7.04', + 'ExtUtils::MM_AIX' => '7.04', + 'ExtUtils::MM_Any' => '7.04', + 'ExtUtils::MM_BeOS' => '7.04', + 'ExtUtils::MM_Cygwin' => '7.04', + 'ExtUtils::MM_DOS' => '7.04', + 'ExtUtils::MM_Darwin' => '7.04', + 'ExtUtils::MM_MacOS' => '7.04', + 'ExtUtils::MM_NW5' => '7.04', + 'ExtUtils::MM_OS2' => '7.04', + 'ExtUtils::MM_QNX' => '7.04', + 'ExtUtils::MM_UWIN' => '7.04', + 'ExtUtils::MM_Unix' => '7.04', + 'ExtUtils::MM_VMS' => '7.04', + 'ExtUtils::MM_VOS' => '7.04', + 'ExtUtils::MM_Win32' => '7.04', + 'ExtUtils::MM_Win95' => '7.04', + 'ExtUtils::MY' => '7.04', + 'ExtUtils::MakeMaker' => '7.04', + 'ExtUtils::MakeMaker::Config'=> '7.04', + 'ExtUtils::MakeMaker::Locale'=> '7.04', + 'ExtUtils::MakeMaker::version'=> '7.04', + 'ExtUtils::MakeMaker::version::regex'=> '7.04', + 'ExtUtils::MakeMaker::version::vpp'=> '7.04', + 'ExtUtils::Mkbootstrap' => '7.04', + 'ExtUtils::Mksymlists' => '7.04', + 'ExtUtils::ParseXS' => '3.27', + 'ExtUtils::ParseXS::Constants'=> '3.27', + 'ExtUtils::ParseXS::CountLines'=> '3.27', + 'ExtUtils::ParseXS::Eval'=> '3.27', + 'ExtUtils::ParseXS::Utilities'=> '3.27', + 'ExtUtils::testlib' => '7.04', + 'File::Spec' => '3.53', + 'File::Spec::Cygwin' => '3.54', + 'File::Spec::Epoc' => '3.54', + 'File::Spec::Functions' => '3.54', + 'File::Spec::Mac' => '3.54', + 'File::Spec::OS2' => '3.54', + 'File::Spec::Unix' => '3.54', + 'File::Spec::VMS' => '3.54', + 'File::Spec::Win32' => '3.54', + 'Filter::Util::Call' => '1.51', + 'HTTP::Tiny' => '0.053', + 'IO' => '1.35', + 'IO::Compress::Adapter::Bzip2'=> '2.067', + 'IO::Compress::Adapter::Deflate'=> '2.067', + 'IO::Compress::Adapter::Identity'=> '2.067', + 'IO::Compress::Base' => '2.067', + 'IO::Compress::Base::Common'=> '2.067', + 'IO::Compress::Bzip2' => '2.067', + 'IO::Compress::Deflate' => '2.067', + 'IO::Compress::Gzip' => '2.067', + 'IO::Compress::Gzip::Constants'=> '2.067', + 'IO::Compress::RawDeflate'=> '2.067', + 'IO::Compress::Zip' => '2.067', + 'IO::Compress::Zip::Constants'=> '2.067', + 'IO::Compress::Zlib::Constants'=> '2.067', + 'IO::Compress::Zlib::Extra'=> '2.067', + 'IO::Socket::IP' => '0.34', + 'IO::Uncompress::Adapter::Bunzip2'=> '2.067', + 'IO::Uncompress::Adapter::Identity'=> '2.067', + 'IO::Uncompress::Adapter::Inflate'=> '2.067', + 'IO::Uncompress::AnyInflate'=> '2.067', + 'IO::Uncompress::AnyUncompress'=> '2.067', + 'IO::Uncompress::Base' => '2.067', + 'IO::Uncompress::Bunzip2'=> '2.067', + 'IO::Uncompress::Gunzip'=> '2.067', + 'IO::Uncompress::Inflate'=> '2.067', + 'IO::Uncompress::RawInflate'=> '2.067', + 'IO::Uncompress::Unzip' => '2.067', + 'Locale::Codes' => '3.33', + 'Locale::Codes::Constants'=> '3.33', + 'Locale::Codes::Country'=> '3.33', + 'Locale::Codes::Country_Codes'=> '3.33', + 'Locale::Codes::Country_Retired'=> '3.33', + 'Locale::Codes::Currency'=> '3.33', + 'Locale::Codes::Currency_Codes'=> '3.33', + 'Locale::Codes::Currency_Retired'=> '3.33', + 'Locale::Codes::LangExt'=> '3.33', + 'Locale::Codes::LangExt_Codes'=> '3.33', + 'Locale::Codes::LangExt_Retired'=> '3.33', + 'Locale::Codes::LangFam'=> '3.33', + 'Locale::Codes::LangFam_Codes'=> '3.33', + 'Locale::Codes::LangFam_Retired'=> '3.33', + 'Locale::Codes::LangVar'=> '3.33', + 'Locale::Codes::LangVar_Codes'=> '3.33', + 'Locale::Codes::LangVar_Retired'=> '3.33', + 'Locale::Codes::Language'=> '3.33', + 'Locale::Codes::Language_Codes'=> '3.33', + 'Locale::Codes::Language_Retired'=> '3.33', + 'Locale::Codes::Script' => '3.33', + 'Locale::Codes::Script_Codes'=> '3.33', + 'Locale::Codes::Script_Retired'=> '3.33', + 'Locale::Country' => '3.33', + 'Locale::Currency' => '3.33', + 'Locale::Language' => '3.33', + 'Locale::Maketext' => '1.26', + 'Locale::Script' => '3.33', + 'Module::CoreList' => '5.20141220', + 'Module::CoreList::TieHashDelta'=> '5.20141220', + 'Module::CoreList::Utils'=> '5.20141220', + 'NDBM_File' => '1.14', + 'Net::Cmd' => '3.04', + 'Net::Config' => '3.04', + 'Net::Domain' => '3.04', + 'Net::FTP' => '3.04', + 'Net::FTP::A' => '3.04', + 'Net::FTP::E' => '3.04', + 'Net::FTP::I' => '3.04', + 'Net::FTP::L' => '3.04', + 'Net::FTP::dataconn' => '3.04', + 'Net::NNTP' => '3.04', + 'Net::Netrc' => '3.04', + 'Net::POP3' => '3.04', + 'Net::SMTP' => '3.04', + 'Net::Time' => '3.04', + 'Opcode' => '1.30', + 'POSIX' => '1.48', + 'PerlIO::scalar' => '0.21', + 'Pod::Escapes' => '1.07', + 'SDBM_File' => '1.12', + 'Storable' => '2.52', + 'Sys::Hostname' => '1.20', + 'Test::Builder' => '1.301001_090', + 'Test::Builder::Module' => '1.301001_090', + 'Test::Builder::Tester' => '1.301001_090', + 'Test::Builder::Tester::Color'=> '1.301001_090', + 'Test::CanFork' => undef, + 'Test::CanThread' => undef, + 'Test::More' => '1.301001_090', + 'Test::Simple' => '1.301001_090', + 'Test::Stream' => '1.301001_090', + 'Test::Stream::API' => undef, + 'Test::Stream::ForceExit'=> undef, + 'Test::Stream::Subtest' => undef, + 'Test::Tester' => '1.301001_090', + 'Test::use::ok' => '1.301001_090', + 'Unicode::Collate' => '1.09', + 'Unicode::Collate::CJK::Big5'=> '1.09', + 'Unicode::Collate::CJK::GB2312'=> '1.09', + 'Unicode::Collate::CJK::JISX0208'=> '1.09', + 'Unicode::Collate::CJK::Korean'=> '1.09', + 'Unicode::Collate::CJK::Pinyin'=> '1.09', + 'Unicode::Collate::CJK::Stroke'=> '1.09', + 'Unicode::Collate::CJK::Zhuyin'=> '1.09', + 'Unicode::Collate::Locale'=> '1.09', + 'XS::APItest' => '0.69', + 'XSLoader' => '0.20', + '_charnames' => '1.43', + 'arybase' => '0.09', + 'charnames' => '1.43', + 'feature' => '1.39', + 'mro' => '1.17', + 'ok' => '1.301001_090', + 'strict' => '1.09', + 'threads' => '1.96_001', + }, + removed => { + } + }, + 5.021008 => { + delta_from => 5.021007, + changed => { + 'App::Prove' => '3.35', + 'App::Prove::State' => '3.35', + 'App::Prove::State::Result'=> '3.35', + 'App::Prove::State::Result::Test'=> '3.35', + 'B' => '1.55', + 'B::Deparse' => '1.32', + 'B::Op_private' => '5.021008', + 'CPAN::Meta::Requirements'=> '2.131', + 'Compress::Raw::Bzip2' => '2.068', + 'Compress::Raw::Zlib' => '2.068', + 'Compress::Zlib' => '2.068', + 'Config' => '5.021008', + 'DB_File' => '1.835', + 'Data::Dumper' => '2.156', + 'Devel::PPPort' => '3.28', + 'Devel::Peek' => '1.21', + 'Digest::MD5' => '2.54', + 'Digest::SHA' => '5.95', + 'DynaLoader' => '1.30', + 'ExtUtils::Command' => '1.20', + 'ExtUtils::Manifest' => '1.70', + 'Fatal' => '2.26', + 'File::Glob' => '1.24', + 'Filter::Util::Call' => '1.54', + 'Getopt::Long' => '2.43', + 'IO::Compress::Adapter::Bzip2'=> '2.068', + 'IO::Compress::Adapter::Deflate'=> '2.068', + 'IO::Compress::Adapter::Identity'=> '2.068', + 'IO::Compress::Base' => '2.068', + 'IO::Compress::Base::Common'=> '2.068', + 'IO::Compress::Bzip2' => '2.068', + 'IO::Compress::Deflate' => '2.068', + 'IO::Compress::Gzip' => '2.068', + 'IO::Compress::Gzip::Constants'=> '2.068', + 'IO::Compress::RawDeflate'=> '2.068', + 'IO::Compress::Zip' => '2.068', + 'IO::Compress::Zip::Constants'=> '2.068', + 'IO::Compress::Zlib::Constants'=> '2.068', + 'IO::Compress::Zlib::Extra'=> '2.068', + 'IO::Socket::IP' => '0.36', + 'IO::Uncompress::Adapter::Bunzip2'=> '2.068', + 'IO::Uncompress::Adapter::Identity'=> '2.068', + 'IO::Uncompress::Adapter::Inflate'=> '2.068', + 'IO::Uncompress::AnyInflate'=> '2.068', + 'IO::Uncompress::AnyUncompress'=> '2.068', + 'IO::Uncompress::Base' => '2.068', + 'IO::Uncompress::Bunzip2'=> '2.068', + 'IO::Uncompress::Gunzip'=> '2.068', + 'IO::Uncompress::Inflate'=> '2.068', + 'IO::Uncompress::RawInflate'=> '2.068', + 'IO::Uncompress::Unzip' => '2.068', + 'MIME::Base64' => '3.15', + 'Module::CoreList' => '5.20150220', + 'Module::CoreList::TieHashDelta'=> '5.20150220', + 'Module::CoreList::Utils'=> '5.20150220', + 'Module::Load::Conditional'=> '0.64', + 'Module::Metadata' => '1.000026', + 'Net::Cmd' => '3.05', + 'Net::Config' => '3.05', + 'Net::Domain' => '3.05', + 'Net::FTP' => '3.05', + 'Net::FTP::A' => '3.05', + 'Net::FTP::E' => '3.05', + 'Net::FTP::I' => '3.05', + 'Net::FTP::L' => '3.05', + 'Net::FTP::dataconn' => '3.05', + 'Net::NNTP' => '3.05', + 'Net::Netrc' => '3.05', + 'Net::POP3' => '3.05', + 'Net::SMTP' => '3.05', + 'Net::Time' => '3.05', + 'Opcode' => '1.31', + 'POSIX' => '1.49', + 'PerlIO::encoding' => '0.21', + 'Pod::Simple' => '3.29', + 'Pod::Simple::BlackBox' => '3.29', + 'Pod::Simple::Checker' => '3.29', + 'Pod::Simple::Debug' => '3.29', + 'Pod::Simple::DumpAsText'=> '3.29', + 'Pod::Simple::DumpAsXML'=> '3.29', + 'Pod::Simple::HTML' => '3.29', + 'Pod::Simple::HTMLBatch'=> '3.29', + 'Pod::Simple::LinkSection'=> '3.29', + 'Pod::Simple::Methody' => '3.29', + 'Pod::Simple::Progress' => '3.29', + 'Pod::Simple::PullParser'=> '3.29', + 'Pod::Simple::PullParserEndToken'=> '3.29', + 'Pod::Simple::PullParserStartToken'=> '3.29', + 'Pod::Simple::PullParserTextToken'=> '3.29', + 'Pod::Simple::PullParserToken'=> '3.29', + 'Pod::Simple::RTF' => '3.29', + 'Pod::Simple::Search' => '3.29', + 'Pod::Simple::SimpleTree'=> '3.29', + 'Pod::Simple::Text' => '3.29', + 'Pod::Simple::TextContent'=> '3.29', + 'Pod::Simple::TiedOutFH'=> '3.29', + 'Pod::Simple::Transcode'=> '3.29', + 'Pod::Simple::TranscodeDumb'=> '3.29', + 'Pod::Simple::TranscodeSmart'=> '3.29', + 'Pod::Simple::XHTML' => '3.29', + 'Pod::Simple::XMLOutStream'=> '3.29', + 'SDBM_File' => '1.13', + 'Safe' => '2.39', + 'TAP::Base' => '3.35', + 'TAP::Formatter::Base' => '3.35', + 'TAP::Formatter::Color' => '3.35', + 'TAP::Formatter::Console'=> '3.35', + 'TAP::Formatter::Console::ParallelSession'=> '3.35', + 'TAP::Formatter::Console::Session'=> '3.35', + 'TAP::Formatter::File' => '3.35', + 'TAP::Formatter::File::Session'=> '3.35', + 'TAP::Formatter::Session'=> '3.35', + 'TAP::Harness' => '3.35', + 'TAP::Harness::Env' => '3.35', + 'TAP::Object' => '3.35', + 'TAP::Parser' => '3.35', + 'TAP::Parser::Aggregator'=> '3.35', + 'TAP::Parser::Grammar' => '3.35', + 'TAP::Parser::Iterator' => '3.35', + 'TAP::Parser::Iterator::Array'=> '3.35', + 'TAP::Parser::Iterator::Process'=> '3.35', + 'TAP::Parser::Iterator::Stream'=> '3.35', + 'TAP::Parser::IteratorFactory'=> '3.35', + 'TAP::Parser::Multiplexer'=> '3.35', + 'TAP::Parser::Result' => '3.35', + 'TAP::Parser::Result::Bailout'=> '3.35', + 'TAP::Parser::Result::Comment'=> '3.35', + 'TAP::Parser::Result::Plan'=> '3.35', + 'TAP::Parser::Result::Pragma'=> '3.35', + 'TAP::Parser::Result::Test'=> '3.35', + 'TAP::Parser::Result::Unknown'=> '3.35', + 'TAP::Parser::Result::Version'=> '3.35', + 'TAP::Parser::Result::YAML'=> '3.35', + 'TAP::Parser::ResultFactory'=> '3.35', + 'TAP::Parser::Scheduler'=> '3.35', + 'TAP::Parser::Scheduler::Job'=> '3.35', + 'TAP::Parser::Scheduler::Spinner'=> '3.35', + 'TAP::Parser::Source' => '3.35', + 'TAP::Parser::SourceHandler'=> '3.35', + 'TAP::Parser::SourceHandler::Executable'=> '3.35', + 'TAP::Parser::SourceHandler::File'=> '3.35', + 'TAP::Parser::SourceHandler::Handle'=> '3.35', + 'TAP::Parser::SourceHandler::Perl'=> '3.35', + 'TAP::Parser::SourceHandler::RawTAP'=> '3.35', + 'TAP::Parser::YAMLish::Reader'=> '3.35', + 'TAP::Parser::YAMLish::Writer'=> '3.35', + 'Test::Builder' => '1.301001_097', + 'Test::Builder::Module' => '1.301001_097', + 'Test::Builder::Tester' => '1.301001_097', + 'Test::Builder::Tester::Color'=> '1.301001_097', + 'Test::Harness' => '3.35', + 'Test::More' => '1.301001_097', + 'Test::Simple' => '1.301001_097', + 'Test::Stream' => '1.301001_097', + 'Test::Stream::Block' => undef, + 'Test::Tester' => '1.301001_097', + 'Test::Tester::CaptureRunner'=> undef, + 'Test::Tester::Delegate'=> undef, + 'Test::use::ok' => '1.301001_097', + 'Unicode::Collate' => '1.10', + 'Unicode::Collate::CJK::Big5'=> '1.10', + 'Unicode::Collate::CJK::GB2312'=> '1.10', + 'Unicode::Collate::CJK::JISX0208'=> '1.10', + 'Unicode::Collate::CJK::Korean'=> '1.10', + 'Unicode::Collate::CJK::Pinyin'=> '1.10', + 'Unicode::Collate::CJK::Stroke'=> '1.10', + 'Unicode::Collate::CJK::Zhuyin'=> '1.10', + 'Unicode::Collate::Locale'=> '1.10', + 'VMS::DCLsym' => '1.06', + 'XS::APItest' => '0.70', + 'arybase' => '0.10', + 'attributes' => '0.25', + 'autodie' => '2.26', + 'autodie::Scope::Guard' => '2.26', + 'autodie::Scope::GuardStack'=> '2.26', + 'autodie::ScopeUtil' => '2.26', + 'autodie::exception' => '2.26', + 'autodie::exception::system'=> '2.26', + 'autodie::hints' => '2.26', + 'autodie::skip' => '2.26', + 'ok' => '1.301001_097', + 're' => '0.30', + 'warnings' => '1.30', + }, + removed => { + } + }, + 5.020002 => { + delta_from => 5.020001, + changed => { + 'CPAN::Author' => '5.5002', + 'CPAN::CacheMgr' => '5.5002', + 'CPAN::FTP' => '5.5006', + 'CPAN::HTTP::Client' => '1.9601', + 'CPAN::HandleConfig' => '5.5005', + 'CPAN::Index' => '1.9601', + 'CPAN::LWP::UserAgent' => '1.9601', + 'CPAN::Mirrors' => '1.9601', + 'Config' => '5.020002', + 'Cwd' => '3.48_01', + 'Data::Dumper' => '2.151_01', + 'Errno' => '1.20_05', + 'File::Spec' => '3.48_01', + 'File::Spec::Cygwin' => '3.48_01', + 'File::Spec::Epoc' => '3.48_01', + 'File::Spec::Functions' => '3.48_01', + 'File::Spec::Mac' => '3.48_01', + 'File::Spec::OS2' => '3.48_01', + 'File::Spec::Unix' => '3.48_01', + 'File::Spec::VMS' => '3.48_01', + 'File::Spec::Win32' => '3.48_01', + 'IO::Socket' => '1.38', + 'Module::CoreList' => '5.20150214', + 'Module::CoreList::TieHashDelta'=> '5.20150214', + 'Module::CoreList::Utils'=> '5.20150214', + 'PerlIO::scalar' => '0.18_01', + 'Pod::PlainText' => '2.07', + 'Storable' => '2.49_01', + 'VMS::DCLsym' => '1.05_01', + 'VMS::Stdio' => '2.41', + 'attributes' => '0.23', + 'feature' => '1.36_01', + }, + removed => { + } + }, ); sub is_core @@ -10396,6 +11308,20 @@ for my $version (sort { $a <=> $b } keys %delta) { removed => { } }, + 5.018003 => { + delta_from => 5.018, + changed => { + }, + removed => { + } + }, + 5.018004 => { + delta_from => 5.018, + changed => { + }, + removed => { + } + }, 5.019 => { delta_from => 5.018, @@ -10613,6 +11539,48 @@ for my $version (sort { $a <=> $b } keys %delta) { removed => { } }, + 5.021004 => { + delta_from => 5.021003, + changed => { + }, + removed => { + } + }, + 5.021005 => { + delta_from => 5.021004, + changed => { + }, + removed => { + } + }, + 5.021006 => { + delta_from => 5.021005, + changed => { + }, + removed => { + } + }, + 5.021007 => { + delta_from => 5.021006, + changed => { + }, + removed => { + } + }, + 5.021008 => { + delta_from => 5.021007, + changed => { + }, + removed => { + } + }, + 5.020002 => { + delta_from => 5.020001, + changed => { + }, + removed => { + } + }, ); for my $version (sort { $a <=> $b } keys %deprecated) { @@ -11400,8 +12368,8 @@ for my $version (sort { $a <=> $b } keys %deprecated) { 'Test' => undef, 'Test::Builder' => 'http://github.com/Test-More/test-more/issues/', 'Test::Builder::Module' => 'http://github.com/Test-More/test-more/issues/', - 'Test::Builder::Tester' => 'http://github.com/schwern/test-more/issues', - 'Test::Builder::Tester::Color'=> 'http://github.com/schwern/test-more/issues', + 'Test::Builder::Tester' => 'http://github.com/Test-More/test-more/issues/', + 'Test::Builder::Tester::Color'=> 'http://github.com/Test-More/test-more/issues/', 'Test::Harness' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness', 'Test::More' => 'http://github.com/Test-More/test-more/issues/', 'Test::Simple' => 'http://github.com/Test-More/test-more/issues/', @@ -11435,12 +12403,12 @@ for my $version (sort { $a <=> $b } keys %deprecated) { 'encoding' => undef, 'encoding::warnings' => undef, 'experimental' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=experimental', - 'inc::latest' => undef, + 'inc::latest' => 'https://github.com/dagolden/inc-latest/issues', 'parent' => undef, 'perlfaq' => 'https://github.com/perl-doc-cats/perlfaq/issues', - 'version' => undef, - 'version::regex' => undef, - 'version::vpp' => undef, + 'version' => 'https://rt.cpan.org/Public/Dist/Display.html?Name=version', + 'version::regex' => 'https://rt.cpan.org/Public/Dist/Display.html?Name=version', + 'version::vpp' => 'https://rt.cpan.org/Public/Dist/Display.html?Name=version', ); # Create aliases with trailing zeros for $] use diff --git a/dist/Module-CoreList/lib/Module/CoreList.pod b/dist/Module-CoreList/lib/Module/CoreList.pod index f97fd53..edc00ec 100644 --- a/dist/Module-CoreList/lib/Module/CoreList.pod +++ b/dist/Module-CoreList/lib/Module/CoreList.pod @@ -220,18 +220,12 @@ http://rt.cpan.org/Public/Dist/Display.html?Name=$ModuleName =head1 CAVEATS Module::CoreList currently covers the 5.000, 5.001, 5.002, 5.003_07, -5.004, 5.004_05, 5.005, 5.005_03, 5.005_04, 5.6.0, 5.6.1, 5.6.2, 5.7.3, -5.8.0, 5.8.1, 5.8.2, 5.8.3, 5.8.4, 5.8.5, 5.8.6, 5.8.7, 5.8.8, 5.8.9, -5.9.0, 5.9.1, 5.9.2, 5.9.3, 5.9.4, 5.9.5, 5.10.0, 5.10.1, 5.11.0, 5.11.1, -5.11.2, 5.11.3, 5.11.4, 5.11.5, 5.12.0, 5.12.1, 5.12.2, 5.12.3, 5.12.4, -5.12.5, 5.13.0, 5.13.1, 5.13.2, 5.13.3, 5.13.4, 5.13.5, 5.13.6, 5.13.7, -5.13.8, 5.13.9, 5.13.10, 5.13.11, 5.14.0, 5.14.1, 5.14.2 5.14.3, 5.14.4, -5.15.0, 5.15.1, 5.15.2, 5.15.3, 5.15.4, 5.15.5, 5.15.6, 5.15.7, 5.15.8, -5.15.9, 5.16.0, 5.16.1, 5.16.2, 5.16.3, 5.17.0, 5.17.1, 5.17.2, 5.17.3, -5.17.4, 5.17.5, 5.17.6, 5.17.7, 5.17.8, 5.17.9, 5.17.10, 5.17.11, 5.18.0, -5.19.0, 5.19.1, 5.19.2, 5.19.3, 5.19.4, 5.19.5, 5.19.6, 5.19.7, 5.19.8, -5.19.9, 5.19.10, 5.19.11, 5.20.0, 5.21.0, 5.21.1, 5.21.2, 5.21.3 and -5.20.1 releases of perl. +5.004, 5.004_05, 5.005, 5.005_03, 5.005_04 and 5.7.3 releases of perl. + +All stable releases of perl since 5.6.0 are covered. + +All development releases of perl since 5.9.0 are covered. + =head1 HISTORY diff --git a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm b/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm index 216836f..eb769f3 100644 --- a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm +++ b/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm @@ -3,7 +3,7 @@ package Module::CoreList::TieHashDelta; use strict; use vars qw($VERSION); -$VERSION = '5.020001'; +$VERSION = '5.20150214'; sub TIEHASH { my ($class, $changed, $removed, $parent) = @_; diff --git a/dist/Module-CoreList/lib/Module/CoreList/Utils.pm b/dist/Module-CoreList/lib/Module/CoreList/Utils.pm index 3278490..b9fde3e 100644 --- a/dist/Module-CoreList/lib/Module/CoreList/Utils.pm +++ b/dist/Module-CoreList/lib/Module/CoreList/Utils.pm @@ -6,7 +6,7 @@ use vars qw[$VERSION %utilities]; use Module::CoreList; use Module::CoreList::TieHashDelta; -$VERSION = '5.020001'; +$VERSION = '5.20150214'; sub utilities { my $perl = shift; @@ -822,6 +822,20 @@ my %delta = ( removed => { } }, + 5.018003 => { + delta_from => 5.018000, + changed => { + }, + removed => { + } + }, + 5.018004 => { + delta_from => 5.018000, + changed => { + }, + removed => { + } + }, 5.019000 => { delta_from => 5.018000, changed => { @@ -957,6 +971,48 @@ my %delta = ( removed => { } }, + 5.021004 => { + delta_from => 5.021003, + changed => { + }, + removed => { + } + }, + 5.021005 => { + delta_from => 5.021004, + changed => { + }, + removed => { + } + }, + 5.021006 => { + delta_from => 5.021005, + changed => { + }, + removed => { + } + }, + 5.021007 => { + delta_from => 5.021006, + changed => { + }, + removed => { + } + }, + 5.021008 => { + delta_from => 5.021007, + changed => { + }, + removed => { + } + }, + 5.020002 => { + delta_from => 5.020001, + changed => { + }, + removed => { + } + }, ); for my $version (sort { $a <=> $b } keys %delta) { diff --git a/dist/Module-CoreList/t/corelist.t b/dist/Module-CoreList/t/corelist.t index d8e93bf..c129584 100644 --- a/dist/Module-CoreList/t/corelist.t +++ b/dist/Module-CoreList/t/corelist.t @@ -1,7 +1,7 @@ #!perl -w use strict; use Module::CoreList; -use Test::More tests => 25; +use Test::More tests => 29; BEGIN { require_ok('Module::CoreList'); } @@ -89,3 +89,20 @@ is(Module::CoreList->removed_from('CPANPLUS::inc'), 5.010001, is(Module::CoreList::removed_from('CPANPLUS::inc'), 5.010001, "CPANPLUS::inc was removed from 5.010001"); +{ + my $warnings_count = 0; + local $SIG{__WARN__} = sub { $warnings_count++ }; + local $^W = 1; + + ok(exists $Module::CoreList::version{5}{strict}, + "strict was in 5"); + + ok(!defined $Module::CoreList::version{5}{strict}, + "strict had no version in 5"); + + is(Module::CoreList::first_release('strict', 1.01), 5.00405, + "strict reached 1.01 with 5.00405"); + + cmp_ok($warnings_count, '==', 0, + "an undefined version does not produce warnings rt#123556"); +} diff --git a/dist/Module-CoreList/t/corevers.t b/dist/Module-CoreList/t/corevers.t deleted file mode 100644 index 09d5d72..0000000 --- a/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/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm index 01393f3..210ea32 100644 --- a/dist/PathTools/Cwd.pm +++ b/dist/PathTools/Cwd.pm @@ -171,7 +171,7 @@ use strict; use Exporter; use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION); -$VERSION = '3.48'; +$VERSION = '3.48_01'; my $xs_version = $VERSION; $VERSION =~ tr/_//; diff --git a/dist/PathTools/Cwd.xs b/dist/PathTools/Cwd.xs index 4ddbdac..1f174bf 100644 --- a/dist/PathTools/Cwd.xs +++ b/dist/PathTools/Cwd.xs @@ -197,7 +197,7 @@ bsd_realpath(const char *path, char resolved[MAXPATHLEN]) symlink[slen] = '/'; symlink[slen + 1] = 0; } - left_len = my_strlcat(symlink, left, sizeof(left)); + left_len = my_strlcat(symlink, left, sizeof(symlink)); if (left_len >= sizeof(left)) { errno = ENAMETOOLONG; return (NULL); diff --git a/dist/PathTools/lib/File/Spec.pm b/dist/PathTools/lib/File/Spec.pm index bf0a327..01a616e 100644 --- a/dist/PathTools/lib/File/Spec.pm +++ b/dist/PathTools/lib/File/Spec.pm @@ -3,7 +3,7 @@ package File::Spec; use strict; use vars qw(@ISA $VERSION); -$VERSION = '3.48'; +$VERSION = '3.48_01'; $VERSION =~ tr/_//; my %module = (MacOS => 'Mac', diff --git a/dist/PathTools/lib/File/Spec/Cygwin.pm b/dist/PathTools/lib/File/Spec/Cygwin.pm index a791a2a..b9e3703 100644 --- a/dist/PathTools/lib/File/Spec/Cygwin.pm +++ b/dist/PathTools/lib/File/Spec/Cygwin.pm @@ -4,7 +4,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '3.48'; +$VERSION = '3.48_01'; $VERSION =~ tr/_//; @ISA = qw(File::Spec::Unix); diff --git a/dist/PathTools/lib/File/Spec/Epoc.pm b/dist/PathTools/lib/File/Spec/Epoc.pm index a7859c5..e5928b8 100644 --- a/dist/PathTools/lib/File/Spec/Epoc.pm +++ b/dist/PathTools/lib/File/Spec/Epoc.pm @@ -3,7 +3,7 @@ package File::Spec::Epoc; use strict; use vars qw($VERSION @ISA); -$VERSION = '3.48'; +$VERSION = '3.48_01'; $VERSION =~ tr/_//; require File::Spec::Unix; diff --git a/dist/PathTools/lib/File/Spec/Functions.pm b/dist/PathTools/lib/File/Spec/Functions.pm index 0170843..451f5bd 100644 --- a/dist/PathTools/lib/File/Spec/Functions.pm +++ b/dist/PathTools/lib/File/Spec/Functions.pm @@ -5,7 +5,7 @@ use strict; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); -$VERSION = '3.48'; +$VERSION = '3.48_01'; $VERSION =~ tr/_//; require Exporter; diff --git a/dist/PathTools/lib/File/Spec/Mac.pm b/dist/PathTools/lib/File/Spec/Mac.pm index a8dc2df..b0aacec 100644 --- a/dist/PathTools/lib/File/Spec/Mac.pm +++ b/dist/PathTools/lib/File/Spec/Mac.pm @@ -4,7 +4,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '3.48'; +$VERSION = '3.48_01'; $VERSION =~ tr/_//; @ISA = qw(File::Spec::Unix); diff --git a/dist/PathTools/lib/File/Spec/OS2.pm b/dist/PathTools/lib/File/Spec/OS2.pm index df458c9..7de0f89 100644 --- a/dist/PathTools/lib/File/Spec/OS2.pm +++ b/dist/PathTools/lib/File/Spec/OS2.pm @@ -4,7 +4,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '3.48'; +$VERSION = '3.48_01'; $VERSION =~ tr/_//; @ISA = qw(File::Spec::Unix); diff --git a/dist/PathTools/lib/File/Spec/Unix.pm b/dist/PathTools/lib/File/Spec/Unix.pm index e4eddbb..c813cc1 100644 --- a/dist/PathTools/lib/File/Spec/Unix.pm +++ b/dist/PathTools/lib/File/Spec/Unix.pm @@ -3,7 +3,7 @@ package File::Spec::Unix; use strict; use vars qw($VERSION); -$VERSION = '3.48'; +$VERSION = '3.48_01'; my $xs_version = $VERSION; $VERSION =~ tr/_//; diff --git a/dist/PathTools/lib/File/Spec/VMS.pm b/dist/PathTools/lib/File/Spec/VMS.pm index b045e27..3072fab 100644 --- a/dist/PathTools/lib/File/Spec/VMS.pm +++ b/dist/PathTools/lib/File/Spec/VMS.pm @@ -4,7 +4,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '3.48'; +$VERSION = '3.48_01'; $VERSION =~ tr/_//; @ISA = qw(File::Spec::Unix); diff --git a/dist/PathTools/lib/File/Spec/Win32.pm b/dist/PathTools/lib/File/Spec/Win32.pm index 352ec99..6c063b5 100644 --- a/dist/PathTools/lib/File/Spec/Win32.pm +++ b/dist/PathTools/lib/File/Spec/Win32.pm @@ -5,7 +5,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '3.48'; +$VERSION = '3.48_01'; $VERSION =~ tr/_//; @ISA = qw(File::Spec::Unix); diff --git a/dist/Storable/Storable.pm b/dist/Storable/Storable.pm index f74c867..7d8a011 100644 --- a/dist/Storable/Storable.pm +++ b/dist/Storable/Storable.pm @@ -22,7 +22,7 @@ package Storable; @ISA = qw(Exporter); use vars qw($canonical $forgive_me $VERSION); -$VERSION = '2.49'; +$VERSION = '2.49_01'; BEGIN { if (eval { local $SIG{__DIE__}; require Log::Agent; 1 }) { @@ -1086,8 +1086,8 @@ deal with them. The store functions will C if they run into such references unless you set C<$Storable::forgive_me> to some C value. In that -case, the fatal message is turned in a warning and some -meaningless string is stored instead. +case, the fatal message is converted to a warning and some meaningless +string is stored instead. Setting C<$Storable::canonical> may not yield frozen strings that compare equal due to possible stringification of numbers. When the diff --git a/dist/lib/t/01lib.t b/dist/lib/t/01lib.t index f58fce5..366ab47 100644 --- a/dist/lib/t/01lib.t +++ b/dist/lib/t/01lib.t @@ -38,6 +38,9 @@ MODULE } END { + # rmtree() can indirectly load the XS object for Win32, ensure + # we have our original sane @INC + local @INC = @OrigINC; # cleanup the auto/ directory we created. rmtree([$lib_dir[0]]); } diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL index 55ad01a..cfab893 100644 --- a/ext/Errno/Errno_pm.PL +++ b/ext/Errno/Errno_pm.PL @@ -2,7 +2,7 @@ use ExtUtils::MakeMaker; use Config; use strict; -our $VERSION = "1.20_03"; +our $VERSION = "1.20_05"; my %err = (); @@ -249,9 +249,9 @@ sub write_errno_pm { my($name,$expr); next unless ($name, $expr) = /"(.*?)"\s*\[\s*\[\s*(.*?)\s*\]\s*\]/; next if $name eq $expr; - $expr =~ s/\(?\(\s*[a-z_]\w*\s*\)([^\)]*)\)?/$1/i; # ((type)0xcafebabe) at alia - $expr =~ s/((?:0x)?[0-9a-fA-F]+)[luLU]+\b/$1/g; # 2147483647L et alia - next if $expr =~ m/^[a-zA-Z]+$/; # skip some Win32 functions + $expr =~ s/\(?\(\s*[a-z_]\w*\s*\)\(?([^\)]+)\)?\)?/$1/i; # ((type)0xcafebabe) at alia + $expr =~ s/\b((?:0x)?[0-9a-f]+)[LU]+\b/$1/gi; # 2147483647L et alia + next if $expr =~ m/\b[a-z_]\w*\b/i; # skip expressions containing function names etc if($expr =~ m/^0[xX]/) { $err{$name} = hex $expr; } diff --git a/ext/PerlIO-scalar/scalar.pm b/ext/PerlIO-scalar/scalar.pm index 7581f84..7e93f6d 100644 --- a/ext/PerlIO-scalar/scalar.pm +++ b/ext/PerlIO-scalar/scalar.pm @@ -1,5 +1,5 @@ package PerlIO::scalar; -our $VERSION = '0.18'; +our $VERSION = '0.18_01'; require XSLoader; XSLoader::load(); 1; diff --git a/ext/PerlIO-scalar/scalar.xs b/ext/PerlIO-scalar/scalar.xs index 8d217c9..5c5eccf 100644 --- a/ext/PerlIO-scalar/scalar.xs +++ b/ext/PerlIO-scalar/scalar.xs @@ -103,28 +103,33 @@ IV PerlIOScalar_seek(pTHX_ PerlIO * f, Off_t offset, int whence) { PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar); + Off_t new_posn; switch (whence) { case SEEK_SET: - s->posn = offset; + new_posn = offset; break; case SEEK_CUR: - s->posn = offset + s->posn; + new_posn = offset + s->posn; break; case SEEK_END: { STRLEN oldcur; (void)SvPV(s->var, oldcur); - s->posn = offset + oldcur; + new_posn = offset + oldcur; break; } + default: + SETERRNO(EINVAL, SS_IVCHAN); + return -1; } - if (s->posn < 0) { + if (new_posn < 0) { if (ckWARN(WARN_LAYER)) Perl_warner(aTHX_ packWARN(WARN_LAYER), "Offset outside string"); SETERRNO(EINVAL, SS_IVCHAN); return -1; } + s->posn = new_posn; return 0; } @@ -151,7 +156,7 @@ PerlIOScalar_read(pTHX_ PerlIO *f, void *vbuf, Size_t count) SV *sv = s->var; char *p; STRLEN len; - I32 got; + STRLEN got; p = SvPV(sv, len); if (SvUTF8(sv)) { if (sv_utf8_downgrade(sv, TRUE)) { @@ -164,9 +169,15 @@ PerlIOScalar_read(pTHX_ PerlIO *f, void *vbuf, Size_t count) return -1; } } - got = len - (STRLEN)(s->posn); - if (got <= 0) + /* I assume that Off_t is at least as large as len (which + * seems safe) and that the size of the buffer in our SV is + * always less than half the size of the address space + */ + assert(sizeof(Off_t) >= sizeof(len)); + assert((Off_t)len >= 0); + if ((Off_t)len <= s->posn) return 0; + got = len - (STRLEN)(s->posn); if ((STRLEN)got > (STRLEN)count) got = (STRLEN)count; Copy(p + (STRLEN)(s->posn), vbuf, got, STDCHAR); @@ -265,7 +276,7 @@ PerlIOScalar_get_cnt(pTHX_ PerlIO * f) PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar); STRLEN len; (void)SvPV(s->var,len); - if (len > (STRLEN) s->posn) + if ((Off_t)len > s->posn) return len - (STRLEN)s->posn; else return 0; diff --git a/ext/PerlIO-scalar/t/scalar.t b/ext/PerlIO-scalar/t/scalar.t index 9bc1abe..f4cfbef 100644 --- a/ext/PerlIO-scalar/t/scalar.t +++ b/ext/PerlIO-scalar/t/scalar.t @@ -16,7 +16,7 @@ use Fcntl qw(SEEK_SET SEEK_CUR SEEK_END); # Not 0, 1, 2 everywhere. $| = 1; -use Test::More tests => 114; +use Test::More tests => 120; my $fh; my $var = "aaa\n"; @@ -491,3 +491,22 @@ my $byte_warning = "Strings with code points over 0xFF may not be mapped into in print $refh "boo\n"; is $x, $as_string."boo\n", 'string gets appended to ref'; } + +SKIP: +{ # [perl #123443] + skip "Can't seek over 4GB with a small off_t", 4 + if $Config::Config{lseeksize} < 8; + my $buf0 = "hello"; + open my $fh, "<", \$buf0 or die $!; + ok(seek($fh, 2**32, SEEK_SET), "seek to a large position"); + is(read($fh, my $tmp, 1), 0, "read from a large offset"); + is($tmp, "", "should have read nothing"); + ok(eof($fh), "fh should be eof"); +} + +{ + my $buf0 = "hello"; + open my $fh, "<", \$buf0 or die $!; + ok(!seek($fh, -10, SEEK_CUR), "seek to negative position"); + is(tell($fh), 0, "shouldn't change the position"); +} diff --git a/ext/VMS-DCLsym/DCLsym.pm b/ext/VMS-DCLsym/DCLsym.pm index 6548223..f299c43 100644 --- a/ext/VMS-DCLsym/DCLsym.pm +++ b/ext/VMS-DCLsym/DCLsym.pm @@ -7,7 +7,7 @@ use strict; # Package globals @ISA = ( 'DynaLoader' ); -$VERSION = '1.05'; +$VERSION = '1.05_01'; my(%Locsyms) = ( ':ID' => 'LOCAL' ); my(%Gblsyms) = ( ':ID' => 'GLOBAL'); my $DoCache = 1; @@ -265,7 +265,7 @@ Charles Bailey bailey@newman.upenn.edu =head1 VERSION -1.05 12-Feb-2011 +1.05_01 16-Jun-2013 =head1 BUGS diff --git a/ext/VMS-Stdio/Stdio.pm b/ext/VMS-Stdio/Stdio.pm index 1b8a4f7..4d05994 100644 --- a/ext/VMS-Stdio/Stdio.pm +++ b/ext/VMS-Stdio/Stdio.pm @@ -13,7 +13,7 @@ use Carp '&croak'; use DynaLoader (); use Exporter (); -$VERSION = '2.4'; +$VERSION = '2.41'; @ISA = qw( Exporter DynaLoader IO::File ); @EXPORT = qw( &O_APPEND &O_CREAT &O_EXCL &O_NDELAY &O_NOWAIT &O_RDONLY &O_RDWR &O_TRUNC &O_WRONLY ); diff --git a/ext/XS-APItest/t/clone-with-stack.t b/ext/XS-APItest/t/clone-with-stack.t index 7a0cd29..3238e9f 100644 --- a/ext/XS-APItest/t/clone-with-stack.t +++ b/ext/XS-APItest/t/clone-with-stack.t @@ -17,7 +17,7 @@ if (not $Config{'useithreads'}) { skip_all("clone_with_stack requires threads"); } -plan(4); +plan(5); fresh_perl_is( <<'----', <<'====', undef, "minimal clone_with_stack" ); use XS::APItest; @@ -65,3 +65,26 @@ X-Y-0:1:2:3:4-Z ==== } + +{ + fresh_perl_is( <<'----', <<'====', undef, "with localised stuff" ); +use XS::APItest; +$s = "outer"; +$a[0] = "anterior"; +$h{k} = "hale"; +{ + local $s = "inner"; + local $a[0] = 'posterior'; + local $h{k} = "halt"; + clone_with_stack(); +} +print "scl: $s\n"; +print "ary: $a[0]\n"; +print "hsh: $h{k}\n"; +---- +scl: outer +ary: anterior +hsh: hale +==== + +} diff --git a/ext/attributes/attributes.pm b/ext/attributes/attributes.pm index 7c3c0b0..ebca214 100644 --- a/ext/attributes/attributes.pm +++ b/ext/attributes/attributes.pm @@ -1,6 +1,6 @@ package attributes; -our $VERSION = 0.22; +our $VERSION = 0.23; @EXPORT_OK = qw(get reftype); @EXPORT = (); diff --git a/ext/attributes/attributes.xs b/ext/attributes/attributes.xs index dbb644d..6b36812 100644 --- a/ext/attributes/attributes.xs +++ b/ext/attributes/attributes.xs @@ -97,7 +97,7 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs) } break; default: - if (memEQs(name, 6, "shared")) { + if (memEQs(name, len, "shared")) { if (negated) Perl_croak(aTHX_ "A variable may not be unshared"); SvSHARE(sv); diff --git a/gv.c b/gv.c index e402f6b..ce68478 100644 --- a/gv.c +++ b/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/hints/catamount.sh b/hints/catamount.sh index b590903..572a6a7 100644 --- a/hints/catamount.sh +++ b/hints/catamount.sh @@ -31,11 +31,11 @@ # mkdir -p /opt/perl-catamount # mkdir -p /opt/perl-catamount/include # mkdir -p /opt/perl-catamount/lib -# mkdir -p /opt/perl-catamount/lib/perl5/5.20.1 +# mkdir -p /opt/perl-catamount/lib/perl5/5.20.2 # mkdir -p /opt/perl-catamount/bin # cp *.h /opt/perl-catamount/include # cp libperl.a /opt/perl-catamount/lib -# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.20.1 +# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.20.2 # cp miniperl perl run.sh cc.sh /opt/perl-catamount/lib # # With the headers and the libperl.a you can embed Perl to your Catamount diff --git a/hints/darwin.sh b/hints/darwin.sh index 7c3f818..276695a 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -168,7 +168,14 @@ esac # Allow the user to override ld, but modify it as necessary below case "$ld" in - '') ld='cc';; + '') case "$cc" in + # If the cc is explicitly something else than cc (or empty), + # set the ld to be that explicitly something else. Conversely, + # if the cc is 'cc' (or empty), set the ld to be 'cc'. + cc|'') ld='cc';; + *) ld="$cc" ;; + esac + ;; esac # Perl bundles do not expect two-level namespace, added in Darwin 1.4. diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index 9856961..1897d6b 100644 --- a/hints/dec_osf.sh +++ b/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/hints/irix_6.sh b/hints/irix_6.sh index e36d643..9714611 100644 --- a/hints/irix_6.sh +++ b/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 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 but then thinks it can use +# instead; in IRIX this is not true because the prototype of fcntl() +# requires explicit include of +i_fcntl=define diff --git a/hints/netbsd.sh b/hints/netbsd.sh index 17a4ff6..6f0dd74 100644 --- a/hints/netbsd.sh +++ b/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/installperl b/installperl index 5acc06a..594f045 100755 --- a/installperl +++ b/installperl @@ -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") { diff --git a/intrpvar.h b/intrpvar.h index e29a30a..08c4a38 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -736,7 +736,7 @@ PERLVAR(I, debug_pad, struct perl_debug_pad) /* always needed because of the re /* Hook for File::Glob */ PERLVARI(I, globhook, globhook_t, NULL) -/* The last unconditional member of the interpreter structure when 5.20.1 was +/* The last unconditional member of the interpreter structure when 5.20.2 was released. The offset of the end of this is baked into a global variable in any shared perl library which will allow a sanity test in future perl releases. */ diff --git a/lib/feature.pm b/lib/feature.pm index 222cdfd..dfcff96 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -5,7 +5,7 @@ package feature; -our $VERSION = '1.36'; +our $VERSION = '1.36_01'; our %feature = ( fc => 'feature_fc', @@ -246,6 +246,27 @@ and C syntax. See L for details. This feature is available from Perl 5.18 onwards. +=head2 The 'postderef' and 'postderef_qq' features + +B: This feature is still experimental and the implementation may +change in future versions of Perl. For this reason, Perl will +warn when you use the feature, unless you have explicitly disabled the +warning: + + no warnings "experimental::postderef"; + +The 'postderef' feature allows the use of L. For example, it will make the +following two statements equivalent: + + my @x = @{ $h->{a} }; + my @x = $h->{a}->@*; + +The 'postderef_qq' feature extends this, for array and scalar dereference, to +working inside of double-quotish interpolations. + +This feature is available from Perl 5.20 onwards. + =head2 The 'signatures' feature B: This feature is still experimental and the implementation may diff --git a/make_ext.pl b/make_ext.pl index b433762..e647aa9 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -443,8 +443,8 @@ EOM # the Makefile.PL. Altering the atime and mtime backwards by 4 # seconds seems to resolve the issue. eval { - my $ftime = time - 4; - utime $ftime, $ftime, 'Makefile.PL'; + my $ftime = (stat('Makefile.PL'))[9] - 4; + utime $ftime, $ftime, 'Makefile.PL'; }; } elsif ($mname =~ /\A(?:Carp |ExtUtils::CBuilder @@ -715,7 +715,7 @@ sub just_pm_to_blib { # (which it has to deal with, as cpan/foo/bar creates # lib/auto/foo/bar, but the EU::MM rule will only # rmdir lib/auto/foo/bar, leaving lib/auto/foo - _unlink("../../$_") + _unlink($_) foreach sort values %pm; } } diff --git a/makedef.pl b/makedef.pl index 8b972a4..a44c014 100644 --- a/makedef.pl +++ b/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/mg.c b/mg.c index c18d4b7..4158f1a 100644 --- a/mg.c +++ b/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/op.c b/op.c index 796cb03..7337f23 100644 --- a/op.c +++ b/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/op.h b/op.h index a1c3c59..9d9dd58 100644 --- a/op.h +++ b/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/pad.c b/pad.c index 31282d1..fed2892 100644 --- a/pad.c +++ b/pad.c @@ -56,7 +56,8 @@ at that depth of recursion into the CV. The 0th slot of a frame AV is an AV which is @_. Other entries are storage for variables and op targets. Iterating over the PADNAMELIST iterates over all possible pad -items. Pad slots for targets (SVs_PADTMP) and GVs end up having &PL_sv_no +items. Pad slots for targets (SVs_PADTMP) +and GVs end up having &PL_sv_undef "names", while slots for constants have &PL_sv_no "names" (see pad_alloc()). That &PL_sv_no is used is an implementation detail subject to change. To test for it, use C. diff --git a/pad.h b/pad.h index 6269bdc..90517c6 100644 --- a/pad.h +++ b/pad.h @@ -242,7 +242,7 @@ for C. =for apidoc m|SV *|PAD_SETSV |PADOFFSET po|SV* sv Set the slot at offset C in the current pad to C -=for apidoc m|void|PAD_SV |PADOFFSET po +=for apidoc m|SV *|PAD_SV |PADOFFSET po Get the value at offset C in the current pad =for apidoc m|SV *|PAD_SVl |PADOFFSET po diff --git a/patchlevel.h b/patchlevel.h index 8cbd286..07e1217 100644 --- a/patchlevel.h +++ b/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 diff --git a/perl.c b/perl.c index 0fb87dc..5000d79 100644 --- a/perl.c +++ b/perl.c @@ -2925,7 +2925,7 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags) /* =for apidoc p||eval_pv -Tells Perl to C the given string and return an SV* result. +Tells Perl to C 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/perl.h b/perl.h index 3b76389..1325de9 100644 --- a/perl.h +++ b/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 #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 # if defined(USE_SOCKS) && defined(I_SOCKS) @@ -1797,6 +1798,16 @@ typedef NVTYPE NV; # include #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 diff --git a/plan9/config.plan9 b/plan9/config.plan9 index e3c525e..7f860f9 100644 --- a/plan9/config.plan9 +++ b/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/plan9/config_sh.sample b/plan9/config_sh.sample index 3eab3d2..57992ff 100644 --- a/plan9/config_sh.sample +++ b/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='' @@ -722,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='' @@ -852,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' @@ -918,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' @@ -957,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='' @@ -1037,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='' @@ -1052,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/plan9/mkfile b/plan9/mkfile index 28d290b..cf2153e 100644 --- a/plan9/mkfile +++ b/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/pod/.gitignore b/pod/.gitignore index 39e768b..3898494 100644 --- a/pod/.gitignore +++ b/pod/.gitignore @@ -59,7 +59,7 @@ /roffitall # generated -/perl5201delta.pod +/perl5202delta.pod /perlapi.pod /perlintern.pod *.html diff --git a/pod/perl.pod b/pod/perl.pod index 31e5633..9473daf 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -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/pod/perl5184delta.pod b/pod/perl5184delta.pod new file mode 100644 index 0000000..3f1b3a3 --- /dev/null +++ b/pod/perl5184delta.pod @@ -0,0 +1,153 @@ +=encoding utf8 + +=head1 NAME + +perl5184delta - what is new for perl v5.18.4 + +=head1 DESCRIPTION + +This document describes differences between the 5.18.4 release and the 5.18.2 +release. B This document ignores perl 5.18.3, a broken release +which existed for a few hours only. + +If you are upgrading from an earlier release such as 5.18.1, first read +L, which describes differences between 5.18.1 and 5.18.2. + +=head1 Modules and Pragmata + +=head2 Updated Modules and Pragmata + +=over 4 + +=item * + +L has been upgraded from 5.84_01 to 5.84_02. + +=item * + +L has been upgraded from version 1.39_10 to 1.39_11. + +This fixes a crash in tab completion, where available. [perl #120827] Also, +filehandle information is properly reset after a pager is run. [perl #121456] + +=back + +=head1 Platform Support + +=head2 Platform-Specific Notes + +=over 4 + +=item Win32 + +=over 4 + +=item * + +Introduced by +L, a memory +leak on every call to C and backticks (C< `` >), on most Win32 Perls +starting from 5.18.0 has been fixed. The memory leak only occurred if you +enabled psuedo-fork in your build of Win32 Perl, and were running that build on +Server 2003 R2 or newer OS. The leak does not appear on WinXP SP3. +[L] + +=back + +=back + +=head1 Selected Bug Fixes + +=over 4 + +=item * + +The debugger now properly resets filehandles as needed. [perl #121456] + +=item * + +A segfault in Digest::SHA has been addressed. [perl #121421] + +=item * + +perl can again be built with USE_64_BIT_INT, with Visual C 2003, 32 bit. +[perl #120925] + +=item * + +A leading { (brace) in formats is properly parsed again. [perl #119973] + +=item * + +Copy the values used to perturb hash iteration when cloning an +interpreter. This was fairly harmless but caused C to +complain. [perl #121336] + +=item * + +In Perl v5.18 C and C started +crashing. This has been fixed. [perl #119949] + +=back + +=head1 Acknowledgements + +Perl 5.18.4 represents approximately 9 months of development since Perl 5.18.2 +and contains approximately 2,000 lines of changes across 53 files from 13 +authors. + +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.18.4: + +Daniel Dragan, David Mitchell, Doug Bell, Father Chrysostomos, Hiroo Hayashi, +James E Keenan, Karl Williamson, Mark Shelor, Ricardo Signes, Shlomi Fish, +Smylers, Steve Hay, Tony Cook. + +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 +the (very much appreciated) contributors who reported issues to the Perl bug +tracker. + +Many of the changes included in this version originated in the CPAN modules +included in Perl's core. We're grateful to the entire CPAN community for +helping Perl to flourish. + +For a more complete list of all of Perl's historical contributors, please see +the F file in the Perl source distribution. + +=head1 Reporting Bugs + +If you find what you think is a bug, you might check the articles recently +posted to the comp.lang.perl.misc newsgroup and the perl bug database at +http://rt.perl.org/perlbug/ . There may also be information at +http://www.perl.org/ , the Perl Home Page. + +If you believe you have an unreported bug, please run the L program +included with your release. Be sure to trim your bug down to a tiny but +sufficient test case. Your bug report, along with the output of C, +will be sent off to perlbug@perl.org to be analysed by the Perl porting team. + +If the bug you are reporting has security implications, which make it +inappropriate to send to a publicly archived mailing list, then please send it +to perl5-security-report@perl.org. This points to a closed subscription +unarchived mailing list, which includes all the core committers, who will be +able to help assess the impact of issues, figure out a resolution, and help +co-ordinate the release of patches to mitigate or fix the problem across all +platforms on which Perl is supported. Please only use this address for +security issues in the Perl core, not for modules independently distributed on +CPAN. + +=head1 SEE ALSO + +The F file for an explanation of how to view exhaustive details on +what changed. + +The F file for how to build Perl. + +The F file for general stuff. + +The F and F files for copyright information. + +=cut + diff --git a/pod/perl5201delta.pod b/pod/perl5201delta.pod new file mode 100644 index 0000000..9352801 --- /dev/null +++ b/pod/perl5201delta.pod @@ -0,0 +1,410 @@ +=encoding utf8 + +=head1 NAME + +perl5201delta - what is new for perl v5.20.1 + +=head1 DESCRIPTION + +This document describes differences between the 5.20.0 release and the 5.20.1 +release. + +If you are upgrading from an earlier release such as 5.18.0, first read +L, which describes differences between 5.18.0 and 5.20.0. + +=head1 Incompatible Changes + +There are no changes intentionally incompatible with 5.20.0. If any exist, +they are bugs, and we request that you submit a report. See L +below. + +=head1 Performance Enhancements + +=over 4 + +=item * + +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> + +=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> + +=back + +=head1 Modules and Pragmata + +=head2 Updated Modules and Pragmata + +=over 4 + +=item * + +L has been upgraded from version 0.20 to 0.22. + +The list of Perl versions covered has been updated and some flaws in the +parsing have been fixed. + +=item * + +L has been upgraded from version 5.70 to 5.71. + +Illegal POD syntax in the documentation has been corrected. + +=item * + +L has been upgraded from version 0.280216 to 0.280217. + +Android builds now link to both B<-lperl> and C<$Config::Config{perllibs}>. + +=item * + +L has been upgraded from version 2.29 to 2.30. + +The documentation now notes that C will not overwrite read-only files. + +=item * + +L has been upgraded from version 3.11 to 5.020001. + +The list of Perl versions covered has been updated. + +=item * + +The PathTools module collection has been upgraded from version 3.47 to 3.48. + +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> + +=item * + +L has been upgraded from version 0.14 to 0.15. + +A minor portability improvement has been made to the XS implementation. + +=item * + +L has been upgraded from version 0.57 to 0.58. + +The documentation includes many clarifications and fixes. + +=item * + +L has been upgraded from version 1.13 to 1.13_01. + +The documentation has some minor formatting improvements. + +=item * + +L has been upgraded from version 0.9908 to 0.9909. + +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> + +=back + +=head1 Documentation + +=head2 Changes to Existing Documentation + +=head3 L + +=over 4 + +=item * + +C - 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> + +=item * + +Note that C doesn't do set magic. + +=item * + +C - Fix documentation to mention the use of C instead of +C. +L<[perl #121869]|https://rt.perl.org/Ticket/Display.html?id=121869> + +=item * + +Clarify where C may be embedded or is required to terminate a string. + +=back + +=head3 L + +=over 4 + +=item * + +Clarify the meaning of C<-B> and C<-T>. + +=item * + +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> + +=item * + +Note that C, C and C may produce different orderings for +tied hashes compared to other perl hashes. +L<[perl #121404]|https://rt.perl.org/Ticket/Display.html?id=121404> + +=item * + +Note that C and C may fall back to the shell on Win32. +Only C and C indirect object syntax +will reliably avoid using the shell. This has also been noted in L. +L<[perl #122046]|https://rt.perl.org/Ticket/Display.html?id=122046> + +=item * + +Clarify the meaning of C. +L<[perl #122132]|https://rt.perl.org/Ticket/Display.html?id=122132> + +=back + +=head3 L + +=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> + +=back + +=head3 L + +=over 4 + +=item * + +We now have a code of conduct for the I<< p5p >> mailing list, as documented in +L<< perlpolicy/STANDARDS OF CONDUCT >>. + +=back + +=head3 L + +=over 4 + +=item * + +The C modifier has been clarified to note that comments cannot be continued +onto the next line by escaping them. + +=back + +=head3 L + +=over 4 + +=item * + +Mention the use of empty conditionals in C/C loops for infinite +loops. + +=back + +=head3 L + +=over 4 + +=item * + +Added a discussion of locale issues in XS code. + +=back + +=head1 Diagnostics + +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. + +=head2 Changes to Existing Diagnostics + +=over 4 + +=item * + +L%sE|perldiag/"Variable length lookbehind not implemented in regex m/%s/"> + +Information about Unicode behaviour has been added. + +=back + +=head1 Configuration and Compilation + +=over 4 + +=item * + +Building Perl no longer writes to the source tree when configured with +F's B<-Dmksymlinks> option. +L<[perl #121585]|https://rt.perl.org/Ticket/Display.html?id=121585> + +=back + +=head1 Platform Support + +=head2 Platform-Specific Notes + +=over 4 + +=item Android + +Build support has been improved for cross-compiling in general and for Android +in particular. + +=item OpenBSD + +Corrected architectures and version numbers used in configuration hints when +building Perl. + +=item Solaris + +B options have been cleaned up, hints look for B as well as +B, and support for native C has been added. + +=item VMS + +An old bug in feature checking, mainly affecting pre-7.3 systems, has been +fixed. + +=item Windows + +C<%I64d> is now being used instead of C<%lld> for MinGW. + +=back + +=head1 Internal Changes + +=over 4 + +=item * + +Added L. +Changing the program's locale should be avoided by XS code. Nevertheless, +certain non-Perl libraries called from XS, such as C 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. + +=back + +=head1 Selected Bug Fixes + +=over 4 + +=item * + +A bug has been fixed where zero-length assertions and code blocks inside of a +regex could cause C to see an incorrect value. +L<[perl #122460]|https://rt.perl.org/Ticket/Display.html?id=122460> + +=item * + +Using C 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 and friends should now work properly on more Android builds. + +Due to an oversight, the value specified through B<-Dtargetsh> to F +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, +C and backticks: the commands would end up looking for F instead +of F, and so would fail for the vast majority of devices, +leaving C<$!> as C. + +=item * + +Many issues have been detected by L and +fixed. + +=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 +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. + +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 list above is almost certainly incomplete as it is automatically generated +from version control history. In particular, it does not include the names of +the (very much appreciated) contributors who reported issues to the Perl bug +tracker. + +Many of the changes included in this version originated in the CPAN modules +included in Perl's core. We're grateful to the entire CPAN community for +helping Perl to flourish. + +For a more complete list of all of Perl's historical contributors, please see +the F file in the Perl source distribution. + +=head1 Reporting Bugs + +If you find what you think is a bug, you might check the articles recently +posted to the comp.lang.perl.misc newsgroup and the perl bug database at +https://rt.perl.org/ . There may also be information at http://www.perl.org/ , +the Perl Home Page. + +If you believe you have an unreported bug, please run the L program +included with your release. Be sure to trim your bug down to a tiny but +sufficient test case. Your bug report, along with the output of C, +will be sent off to perlbug@perl.org to be analysed by the Perl porting team. + +If the bug you are reporting has security implications, which make it +inappropriate to send to a publicly archived mailing list, then please send it +to perl5-security-report@perl.org. This points to a closed subscription +unarchived mailing list, which includes all the core committers, who will be +able to help assess the impact of issues, figure out a resolution, and help +co-ordinate the release of patches to mitigate or fix the problem across all +platforms on which Perl is supported. Please only use this address for +security issues in the Perl core, not for modules independently distributed on +CPAN. + +=head1 SEE ALSO + +The F file for an explanation of how to view exhaustive details on +what changed. + +The F file for how to build Perl. + +The F file for general stuff. + +The F and F files for copyright information. + +=cut diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 92133e2..a339f3d 100644 --- a/pod/perldelta.pod +++ b/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, 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, 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 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 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 in the XS has been corrected. +L<[perl #122701]|https://rt.perl.org/Ticket/Display.html?id=122701> =item * -L has been upgraded from version 0.20 to 0.22. +L 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 has been upgraded from version 5.70 to 5.71. +L 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 has been upgraded from version 0.280216 to 0.280217. +L 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 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 has been upgraded from version 2.29 to 2.30. +L has been upgraded from version 1.37 to 1.38. -The documentation now notes that C 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 has been upgraded from version 3.11 to 5.020001. +L 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 compiler is now avoided when building the XS. =item * -L has been upgraded from version 0.14 to 0.15. +L 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 on a C handle now properly returns true when the file +position is past the 2GB mark on 32-bit systems. =item * -L has been upgraded from version 0.57 to 0.58. +L 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 has been upgraded from version 1.13 to 1.13_01. +L 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 has been upgraded from version 0.9908 to 0.9909. +L 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 + +This document, by Tom Christiansen, provides examples of handling Unicode in +Perl. + =head2 Changes to Existing Documentation -=head3 L +=head3 L =over 4 =item * -C - 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 doesn't do set magic. +=back -=item * +=head3 L -C - Fix documentation to mention the use of C instead of -C. -L<[perl #121869]|https://rt.perl.org/Ticket/Display.html?id=121869> +=over 4 =item * -Clarify where C 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 +=head3 L =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. -Note that C, C and C 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 and C may fall back to the shell on Win32. -Only C and C indirect object syntax -will reliably avoid using the shell. This has also been noted in L. -L<[perl #122046]|https://rt.perl.org/Ticket/Display.html?id=122046> +L is now documented. +This error is not new, but was not previously documented here. =item * -Clarify the meaning of C. -L<[perl #122132]|https://rt.perl.org/Ticket/Display.html?id=122132> +L is now +documented. This error is not new, but was not previously documented here. =back -=head3 L +=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 has been added to verify that +L remains +fixed. =back -=head3 L - -=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 failures +remain.) -=head3 L +=head1 Selected Bug Fixes =over 4 =item * -The C 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 +=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/C 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 +=item * -=over 4 +An assertion failure when parsing C 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. - -=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%sE|perldiag/"Variable length lookbehind not implemented in regex m/%s/"> +On Win32, restoring in a child pseudo-process a variable that was Ced +in a parent pseudo-process before the C 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 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's B<-Dmksymlinks> option. -L<[perl #121585]|https://rt.perl.org/Ticket/Display.html?id=121585> +In Perl 5.20.0, C 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>), 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 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 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 options have been cleaned up, hints look for B as well as -B, and support for native C 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 case in +pp_formline() didn't set the pointer used to mark the chop position, which led +to the C 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. -Changing the program's locale should be avoided by XS code. Nevertheless, -certain non-Perl libraries called from XS, such as C 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 +argument to C. 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 to see an incorrect value. -L<[perl #122460]|https://rt.perl.org/Ticket/Display.html?id=122460> - -=item * - -Using C 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 and friends should now work properly on more Android builds. - -Due to an oversight, the value specified through B<-Dtargetsh> to F -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, -C and backticks: the commands would end up looking for F instead -of F, and so would fail for the vast majority of devices, -leaving C<$!> as C. - -=item * - -Many issues have been detected by L 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/pod/perldiag.pod b/pod/perldiag.pod index e4b861b..9f3996f 100644 --- a/pod/perldiag.pod +++ b/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. functioning as a class, but that package doesn't define that particular method, nor does any of its base classes. See L. +=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> 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 and L. =item Invalid negative number (%s) in chr (W utf8) You passed a negative number to C. 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/pod/perlexperiment.pod b/pod/perlexperiment.pod index 66bd960..90539ea 100644 --- a/pod/perlexperiment.pod +++ b/pod/perlexperiment.pod @@ -91,6 +91,16 @@ C. Introduced in Perl 5.18 +=item Subroutine signatures + +Introduced in Perl 5.20.0 + +Using this feature triggers warnings in the category +C. + +The ticket for this feature is +L<[perl #121481]|https://rt.perl.org/Ticket/Display.html?id=121481>. + =item Postfix dereference syntax Introduced in Perl 5.20.0 diff --git a/pod/perlfork.pod b/pod/perlfork.pod index 7729444..c118fb5 100644 --- a/pod/perlfork.pod +++ b/pod/perlfork.pod @@ -152,7 +152,7 @@ pseudo-child created by it that is also a pseudo-parent will only exit after their pseudo-children have exited. Starting with Perl 5.14 a parent will not wait() automatically -for any child that has been signalled with C +for any child that has been signalled with C to avoid a deadlock in case the child is blocking on I/O and never receives the signal. @@ -168,8 +168,8 @@ BEGIN block, but will not continue parsing the source stream after the BEGIN block. For example, consider the following code: BEGIN { - fork and exit; # fork child and exit the parent - print "inner\n"; + fork and exit; # fork child and exit the parent + print "inner\n"; } print "outer\n"; @@ -198,7 +198,7 @@ separately in the child. On some operating systems, notably Solaris and Unixware, calling C from a child process will flush and close open filehandles in the parent, thereby corrupting the filehandles. On these systems, calling C<_exit()> -is suggested instead. C<_exit()> is available in Perl through the +is suggested instead. C<_exit()> is available in Perl through the C module. Please consult your system's manpages for more information on this. @@ -224,63 +224,63 @@ write to a forked child: # simulate open(FOO, "|-") sub pipe_to_fork ($) { - my $parent = shift; - pipe my $child, $parent or die; - my $pid = fork(); - die "fork() failed: $!" unless defined $pid; - if ($pid) { - close $child; - } - else { - close $parent; - open(STDIN, "<&=" . fileno($child)) or die; - } - $pid; + my $parent = shift; + pipe my $child, $parent or die; + my $pid = fork(); + die "fork() failed: $!" unless defined $pid; + if ($pid) { + close $child; + } + else { + close $parent; + open(STDIN, "<&=" . fileno($child)) or die; + } + $pid; } if (pipe_to_fork('FOO')) { - # parent - print FOO "pipe_to_fork\n"; - close FOO; + # parent + print FOO "pipe_to_fork\n"; + close FOO; } else { - # child - while () { print; } - exit(0); + # child + while () { print; } + exit(0); } And this one reads from the child: # simulate open(FOO, "-|") sub pipe_from_fork ($) { - my $parent = shift; - pipe $parent, my $child or die; - my $pid = fork(); - die "fork() failed: $!" unless defined $pid; - if ($pid) { - close $child; - } - else { - close $parent; - open(STDOUT, ">&=" . fileno($child)) or die; - } - $pid; + my $parent = shift; + pipe $parent, my $child or die; + my $pid = fork(); + die "fork() failed: $!" unless defined $pid; + if ($pid) { + close $child; + } + else { + close $parent; + open(STDOUT, ">&=" . fileno($child)) or die; + } + $pid; } if (pipe_from_fork('BAR')) { - # parent - while () { print; } - close BAR; + # parent + while () { print; } + close BAR; } else { - # child - print "pipe_from_fork\n"; - exit(0); + # child + print "pipe_from_fork\n"; + exit(0); } Forking pipe open() constructs will be supported in future. -=item Global state maintained by XSUBs +=item Global state maintained by XSUBs External subroutines (XSUBs) that maintain their own global state may not work correctly. Such XSUBs will either need to maintain locks to diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 7713f54..802b990 100644 --- a/pod/perlfunc.pod +++ b/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|perllocale> which includes C, 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 a caller (that is, if we're in a subroutine or C or C) 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. 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 Calling delete on array values is deprecated and likely to -be removed in a future version of Perl. +B Calling C 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 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 on arrays. B -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 on arrays. + +B Calling C 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. -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 is in effect, C lets you use a package variable without qualifying it with the package name, but only within -the lexical scope of the C declaration. +the lexical scope of the C 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, 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 variables are enabled only when the C pragma is in effect, unless the keyword is written as C. -See also L. +See also L. Alternately, include a C or later to the +current scope. =item study SCALAR X @@ -8602,15 +8619,19 @@ This is often useful if you need to check the current Perl version before Cing library modules that won't work with older versions of Perl. (We try not to do this more than we have to.) -C also enables all features available in the requested +C also lexically enables all features available in the requested version as defined by the C pragma, disabling any features not in the requested version's feature bundle. See L. Similarly, if the specified Perl version is greater than or equal to 5.12.0, strictures are enabled lexically as with C. Any explicit use of C or C overrides C, even if it comes -before it. In both cases, the F and F files are -not actually loaded. +before it. Later use of C +will override all behavior of a previous +C, possibly removing the C and C added by +C. C does not +load the F or F +files. The C forces the C and C to happen at compile time. The C 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. -If you use wait in your handler for $SIG{CHLD} it may accidentally for the -child created by qx() or system(). See L for details. +If you use C in your handler for $SIG{CHLD}, it may accidentally wait +for the child created by qx() or system(). See L for details. Portability issues: L. @@ -9280,8 +9301,6 @@ This keyword is documented in L. =item else -=item elseif - =item elsif =item for @@ -9298,6 +9317,15 @@ This keyword is documented in L. These flow-control keywords are documented in L. +=item elseif + +The "else if" keyword is spelled C in Perl. There's no C +or C either. It does parse C, but only to warn you +about not using it. + +See the documentation for flow-control keywords in L. + =back =over diff --git a/pod/perlgit.pod b/pod/perlgit.pod index 2b00774..b45faf4 100644 --- a/pod/perlgit.pod +++ b/pod/perlgit.pod @@ -255,12 +255,12 @@ itself you can fix it up by editing the files once more and then issue: Now you should create a patch file for all your local changes: - % git format-patch -M origin.. + % git format-patch -M blead.. 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch Or for a lot of changes, e.g. from a topic branch: - % git format-patch --stdout -M origin.. > topic-branch-changes.patch + % git format-patch --stdout -M blead.. > topic-branch-changes.patch You should now send an email to L with a description of your @@ -271,8 +271,8 @@ should only send patches to L directly if the patch is not ready to be applied, but intended for discussion. -See the next section for how to configure and use git to send these -emails for you. +Please do not use git-send-email(1) to send your patch. See L for more information. If you want to delete your temporary branch, you may do so with: @@ -326,7 +326,7 @@ output. After you've generated your patch you should sent it to perlbug@perl.org (as discussed L with a normal mail client as an +section|/"Patch workflow">) with a normal mail client as an attachment, along with a description of the patch. You B use git-send-email(1) to send patches generated with diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 90ab204..d845010 100644 --- a/pod/perlguts.pod +++ b/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 set, and -Is have C set. But this have never been fully true. +Is have C set. But this has never been fully true. C could be set on a variable that no longer resides in any pad. While Is do have C set, it can also be set on variables that have never resided in a pad, but nonetheless act like Is. diff --git a/pod/perlhack.pod b/pod/perlhack.pod index dc3f396..8fcd618 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -125,8 +125,7 @@ are also referred to as the "Perl 5 Porters", "p5p" or just the "porters". A searchable archive of the list is available at -L. There is -also another archive at +L. There is also an archive at L. =head2 perl-changes mailing list diff --git a/pod/perlhist.pod b/pod/perlhist.pod index 2cf9c58..7afc2fc 100644 --- a/pod/perlhist.pod +++ b/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/pod/perliol.pod b/pod/perliol.pod index b01b10e..ab600bd 100644 --- a/pod/perliol.pod +++ b/pod/perliol.pod @@ -98,7 +98,7 @@ The basic data structure is a PerlIOl: { PerlIOl * next; /* Lower layer */ PerlIO_funcs * tab; /* Functions for this layer */ - IV flags; /* Various flags for state */ + U32 flags; /* Various flags for state */ }; A C is a pointer to the struct, and the I diff --git a/pod/perlipc.pod b/pod/perlipc.pod index 0e00d18..49c605b 100644 --- a/pod/perlipc.pod +++ b/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 signal is received. The actual code is located in the subroutine C, 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 use SA_RESTART. Consequently, +Perl 5.8.0 and later do I use SA_RESTART. Consequently, restartable system calls can fail (with $! set to C) in places where they previously would have succeeded. The default C<:perlio> layer retries C, C -and C as described above; interrupted C and +and C as described above; interrupted C and C 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 and use the C ioctl() on it instead. See tty(4) for details. -Non-Unix users should check their C<< I::Process >> module for +Non-Unix users should check their C<< I::Process >> module for other possible solutions. =head2 Safe Pipe Opens @@ -559,13 +562,13 @@ you opened whatever your kid writes to I 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 () { 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 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 spawning a shell, and reads its standard output via the C filehandle. The corresponding syntax to I 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 = ); @@ -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 = ); 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 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 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) @@ -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, you should also check out the F file at your nearest CPAN site, especially -L. +L. See L or best yet, the F 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 file is devoted to "Networking, Device diff --git a/pod/perllocale.pod b/pod/perllocale.pod index 1d7e4e4..40fc3e6 100644 --- a/pod/perllocale.pod +++ b/pod/perllocale.pod @@ -373,6 +373,10 @@ C 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 gives the B, the second the B. 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, B, B, B): LC_ALL=en_US.ISO8859-1 @@ -551,7 +555,7 @@ locale "En_US"--and in Cshish shells (B, B) 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" and "E" 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. This means +Perl currently only supports single-byte locales for C. This means that a UTF-8 locale likely will just give you machine-native ordering. Use L for the full implementation of the Unicode Collation Algorithm. @@ -808,15 +812,16 @@ information on all these.) The C locale also provides the map used in transliterating characters between lower and uppercase. This affects the case-mapping -functions--C, C, C, C, and C; case-mapping +functions--C, C, C, C, and C; +case-mapping interpolation with C<\F>, C<\l>, C<\L>, C<\u>, or C<\U> in double-quoted strings and C substitutions; and case-independent regular expression pattern matching using the C modifier. Finally, C affects the (deprecated) POSIX character-class test functions--C, C, 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 class to C. 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, 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). POSIX locales, even UTF-8 ones, @@ -837,7 +842,11 @@ For releases v5.16 and v5.18, C> could be used as a workaround for this (see L). 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 locale that claims that -characters such as "E" and "|" are alphanumeric. +characters such as C<"E"> 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. To see if a character is a particular type under a locale, Perl uses the functions like C. Your C library may not work for UTF-8 locales with those functions, instead -only working under the newer wide library functions like C. -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, +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--I 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. For -collation, in all releases, the system's C function is called, -and whatever it does is what you get. +v5.16 to the casing operations such as C<\L> and C. For +collation, in all releases so far, the system's C function is +called, and whatever it does is what you get. =head1 BUGS diff --git a/pod/perlmod.pod b/pod/perlmod.pod index f708cc0..0ed4bd9 100644 --- a/pod/perlmod.pod +++ b/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 + +Tutorial on making a new module. + +=item L + +Best practices for making a new module. + +=back + =head2 Packages X X X X X diff --git a/pod/perlmodstyle.pod b/pod/perlmodstyle.pod index 5622d32..d6111d0 100644 --- a/pod/perlmodstyle.pod +++ b/pod/perlmodstyle.pod @@ -178,7 +178,9 @@ been done in Perl, and avoid re-inventing the wheel unless you have a good reason. Good places to look for pre-existing modules include -http://search.cpan.org/ and asking on modules@perl.org +L and L +and asking on C +(L). If an existing module B does what you want, consider writing a patch, writing a subclass, or otherwise extending the existing module @@ -370,7 +372,7 @@ which is visible to the user (and most things that aren't!) =item Parameter passing -Use named parameters. It's easier to use a hash like this: +Use named parameters. It's easier to use a hash like this: $obj->do_something( name => "wibble", @@ -566,7 +568,7 @@ Your module should also include a README file describing the module and giving pointers to further information (website, author email). An INSTALL file should be included, and should contain simple installation -instructions. When using ExtUtils::MakeMaker this will usually be: +instructions. When using ExtUtils::MakeMaker this will usually be: =over 4 @@ -620,23 +622,25 @@ The most common CPAN version numbering scheme looks like this: 1.00, 1.10, 1.11, 1.20, 1.30, 1.31, 1.32 A correct CPAN version number is a floating point number with at least -2 digits after the decimal. You can test whether it conforms to CPAN by +2 digits after the decimal. You can test whether it conforms to CPAN by using perl -MExtUtils::MakeMaker -le 'print MM->parse_version(shift)' 'Foo.pm' If you want to release a 'beta' or 'alpha' version of a module but don't want CPAN.pm to list it as most recent use an '_' after the -regular version number followed by at least 2 digits, eg. 1.20_01. If +regular version number followed by at least 2 digits, eg. 1.20_01. If you do this, the following idiom is recommended: - $VERSION = "1.12_01"; - $XS_VERSION = $VERSION; # only needed if you have XS code - $VERSION = eval $VERSION; + our $VERSION = "1.12_01"; # so CPAN distribution will have + # right filename + our $XS_VERSION = $VERSION; # only needed if you have XS code + $VERSION = eval $VERSION; # so "use Module 0.002" won't warn on + # underscore With that trick MakeMaker will only read the first line and thus read the underscore, while the perl interpreter will evaluate the $VERSION -and convert the string into a number. Later operations that treat +and convert the string into a number. Later operations that treat $VERSION as a number will then be able to do so without provoking a warning about $VERSION not being a number. @@ -644,6 +648,13 @@ Never release anything (even a one-word documentation patch) without incrementing the number. Even a one-word documentation patch should result in a change in version at the sub-minor level. +Once picked, it is important to stick to your version scheme, without +reducing the number of digits. This is because "downstream" packagers, +such as the FreeBSD ports system, interpret the version numbers in +various ways. If you change the number of digits in your version scheme, +you can confuse these systems so they get the versions of your module +out of order, which is obviously bad. + =head2 Pre-requisites Module authors should carefully consider whether to rely on other @@ -676,7 +687,7 @@ Specify version requirements for other Perl modules in the pre-requisites in your Makefile.PL or Build.PL. Be sure to specify Perl version requirements both in Makefile.PL or -Build.PL and with C or similar. See the section on +Build.PL and with C or similar. See the section on C of L for details. =head2 Testing @@ -687,7 +698,8 @@ and the tests should also be available to people installing the modules For Module::Build you would use the C equivalent C. The importance of these tests is proportional to the alleged stability of a -module. A module which purports to be stable or which hopes to achieve wide +module. A module which purports to be +stable or which hopes to achieve wide use should adhere to as strict a testing regime as possible. Useful modules to help you write tests (with minimum impact on your @@ -702,8 +714,9 @@ Currently you have the choice between ExtUtils::MakeMaker and the more platform independent Module::Build, allowing modules to be installed in a consistent manner. When using ExtUtils::MakeMaker, you can use "make dist" to create your -package. Tools exist to help you to build your module in a MakeMaker-friendly -style. These include ExtUtils::ModuleMaker and h2xs. See also L. +package. Tools exist to help you to build your module in a +MakeMaker-friendly style. These include ExtUtils::ModuleMaker and h2xs. +See also L. =head2 Licensing diff --git a/pod/perlnewmod.pod b/pod/perlnewmod.pod index 7555f97..26c4c13 100644 --- a/pod/perlnewmod.pod +++ b/pod/perlnewmod.pod @@ -23,6 +23,9 @@ trying to do, and you've had to write the code yourself, consider packaging up the solution into a module and uploading it to CPAN so that others can benefit. +You should also take a look at L for best practices in +making a module. + =head2 Warning We're going to primarily concentrate on Perl-only modules here, rather diff --git a/pod/perlop.pod b/pod/perlop.pod index 888ba53..56d463a 100644 --- a/pod/perlop.pod +++ b/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 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 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 X 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. X<-> X @@ -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 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) 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) 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 means the maximum of the unsigned integer type). -If the absolute value of the right operand (C) is greater than +If the absolute value of the right operand (C) 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 as the left operand C<$a> like C function C) -and the absolute value less than that of C<$b>. +C<$n> (B as the left operand C<$m> like C function C) +and the absolute value less than that of C<$n>. Note that when C 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 - $ 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, L, and L pragmas all +(Note that the L, L, and L 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 clause. See the section on "Switch Statements" in L. 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". 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. 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. +at least one of C<$x> and C<$y> is defined, use C. 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 loops and for doing slice operations on arrays. In +C 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 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, B, and various editors. Each ".." operator +operator of B, B, 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 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), 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, 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 X X<=> X<**=> X<+=> X<*=> X<&=> @@ -1111,11 +1114,11 @@ 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 module (standard as of v5.8, +is a syntax error. The C 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 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. @@ -1592,8 +1595,8 @@ is equivalent to For the pattern of regex operators (C, C and C), 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 as a regular expression. I is interpolated the same way as I in C. If "'" is used as the delimiter, no interpolation is done. Returns a Perl value which may be used instead of the -corresponding C expression. The returned value is a -normalized version of the original pattern. It magically differs from +corresponding C expression. The returned value is a +normalized version of the original pattern. It magically differs from a string containing the same characters: C 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 below. If "'" (single quote) is the delimiter, +described in C 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. @@ -1785,16 +1788,16 @@ The bottom line is that using C is almost never a good idea. =item The empty pattern // If the PATTERN evaluates to the empty string, the last -I matched regular expression is used instead. In this +I matched regular expression is used instead. In this case, only the C and 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 +C<$x///> (is that C<($x) / (//)> or C<$x // />?) and C (C or C?). 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 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 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 -function; see L. A failed match normally resets the +function; see L. A failed match normally resets the search position to the beginning of the string, but you can avoid that -by adding the C modifier (for example, C). Modifying the target +by adding the C modifier (for example, C). Modifying the target string also resets the search position. =item \G assertion You can intermix C matches with C, where C<\G> is a zero-width assertion that matches the exact position where the -previous C, if any, left off. Without the C modifier, the +previous C, if any, left off. Without the C modifier, the C<\G> assertion still anchors at C as it was at the start of the operation (see L), but the match is of course only -attempted once. Using C<\G> without C on a target string that has +attempted once. Using C<\G> without C on a target string that has not previously had a C 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 instead of C

, which a match -without the C<\G> anchor would have done. Also note that the final match -did not update C. C is only updated on a C match. If the +without the C<\G> anchor would have done. Also note that the final match +did not update C. C is only updated on a C match. If the final match did indeed match C

, 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 or C<< s/bar/ >>. A C 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 modifier will cause the replacement portion +compile-time. A second C modifier will cause the replacement portion to be Ced 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 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 programs, which delete anything they find in the SEARCHLIST, -period.) If the C modifier is specified, sequences of characters +period.) If the C 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, C, and the like are not +unrelated to Perl's quoting rules. C, C, 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<< is +that has a terminating string as the content. Therefore C<< is terminated by C 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 construct, while a C<]> terminates -C and C constructs. +both C and C 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, C, and C), the search is repeated once more. -If the first delimiter is not an opening punctuation, three delimiters must -be same such as C and C, 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 and C, +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 and C. 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, but rather C with no C 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 is interpreted as a part +this search. Thus the second C<\> in 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 -internally. <> is just a synonym for , which +internally. <> is just a synonym for , which is magical. (The pseudo code above doesn't work because it treats as non-magical.) @@ -3229,7 +3233,7 @@ X The standard C, C, and C modules, along with the C, C, and C 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/pod/perlpolicy.pod b/pod/perlpolicy.pod index 1dcb1a5..c6e0bbd 100644 --- a/pod/perlpolicy.pod +++ b/pod/perlpolicy.pod @@ -84,9 +84,9 @@ the Perl community should expect from Perl's developers: =item * -We "officially" support the two most recent stable release series. 5.12.x -and earlier are now out of support. As of the release of 5.18.0, we will -"officially" end support for Perl 5.14.x, other than providing security +We "officially" support the two most recent stable release series. 5.14.x +and earlier are now out of support. As of the release of 5.20.0, we will +"officially" end support for Perl 5.16.x, other than providing security updates as described below. =item * @@ -204,6 +204,14 @@ do our best to smooth the transition path for users of experimental features, you should contact the perl5-porters mailinglist if you find an experimental feature useful and want to help shape its future. +Experimental features must be experimental in two stable releases before being +marked non-experimental. Experimental features will only have their +experimental status revoked when they no longer have any design-changing bugs +open against them and when they have remained unchanged in behavior for the +entire length of a development cycle. In other words, a feature present in +v5.20.0 may be marked no longer experimental in v5.22.0 if and only if its +behavior is unchanged throughout all of v5.21. + =item deprecated If something in the Perl core is marked as B, we may remove it @@ -272,7 +280,8 @@ are not acceptable. =item * -Patches that fix crashing bugs that do not otherwise change Perl's +Patches that fix crashing bugs, assertion failures and +memory corruption that do not otherwise change Perl's functionality or negatively impact performance are acceptable. =item * @@ -512,10 +521,10 @@ protest, but repeated protest in the face of a repeatedly reaffirmed decision is not acceptable. Unacceptable behavior will result in a public and clearly identified warning. -Repeated unacceptable behavior will result in removal from the mailing list. -The first removal is for one month. Subsequent removals will double in length. -After six months with no warning, a user's ban length is reset. Removals, like -warnings, are public. +Repeated unacceptable behavior will result in removal from the mailing list and +revocation of rights to update rt.perl.org. The first removal is for one +month. Subsequent removals will double in length. After six months with no +warning, a user's ban length is reset. Removals, like warnings, are public. The list of moderators will be public knowledge. At present, it is: Aaron Crane, Andy Dougherty, Ricardo Signes, Steffen Müller. diff --git a/pod/perlport.pod b/pod/perlport.pod index 8b71a6e..a4cd831 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -542,12 +542,12 @@ them on. External tools are often named differently on different platforms, may not be available in the same location, might accept different arguments, can behave differently, and often present their results in a platform-dependent way. Thus, you should seldom depend -on them to produce consistent results. (Then again, if you're calling +on them to produce consistent results. (Then again, if you're calling I, you probably don't expect it to run on both Unix and CP/M.) One especially common bit of Perl code is opening a pipe to B: - open(MAIL, '|/usr/lib/sendmail -t') + open(MAIL, '|/usr/lib/sendmail -t') or die "cannot fork sendmail: $!"; This is fine for systems programming when sendmail is known to be @@ -760,7 +760,7 @@ problems in their code that crop up because of lack of testing on other platforms; two, to provide users with information about whether a given module works on a given platform. -Also see: +Also see: =over 4 @@ -805,7 +805,7 @@ are a few of the more popular Unix flavors: BSD/OS bsdos i386-bsdos Darwin darwin darwin DYNIX/ptx dynixptx i386-dynixptx - FreeBSD freebsd freebsd-i386 + FreeBSD freebsd freebsd-i386 Haiku haiku BePC-haiku Linux linux arm-linux Linux linux armv5tel-linux @@ -883,8 +883,8 @@ DOSish perls are as follows: OS $^O $Config{archname} ID Version -------------------------------------------------------- - MS-DOS dos ? - PC-DOS dos ? + MS-DOS dos ? + PC-DOS dos ? OS/2 os2 ? Windows 3.1 ? ? 0 3 01 Windows 95 MSWin32 MSWin32-x86 1 4 00 @@ -901,11 +901,11 @@ DOSish perls are as follows: Windows 7 MSWin32 MSWin32-x64 2 6 01 Windows 2008 MSWin32 MSWin32-x86 2 6 01 Windows 2008 MSWin32 MSWin32-x64 2 6 01 - Windows CE MSWin32 ? 3 + Windows CE MSWin32 ? 3 Cygwin cygwin cygwin The various MSWin32 Perl's can distinguish the OS they are running on -via the value of the fifth element of the list returned from +via the value of the fifth element of the list returned from Win32::GetOSVersion(). For example: if ($^O eq 'MSWin32') { @@ -937,7 +937,7 @@ L Also L. =item * Build instructions for Win32 in L, or under the Cygnus environment -in L. +in L. =item * @@ -949,7 +949,7 @@ The ActiveState Pages, L =item * -The Cygwin environment for Win32; F (installed +The Cygwin environment for Win32; F (installed as L), L =item * @@ -1099,9 +1099,9 @@ native formats. It is also now the only way that you should check to see if VMS is in a case sensitive mode. What C<\n> represents depends on the type of file opened. It usually -represents C<\012> but it could also be C<\015>, C<\012>, C<\015\012>, -C<\000>, C<\040>, or nothing depending on the file organization and -record format. The VMS::Stdio module provides access to the +represents C<\012> but it could also be C<\015>, C<\012>, C<\015\012>, +C<\000>, C<\040>, or nothing depending on the file organization and +record format. The VMS::Stdio module provides access to the special fopen() requirements of files with unusual attributes on VMS. TCP/IP stacks are optional on VMS, so socket routines might not be @@ -1245,7 +1245,7 @@ services for OS/390" (formerly known as OpenEdition), VM/ESA OpenEdition, or the BS200 POSIX-BC system (BS2000 is supported in perl 5.6 and greater). See L for details. Note that for OS/400 there is also a port of Perl 5.8.1/5.10.0 or later to the PASE which is ASCII-based (as opposed to -ILE which is EBCDIC-based), see L. +ILE which is EBCDIC-based), see L. As of R2.5 of USS for OS/390 and Version 2.3 of VM/ESA these Unix sub-systems do not support the C<#!> shebang trick for script invocation. @@ -1334,7 +1334,7 @@ as well as on CPAN in the F directory. =head2 Acorn RISC OS Because Acorns use ASCII with newlines (C<\n>) in text files as C<\012> like -Unix, and because Unix filename emulation is turned on by default, +Unix, and because Unix filename emulation is turned on by default, most simple scripts will probably work "out of the box". The native filesystem is modular, and individual filesystems are free to be case-sensitive or insensitive, and are usually case-preserving. Some @@ -1408,7 +1408,7 @@ assume that they can spawn a child process which can change the current directory without affecting its parent (and everyone else for that matter). -Because native operating system filehandles are global and are currently +Because native operating system filehandles are global and are currently allocated down from 255, with 0 being a reserved value, the Unix emulation library emulates Unix filehandles. Consequently, you can't rely on passing C, C, or C to your children. @@ -1538,9 +1538,9 @@ Due to issues with various CPUs, math libraries, compilers, and standards, results for C may vary depending on any combination of the above. Perl attempts to conform to the Open Group/IEEE standards for the results returned from C, but cannot force the issue if the system Perl is -run on does not allow it. (Tru64, HP-UX 10.20) +run on does not allow it. (Tru64, HP-UX 10.20) -The current version of the standards for C is available at +The current version of the standards for C is available at L. =item binmode @@ -1628,8 +1628,8 @@ enabled, a generic number will be encoded in a method compatible with the C library _POSIX_EXIT macro so that it can be decoded by other programs, particularly ones written in C, like the GNV package. (VMS) -C resets file pointers, which is a problem when called -from a child process (created by C) in C. +C resets file pointers, which is a problem when called +from a child process (created by C) in C. A workaround is to use C. (Solaris) exit unless $Config{archname} =~ /\bsolaris\b/; @@ -2022,7 +2022,7 @@ Does not automatically flush output handles on some platforms. The return value is POSIX-like (shifted up by 8 bits), which only allows room for a made-up value derived from the severity bits of the native -32-bit condition code (unless overridden by C). +32-bit condition code (unless overridden by C). If the native condition code is one that has a POSIX value encoded, the POSIX value will be decoded to extract the expected exit value. For more details see L. (VMS) @@ -2195,7 +2195,7 @@ ensure you have that library installed when building perl. =back -=head1 EOL Platforms +=head1 EOL Platforms =head2 (Perl 5.20) diff --git a/pod/perlrecharclass.pod b/pod/perlrecharclass.pod index ba49ba0..5e82332 100644 --- a/pod/perlrecharclass.pod +++ b/pod/perlrecharclass.pod @@ -772,9 +772,9 @@ Unicode considers symbols. =item [6] -C<\p{SpacePerl}> and C<\p{Space}> match identically starting with Perl +C<\p{XPerlSpace}> and C<\p{Space}> match identically starting with Perl v5.18. In earlier versions, these differ only in that in non-locale -matching, C<\p{SpacePerl}> does not match the vertical tab, C<\cK>. +matching, C<\p{XPerlSpace}> does not match the vertical tab, C<\cK>. Same for the two ASCII-only range forms. =back diff --git a/pod/perlref.pod b/pod/perlref.pod index 6c5a7e1..f57ed3d 100644 --- a/pod/perlref.pod +++ b/pod/perlref.pod @@ -69,7 +69,7 @@ References can be created in several ways. X<\> X 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 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 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 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 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 { "@_" }; - } + } 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/pod/perlsec.pod b/pod/perlsec.pod index b6474e6..75ce3fd 100644 --- a/pod/perlsec.pod +++ b/pod/perlsec.pod @@ -28,9 +28,9 @@ Perl automatically enables a set of special security checks, called I, 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 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) is in effect, the "." directory is removed from C<@INC>, and the environment variables C and C -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. The two environment variables are ignored because +L. 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 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 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 (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. This environment variable controls how +L. This environment variable controls how items are actually stored, not how they are presented via C, C and C. @@ -489,14 +490,15 @@ C, and C 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 from L or by using the PERL_PERTURB_KEYS environment variable, -see L. Note that this feature controls the +see L. 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. =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, and diff --git a/pod/perlsub.pod b/pod/perlsub.pod index aeced63..1ba5186 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -89,8 +89,8 @@ aggregates (arrays and hashes), these will be flattened together into one large indistinguishable list. If no C 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 or a C, the returned value is unspecified. The +value is returned. If the last statement is a loop control structure +like a C or a C, the returned value is unspecified. The empty sub returns the empty list. X X X @@ -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 X X X X X There are two ways to build persistent private variables in Perl 5.10. -First, you can simply use the C feature. Or, you can use closures, +First, you can simply use the C 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 X X It's also worth taking a moment to explain what happens when you Cize a member of a composite type (i.e. an array or hash element). -In this case, the element is Cized I. This means that +In this case, the element is Cized I. This means that when the scope of the C ends, the saved value will be restored to the hash element whose key was named in the C, or the array element whose index was named in the C. If that @@ -967,7 +967,7 @@ X X X X and C 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 is scoped to the C block. Slices are +except that for those the C is +scoped to the C 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 or C declaration. baz(); # recursive call } +It is a known bug that lexical subroutines cannot be used as the C +argument to C. This will be fixed in a future version of Perl. + =head3 C vs C 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, C or C), 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, the C<< <*> >> glob operator is overridden as well. In a similar fashion, overriding the C function also overrides -the equivalent I/O operator C<< >>. Also, overriding +the equivalent I/O operator C<< >>. Also, overriding C also overrides the operators C<``> and C. Finally, some built-ins (e.g. C or C) can't be overridden. diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 8bbca75..46c9527 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -68,7 +68,7 @@ subroutine without defining it by saying C, thus: X 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 = ; - ... + $line = ; + ... } until !defined($line) || $line eq ".\n" See L. Note also that the loop control statements described @@ -186,18 +186,18 @@ For C, just double the braces: X X X do {{ - next if $x == $y; - # do something here + next if $x == $y; + # do something here }} until $x++ > $z; For C, you have to be more elaborate: X - 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 The behaviour of a C, C, or @@ -267,7 +267,7 @@ The following compound statements may be used to control flow: PHASE BLOCK -The experimental C statement is I; see +The experimental C statement is I; see L 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 statement is straightforward. Because BLOCKs are always bounded by curly brackets, there is never any ambiguity about which @@ -327,16 +327,16 @@ X X X X X X The C command starts the next iteration of the loop: LINE: while () { - next LINE if /^#/; # discard comments - ... + next LINE if /^#/; # discard comments + ... } The C command immediately exits the loop in question. The C block, if any, is not executed: LINE: while () { - last LINE if /^$/; # exit when done with header - ... + last LINE if /^$/; # exit when done with header + ... } The C 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 = )) { - chomp($line); - if ($line =~ s/\\$//) { - $line .= ; - redo LINE unless eof(); # not eof(ARGV)! - } - # now process $line + chomp($line); + if ($line =~ s/\\$//) { + $line .= ; + redo LINE unless eof(); # not eof(ARGV)! + } + # now process $line } Note that if there were a C block on the above code, it would @@ -375,13 +375,13 @@ or C 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 is replaced by the word C, the sense of the @@ -392,10 +392,10 @@ Loop control statements don't work in an C or C, 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 loop works like the corresponding C 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 @@ -433,13 +433,13 @@ As a special case, if the test in the C loop (or the corresponding C loop) is empty, it is treated as true. That is, both for (;;) { - ... + ... } and while () { - ... + ... } are treated as infinite loops. @@ -454,7 +454,7 @@ X X X $on_a_tty = -t STDIN && -t STDOUT; sub prompt { print "yes? " if $on_a_tty } for ( prompt(); ; prompt() ) { - # do something + # do something } Using C (or the operator form, C<< >>) 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 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 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 and C are in scalar context, @@ -746,7 +746,7 @@ throws an exception with the text C: 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 X @@ -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: 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 assigned the value of I to merely a lexically scoped I> (!) of C<$_>, not a dynamically scoped alias the way C 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 or an explicit C. Because it was only a copy, and because @@ -1103,9 +1100,9 @@ You can use the C 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 and C, failed C 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 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 were an element of the hash diff --git a/pod/perlthrtut.pod b/pod/perlthrtut.pod index e885bb2..f5e35a3 100644 --- a/pod/perlthrtut.pod +++ b/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. Both C and C access the global variable C<$a>, once +What do you think C<$x> will be? The answer, unfortunately, is I. Both C and C 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/pod/perlunicook.pod b/pod/perlunicook.pod new file mode 100644 index 0000000..44a4571 --- /dev/null +++ b/pod/perlunicook.pod @@ -0,0 +1,857 @@ + +=encoding utf8 + +=head1 NAME + +perlunicook - cookbookish examples of handling Unicode in Perl + +=head1 DESCRIPTION + +This manpage contains short recipes demonstrating how to handle common Unicode +operations in Perl, plus one complete program at the end. Any undeclared +variables in individual recipes are assumed to have a previous appropriate +value in them. + +=head1 EXAMPLES + +=head2 ℞ 0: Standard preamble + +Unless otherwise notes, all examples below require this standard preamble +to work correctly, with the C<#!> adjusted to work on your system: + + #!/usr/bin/env perl + + use utf8; # so literals and identifiers can be in UTF-8 + use v5.12; # or later to get "unicode_strings" feature + use strict; # quote strings, declare variables + use warnings; # on by default + use warnings qw(FATAL utf8); # fatalize encoding glitches + use open qw(:std :utf8); # undeclared streams in UTF-8 + use charnames qw(:full :short); # unneeded in v5.16 + +This I make even Unix programmers C your binary streams, +or open them with C<:raw>, but that's the only way to get at them +portably anyway. + +B: C and C do not get along with each other. + +=head2 ℞ 1: Generic Unicode-savvy filter + +Always decompose on the way in, then recompose on the way out. + + use Unicode::Normalize; + + while (<>) { + $_ = NFD($_); # decompose + reorder canonically + ... + } continue { + print NFC($_); # recompose (where possible) + reorder canonically + } + +=head2 ℞ 2: Fine-tuning Unicode warnings + +As of v5.14, Perl distinguishes three subclasses of UTF‑8 warnings. + + use v5.14; # subwarnings unavailable any earlier + no warnings "nonchar"; # the 66 forbidden non-characters + no warnings "surrogate"; # UTF-16/CESU-8 nonsense + no warnings "non_unicode"; # for codepoints over 0x10_FFFF + +=head2 ℞ 3: Declare source in utf8 for identifiers and literals + +Without the all-critical C declaration, putting UTF‑8 in your +literals and identifiers won’t work right. If you used the standard +preamble just given above, this already happened. If you did, you can +do things like this: + + use utf8; + + my $measure = "Ångström"; + my @μsoft = qw( cp852 cp1251 cp1252 ); + my @ὑπέρμεγας = qw( ὑπέρ μεγας ); + my @鯉 = qw( koi8-f koi8-u koi8-r ); + my $motto = "👪 💗 🐪"; # FAMILY, GROWING HEART, DROMEDARY CAMEL + +If you forget C, high bytes will be misunderstood as +separate characters, and nothing will work right. + +=head2 ℞ 4: Characters and their numbers + +The C and C functions work transparently on all codepoints, +not just on ASCII alone — nor in fact, not even just on Unicode alone. + + # ASCII characters + ord("A") + chr(65) + + # characters from the Basic Multilingual Plane + ord("Σ") + chr(0x3A3) + + # beyond the BMP + ord("𝑛") # MATHEMATICAL ITALIC SMALL N + chr(0x1D45B) + + # beyond Unicode! (up to MAXINT) + ord("\x{20_0000}") + chr(0x20_0000) + +=head2 ℞ 5: Unicode literals by character number + +In an interpolated literal, whether a double-quoted string or a +regex, you may specify a character by its number using the +C<\x{I}> escape. + + String: "\x{3a3}" + Regex: /\x{3a3}/ + + String: "\x{1d45b}" + Regex: /\x{1d45b}/ + + # even non-BMP ranges in regex work fine + /[\x{1D434}-\x{1D467}]/ + +=head2 ℞ 6: Get character name by number + + use charnames (); + my $name = charnames::viacode(0x03A3); + +=head2 ℞ 7: Get character number by name + + use charnames (); + my $number = charnames::vianame("GREEK CAPITAL LETTER SIGMA"); + +=head2 ℞ 8: Unicode named characters + +Use the C<< \N{I} >> notation to get the character +by that name for use in interpolated literals (double-quoted +strings and regexes). In v5.16, there is an implicit + + use charnames qw(:full :short); + +But prior to v5.16, you must be explicit about which set of charnames you +want. The C<:full> names are the official Unicode character name, alias, or +sequence, which all share a namespace. + + use charnames qw(:full :short latin greek); + + "\N{MATHEMATICAL ITALIC SMALL N}" # :full + "\N{GREEK CAPITAL LETTER SIGMA}" # :full + +Anything else is a Perl-specific convenience abbreviation. Specify one or +more scripts by names if you want short names that are script-specific. + + "\N{Greek:Sigma}" # :short + "\N{ae}" # latin + "\N{epsilon}" # greek + +The v5.16 release also supports a C<:loose> import for loose matching of +character names, which works just like loose matching of property names: +that is, it disregards case, whitespace, and underscores: + + "\N{euro sign}" # :loose (from v5.16) + +=head2 ℞ 9: Unicode named sequences + +These look just like character names but return multiple codepoints. +Notice the C<%vx> vector-print functionality in C. + + use charnames qw(:full); + my $seq = "\N{LATIN CAPITAL LETTER A WITH MACRON AND GRAVE}"; + printf "U+%v04X\n", $seq; + U+0100.0300 + +=head2 ℞ 10: Custom named characters + +Use C<:alias> to give your own lexically scoped nicknames to existing +characters, or even to give unnamed private-use characters useful names. + + use charnames ":full", ":alias" => { + ecute => "LATIN SMALL LETTER E WITH ACUTE", + "APPLE LOGO" => 0xF8FF, # private use character + }; + + "\N{ecute}" + "\N{APPLE LOGO}" + +=head2 ℞ 11: Names of CJK codepoints + +Sinograms like “東京” come back with character names of +C and C, +because their “names” vary. The CPAN C module +has a large database for decoding these (and a whole lot more), provided you +know how to understand its output. + + # cpan -i Unicode::Unihan + use Unicode::Unihan; + my $str = "東京"; + my $unhan = new Unicode::Unihan; + for my $lang (qw(Mandarin Cantonese Korean JapaneseOn JapaneseKun)) { + printf "CJK $str in %-12s is ", $lang; + say $unhan->$lang($str); + } + +prints: + + CJK 東京 in Mandarin is DONG1JING1 + CJK 東京 in Cantonese is dung1ging1 + CJK 東京 in Korean is TONGKYENG + CJK 東京 in JapaneseOn is TOUKYOU KEI KIN + CJK 東京 in JapaneseKun is HIGASHI AZUMAMIYAKO + +If you have a specific romanization scheme in mind, +use the specific module: + + # cpan -i Lingua::JA::Romanize::Japanese + use Lingua::JA::Romanize::Japanese; + my $k2r = new Lingua::JA::Romanize::Japanese; + my $str = "東京"; + say "Japanese for $str is ", $k2r->chars($str); + +prints + + Japanese for 東京 is toukyou + +=head2 ℞ 12: Explicit encode/decode + +On rare occasion, such as a database read, you may be +given encoded text you need to decode. + + use Encode qw(encode decode); + + my $chars = decode("shiftjis", $bytes, 1); + # OR + my $bytes = encode("MIME-Header-ISO_2022_JP", $chars, 1); + +For streams all in the same encoding, don't use encode/decode; instead +set the file encoding when you open the file or immediately after with +C as described later below. + +=head2 ℞ 13: Decode program arguments as utf8 + + $ perl -CA ... + or + $ export PERL_UNICODE=A + or + use Encode qw(decode_utf8); + @ARGV = map { decode_utf8($_, 1) } @ARGV; + +=head2 ℞ 14: Decode program arguments as locale encoding + + # cpan -i Encode::Locale + use Encode qw(locale); + use Encode::Locale; + + # use "locale" as an arg to encode/decode + @ARGV = map { decode(locale => $_, 1) } @ARGV; + +=head2 ℞ 15: Declare STD{IN,OUT,ERR} to be utf8 + +Use a command-line option, an environment variable, or else +call C explicitly: + + $ perl -CS ... + or + $ export PERL_UNICODE=S + or + use open qw(:std :utf8); + or + binmode(STDIN, ":utf8"); + binmode(STDOUT, ":utf8"); + binmode(STDERR, ":utf8"); + +=head2 ℞ 16: Declare STD{IN,OUT,ERR} to be in locale encoding + + # cpan -i Encode::Locale + use Encode; + use Encode::Locale; + + # or as a stream for binmode or open + binmode STDIN, ":encoding(console_in)" if -t STDIN; + binmode STDOUT, ":encoding(console_out)" if -t STDOUT; + binmode STDERR, ":encoding(console_out)" if -t STDERR; + +=head2 ℞ 17: Make file I/O default to utf8 + +Files opened without an encoding argument will be in UTF-8: + + $ perl -CD ... + or + $ export PERL_UNICODE=D + or + use open qw(:utf8); + +=head2 ℞ 18: Make all I/O and args default to utf8 + + $ perl -CSDA ... + or + $ export PERL_UNICODE=SDA + or + use open qw(:std :utf8); + use Encode qw(decode_utf8); + @ARGV = map { decode_utf8($_, 1) } @ARGV; + +=head2 ℞ 19: Open file with specific encoding + +Specify stream encoding. This is the normal way +to deal with encoded text, not by calling low-level +functions. + + # input file + open(my $in_file, "< :encoding(UTF-16)", "wintext"); + OR + open(my $in_file, "<", "wintext"); + binmode($in_file, ":encoding(UTF-16)"); + THEN + my $line = <$in_file>; + + # output file + open($out_file, "> :encoding(cp1252)", "wintext"); + OR + open(my $out_file, ">", "wintext"); + binmode($out_file, ":encoding(cp1252)"); + THEN + print $out_file "some text\n"; + +More layers than just the encoding can be specified here. For example, +the incantation C<":raw :encoding(UTF-16LE) :crlf"> includes implicit +CRLF handling. + +=head2 ℞ 20: Unicode casing + +Unicode casing is very different from ASCII casing. + + uc("henry ⅷ") # "HENRY Ⅷ" + uc("tschüß") # "TSCHÜSS" notice ß => SS + + # both are true: + "tschüß" =~ /TSCHÜSS/i # notice ß => SS + "Σίσυφος" =~ /ΣΊΣΥΦΟΣ/i # notice Σ,σ,ς sameness + +=head2 ℞ 21: Unicode case-insensitive comparisons + +Also available in the CPAN L module, +the new C “foldcase” function from v5.16 grants +access to the same Unicode casefolding as the C +pattern modifier has always used: + + use feature "fc"; # fc() function is from v5.16 + + # sort case-insensitively + my @sorted = sort { fc($a) cmp fc($b) } @list; + + # both are true: + fc("tschüß") eq fc("TSCHÜSS") + fc("Σίσυφος") eq fc("ΣΊΣΥΦΟΣ") + +=head2 ℞ 22: Match Unicode linebreak sequence in regex + +A Unicode linebreak matches the two-character CRLF +grapheme or any of seven vertical whitespace characters. +Good for dealing with textfiles coming from different +operating systems. + + \R + + s/\R/\n/g; # normalize all linebreaks to \n + +=head2 ℞ 23: Get character category + +Find the general category of a numeric codepoint. + + use Unicode::UCD qw(charinfo); + my $cat = charinfo(0x3A3)->{category}; # "Lu" + +=head2 ℞ 24: Disabling Unicode-awareness in builtin charclasses + +Disable C<\w>, C<\b>, C<\s>, C<\d>, and the POSIX +classes from working correctly on Unicode either in this +scope, or in just one regex. + + use v5.14; + use re "/a"; + + # OR + + my($num) = $str =~ /(\d+)/a; + +Or use specific un-Unicode properties, like C<\p{ahex}> +and C<\p{POSIX_Digit>}. Properties still work normally +no matter what charset modifiers (C) +should be effect. + +=head2 ℞ 25: Match Unicode properties in regex with \p, \P + +These all match a single codepoint with the given +property. Use C<\P> in place of C<\p> to match +one codepoint lacking that property. + + \pL, \pN, \pS, \pP, \pM, \pZ, \pC + \p{Sk}, \p{Ps}, \p{Lt} + \p{alpha}, \p{upper}, \p{lower} + \p{Latin}, \p{Greek} + \p{script=Latin}, \p{script=Greek} + \p{East_Asian_Width=Wide}, \p{EA=W} + \p{Line_Break=Hyphen}, \p{LB=HY} + \p{Numeric_Value=4}, \p{NV=4} + +=head2 ℞ 26: Custom character properties + +Define at compile-time your own custom character +properties for use in regexes. + + # using private-use characters + sub In_Tengwar { "E000\tE07F\n" } + + if (/\p{In_Tengwar}/) { ... } + + # blending existing properties + sub Is_GraecoRoman_Title {<<'END_OF_SET'} + +utf8::IsLatin + +utf8::IsGreek + &utf8::IsTitle + END_OF_SET + + if (/\p{Is_GraecoRoman_Title}/ { ... } + +=head2 ℞ 27: Unicode normalization + +Typically render into NFD on input and NFC on output. Using NFKC or NFKD +functions improves recall on searches, assuming you've already done to the +same text to be searched. Note that this is about much more than just pre- +combined compatibility glyphs; it also reorders marks according to their +canonical combining classes and weeds out singletons. + + use Unicode::Normalize; + my $nfd = NFD($orig); + my $nfc = NFC($orig); + my $nfkd = NFKD($orig); + my $nfkc = NFKC($orig); + +=head2 ℞ 28: Convert non-ASCII Unicode numerics + +Unless you’ve used C or C, C<\d> matches more than +ASCII digits only, but Perl’s implicit string-to-number +conversion does not current recognize these. Here’s how to +convert such strings manually. + + use v5.14; # needed for num() function + use Unicode::UCD qw(num); + my $str = "got Ⅻ and ४५६७ and ⅞ and here"; + my @nums = (); + while (/$str =~ (\d+|\N)/g) { # not just ASCII! + push @nums, num($1); + } + say "@nums"; # 12 4567 0.875 + + use charnames qw(:full); + my $nv = num("\N{RUMI DIGIT ONE}\N{RUMI DIGIT TWO}"); + +=head2 ℞ 29: Match Unicode grapheme cluster in regex + +Programmer-visible “characters” are codepoints matched by C, +but user-visible “characters” are graphemes matched by C. + + # Find vowel *plus* any combining diacritics,underlining,etc. + my $nfd = NFD($orig); + $nfd =~ / (?=[aeiou]) \X /xi + +=head2 ℞ 30: Extract by grapheme instead of by codepoint (regex) + + # match and grab five first graphemes + my($first_five) = $str =~ /^ ( \X{5} ) /x; + +=head2 ℞ 31: Extract by grapheme instead of by codepoint (substr) + + # cpan -i Unicode::GCString + use Unicode::GCString; + my $gcs = Unicode::GCString->new($str); + my $first_five = $gcs->substr(0, 5); + +=head2 ℞ 32: Reverse string by grapheme + +Reversing by codepoint messes up diacritics, mistakenly converting +C into C<éel̂urb em̀erc> instead of into C; +so reverse by grapheme instead. Both these approaches work +right no matter what normalization the string is in: + + $str = join("", reverse $str =~ /\X/g); + + # OR: cpan -i Unicode::GCString + use Unicode::GCString; + $str = reverse Unicode::GCString->new($str); + +=head2 ℞ 33: String length in graphemes + +The string C has six graphemes but up to eight codepoints. +This counts by grapheme, not by codepoint: + + my $str = "brûlée"; + my $count = 0; + while ($str =~ /\X/g) { $count++ } + + # OR: cpan -i Unicode::GCString + use Unicode::GCString; + my $gcs = Unicode::GCString->new($str); + my $count = $gcs->length; + +=head2 ℞ 34: Unicode column-width for printing + +Perl’s C, C, and C think all +codepoints take up 1 print column, but many take 0 or 2. +Here to show that normalization makes no difference, +we print out both forms: + + use Unicode::GCString; + use Unicode::Normalize; + + my @words = qw/crème brûlée/; + @words = map { NFC($_), NFD($_) } @words; + + for my $str (@words) { + my $gcs = Unicode::GCString->new($str); + my $cols = $gcs->columns; + my $pad = " " x (10 - $cols); + say str, $pad, " |"; + } + +generates this to show that it pads correctly no matter +the normalization: + + crème | + crème | + brûlée | + brûlée | + +=head2 ℞ 35: Unicode collation + +Text sorted by numeric codepoint follows no reasonable alphabetic order; +use the UCA for sorting text. + + use Unicode::Collate; + my $col = Unicode::Collate->new(); + my @list = $col->sort(@old_list); + +See the I program from the L CPAN module +for a convenient command-line interface to this module. + +=head2 ℞ 36: Case- I accent-insensitive Unicode sort + +Specify a collation strength of level 1 to ignore case and +diacritics, only looking at the basic character. + + use Unicode::Collate; + my $col = Unicode::Collate->new(level => 1); + my @list = $col->sort(@old_list); + +=head2 ℞ 37: Unicode locale collation + +Some locales have special sorting rules. + + # either use v5.12, OR: cpan -i Unicode::Collate::Locale + use Unicode::Collate::Locale; + my $col = Unicode::Collate::Locale->new(locale => "de__phonebook"); + my @list = $col->sort(@old_list); + +The I program mentioned above accepts a C<--locale> parameter. + +=head2 ℞ 38: Making C work on text instead of codepoints + +Instead of this: + + @srecs = sort { + $b->{AGE} <=> $a->{AGE} + || + $a->{NAME} cmp $b->{NAME} + } @recs; + +Use this: + + my $coll = Unicode::Collate->new(); + for my $rec (@recs) { + $rec->{NAME_key} = $coll->getSortKey( $rec->{NAME} ); + } + @srecs = sort { + $b->{AGE} <=> $a->{AGE} + || + $a->{NAME_key} cmp $b->{NAME_key} + } @recs; + +=head2 ℞ 39: Case- I accent-insensitive comparisons + +Use a collator object to compare Unicode text by character +instead of by codepoint. + + use Unicode::Collate; + my $es = Unicode::Collate->new( + level => 1, + normalization => undef + ); + + # now both are true: + $es->eq("García", "GARCIA" ); + $es->eq("Márquez", "MARQUEZ"); + +=head2 ℞ 40: Case- I accent-insensitive locale comparisons + +Same, but in a specific locale. + + my $de = Unicode::Collate::Locale->new( + locale => "de__phonebook", + ); + + # now this is true: + $de->eq("tschüß", "TSCHUESS"); # notice ü => UE, ß => SS + +=head2 ℞ 41: Unicode linebreaking + +Break up text into lines according to Unicode rules. + + # cpan -i Unicode::LineBreak + use Unicode::LineBreak; + use charnames qw(:full); + + my $para = "This is a super\N{HYPHEN}long string. " x 20; + my $fmt = new Unicode::LineBreak; + print $fmt->break($para), "\n"; + +=head2 ℞ 42: Unicode text in DBM hashes, the tedious way + +Using a regular Perl string as a key or value for a DBM +hash will trigger a wide character exception if any codepoints +won’t fit into a byte. Here’s how to manually manage the translation: + + use DB_File; + use Encode qw(encode decode); + tie %dbhash, "DB_File", "pathname"; + + # STORE + + # assume $uni_key and $uni_value are abstract Unicode strings + my $enc_key = encode("UTF-8", $uni_key, 1); + my $enc_value = encode("UTF-8", $uni_value, 1); + $dbhash{$enc_key} = $enc_value; + + # FETCH + + # assume $uni_key holds a normal Perl string (abstract Unicode) + my $enc_key = encode("UTF-8", $uni_key, 1); + my $enc_value = $dbhash{$enc_key}; + my $uni_value = decode("UTF-8", $enc_key, 1); + +=head2 ℞ 43: Unicode text in DBM hashes, the easy way + +Here’s how to implicitly manage the translation; all encoding +and decoding is done automatically, just as with streams that +have a particular encoding attached to them: + + use DB_File; + use DBM_Filter; + + my $dbobj = tie %dbhash, "DB_File", "pathname"; + $dbobj->Filter_Value("utf8"); # this is the magic bit + + # STORE + + # assume $uni_key and $uni_value are abstract Unicode strings + $dbhash{$uni_key} = $uni_value; + + # FETCH + + # $uni_key holds a normal Perl string (abstract Unicode) + my $uni_value = $dbhash{$uni_key}; + +=head2 ℞ 44: PROGRAM: Demo of Unicode collation and printing + +Here’s a full program showing how to make use of locale-sensitive +sorting, Unicode casing, and managing print widths when some of the +characters take up zero or two columns, not just one column each time. +When run, the following program produces this nicely aligned output: + + Crème Brûlée....... €2.00 + Éclair............. €1.60 + Fideuà............. €4.20 + Hamburger.......... €6.00 + Jamón Serrano...... €4.45 + Linguiça........... €7.00 + Pâté............... €4.15 + Pears.............. €2.00 + Pêches............. €2.25 + Smørbrød........... €5.75 + Spätzle............ €5.50 + Xoriço............. €3.00 + Γύρος.............. €6.50 + 막걸리............. €4.00 + おもち............. €2.65 + お好み焼き......... €8.00 + シュークリーム..... €1.85 + 寿司............... €9.99 + 包子............... €7.50 + +Here's that program; tested on v5.14. + + #!/usr/bin/env perl + # umenu - demo sorting and printing of Unicode food + # + # (obligatory and increasingly long preamble) + # + use utf8; + use v5.14; # for locale sorting + use strict; + use warnings; + use warnings qw(FATAL utf8); # fatalize encoding faults + use open qw(:std :utf8); # undeclared streams in UTF-8 + use charnames qw(:full :short); # unneeded in v5.16 + + # std modules + use Unicode::Normalize; # std perl distro as of v5.8 + use List::Util qw(max); # std perl distro as of v5.10 + use Unicode::Collate::Locale; # std perl distro as of v5.14 + + # cpan modules + use Unicode::GCString; # from CPAN + + # forward defs + sub pad($$$); + sub colwidth(_); + sub entitle(_); + + my %price = ( + "γύρος" => 6.50, # gyros + "pears" => 2.00, # like um, pears + "linguiça" => 7.00, # spicy sausage, Portuguese + "xoriço" => 3.00, # chorizo sausage, Catalan + "hamburger" => 6.00, # burgermeister meisterburger + "éclair" => 1.60, # dessert, French + "smørbrød" => 5.75, # sandwiches, Norwegian + "spätzle" => 5.50, # Bayerisch noodles, little sparrows + "包子" => 7.50, # bao1 zi5, steamed pork buns, Mandarin + "jamón serrano" => 4.45, # country ham, Spanish + "pêches" => 2.25, # peaches, French + "シュークリーム" => 1.85, # cream-filled pastry like eclair + "막걸리" => 4.00, # makgeolli, Korean rice wine + "寿司" => 9.99, # sushi, Japanese + "おもち" => 2.65, # omochi, rice cakes, Japanese + "crème brûlée" => 2.00, # crema catalana + "fideuà" => 4.20, # more noodles, Valencian + # (Catalan=fideuada) + "pâté" => 4.15, # gooseliver paste, French + "お好み焼き" => 8.00, # okonomiyaki, Japanese + ); + + my $width = 5 + max map { colwidth } keys %price; + + # So the Asian stuff comes out in an order that someone + # who reads those scripts won't freak out over; the + # CJK stuff will be in JIS X 0208 order that way. + my $coll = new Unicode::Collate::Locale locale => "ja"; + + for my $item ($coll->sort(keys %price)) { + print pad(entitle($item), $width, "."); + printf " €%.2f\n", $price{$item}; + } + + sub pad($$$) { + my($str, $width, $padchar) = @_; + return $str . ($padchar x ($width - colwidth($str))); + } + + sub colwidth(_) { + my($str) = @_; + return Unicode::GCString->new($str)->columns; + } + + sub entitle(_) { + my($str) = @_; + $str =~ s{ (?=\pL)(\S) (\S*) } + { ucfirst($1) . lc($2) }xge; + return $str; + } + +=head1 SEE ALSO + +See these manpages, some of which are CPAN modules: +L, L, +L, L, +L, L, L, +L, L, L, L, +L, L, +L, +L, +L, L, +L, L, +L, +L, +L, +L, +L, +L. + +The L CPAN module includes many programs +to help with working with Unicode, including +these programs to fully or partly replace standard utilities: +I instead of I, +I instead of I or I, +I instead of I, +I instead of I, +I instead of I, +and +I instead of I. +For exploring Unicode character names and character properties, +see its I, I, and I programs. +It also supplies these programs, all of which are general filters that do Unicode-y things: +I and I; +I and I; +I and I; +I, I, I, and I; +and I, I, and I. + +Finally, see the published Unicode Standard (page numbers are from version +6.0.0), including these specific annexes and technical reports: + +=over + +=item §3.13 Default Case Algorithms, page 113; +§4.2 Case, pages 120–122; +Case Mappings, page 166–172, especially Caseless Matching starting on page 170. + +=item UAX #44: Unicode Character Database + +=item UTS #18: Unicode Regular Expressions + +=item UAX #15: Unicode Normalization Forms + +=item UTS #10: Unicode Collation Algorithm + +=item UAX #29: Unicode Text Segmentation + +=item UAX #14: Unicode Line Breaking Algorithm + +=item UAX #11: East Asian Width + +=back + +=head1 AUTHOR + +Tom Christiansen Etchrist@perl.comE wrote this, with occasional +kibbitzing from Larry Wall and Jeffrey Friedl in the background. + +=head1 COPYRIGHT AND LICENCE + +Copyright © 2012 Tom Christiansen. + +This program is free software; you may redistribute it and/or modify it +under the same terms as Perl itself. + +Most of these examples taken from the current edition of the “Camel Book”; +that is, from the 4ᵗʰ Edition of I, Copyright © 2012 Tom +Christiansen , 2012-02-13 by O’Reilly Media. The code itself is +freely redistributable, and you are encouraged to transplant, fold, +spindle, and mutilate any of the examples in this manpage however you please +for inclusion into your own programs without any encumbrance whatsoever. +Acknowledgement via code comment is polite but not required. + +=head1 REVISION HISTORY + +v1.0.0 – first public release, 2012-02-27 + diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod index 4348663..244cd38 100644 --- a/pod/perluniintro.pod +++ b/pod/perluniintro.pod @@ -473,13 +473,13 @@ its argument so that Unicode characters with code points greater than displayed as C<\x..>, and the rest of the characters as themselves: sub nice_string { - join("", - map { $_ > 255 ? # if wide character... - sprintf("\\x{%04X}", $_) : # \x{...} - chr($_) =~ /[[:cntrl:]]/ ? # else if control character... - sprintf("\\x%02X", $_) : # \x.. - quotemeta(chr($_)) # else quoted or as themselves - } unpack("W*", $_[0])); # unpack Unicode characters + join("", + map { $_ > 255 # if wide character... + ? sprintf("\\x{%04X}", $_) # \x{...} + : chr($_) =~ /[[:cntrl:]]/ # else if control character... + ? sprintf("\\x%02X", $_) # \x.. + : quotemeta(chr($_)) # else quoted or as themselves + } unpack("W*", $_[0])); # unpack Unicode characters } For example, diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 4b6bb74..e980e95 100644 --- a/pod/perlvar.pod +++ b/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; see L. 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 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. If your keys contain binary data there might not be any safe value for C<$;>. diff --git a/pp_ctl.c b/pp_ctl.c index 39b7941..11314ec 100644 --- a/pp_ctl.c +++ b/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/pp_sys.c b/pp_sys.c index 43d6473..9de4dff 100644 --- a/pp_sys.c +++ b/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/regcomp.c b/regcomp.c index e991999..573072a 100644 --- a/regcomp.c +++ b/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/regen/feature.pl b/regen/feature.pl index fccfc2d..cb2fc40 100755 --- a/regen/feature.pl +++ b/regen/feature.pl @@ -361,7 +361,7 @@ read_only_bottom_close_and_rename($h); __END__ package feature; -our $VERSION = '1.36'; +our $VERSION = '1.36_01'; FEATURES @@ -561,6 +561,27 @@ and C syntax. See L for details. This feature is available from Perl 5.18 onwards. +=head2 The 'postderef' and 'postderef_qq' features + +B: This feature is still experimental and the implementation may +change in future versions of Perl. For this reason, Perl will +warn when you use the feature, unless you have explicitly disabled the +warning: + + no warnings "experimental::postderef"; + +The 'postderef' feature allows the use of L. For example, it will make the +following two statements equivalent: + + my @x = @{ $h->{a} }; + my @x = $h->{a}->@*; + +The 'postderef_qq' feature extends this, for array and scalar dereference, to +working inside of double-quotish interpolations. + +This feature is available from Perl 5.20 onwards. + =head2 The 'signatures' feature B: This feature is still experimental and the implementation may diff --git a/regexec.c b/regexec.c index 362390b..5edac3f 100644 --- a/regexec.c +++ b/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/sv.c b/sv.c index e1962ce..af393bd 100644 --- a/sv.c +++ b/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 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 should point to memory that was allocated -by L. It must be +by L. It must be the start of a Newx-ed block of memory, and not a pointer to the middle of it (beware of L and copy-on-write), -and not be from a non-Newx memory allocator like C. The +and not be from a non-Newx memory allocator like C. The string length, C, must be supplied. By default this function will C (i.e. realloc, move) the memory pointed to by C, 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/sv.h b/sv.h index 68e5db1..b129225 100644 --- a/sv.h +++ b/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. Handles 'get' magic. The C variable will be set to the length of the string (this is a macro, so -don't use C<&len>). See also C for a version which guarantees to +don't use C<&len>). See also C for a version which guarantees to evaluate sv only once. Note that there is no guarantee that the return value of C is diff --git a/t/comp/parser.t b/t/comp/parser.t index 7caa116..584a473 100644 --- a/t/comp/parser.t +++ b/t/comp/parser.t @@ -499,6 +499,9 @@ eval 'for my a1b $i (1) {}'; # ng: 'Missing $ on loop variable' like $@, "^No such class a1b at ", 'TYPE of my of for statement'; +# Used to crash [perl #123542] +eval 's /${<>{}) //'; + # Add new tests HERE (above this line) # bug #74022: Loop on characters in \p{OtherIDContinue} diff --git a/t/io/eintr.t b/t/io/eintr.t index 9ea9cc7..32f109d 100644 --- a/t/io/eintr.t +++ b/t/io/eintr.t @@ -95,11 +95,16 @@ alarm(0); ok(!$st, 'read/die: read status'); ok(close($in), 'read/die: close status'); +# This used to be 1_000_000, but on Linux/ppc64 (POWER7) this kept +# consistently failing. At exactly 0x100000 it started passing +# again. We're hoping this number is bigger than any pipe buffer. +my $surely_this_arbitrary_number_is_fine = 0x100000; + # close during print fresh_io; $SIG{ALRM} = sub { $sigst = close($out) ? "ok" : "nok" }; -$buf = "a" x 1_000_000 . "\n"; # bigger than any pipe buffer hopefully +$buf = "a" x $surely_this_arbitrary_number_is_fine . "\n"; select $out; $| = 1; select STDOUT; alarm(1); $st = print $out $buf; @@ -112,7 +117,7 @@ ok(!close($out), 'print/close: close status'); fresh_io; $SIG{ALRM} = sub { die }; -$buf = "a" x 1_000_000 . "\n"; # bigger than any pipe buffer hopefully +$buf = "a" x $surely_this_arbitrary_number_is_fine . "\n"; select $out; $| = 1; select STDOUT; alarm(1); $st = eval { print $out $buf }; diff --git a/t/lib/warnings/pp_sys b/t/lib/warnings/pp_sys index 0891a39..6999327 100644 --- a/t/lib/warnings/pp_sys +++ b/t/lib/warnings/pp_sys @@ -105,6 +105,10 @@ Non-string passed as bitmask [pp_sselect] + %s too large [pp_gmtime] + + %s failed [pp_gmtime] + __END__ # pp_sys.c [pp_untie] use warnings 'untie' ; @@ -893,3 +897,23 @@ telldir() attempted on invalid dirhandle $foo at - line 20. seekdir() attempted on invalid dirhandle $foo at - line 21. rewinddir() attempted on invalid dirhandle $foo at - line 22. closedir() attempted on invalid dirhandle $foo at - line 23. +######## +# pp_sys.c [pp_gmtime] +BEGIN { + print < \&quire } + ok "quires" =~ bless([], o::), 'state sub used as overload method'; +} +{ + local $ENV{PERL5DB} = 'sub DB::DB{}'; + is( + runperl( + switches => [ '-d' ], + progs => [ split "\n", + 'use feature qw - lexical_subs state -; + no warnings q-experimental::lexical_subs-; + sub DB::sub{ print qq|4\n|; goto $DB::sub } + state sub foo {print qq|2\n|} + foo(); + ' + ], + stderr => 1 + ), + "4\n2\n", + 'state subs and DB::sub under -d' + ); +} # -------------------- my -------------------- # @@ -606,6 +639,40 @@ like runperl( ), qr/syntax error/, 'referencing a my sub after a syntax error does not crash'; +{ + state $stuff; + package A { + my sub foo{ $stuff .= our $AUTOLOAD } + *A::AUTOLOAD = \&foo; + } + A::bar(); + is $stuff, 'A::bar', 'my sub assigned to *AUTOLOAD can autoload'; +} +{ + my sub quire{qr "quires"} + package mo { use overload qr => \&quire } + ok "quires" =~ bless([], mo::), 'my sub used as overload method'; +} + +{ + local $ENV{PERL5DB} = 'sub DB::DB{}'; + is( + runperl( + switches => [ '-d' ], + progs => [ split "\n", + 'use feature qw - lexical_subs state -; + no warnings q-experimental::lexical_subs-; + sub DB::sub{ print qq|4\n|; goto $DB::sub } + my sub foo {print qq|2\n|} + foo(); + ' + ], + stderr => 1 + ), + "4\n2\n", + 'my subs and DB::sub under -d' + ); +} # -------------------- Interactions (and misc tests) -------------------- # diff --git a/t/op/list.t b/t/op/list.t index 0f6e0bc..74f256b 100644 --- a/t/op/list.t +++ b/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/t/op/sort.t b/t/op/sort.t index dd60f97..151e3ea 100644 --- a/t/op/sort.t +++ b/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/t/op/state.t b/t/op/state.t index b4542e1..81e5486 100644 --- a/t/op/state.t +++ b/t/op/state.t @@ -9,7 +9,7 @@ BEGIN { use strict; -plan tests => 136; +plan tests => 137; # Before loading feature.pm, test it with CORE:: ok eval 'CORE::state $x = 1;', 'CORE::state outside of feature.pm scope'; @@ -446,6 +446,14 @@ foreach my $forbidden () { thing2(6); } +# [perl #123029] regression in "state" under PERL_NO_COW +sub rt_123029 { + state $s; + $s = 'foo'x500; + my $c = $s; + return defined $s; +} +ok(rt_123029(), "state variables don't surprisingly disappear when accessed"); __DATA__ state ($a) = 1; diff --git a/t/op/svleak.t b/t/op/svleak.t index 3b8df47..74a8338 100644 --- a/t/op/svleak.t +++ b/t/op/svleak.t @@ -15,7 +15,7 @@ BEGIN { use Config; -plan tests => 127; +plan tests => 128; # run some code N times. If the number of SVs at the end of loop N is # greater than (N-1)*delta at the end of loop 1, we've got a leak @@ -256,6 +256,7 @@ eleak(2,0,'/[pp]/'); eleak(2,0,'/[[:ascii:]]/'); eleak(2,0,'/[[.zog.]]/'); eleak(2,0,'/[.zog.]/'); +eleak(2,0,'/|\W/', '/|\W/ [perl #123198]'); eleak(2,0,'no warnings; /(?[])/'); eleak(2,0,'no warnings; /(?[[a]+[b]])/'); eleak(2,0,'no warnings; /(?[[a]-[b]])/'); diff --git a/t/op/taint.t b/t/op/taint.t index 806208a..c3c03ba 100644 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -17,7 +17,7 @@ BEGIN { use strict; use Config; -plan tests => 800; +plan tests => 801; $| = 1; @@ -2383,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/t/op/time.t b/t/op/time.t index 734b838..5cb9191 100644 --- a/t/op/time.t +++ b/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/t/op/write.t b/t/op/write.t index 7591cde..7f0e881 100644 --- a/t/op/write.t +++ b/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/t/op/yadayada.t b/t/op/yadayada.t index 770a51e..a213bec 100644 --- a/t/op/yadayada.t +++ b/t/op/yadayada.t @@ -8,14 +8,39 @@ BEGIN { use strict; -plan 5; +plan 9; -my $err = "Unimplemented at $0 line " . ( __LINE__ + 2 ) . ".\n"; +my $err; +my $err1 = "Unimplemented at $0 line "; +my $err2 = ".\n"; +$err = $err1 . ( __LINE__ + 1 ) . $err2; eval { ... }; +is $@, $err, "Execution of ellipsis statement reported 'Unimplemented' code"; +$@ = ''; -is $@, $err; +note("RT #122661: Semicolon before ellipsis statement disambiguates to indicate block rather than hash reference"); +my @input = (3..5); +my @transformed; +$err = $err1 . ( __LINE__ + 1 ) . $err2; +eval { @transformed = map {; ... } @input; }; +is $@, $err, "Disambiguation case 1"; +$@ = ''; +$err = $err1 . ( __LINE__ + 1 ) . $err2; +eval { @transformed = map {;...} @input; }; +is $@, $err, "Disambiguation case 2"; +$@ = ''; + +$err = $err1 . ( __LINE__ + 1 ) . $err2; +eval { @transformed = map {; ...} @input; }; +is $@, $err, "Disambiguation case 3"; +$@ = ''; + +$err = $err1 . ( __LINE__ + 1 ) . $err2; +eval { @transformed = map {;... } @input; }; +is $@, $err, "Disambiguation case 4"; +$@ = ''; # # Regression tests, making sure ... is still parsable as an operator. diff --git a/t/porting/corelist.t b/t/porting/corelist.t index bff1b69..251a260 100644 --- a/t/porting/corelist.t +++ b/t/porting/corelist.t @@ -8,10 +8,11 @@ use Config; require 't/test.pl'; -plan(tests => 5); +plan(tests => 6); use_ok('Module::CoreList'); use_ok('Module::CoreList::Utils'); +use_ok('Module::CoreList::TieHashDelta'); { no warnings 'once'; diff --git a/t/porting/customized.dat b/t/porting/customized.dat index 37d6bf2..04c8db0 100644 --- a/t/porting/customized.dat +++ b/t/porting/customized.dat @@ -1,3 +1,11 @@ +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 @@ -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/t/porting/diag.t b/t/porting/diag.t index d3e0021..e7df6ec 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -483,7 +483,6 @@ Can't fix broken locale name "%s" Can't get short module name from a handle Can't load DLL `%s', possible problematic module `%s' Can't locate %s: %s -Can't locate object method "%s" via package "%s" (perhaps you forgot to load "%s"?) Can't pipe "%s": %s Can't set type on DOS Can't spawn: %s diff --git a/t/porting/known_pod_issues.dat b/t/porting/known_pod_issues.dat index 34fd676..b2a8a2b 100644 --- a/t/porting/known_pod_issues.dat +++ b/t/porting/known_pod_issues.dat @@ -85,7 +85,10 @@ IPC::Signal kill(3) langinfo(3) LaTeX::Encode +Lingua::JA::Romanize::Japanese Lingua::KO::Hangul::Util +Lingua::KO::Romanize::Hangul +Lingua::ZH::Romanize::Pinyin List::Gather local::lib Log::Message @@ -190,10 +193,13 @@ Time::Object Tk Tk::Pod tty(1) +Unicode::CaseFold Unicode::Casing +Unicode::GCString Unicode::LineBreak Unicode::Regex::Set Unicode::Semantics +Unicode::Tussle Unicode::Unihan unzip(1) Version::Requirements diff --git a/t/porting/podcheck.t b/t/porting/podcheck.t index cd9057d..625d9c8 100644 --- a/t/porting/podcheck.t +++ b/t/porting/podcheck.t @@ -22,6 +22,10 @@ BEGIN { print "1..0 # Not all files are available during cross-compilation\n"; exit 0; } + if ($^O eq 'dec_osf') { + print "1..0 # $^O cannot handle this test\n"; + exit 0; + } require '../regen/regen_lib.pl'; } diff --git a/t/porting/regen.t b/t/porting/regen.t index f57b8da..048a0c0 100644 --- a/t/porting/regen.t +++ b/t/porting/regen.t @@ -15,6 +15,9 @@ $::NO_ENDING = $::NO_ENDING = 1; if ( $^O eq "VMS" ) { skip_all( "- regen.pl needs porting." ); } +if ($^O eq 'dec_osf') { + skip_all("$^O cannot handle this test"); +} use Config; if ( $Config{usecrosscompile} ) { skip_all( "Not all files are available during cross-compilation" ); diff --git a/t/re/fold_grind.t b/t/re/fold_grind.t index a7a846c..7437295 100644 --- a/t/re/fold_grind.t +++ b/t/re/fold_grind.t @@ -8,6 +8,9 @@ BEGIN { require './test.pl'; require Config; import Config; skip_all_if_miniperl("no dynamic loading on miniperl, no Encode nor POSIX"); + if ($^O eq 'dec_osf') { + skip_all("$^O cannot handle this test"); + } require './loc_tools.pl'; } diff --git a/t/re/pat.t b/t/re/pat.t index 51838f9..7965f4e 100644 --- a/t/re/pat.t +++ b/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; @@ -1588,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/t/re/pat_psycho.t b/t/re/pat_psycho.t index 55c8776..fada302 100644 --- a/t/re/pat_psycho.t +++ b/t/re/pat_psycho.t @@ -21,10 +21,14 @@ BEGIN { chdir 't' if -d 't'; @INC = ('../lib','.'); require './test.pl'; + if ($^O eq 'dec_osf') { + skip_all("$^O cannot handle this test"); + } } skip_all('$PERL_SKIP_PSYCHO_TEST set') if $ENV{PERL_SKIP_PSYCHO_TEST}; + plan tests => 15; # Update this when adding/deleting tests. run_tests() unless caller; diff --git a/t/re/re_tests b/t/re/re_tests index d6a8b12..d883add 100644 --- a/t/re/re_tests +++ b/t/re/re_tests @@ -1885,6 +1885,7 @@ A+(*PRUNE)BC(?{}) AAABC y $& AAABC [bcd].{2,3}aaaa Xb\x{100}aaaaa y - - '\Awibble\z'm wibble y - - /(alias|status)es$/i Statuses y $1 Status # [perl #121778] +(.)(?{$~=$^N}) \x{100} y $~ \x{100} # [perl #123135] # Keep these lines at the end of the file # vim: softtabstop=0 noexpandtab diff --git a/t/re/rt122747.t b/t/re/rt122747.t new file mode 100644 index 0000000..b839edd --- /dev/null +++ b/t/re/rt122747.t @@ -0,0 +1,29 @@ +#!./perl +use strict; +use warnings; + +$| = 1; + + +BEGIN { + chdir 't' if -d 't'; + @INC = ('../lib','.','../ext/re'); + require './test.pl'; +} + +plan tests => 3; +use strict; + +my(@body) = ( + "", + "A\x{B9}ker\x{E8}eva xxxx.xxxx\@outlook.com \x{201D}", +); + +for (@body) { + s{ | \s{1,10} (?!phone) [a-z]{2,11} : ) }{ }xgi; + my $got= $1; + is( $got, '.xxxx@outlook.com' ); +} +ok("got to the end without dieing (note without DEBUGGING passing this test means nothing)"); + diff --git a/t/re/rxcode.t b/t/re/rxcode.t index 19a859b..42cece5 100644 --- a/t/re/rxcode.t +++ b/t/re/rxcode.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -plan tests => 40; +plan tests => 42; $^R = undef; like( 'a', qr/^a(?{1})(?:b(?{2}))?/, 'a =~ ab?' ); @@ -95,3 +95,10 @@ cmp_ok( scalar(@var), '==', 0, '..still nothing pushed (package)' ); # [perl #78194] $_ in code block aliasing op return values "$_" =~ /(?{ is \$_, \$_, '[perl #78194] \$_ == \$_ when $_ aliases "$x"' })/; + +@a = 1..3; +like eval { qr/@a(?{})/ }, qr/1 2 3\(\?\{\}\)/, 'qr/@a(?{})/'; + +# Not a code block, but looks a bit like one. (Failed an assertion from +# 5.17.1 to 5.21.6.) +ok "(?{" =~ qr/\Q(?{/, 'qr/\Q(?{/'; diff --git a/t/re/uniprops.t b/t/re/uniprops.t index 927f8a7..2f1cb44 100644 --- a/t/re/uniprops.t +++ b/t/re/uniprops.t @@ -2,6 +2,11 @@ use strict; use warnings; no warnings 'once'; +if ($^O eq 'dec_osf') { + print "1..0 # $^O cannot handle this test\n"; + exit(0); +} + # This is a wrapper for a generated file. Assumes being run from 't' # directory. diff --git a/t/run/switchd.t b/t/run/switchd.t index b5d4d42..d24d98b 100644 --- a/t/run/switchd.t +++ b/t/run/switchd.t @@ -9,7 +9,7 @@ BEGIN { require "./test.pl"; } # This test depends on t/lib/Devel/switchd*.pm. -plan(tests => 18); +plan(tests => 19); my $r; @@ -275,3 +275,13 @@ is( "42\n", 'UTF8 length caches on $DB::sub are flushed' ); + +# [perl #122771] -d conflicting with sort optimisations +is( + runperl( + switches => [ '-Ilib', '-d:switchd_empty' ], + prog => 'BEGIN { $^P &= ~0x4 } sort { $$b <=> $$a } (); print qq-42\n-', + ), + "42\n", + '-d does not conflict with sort optimisations' +); diff --git a/toke.c b/toke.c index 0028b18..906d56c 100644 --- a/toke.c +++ b/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/utf8.c b/utf8.c index e97115f..d076799 100644 --- a/utf8.c +++ b/utf8.c @@ -2509,6 +2509,14 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits SV* Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits, I32 none, SV* invlist, U8* const flags_p) { + + /*NOTE NOTE NOTE - If you want to use "return" in this routine you MUST + * use the following define */ + +#define CORE_SWASH_INIT_RETURN(x) \ + PL_curpm= old_PL_curpm; \ + return x + /* Initialize and return a swash, creating it if necessary. It does this * by calling utf8_heavy.pl in the general case. The returned value may be * the swash's inversion list instead if the input parameters allow it. @@ -2554,6 +2562,8 @@ Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 m * is only valid for binary properties */ dVAR; + PMOP *old_PL_curpm= PL_curpm; /* save away the old PL_curpm */ + SV* retval = &PL_sv_undef; HV* swash_hv = NULL; const int invlist_swash_boundary = @@ -2565,6 +2575,10 @@ Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 m assert(listsv != &PL_sv_undef || strNE(name, "") || invlist); assert(! invlist || minbits == 1); + PL_curpm= NULL; /* reset PL_curpm so that we dont get confused between the regex + that triggered the swash init and the swash init perl logic itself. + See perl #122747 */ + /* If data was passed in to go out to utf8_heavy to find the swash of, do * so */ if (listsv != &PL_sv_undef || strNE(name, "")) { @@ -2653,7 +2667,7 @@ Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 m /* If caller wants to handle missing properties, let them */ if (flags_p && *flags_p & _CORE_SWASH_INIT_RETURN_IF_UNDEF) { - return NULL; + CORE_SWASH_INIT_RETURN(NULL); } Perl_croak(aTHX_ "Can't find Unicode property definition \"%"SVf"\"", @@ -2755,7 +2769,8 @@ Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 m } } - return retval; + CORE_SWASH_INIT_RETURN(retval); +#undef CORE_SWASH_INIT_RETURN } diff --git a/util.c b/util.c index 2bb4a97..5a3c077 100644 --- a/util.c +++ b/util.c @@ -5303,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/vms/descrip_mms.template b/vms/descrip_mms.template index 69a898c..309ffab 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -319,7 +319,7 @@ x2p : [.x2p]$(DBG)a2p$(E) [.x2p]s2p.com [.x2p]find2perl.com extra.pods : miniperl @ @extra_pods.com -PERLDELTA_CURRENT = [.pod]perl5201delta.pod +PERLDELTA_CURRENT = [.pod]perl5202delta.pod $(PERLDELTA_CURRENT) : [.pod]perldelta.pod Copy/NoConfirm/Log $(MMS$SOURCE) $(PERLDELTA_CURRENT) diff --git a/win32/Makefile b/win32/Makefile index 6d86145..aa664ce 100644 --- a/win32/Makefile +++ b/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 .. @@ -1290,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 \ diff --git a/win32/config.ce b/win32/config.ce index 5177beb..bb87699 100644 --- a/win32/config.ce +++ b/win32/config.ce @@ -290,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' @@ -636,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/win32/config_H.ce b/win32/config_H.ce index e2837a6..196f419 100644 --- a/win32/config_H.ce +++ b/win32/config_H.ce @@ -227,7 +227,7 @@ * This symbol, if defined, indicates that the localeconv routine is * available for numeric and monetary formatting conventions. */ -#define HAS_LOCALECONV /**/ +/*#define HAS_LOCALECONV /**/ /* HAS_LOCKF: * This symbol, if defined, indicates that the lockf routine is diff --git a/win32/makefile.mk b/win32/makefile.mk index 3c9b89c..02231a1 100644 --- a/win32/makefile.mk +++ b/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 .. @@ -1488,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 \ diff --git a/win32/pod.mak b/win32/pod.mak index 51c54f4..1f9593a 100644 --- a/win32/pod.mak +++ b/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/win32/win32.h b/win32/win32.h index 8db0303..735c450 100644 --- a/win32/win32.h +++ b/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 -- 2.7.4