From 9eff162fa52e246ae016a43e78dac705fc1db989 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 28 Jun 2017 10:41:08 +0900 Subject: [PATCH] Imported Upstream version 5.22.0 Change-Id: I057a7bfd3abd9a23c83d7eea996e692ecc67b40f Signed-off-by: DongHun Kwak --- Cross/config.sh-arm-linux | 46 +- Cross/config.sh-arm-linux-n770 | 46 +- INSTALL | 30 +- MANIFEST | 2 +- META.json | 4 +- META.yml | 2 +- Makefile.SH | 8 +- NetWare/Makefile | 4 +- NetWare/config_H.wc | 10 +- Porting/Maintainers.pl | 46 +- Porting/checkAUTHORS.pl | 2 + Porting/cmpVERSION.pl | 2 +- Porting/config.sh | 48 +- Porting/config_H | 18 +- Porting/epigraphs.pod | 65 +- Porting/perl5220delta.pod | 461 --- Porting/perldelta_template.pod | 2 +- Porting/release_schedule.pod | 2 +- Porting/todo.pod | 4 +- README.bs2000 | 3 + README.haiku | 4 +- README.macosx | 8 +- README.os2 | 2 +- README.os390 | 3 + README.os400 | 3 + README.vms | 4 +- README.win32 | 2 +- autodoc.pl | 4 +- configure.com | 2 +- cop.h | 14 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm | 2 +- .../ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm | 2 +- .../lib/ExtUtils/MakeMaker/Config.pm | 2 +- .../lib/ExtUtils/MakeMaker/FAQ.pod | 2 +- .../lib/ExtUtils/MakeMaker/Locale.pm | 72 +- .../lib/ExtUtils/MakeMaker/Tutorial.pod | 2 +- .../lib/ExtUtils/MakeMaker/version.pm | 2 +- .../lib/ExtUtils/MakeMaker/version/regex.pm | 2 +- .../lib/ExtUtils/MakeMaker/version/vpp.pm | 2 +- .../ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm | 2 +- cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm | 2 +- cpan/ExtUtils-MakeMaker/t/basic.t | 22 +- .../lib/PerlIO/via/QuotedPrint.pm | 4 +- dist/Module-CoreList/Changes | 3 + dist/Module-CoreList/lib/Module/CoreList.pm | 168 +- .../lib/Module/CoreList/TieHashDelta.pm | 2 +- dist/Module-CoreList/lib/Module/CoreList/Utils.pm | 9 +- embed.fnc | 2 +- ext/POSIX/lib/POSIX.pm | 55 +- ext/POSIX/lib/POSIX.pod | 71 +- ext/POSIX/t/export.t | 252 +- ext/POSIX/t/math.t | 16 +- ext/VMS-Filespec/t/filespec.t | 3 + handy.h | 10 + hints/catamount.sh | 4 +- intrpvar.h | 4 +- lib/B/Op_private.pm | 2 +- lib/ExtUtils/typemap | 32 +- lib/overload.pm | 3 +- lib/utf8.pm | 4 +- op.c | 36 +- pad.c | 32 +- patchlevel.h | 8 +- plan9/config.plan9 | 10 +- plan9/config_sh.sample | 44 +- pod/.gitignore | 2 +- pod/perl.pod | 1 + pod/perl52111delta.pod | 432 +++ pod/perldelta.pod | 3958 +++++++++++++++++++- pod/perldiag.pod | 9 +- pod/perlebcdic.pod | 30 +- pod/perlfunc.pod | 20 +- pod/perlguts.pod | 123 +- pod/perlhacktips.pod | 31 +- pod/perlhist.pod | 43 +- pod/perlintro.pod | 2 +- pod/perlobj.pod | 2 +- pod/perlop.pod | 6 +- pod/perlperf.pod | 6 +- pod/perlport.pod | 17 +- pod/perlrebackslash.pod | 3 +- pod/perlrun.pod | 4 +- pod/perlunicode.pod | 1301 +++---- pod/perluniintro.pod | 7 +- pod/perlunitut.pod | 3 +- pod/perlvar.pod | 71 +- pp_ctl.c | 8 +- pp_pack.c | 5 + proto.h | 6 +- regcomp.c | 6 +- regexec.c | 8 +- sv.c | 15 +- sv.h | 3 + t/base/lex.t | 13 +- t/comp/parser.t | 11 +- t/comp/proto.t | 3 +- t/lib/croak/toke | 9 + t/op/dump.t | 6 + t/op/sub.t | 52 +- t/porting/customized.dat | 34 +- t/porting/known_pod_issues.dat | 12 +- t/re/subst.t | 11 +- t/test.pl | 33 +- t/uni/parser.t | 12 +- toke.c | 10 +- uconfig.h | 18 +- uconfig.sh | 16 +- uconfig64.sh | 16 +- universal.c | 3 +- utf8.c | 10 +- utf8.h | 43 +- vms/descrip_mms.template | 2 +- vms/vms.c | 5 +- win32/Makefile | 16 +- win32/Makefile.ce | 2 +- win32/config_H.gc | 4 +- win32/makefile.mk | 20 +- win32/pod.mak | 4 + win32/win32.c | 2 + win32/win32.h | 2 + 141 files changed, 6245 insertions(+), 2027 deletions(-) delete mode 100644 Porting/perl5220delta.pod create mode 100644 pod/perl52111delta.pod diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index 7de05eb..68dcfa6 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -32,12 +32,12 @@ alignbytes='4' ansi2knr='' aphostname='/bin/hostname' api_revision='5' -api_subversion='11' -api_version='21' -api_versionstring='5.21.11' +api_subversion='0' +api_version='22' +api_versionstring='5.22.0' ar='ar' -archlib='/usr/lib/perl5/5.21.11/armv4l-linux' -archlibexp='/usr/lib/perl5/5.21.11/armv4l-linux' +archlib='/usr/lib/perl5/5.22.0/armv4l-linux' +archlibexp='/usr/lib/perl5/5.22.0/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.21.11/armv4l-linux/CORE' +ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.22.0/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' @@ -793,7 +793,7 @@ inc_version_list=' ' inc_version_list_init='0' incpath='' inews='' -installarchlib='./install_me_here/usr/lib/perl5/5.21.11/armv4l-linux' +installarchlib='./install_me_here/usr/lib/perl5/5.22.0/armv4l-linux' installbin='./install_me_here/usr/bin' installhtml1dir='' installhtml3dir='' @@ -801,13 +801,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.21.11' +installprivlib='./install_me_here/usr/lib/perl5/5.22.0' installscript='./install_me_here/usr/bin' -installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.21.11/armv4l-linux' +installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.22.0/armv4l-linux' installsitebin='./install_me_here/usr/bin' installsitehtml1dir='' installsitehtml3dir='' -installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.21.11' +installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.22.0' installsiteman1dir='./install_me_here/usr/share/man/man1' installsiteman3dir='./install_me_here/usr/share/man/man3' installsitescript='./install_me_here/usr/bin' @@ -937,8 +937,8 @@ pmake='' pr='' prefix='/usr' prefixexp='/usr' -privlib='/usr/lib/perl5/5.21.11' -privlibexp='/usr/lib/perl5/5.21.11' +privlib='/usr/lib/perl5/5.22.0' +privlibexp='/usr/lib/perl5/5.22.0' procselfexe='"/proc/self/exe"' prototype='define' ptrsize='4' @@ -1003,17 +1003,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.21.11/armv4l-linux' -sitearchexp='/usr/lib/perl5/site_perl/5.21.11/armv4l-linux' +sitearch='/usr/lib/perl5/site_perl/5.22.0/armv4l-linux' +sitearchexp='/usr/lib/perl5/site_perl/5.22.0/armv4l-linux' sitebin='/usr/bin' sitebinexp='/usr/bin' sitehtml1dir='' sitehtml1direxp='' sitehtml3dir='' sitehtml3direxp='' -sitelib='/usr/lib/perl5/site_perl/5.21.11' +sitelib='/usr/lib/perl5/site_perl/5.22.0' sitelib_stem='/usr/lib/perl5/site_perl' -sitelibexp='/usr/lib/perl5/site_perl/5.21.11' +sitelibexp='/usr/lib/perl5/site_perl/5.22.0' siteman1dir='/usr/share/man/man1' siteman1direxp='/usr/share/man/man1' siteman3dir='/usr/share/man/man3' @@ -1052,7 +1052,7 @@ stdio_stream_array='' strerror_r_proto='0' strings='/usr/include/string.h' submit='' -subversion='11' +subversion='0' sysman='/usr/share/man/man1' tail='' tar='' @@ -1144,8 +1144,8 @@ vendorprefix='' vendorprefixexp='' vendorscript='' vendorscriptexp='' -version='5.21.11' -version_patchlevel_string='version 21 subversion 11' +version='5.22.0' +version_patchlevel_string='version 22 subversion 0' versiononly='undef' vi='' xlibpth='/usr/lib/386 /lib/386' @@ -1158,10 +1158,10 @@ config_arg0='Configure' config_args='' config_argc=0 PERL_REVISION=5 -PERL_VERSION=21 -PERL_SUBVERSION=11 +PERL_VERSION=22 +PERL_SUBVERSION=0 PERL_API_REVISION=5 -PERL_API_VERSION=21 -PERL_API_SUBVERSION=11 +PERL_API_VERSION=22 +PERL_API_SUBVERSION=0 PERL_PATCHLEVEL= PERL_CONFIG_SH=true diff --git a/Cross/config.sh-arm-linux-n770 b/Cross/config.sh-arm-linux-n770 index 69c7030..0bf7c85 100644 --- a/Cross/config.sh-arm-linux-n770 +++ b/Cross/config.sh-arm-linux-n770 @@ -32,12 +32,12 @@ alignbytes='4' ansi2knr='' aphostname='/bin/hostname' api_revision='5' -api_subversion='11' -api_version='21' -api_versionstring='5.21.11' +api_subversion='0' +api_version='22' +api_versionstring='5.22.0' ar='ar' -archlib='/usr/lib/perl5/5.21.11/armv4l-linux' -archlibexp='/usr/lib/perl5/5.21.11/armv4l-linux' +archlib='/usr/lib/perl5/5.22.0/armv4l-linux' +archlibexp='/usr/lib/perl5/5.22.0/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.21.11/armv4l-linux/CORE' +ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.22.0/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.21.11/armv4l-linux' +installarchlib='./install_me_here/usr/lib/perl5/5.22.0/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.21.11' +installprivlib='./install_me_here/usr/lib/perl5/5.22.0' installscript='./install_me_here/usr/bin' -installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.21.11/armv4l-linux' +installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.22.0/armv4l-linux' installsitebin='./install_me_here/usr/bin' installsitehtml1dir='' installsitehtml3dir='' -installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.21.11' +installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.22.0' 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.21.11' -privlibexp='/usr/lib/perl5/5.21.11' +privlib='/usr/lib/perl5/5.22.0' +privlibexp='/usr/lib/perl5/5.22.0' 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.21.11/armv4l-linux' -sitearchexp='/usr/lib/perl5/site_perl/5.21.11/armv4l-linux' +sitearch='/usr/lib/perl5/site_perl/5.22.0/armv4l-linux' +sitearchexp='/usr/lib/perl5/site_perl/5.22.0/armv4l-linux' sitebin='/usr/bin' sitebinexp='/usr/bin' sitehtml1dir='' sitehtml1direxp='' sitehtml3dir='' sitehtml3direxp='' -sitelib='/usr/lib/perl5/site_perl/5.21.11' +sitelib='/usr/lib/perl5/site_perl/5.22.0' sitelib_stem='/usr/lib/perl5/site_perl' -sitelibexp='/usr/lib/perl5/site_perl/5.21.11' +sitelibexp='/usr/lib/perl5/site_perl/5.22.0' 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='11' +subversion='0' sysman='/usr/share/man/man1' tail='' tar='' @@ -1035,8 +1035,8 @@ vendorprefix='' vendorprefixexp='' vendorscript='' vendorscriptexp='' -version='5.21.11' -version_patchlevel_string='version 21 subversion 11' +version='5.22.0' +version_patchlevel_string='version 22 subversion 0' versiononly='undef' vi='' xlibpth='/usr/lib/386 /lib/386' @@ -1049,10 +1049,10 @@ config_arg0='Configure' config_args='' config_argc=0 PERL_REVISION=5 -PERL_VERSION=21 -PERL_SUBVERSION=11 +PERL_VERSION=22 +PERL_SUBVERSION=0 PERL_API_REVISION=5 -PERL_API_VERSION=21 -PERL_API_SUBVERSION=11 +PERL_API_VERSION=22 +PERL_API_SUBVERSION=0 PERL_PATCHLEVEL= PERL_CONFIG_SH=true diff --git a/INSTALL b/INSTALL index e7f2fea..dd73d4c 100644 --- a/INSTALL +++ b/INSTALL @@ -584,7 +584,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.21.11. +By default, Configure will use the following directories for 5.22.0. $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 @@ -2443,7 +2443,7 @@ http://www.chiark.greenend.org.uk/~sgtatham/bugs.html =head1 Coexistence with earlier versions of perl 5 -Perl 5.21.11 is not binary compatible with earlier versions of Perl. +Perl 5.22.0 is not binary compatible with earlier versions of Perl. In other words, you will have to recompile your XS modules. In general, you can usually safely upgrade from one version of Perl @@ -2518,9 +2518,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.21.11 + sh Configure -Dprefix=/opt/perl5.22.0 -and adding /opt/perl5.21.11/bin to the shell PATH variable. Such users +and adding /opt/perl5.22.0/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. @@ -2533,13 +2533,13 @@ seriously consider using a separate directory, since development subversions may not have all the compatibility wrinkles ironed out yet. -=head2 Upgrading from 5.21.10 or earlier +=head2 Upgrading from 5.21.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.21.11. If you find you do need to rebuild an extension with -5.21.11, you may safely do so without disturbing the older +used with 5.22.0. If you find you do need to rebuild an extension with +5.22.0, you may safely do so without disturbing the older installations. (See L<"Coexistence with earlier versions of perl 5"> above.) @@ -2572,15 +2572,15 @@ Firstly, the bare minimum to run this script print("$f\n"); } -in Linux with perl-5.21.11 is as follows (under $Config{prefix}): +in Linux with perl-5.22.0 is as follows (under $Config{prefix}): ./bin/perl - ./lib/perl5/5.21.11/strict.pm - ./lib/perl5/5.21.11/warnings.pm - ./lib/perl5/5.21.11/i686-linux/File/Glob.pm - ./lib/perl5/5.21.11/feature.pm - ./lib/perl5/5.21.11/XSLoader.pm - ./lib/perl5/5.21.11/i686-linux/auto/File/Glob/Glob.so + ./lib/perl5/5.22.0/strict.pm + ./lib/perl5/5.22.0/warnings.pm + ./lib/perl5/5.22.0/i686-linux/File/Glob.pm + ./lib/perl5/5.22.0/feature.pm + ./lib/perl5/5.22.0/XSLoader.pm + ./lib/perl5/5.22.0/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 diff --git a/MANIFEST b/MANIFEST index eaa205a..4278740 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4567,6 +4567,7 @@ pod/perl5201delta.pod Perl changes in version 5.20.1 pod/perl5202delta.pod Perl changes in version 5.20.2 pod/perl5210delta.pod Perl changes in version 5.21.0 pod/perl52110delta.pod Perl changes in version 5.21.10 +pod/perl52111delta.pod Perl changes in version 5.21.11 pod/perl5211delta.pod Perl changes in version 5.21.1 pod/perl5212delta.pod Perl changes in version 5.21.2 pod/perl5213delta.pod Perl changes in version 5.21.3 @@ -4733,7 +4734,6 @@ Porting/manicheck Check against MANIFEST Porting/manisort Sort the MANIFEST Porting/new-perldelta.pl Generate a new perldelta Porting/newtests-perldelta.pl Generate Perldelta stub for newly added tests -Porting/perl5220delta.pod Perl changes in version 5.22.0 Porting/perldelta_template.pod Template for creating new perldelta.pod files Porting/perlhist_calculate.pl Perform calculations to update perlhist Porting/pod_lib.pl Code for handling generated pods diff --git a/META.json b/META.json index cf349bb..0f62c2b 100644 --- a/META.json +++ b/META.json @@ -112,7 +112,7 @@ "vxs.inc" ] }, - "release_status" : "unstable", + "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://rt.perl.org/" @@ -125,5 +125,5 @@ "url" : "http://perl5.git.perl.org/" } }, - "version" : "5.021011" + "version" : "5.022000" } diff --git a/META.yml b/META.yml index f22ef9f..552f572 100644 --- a/META.yml +++ b/META.yml @@ -112,4 +112,4 @@ resources: homepage: http://www.perl.org/ license: http://dev.perl.org/licenses/ repository: http://perl5.git.perl.org/ -version: '5.021011' +version: '5.022000' diff --git a/Makefile.SH b/Makefile.SH index eb082c2..034d812 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -492,7 +492,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/perl52111delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod +perltoc_pod_prereqs = extra.pods pod/perl5220delta.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 @@ -1020,9 +1020,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/perl52111delta.pod: pod/perldelta.pod - $(RMS) pod/perl52111delta.pod - $(LNS) perldelta.pod pod/perl52111delta.pod +pod/perl5220delta.pod: pod/perldelta.pod + $(RMS) pod/perl5220delta.pod + $(LNS) perldelta.pod pod/perl5220delta.pod extra.pods: $(MINIPERL_EXE) -@test ! -f extra.pods || rm -f `cat extra.pods` diff --git a/NetWare/Makefile b/NetWare/Makefile index 1411d04..42d85b1 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.21.11 for NetWare" +MODULE_DESC = "Perl 5.22.0 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.21.11 +INST_VER = \5.22.0 # # 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 bfe1ba3..ef47c60 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.21.11\\lib\\NetWare-x86-multi-thread" /**/ +#define ARCHLIB "c:\\perl\\5.22.0\\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.21.11\\bin\\NetWare-x86-multi-thread" /**/ -#define BIN_EXP "c:\\perl\\5.21.11\\bin\\NetWare-x86-multi-thread" /**/ +#define BIN "c:\\perl\\5.22.0\\bin\\NetWare-x86-multi-thread" /**/ +#define BIN_EXP "c:\\perl\\5.22.0\\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.21.11\\lib\\NetWare-x86-multi-thread" /**/ +#define SITEARCH "c:\\perl\\site\\5.22.0\\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.21.11\\lib" /**/ +#define SITELIB "c:\\perl\\site\\5.22.0\\lib" /**/ /*#define SITELIB_EXP "" /**/ #define SITELIB_STEM "" /**/ diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index b8a4365..81a075d 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -474,7 +474,40 @@ use File::Glob qw(:case); 'README.packaging', ], # Applied upstream remove customisation when updating EUMM - 'CUSTOMIZED' => [ qw[ t/pm_to_blib.t ] ], + 'CUSTOMIZED' => [ qw[ t/pm_to_blib.t + t/basic.t + lib/ExtUtils/Command/MM.pm + lib/ExtUtils/Liblist.pm + lib/ExtUtils/Liblist/Kid.pm + lib/ExtUtils/MM.pm + lib/ExtUtils/MM_AIX.pm + lib/ExtUtils/MM_Any.pm + lib/ExtUtils/MM_BeOS.pm + lib/ExtUtils/MM_Cygwin.pm + lib/ExtUtils/MM_DOS.pm + lib/ExtUtils/MM_Darwin.pm + lib/ExtUtils/MM_MacOS.pm + lib/ExtUtils/MM_NW5.pm + lib/ExtUtils/MM_OS2.pm + lib/ExtUtils/MM_QNX.pm + lib/ExtUtils/MM_UWIN.pm + lib/ExtUtils/MM_Unix.pm + lib/ExtUtils/MM_VMS.pm + lib/ExtUtils/MM_VOS.pm + lib/ExtUtils/MM_Win32.pm + lib/ExtUtils/MM_Win95.pm + lib/ExtUtils/MY.pm + lib/ExtUtils/MakeMaker.pm + lib/ExtUtils/MakeMaker/Config.pm + lib/ExtUtils/MakeMaker/FAQ.pod + lib/ExtUtils/MakeMaker/Locale.pm + lib/ExtUtils/MakeMaker/Tutorial.pod + lib/ExtUtils/MakeMaker/version.pm + lib/ExtUtils/MakeMaker/version/regex.pm + lib/ExtUtils/MakeMaker/version/vpp.pm + lib/ExtUtils/Mkbootstrap.pm + lib/ExtUtils/Mksymlists.pm + lib/ExtUtils/testlib.pm ] ], }, 'ExtUtils::Manifest' => { @@ -788,7 +821,7 @@ use File::Glob qw(:case); }, 'Module::CoreList' => { - 'DISTRIBUTION' => 'BINGOS/Module-CoreList-5.20150320.tar.gz', + 'DISTRIBUTION' => 'BINGOS/Module-CoreList-5.20150420.tar.gz', 'FILES' => q[dist/Module-CoreList], }, @@ -875,15 +908,8 @@ use File::Glob qw(:case); }, 'PerlIO::via::QuotedPrint' => { - 'DISTRIBUTION' => 'ELIZABETH/PerlIO-via-QuotedPrint-0.07.tar.gz', + 'DISTRIBUTION' => 'SHAY/PerlIO-via-QuotedPrint-0.08.tar.gz', 'FILES' => q[cpan/PerlIO-via-QuotedPrint], - - # Waiting to be merged upstream: see CPAN RT#54047 - 'CUSTOMIZED' => [ - qw( t/QuotedPrint.t - ), - ], - }, 'Pod::Checker' => { diff --git a/Porting/checkAUTHORS.pl b/Porting/checkAUTHORS.pl index fc76d97..c164933 100755 --- a/Porting/checkAUTHORS.pl +++ b/Porting/checkAUTHORS.pl @@ -696,6 +696,8 @@ keith.s.thompson\100gmail.com kst\100mib.org ken\100mathforum.org kenahoo\100gmail.com + ken.williams\100thomsonreuters.com kentfredric\100gmail.com kentnl\100cpan.org +kmx\100volny.cz kmx\100volny.cz ++ kmx\100cpan.org kroepke\100dolphin-services.de kay\100dolphin-services.de kst\100mib.org kst\100cts.com + kst\100SDSC.EDU diff --git a/Porting/cmpVERSION.pl b/Porting/cmpVERSION.pl index 7964b9b..95f695f 100755 --- a/Porting/cmpVERSION.pl +++ b/Porting/cmpVERSION.pl @@ -42,7 +42,7 @@ unless (defined $tag_to_compare) { $check = `git describe --abbrev=0 $check 2>$null`; chomp $check; last unless $check =~ /-RC/; - $check .= '^'; + $check .= '~1'; } $tag_to_compare = $check; # Thanks to David Golden for this suggestion. diff --git a/Porting/config.sh b/Porting/config.sh index d664f30..50c074a 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -39,12 +39,12 @@ alignbytes='4' ansi2knr='' aphostname='/bin/hostname' api_revision='5' -api_subversion='11' -api_version='21' -api_versionstring='5.21.11' +api_subversion='0' +api_version='22' +api_versionstring='5.22.0' ar='ar' -archlib='/pro/lib/perl5/5.21.11/i686-linux-64int' -archlibexp='/pro/lib/perl5/5.21.11/i686-linux-64int' +archlib='/pro/lib/perl5/5.22.0/i686-linux-64int' +archlibexp='/pro/lib/perl5/5.22.0/i686-linux-64int' archname64='64int' archname='i686-linux-64int' archobjs='' @@ -810,7 +810,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.21.11/i686-linux-64int' +installarchlib='/pro/lib/perl5/5.22.0/i686-linux-64int' installbin='/pro/bin' installhtml1dir='' installhtml3dir='' @@ -818,13 +818,13 @@ installman1dir='/pro/local/man/man1' installman3dir='/pro/local/man/man3' installprefix='/pro' installprefixexp='/pro' -installprivlib='/pro/lib/perl5/5.21.11' +installprivlib='/pro/lib/perl5/5.22.0' installscript='/pro/bin' -installsitearch='/pro/lib/perl5/site_perl/5.21.11/i686-linux-64int' +installsitearch='/pro/lib/perl5/site_perl/5.22.0/i686-linux-64int' installsitebin='/pro/bin' installsitehtml1dir='' installsitehtml3dir='' -installsitelib='/pro/lib/perl5/site_perl/5.21.11' +installsitelib='/pro/lib/perl5/site_perl/5.22.0' installsiteman1dir='/pro/local/man/man1' installsiteman3dir='/pro/local/man/man3' installsitescript='/pro/bin' @@ -946,7 +946,7 @@ perl_patchlevel='' perl_static_inline='static __inline__' perladmin='hmbrand@cpan.org' perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc' -perlpath='/pro/bin/perl5.21.11' +perlpath='/pro/bin/perl5.22.0' pg='pg' phostname='hostname' pidtype='pid_t' @@ -955,8 +955,8 @@ pmake='' pr='' prefix='/pro' prefixexp='/pro' -privlib='/pro/lib/perl5/5.21.11' -privlibexp='/pro/lib/perl5/5.21.11' +privlib='/pro/lib/perl5/5.22.0' +privlibexp='/pro/lib/perl5/5.22.0' procselfexe='"/proc/self/exe"' prototype='define' ptrsize='4' @@ -1022,17 +1022,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.21.11/i686-linux-64int' -sitearchexp='/pro/lib/perl5/site_perl/5.21.11/i686-linux-64int' +sitearch='/pro/lib/perl5/site_perl/5.22.0/i686-linux-64int' +sitearchexp='/pro/lib/perl5/site_perl/5.22.0/i686-linux-64int' sitebin='/pro/bin' sitebinexp='/pro/bin' sitehtml1dir='' sitehtml1direxp='' sitehtml3dir='' sitehtml3direxp='' -sitelib='/pro/lib/perl5/site_perl/5.21.11' +sitelib='/pro/lib/perl5/site_perl/5.22.0' sitelib_stem='/pro/lib/perl5/site_perl' -sitelibexp='/pro/lib/perl5/site_perl/5.21.11' +sitelibexp='/pro/lib/perl5/site_perl/5.22.0' siteman1dir='/pro/local/man/man1' siteman1direxp='/pro/local/man/man1' siteman3dir='/pro/local/man/man3' @@ -1058,7 +1058,7 @@ src='.' ssizetype='ssize_t' st_ino_sign='1' st_ino_size='8' -startperl='#!/pro/bin/perl5.21.11' +startperl='#!/pro/bin/perl5.22.0' startsh='#!/bin/sh' static_ext=' ' stdchar='char' @@ -1071,7 +1071,7 @@ stdio_stream_array='' strerror_r_proto='0' strings='/usr/include/string.h' submit='' -subversion='11' +subversion='0' sysman='/usr/share/man/man1' sysroot='' tail='' @@ -1170,8 +1170,8 @@ vendorprefix='' vendorprefixexp='' vendorscript='' vendorscriptexp='' -version='5.21.11' -version_patchlevel_string='version 21 subversion 11' +version='5.22.0' +version_patchlevel_string='version 22 subversion 0' versiononly='define' vi='' xlibpth='/usr/lib/386 /lib/386' @@ -1180,11 +1180,11 @@ yaccflags='' zcat='' zip='zip' PERL_REVISION=5 -PERL_VERSION=21 -PERL_SUBVERSION=11 +PERL_VERSION=22 +PERL_SUBVERSION=0 PERL_API_REVISION=5 -PERL_API_VERSION=21 -PERL_API_SUBVERSION=11 +PERL_API_VERSION=22 +PERL_API_SUBVERSION=0 PERL_PATCHLEVEL='' PERL_CONFIG_SH=true : Variables propagated from previous config.sh file. diff --git a/Porting/config_H b/Porting/config_H index 9ec16e4..55d20cc 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.21.11/i686-linux-64int-ld" /**/ -#define ARCHLIB_EXP "/pro/lib/perl5/5.21.11/i686-linux-64int-ld" /**/ +#define ARCHLIB "/pro/lib/perl5/5.22.0/i686-linux-64int-ld" /**/ +#define ARCHLIB_EXP "/pro/lib/perl5/5.22.0/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.21.11" /**/ -#define PRIVLIB_EXP "/pro/lib/perl5/5.21.11" /**/ +#define PRIVLIB "/pro/lib/perl5/5.22.0" /**/ +#define PRIVLIB_EXP "/pro/lib/perl5/5.22.0" /**/ /* 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.21.11/i686-linux-64int-ld" /**/ -#define SITEARCH_EXP "/pro/lib/perl5/site_perl/5.21.11/i686-linux-64int-ld" /**/ +#define SITEARCH "/pro/lib/perl5/site_perl/5.22.0/i686-linux-64int-ld" /**/ +#define SITEARCH_EXP "/pro/lib/perl5/site_perl/5.22.0/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.21.11" /**/ -#define SITELIB_EXP "/pro/lib/perl5/site_perl/5.21.11" /**/ +#define SITELIB "/pro/lib/perl5/site_perl/5.22.0" /**/ +#define SITELIB_EXP "/pro/lib/perl5/site_perl/5.22.0" /**/ #define SITELIB_STEM "/pro/lib/perl5/site_perl" /**/ /* SSize_t: @@ -4326,7 +4326,7 @@ * script to make sure (one hopes) that it runs with perl and not * some shell. */ -#define STARTPERL "#!/pro/bin/perl5.21.11" /**/ +#define STARTPERL "#!/pro/bin/perl5.22.0" /**/ /* HAS_STDIO_STREAM_ARRAY: * This symbol, if defined, tells that there is an array diff --git a/Porting/epigraphs.pod b/Porting/epigraphs.pod index 6f3ceff..7e705f8 100644 --- a/Porting/epigraphs.pod +++ b/Porting/epigraphs.pod @@ -17,6 +17,43 @@ Consult your favorite dictionary for details. =head1 EPIGRAPHS +=head2 v5.22.0-RC2 - T.S. Eliot, unpublished work + +L + + And when thyself with silver foot shall pass + Among the theories scattered on the grass + Take up my good intentions with the rest + +=head2 v5.22.0-RC1 - Gene Wolfe, Citadel of the Autarch + +L + +There is no limit to stupidity. Space itself is said to be bounded by +its own curvature, but stupidity continues beyond infinity. + +=head2 v5.21.11 - Algernon Charles Swinburne, "Dolores (Notre-Dame des Sept Douleurs)" + +L + + They shall pass and their places be taken, + The gods and the priests that are pure. + They shall pass, and shalt thou not be shaken? + They shall perish, and shalt thou endure? + Death laughs, breathing close and relentless + In the nostrils and eyelids of lust, + With a pinch in his fingers of scentless + And delicate dust. + + But the worm shall revive thee with kisses; + Thou shalt change and transmute as a god, + As the rod to a serpent that hisses, + As the serpent again to a rod. + Thy life shall not cease though thou doff it; + Thou shalt live until evil be slain, + And good shall die first, said thy prophet, + Our Lady of Pain. + =head2 v5.21.10 - Aldous Huxley, "The Devils of Loudun" L @@ -38,20 +75,20 @@ obeying the laws of their own, their blessedly other-than-human nature. L -There is another sky, -Ever serene and fair, -And there is another sunshine, -Though it be darkness there; -Never mind faded forests, Austin, -Never mind silent fields - -Here is a little forest, -Whose leaf is ever green; -Here is a brighter garden, -Where not a frost has been; -In its unfading flowers -I hear the bright bee hum: -Prithee, my brother, -Into my garden come! + There is another sky, + Ever serene and fair, + And there is another sunshine, + Though it be darkness there; + Never mind faded forests, Austin, + Never mind silent fields - + Here is a little forest, + Whose leaf is ever green; + Here is a brighter garden, + Where not a frost has been; + In its unfading flowers + I hear the bright bee hum: + Prithee, my brother, + Into my garden come! =head2 v5.21.8 - Bill Watterson, "Scientific Progress Goes 'Boink': A Calvin and Hobbes Collection" diff --git a/Porting/perl5220delta.pod b/Porting/perl5220delta.pod deleted file mode 100644 index 1349db2..0000000 --- a/Porting/perl5220delta.pod +++ /dev/null @@ -1,461 +0,0 @@ -=encoding utf8 - -=head1 NAME - -[ this is a template for a new perldelta file. Any text flagged as XXX needs -to be processed before release. ] - -perldelta - what is new for perl v5.22.0 - -=head1 DESCRIPTION - -This document describes differences between the 5.22.0 release and the 5.20.0 -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 Notice - -XXX Any important notices here - -=head1 Core Enhancements - -XXX New core language features go here. Summarize user-visible core language -enhancements. Particularly prominent performance optimisations could go -here, but most should go in the L section. - -[ List each enhancement as a =head2 entry ] - -=head1 Security - -XXX Any security-related notices go here. In particular, any security -vulnerabilities closed should be noted here rather than in the -L section. - -[ List each security issue as a =head2 entry ] - -=head1 Incompatible Changes - -XXX For a release on a stable branch, this section aspires to be: - - There are no changes intentionally incompatible with 5.XXX.XXX - If any exist, they are bugs, and we request that you submit a - report. See L below. - -[ List each incompatible change as a =head2 entry ] - -=head1 Deprecations - -XXX Any deprecated features, syntax, modules etc. should be listed here. - -=head2 Module removals - -XXX Remove this section if inapplicable. - -The following modules will be removed from the core distribution in a -future release, and will at that time need to be installed from CPAN. -Distributions on CPAN which require these modules will need to list them as -prerequisites. - -The core versions of these modules will now issue C<"deprecated">-category -warnings to alert you to this fact. To silence these deprecation warnings, -install the modules in question from CPAN. - -Note that these are (with rare exceptions) fine modules that you are encouraged -to continue to use. Their disinclusion from core primarily hinges on their -necessity to bootstrapping a fully functional, CPAN-capable Perl installation, -not usually on concerns over their design. - -=over - -=item XXX - -XXX Note that deprecated modules should be listed here even if they are listed -as an updated module in the L section. - -=back - -[ List each other deprecation as a =head2 entry ] - -=head1 Performance Enhancements - -XXX Changes which enhance performance without changing behaviour go here. -There may well be none in a stable release. - -[ List each enhancement as a =item entry ] - -=over 4 - -=item * - -XXX - -=back - -=head1 Modules and Pragmata - -XXX All changes to installed files in F, F, F and F -go here. If Module::CoreList is updated, generate an initial draft of the -following sections using F. A paragraph summary -for important changes should then be added by hand. In an ideal world, -dual-life modules would have a F file that could be cribbed. - -[ Within each section, list entries as a =item entry ] - -=head2 New Modules and Pragmata - -=over 4 - -=item * - -XXX - -=back - -=head2 Updated Modules and Pragmata - -=over 4 - -=item * - -L has been upgraded from version A.xx to B.yy. - -=back - -=head2 Removed Modules and Pragmata - -=over 4 - -=item * - -XXX - -=back - -=head1 Documentation - -XXX Changes to files in F go here. Consider grouping entries by -file and be sure to link to the appropriate page, e.g. L. - -=head2 New Documentation - -XXX Changes which create B files in F go here. - -=head3 L - -XXX Description of the purpose of the new file here - -=head2 Changes to Existing Documentation - -XXX Changes which significantly change existing files in F go here. -However, any changes to F should go in the L -section. - -=head3 L - -=over 4 - -=item * - -XXX Description of the change here - -=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. - -XXX New or changed warnings emitted by the core's C code go here. Also -include any changes in L that reconcile it to the C code. - -=head2 New Diagnostics - -XXX Newly added diagnostic messages go under here, separated into New Errors -and New Warnings - -=head3 New Errors - -=over 4 - -=item * - -XXX L - -=back - -=head3 New Warnings - -=over 4 - -=item * - -XXX L - -=back - -=head2 Changes to Existing Diagnostics - -XXX Changes (i.e. rewording) of diagnostic messages go here - -=over 4 - -=item * - -XXX Describe change here - -=back - -=head1 Utility Changes - -XXX Changes to installed programs such as F and F go here. -Most of these are built within the directory F. - -[ List utility changes as a =head2 entry for each utility and =item -entries for each change -Use L with program names to get proper documentation linking. ] - -=head2 L - -=over 4 - -=item * - -XXX - -=back - -=head1 Configuration and Compilation - -XXX Changes to F, F, F, and analogous tools -go here. Any other changes to the Perl build process should be listed here. -However, any platform-specific changes should be listed in the -L section, instead. - -[ List changes as a =item entry ]. - -=over 4 - -=item * - -XXX - -=back - -=head1 Testing - -XXX Any significant changes to the testing of a freshly built perl should be -listed here. Changes which create B files in F go here as do any -large changes to the testing harness (e.g. when parallel testing was added). -Changes to existing files in F aren't worth summarizing, although the bugs -that they represent may be covered elsewhere. - -[ List each test improvement as a =item entry ] - -=over 4 - -=item * - -XXX - -=back - -=head1 Platform Support - -XXX Any changes to platform support should be listed in the sections below. - -[ Within the sections, list each platform as a =item entry with specific -changes as paragraphs below it. ] - -=head2 New Platforms - -XXX List any platforms that this version of perl compiles on, that previous -versions did not. These will either be enabled by new files in the F -directories, or new subdirectories and F files at the top level of the -source tree. - -=over 4 - -=item XXX-some-platform - -XXX - -=back - -=head2 Discontinued Platforms - -XXX List any platforms that this version of perl no longer compiles on. - -=over 4 - -=item XXX-some-platform - -XXX - -=back - -=head2 Platform-Specific Notes - -XXX List any changes for specific platforms. This could include configuration -and compilation changes or changes in portability/compatibility. However, -changes within modules for platforms should generally be listed in the -L section. - -=over 4 - -=item XXX-some-platform - -XXX - -=back - -=head1 Internal Changes - -XXX Changes which affect the interface available to C code go here. Other -significant internal changes for future core maintainers should be noted as -well. - -[ List each change as a =item entry ] - -=over 4 - -=item * - -XXX - -=back - -=head1 Selected Bug Fixes - -XXX Important bug fixes in the core language are summarized here. Bug fixes in -files in F and F are best summarized in L. - -[ List each fix as a =item entry ] - -=over 4 - -=item * - -XXX - -=back - -=head1 Known Problems - -XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any -tests that had to be Ced for the release would be noted here. Unfixed -platform specific bugs also go here. - -[ List each fix as a =item entry ] - -=over 4 - -=item * - -XXX Check this list before the release of 5.22.0 for modules that have -been fixed. - -The following modules are known to have test failures with this version of -Perl. Patches have been submitted, so there will hopefully be new releases -soon: - -=over - -=item * - -L version 1.50 - -=item * - -L version 0.25 - -=item * - -L version 1.3130 - -=item * - -L version 1.18 - -=item * - -L version 0.63 - -=item * - -L version 0.009 - -=item * - -L version 2.22 - -=item * - -L version 1.00 - -=item * - -L 0.08 - -=back - -=back - -=head1 Errata From Previous Releases - -=over 4 - -=item * - -XXX Add anything here that we forgot to add, or were mistaken about, in -the perldelta of a previous release. - -=back - -=head1 Obituary - -XXX If any significant core contributor has died, we've added a short obituary -here. - -=head1 Acknowledgements - -XXX Generate this with: - - perl Porting/acknowledgements.pl v5.21.11..HEAD - -=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/Porting/perldelta_template.pod b/Porting/perldelta_template.pod index 27081af..c5fd4c6 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.21.11..HEAD + perl Porting/acknowledgements.pl v5.22.0..HEAD =head1 Reporting Bugs diff --git a/Porting/release_schedule.pod b/Porting/release_schedule.pod index f984b1c..d392e14 100644 --- a/Porting/release_schedule.pod +++ b/Porting/release_schedule.pod @@ -63,7 +63,7 @@ you should reset the version numbers to the next blead series. 2015-01-20 5.21.8 ✓ Matthew Horsfall 2015-02-20 5.21.9 ✓ Sawyer X 2015-03-20 5.21.10 ✓ Steve Hay - 2015-04-20 5.21.11 ? + 2015-04-20 5.21.11 ✓ Steve Hay (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.) diff --git a/Porting/todo.pod b/Porting/todo.pod index 31c2eee..d581b53 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.21.11. +options would be nice for perl 5.22.0. =head2 Profile Perl - am I hot or not? @@ -1169,7 +1169,7 @@ L =head1 Big projects Tasks that will get your name mentioned in the description of the "Highlights -of 5.21.11" +of 5.22.0" =head2 make ithreads more robust diff --git a/README.bs2000 b/README.bs2000 index a1ea777..92cf0ed 100644 --- a/README.bs2000 +++ b/README.bs2000 @@ -7,6 +7,9 @@ about pod in pod/perlpod.pod or the short summary in the INSTALL file. perlbs2000 - building and installing Perl for BS2000. +B.> + =head1 SYNOPSIS This document will help you Configure, build, test and install Perl diff --git a/README.haiku b/README.haiku index 010737b..d504889 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.21.11/BePC-haiku/CORE/libperl.so . + cd /boot/common/lib; ln -s perl5/5.22.0/BePC-haiku/CORE/libperl.so . -Replace C<5.21.11> with your respective version of Perl. +Replace C<5.22.0> with your respective version of Perl. =head1 KNOWN PROBLEMS diff --git a/README.macosx b/README.macosx index a1d3ebc..51de236 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.21.11.tar.gz - tar -xzf perl-5.21.11.tar.gz - cd perl-5.21.11 + curl -O http://www.cpan.org/src/perl-5.22.0.tar.gz + tar -xzf perl-5.22.0.tar.gz + cd perl-5.22.0 ./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.21.11 as of this writing) builds without changes +The latest Perl release (5.22.0 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 a8ea1ac..bfe329f 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.21.11/ + unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.22.0/ 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.os390 b/README.os390 index 61fd667..899e50e 100644 --- a/README.os390 +++ b/README.os390 @@ -12,6 +12,9 @@ perlos390 - building and installing Perl for OS/390 and z/OS This document will help you Configure, build, test and install Perl on OS/390 (aka z/OS) Unix System Services. +B.> + =head1 DESCRIPTION This is a fully ported Perl for OS/390 Version 2 Release 3, 5, 6, 7, diff --git a/README.os400 b/README.os400 index e720f2d..eef324a 100644 --- a/README.os400 +++ b/README.os400 @@ -6,6 +6,9 @@ designed to be readable as is. perlos400 - Perl version 5 on OS/400 +B.> + =head1 DESCRIPTION This document describes various features of IBM's OS/400 operating diff --git a/README.vms b/README.vms index 97481b4..70ca101 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^.21^.11.tar + vmstar -xvf perl-5^.22^.0.tar Then set default to the top-level source directory like so: - set default [.perl-5^.21^.11] + set default [.perl-5^.22^.0] and proceed with configuration as described in the next section. diff --git a/README.win32 b/README.win32 index 403c517..605f980 100644 --- a/README.win32 +++ b/README.win32 @@ -396,7 +396,7 @@ Be sure to read the instructions near the top of the makefiles carefully. Type "dmake" (or "nmake" if you are using that make). This should build everything. Specifically, it will create perl.exe, -perl521.dll at the perl toplevel, and various other extension dll's +perl522.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. diff --git a/autodoc.pl b/autodoc.pl index 9395d91..b27fc4d 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -404,8 +404,8 @@ whose ordinal numbers are in the range 0 - 127). And documentation and comments may still use the term ASCII, when sometimes in fact the entire range from 0 - 255 is meant. -Note that Perl can be compiled and run under EBCDIC (See L) -or ASCII. Most of the documentation (and even comments in the code) +Note that Perl can be compiled and run under either ASCII or EBCDIC (See +L). Most of the documentation (and even comments in the code) ignore the EBCDIC possibility. For almost all purposes the differences are transparent. As an example, under EBCDIC, diff --git a/configure.com b/configure.com index f926229..78ce59f 100644 --- a/configure.com +++ b/configure.com @@ -731,7 +731,7 @@ $ WRITE CONFIG - $ CLOSE CONFIG $ ENDIF $! -$ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n +$ IF F$TYPE(usedevel) .EQS. "" THEN usedevel = "undef" $ patchlevel_h = F$SEARCH("[-]patchlevel.h") $ IF (patchlevel_h.NES."") $ THEN diff --git a/cop.h b/cop.h index ce0cd54..8a96331 100644 --- a/cop.h +++ b/cop.h @@ -7,7 +7,7 @@ * License or the Artistic License, as specified in the README file. * * Control ops (cops) are one of the two ops OP_NEXTSTATE and OP_DBSTATE, - * that (loosely speaking) are separate statements. + * that (loosely speaking) are statement separators. * They hold information important for lexical state and error reporting. * At run time, PL_curcop is set to point to the most recently executed cop, * and thus can be used to determine our current state. @@ -617,6 +617,7 @@ struct block_format { cx->blk_format.gv = gv; \ cx->blk_format.retop = (retop); \ cx->blk_format.dfoutgv = PL_defoutgv; \ + cx->blk_u16 = 0; \ if (!CvDEPTH(cv)) SvREFCNT_inc_simple_void_NN(cv); \ CvDEPTH(cv)++; \ SvREFCNT_inc_void(cx->blk_format.dfoutgv) @@ -639,6 +640,8 @@ struct block_format { #define POPSUB(cx,sv) \ STMT_START { \ const I32 olddepth = cx->blk_sub.olddepth; \ + if (!(cx->blk_u16 & CxPOPSUB_DONE)) { \ + cx->blk_u16 |= CxPOPSUB_DONE; \ RETURN_PROBE(CvNAMED(cx->blk_sub.cv) \ ? HEK_KEY(CvNAME_HEK(cx->blk_sub.cv)) \ : GvENAME(CvGV(cx->blk_sub.cv)), \ @@ -661,6 +664,7 @@ struct block_format { CLEAR_ARGARRAY(cx->blk_sub.argarray); \ } \ } \ + } \ sv = MUTABLE_SV(cx->blk_sub.cv); \ LEAVE_SCOPE(PL_scopestack[cx->blk_oldscopesp-1]); \ if (sv && (CvDEPTH((const CV*)sv) = olddepth)) \ @@ -674,13 +678,16 @@ struct block_format { #define POPFORMAT(cx) \ STMT_START { \ + if (!(cx->blk_u16 & CxPOPSUB_DONE)) { \ CV * const cv = cx->blk_format.cv; \ GV * const dfuot = cx->blk_format.dfoutgv; \ + cx->blk_u16 |= CxPOPSUB_DONE; \ setdefout(dfuot); \ LEAVE_SCOPE(PL_scopestack[cx->blk_oldscopesp-1]); \ if (!--CvDEPTH(cv)) \ SvREFCNT_dec_NN(cx->blk_format.cv); \ SvREFCNT_dec_NN(dfuot); \ + } \ } STMT_END /* eval context */ @@ -770,7 +777,10 @@ struct block_loop { #define CxLABEL_len(c,len) (0 + CopLABEL_len((c)->blk_oldcop, len)) #define CxLABEL_len_flags(c,len,flags) (0 + CopLABEL_len_flags((c)->blk_oldcop, len, flags)) #define CxHASARGS(c) (((c)->cx_type & CXp_HASARGS) == CXp_HASARGS) -#define CxLVAL(c) (0 + (c)->blk_u16) +#define CxLVAL(c) (0 + ((c)->blk_u16 & 0xff)) +/* POPSUB has already been performed on this context frame */ +#define CxPOPSUB_DONE 0x100 + #define PUSHLOOP_PLAIN(cx, s) \ cx->blk_loop.resetsp = s - PL_stack_base; \ diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm index 41f5478..203b3aa 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm @@ -10,7 +10,7 @@ our @ISA = qw(Exporter); our @EXPORT = qw(test_harness pod2man perllocal_install uninstall warn_if_old_packlist test_s cp_nonempty); -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; my $Is_VMS = $^O eq 'VMS'; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm index 85ebbf5..3df1793 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm @@ -2,7 +2,7 @@ package ExtUtils::Liblist; use strict; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; use File::Spec; require ExtUtils::Liblist::Kid; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm index 41f07c2..37bcfd4 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm @@ -11,7 +11,7 @@ use 5.006; use strict; use warnings; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; use ExtUtils::MakeMaker::Config; use Cwd 'cwd'; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm index 0e0770c..f2aa8b4 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm @@ -3,7 +3,7 @@ package ExtUtils::MM; use strict; use ExtUtils::MakeMaker::Config; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require ExtUtils::Liblist; require ExtUtils::MakeMaker; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm index 211c5af..58ea5b9 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_AIX; use strict; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm index af4c9ca..4c00129 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_Any; use strict; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; use Carp; use File::Spec; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm index f5c4e18..35b76c0 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm @@ -26,7 +26,7 @@ require ExtUtils::MM_Any; require ExtUtils::MM_Unix; our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; =item os_flavor diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm index de98b1b..b504c47 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm @@ -9,7 +9,7 @@ require ExtUtils::MM_Unix; require ExtUtils::MM_Win32; our @ISA = qw( ExtUtils::MM_Unix ); -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; =head1 NAME diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm index b227e2d..353c54f 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_DOS; use strict; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm index 247a836..315d1b4 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm @@ -7,7 +7,7 @@ BEGIN { our @ISA = qw( ExtUtils::MM_Unix ); } -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; =head1 NAME diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm index 973e2e3..bef2c00 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_MacOS; use strict; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; sub new { die 'MacOS Classic (MacPerl) is no longer supported by MakeMaker'; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm index 7d283d9..4e36796 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm @@ -22,7 +22,7 @@ use strict; use ExtUtils::MakeMaker::Config; use File::Basename; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require ExtUtils::MM_Win32; our @ISA = qw(ExtUtils::MM_Win32); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm index cd40832..c9ace00 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm @@ -5,7 +5,7 @@ use strict; use ExtUtils::MakeMaker qw(neatvalue); use File::Spec; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm index 374180e..13e12c4 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_QNX; use strict; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm index 569bdee..4af2909 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_UWIN; use strict; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm index 4ec32a3..f63145c 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm @@ -15,7 +15,7 @@ use ExtUtils::MakeMaker qw($Verbose neatvalue); # If we make $VERSION an our variable parse_version() breaks use vars qw($VERSION); -$VERSION = '7.04'; +$VERSION = '7.04_01'; $VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] require ExtUtils::MM_Any; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm index ed27ced..45d06b0 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm @@ -15,7 +15,7 @@ BEGIN { use File::Basename; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm index 634a966..dfec6d5 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_VOS; use strict; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm index 8e7da6a..fbd3f49 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm @@ -27,7 +27,7 @@ use ExtUtils::MakeMaker qw( neatvalue ); require ExtUtils::MM_Any; require ExtUtils::MM_Unix; our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; $ENV{EMXSHELL} = 'sh'; # to run `commands` diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm index 20f1590..cc37c24 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_Win95; use strict; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require ExtUtils::MM_Win32; our @ISA = qw(ExtUtils::MM_Win32); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm index 54c1129..f2114f9 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm @@ -3,7 +3,7 @@ package ExtUtils::MY; use strict; require ExtUtils::MM; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; our @ISA = qw(ExtUtils::MM); { diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm index df5acdf..fe95b27 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm @@ -24,7 +24,7 @@ my %Recognized_Att_Keys; our %macro_fsentity; # whether a macro is a filesystem name our %macro_dep; # whether a macro is a dependency -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; $VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] # Emulate something resembling CVS $Revision$ diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm index 13d75ea..9001cc6 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm @@ -2,7 +2,7 @@ package ExtUtils::MakeMaker::Config; use strict; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; use Config (); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod index 11b8883..d2b4ab3 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker::FAQ; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; 1; __END__ diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm index f6edcf2..23d0c6e 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm @@ -1,7 +1,7 @@ package ExtUtils::MakeMaker::Locale; use strict; -our $VERSION = "7.04"; +our $VERSION = "7.04_01"; use base 'Exporter'; our @EXPORT_OK = qw( @@ -25,31 +25,60 @@ sub _init { unless ($ENCODING_LOCALE) { # Try to obtain what the Windows ANSI code page is eval { - unless (defined &GetACP) { + unless (defined &GetConsoleCP) { + require Win32; + # no point falling back to Win32::GetConsoleCP from this + # as added same time, 0.45 + eval { Win32::GetConsoleCP() }; + # manually "import" it since Win32->import refuses + *GetConsoleCP = sub { &Win32::GetConsoleCP } unless $@; + } + unless (defined &GetConsoleCP) { require Win32::API; - Win32::API->Import('kernel32', 'int GetACP()'); - }; - if (defined &GetACP) { - my $cp = GetACP(); + Win32::API->Import('kernel32', 'int GetConsoleCP()'); + } + if (defined &GetConsoleCP) { + my $cp = GetConsoleCP(); $ENCODING_LOCALE = "cp$cp" if $cp; } }; } unless ($ENCODING_CONSOLE_IN) { - # If we have the Win32::Console module installed we can ask - # it for the code set to use - eval { - require Win32::Console; - my $cp = Win32::Console::InputCP(); - $ENCODING_CONSOLE_IN = "cp$cp" if $cp; - $cp = Win32::Console::OutputCP(); - $ENCODING_CONSOLE_OUT = "cp$cp" if $cp; - }; - # Invoking the 'chcp' program might also work - if (!$ENCODING_CONSOLE_IN && (qx(chcp) || '') =~ /^Active code page: (\d+)/) { - $ENCODING_CONSOLE_IN = "cp$1"; + # only test one since set together + unless (defined &GetInputCP) { + eval { + require Win32; + eval { Win32::GetConsoleCP() }; + # manually "import" it since Win32->import refuses + *GetInputCP = sub { &Win32::GetConsoleCP } unless $@; + *GetOutputCP = sub { &Win32::GetConsoleOutputCP } unless $@; + }; + unless (defined &GetInputCP) { + eval { + # try Win32::Console module for codepage to use + require Win32::Console; + eval { Win32::Console::InputCP() }; + *GetInputCP = sub { &Win32::Console::InputCP } + unless $@; + *GetOutputCP = sub { &Win32::Console::OutputCP } + unless $@; + }; + } + unless (defined &GetInputCP) { + # final fallback + *GetInputCP = *GetOutputCP = sub { + # another fallback that could work is: + # reg query HKLM\System\CurrentControlSet\Control\Nls\CodePage /v ACP + ((qx(chcp) || '') =~ /^Active code page: (\d+)/) + ? $1 : (); + }; + } } + my $cp = GetInputCP(); + $ENCODING_CONSOLE_IN = "cp$cp" if $cp; + $cp = GetOutputCP(); + $ENCODING_CONSOLE_OUT = "cp$cp" if $cp; } } @@ -206,8 +235,7 @@ C will do that if available and make these encodings known under the C aliases "console_in" and "console_out". For systems where we can't determine the terminal encoding these will be aliased as the same encoding as "locale". The advice is to use "console_in" for input known to -come from the terminal and "console_out" for output known to go from the -terminal. +come from the terminal and "console_out" for output to the terminal. In addition to arranging for various Encode aliases the following functions and variables are provided: @@ -266,7 +294,7 @@ L know this encoding as "locale". =item $ENCODING_LOCALE_FS -The encoding name determined to be suiteable for file system interfaces +The encoding name determined to be suitable for file system interfaces involving file names. L know this encoding as "locale_fs". @@ -336,7 +364,7 @@ Users are advised to always specify UTF-8 as the locale charset. =head1 SEE ALSO -L, L +L, L, L =head1 AUTHOR diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod index dd636bd..9cbdd9b 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker::Tutorial; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; =head1 NAME diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm index 8b18042..3269f44 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm @@ -15,7 +15,7 @@ use strict; use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv); -$VERSION = '7.04'; +$VERSION = '7.04_01'; $CLASS = 'version'; { diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm index e125d38..a134a00 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm @@ -10,7 +10,7 @@ use strict; use vars qw($VERSION $CLASS $STRICT $LAX); -$VERSION = '7.04'; +$VERSION = '7.04_01'; #--------------------------------------------------------------------------# # Version regexp components diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/vpp.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/vpp.pm index 68376ba..34bbd01 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/vpp.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/vpp.pm @@ -128,7 +128,7 @@ use strict; use Config; use vars qw($VERSION $CLASS @ISA $LAX $STRICT); -$VERSION = '7.04'; +$VERSION = '7.04_01'; $CLASS = 'ExtUtils::MakeMaker::version::vpp'; require ExtUtils::MakeMaker::version::regex; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm index 4177723..97d4300 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm @@ -3,7 +3,7 @@ package ExtUtils::Mkbootstrap; # There's just too much Dynaloader incest here to turn on strict vars. use strict 'refs'; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; require Exporter; our @ISA = ('Exporter'); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm index 2eb8bf4..3a9fc71 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm @@ -10,7 +10,7 @@ use Config; our @ISA = qw(Exporter); our @EXPORT = qw(&Mksymlists); -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; sub Mksymlists { my(%spec) = @_; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm index f48dfa4..2a5323e 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm @@ -3,7 +3,7 @@ package ExtUtils::testlib; use strict; use warnings; -our $VERSION = '7.04'; +our $VERSION = '7.04_01'; use Cwd; use File::Spec; diff --git a/cpan/ExtUtils-MakeMaker/t/basic.t b/cpan/ExtUtils-MakeMaker/t/basic.t index a0a6f91..f58211a 100644 --- a/cpan/ExtUtils-MakeMaker/t/basic.t +++ b/cpan/ExtUtils-MakeMaker/t/basic.t @@ -33,11 +33,27 @@ use File::Temp qw[tempdir]; my $perl = which_perl(); my $Is_VMS = $^O eq 'VMS'; my $OLD_CP; # crude but... +my $w32worked; # or whether we had to fallback to chcp if ($^O eq "MSWin32") { - $OLD_CP = $1 if qx(chcp) =~ /(\d+)$/ and $? == 0; - qx(chcp 1252) if defined $OLD_CP; + eval { require Win32; $w32worked = $OLD_CP = Win32::GetConsoleCP() }; + $OLD_CP = $1 if !$w32worked and qx(chcp) =~ /(\d+)$/ and $? == 0; + if (defined $OLD_CP) { + if ($w32worked) { + Win32::SetConsoleCP(1252) + } else { + qx(chcp 1252); + } + } +} +END { + if ($^O eq "MSWin32" and defined $OLD_CP) { + if ($w32worked) { + Win32::SetConsoleCP($OLD_CP) + } else { + qx(chcp $OLD_CP); + } + } } -END { qx(chcp $OLD_CP) if $^O eq "MSWin32" and defined $OLD_CP } my $tmpdir = tempdir( DIR => 't', CLEANUP => 1 ); chdir $tmpdir; diff --git a/cpan/PerlIO-via-QuotedPrint/lib/PerlIO/via/QuotedPrint.pm b/cpan/PerlIO-via-QuotedPrint/lib/PerlIO/via/QuotedPrint.pm index 11ba2e7..8135e17 100644 --- a/cpan/PerlIO-via-QuotedPrint/lib/PerlIO/via/QuotedPrint.pm +++ b/cpan/PerlIO-via-QuotedPrint/lib/PerlIO/via/QuotedPrint.pm @@ -1,6 +1,6 @@ package PerlIO::via::QuotedPrint; -$VERSION= '0.07'; +$VERSION= '0.08'; # be as strict as possible use strict; @@ -71,7 +71,7 @@ PerlIO::via::QuotedPrint - PerlIO layer for quoted-printable strings =head1 VERSION -This documentation describes version 0.07. +This documentation describes version 0.08. =head1 DESCRIPTION diff --git a/dist/Module-CoreList/Changes b/dist/Module-CoreList/Changes index 2489aa7..1d3b06b 100644 --- a/dist/Module-CoreList/Changes +++ b/dist/Module-CoreList/Changes @@ -1,3 +1,6 @@ +5.20150520 + - Updated for v5.21.12 + 5.20150420 - Updated for v5.21.11 diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm index 87029ed..eeec0dc 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.20150420'; +$VERSION = '5.20150520'; sub _released_order { # Sort helper, to make '?' sort after everything else (substr($released{$a}, 0, 1) eq "?") @@ -275,6 +275,7 @@ sub changes_between { 5.021009 => '2015-02-21', 5.021010 => '2015-03-20', 5.021011 => '2015-04-20', + 5.022000 => '2015-06-01', ); for my $version ( sort { $a <=> $b } keys %released ) { @@ -406,14 +407,14 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'Config' => undef, 'DB_File' => '1.03', 'ExtUtils::Embed' => '1.18', - 'ExtUtils::Install' => '1.15 ', - 'ExtUtils::Liblist' => '1.20 ', - 'ExtUtils::MM_Unix' => '1.107 ', + 'ExtUtils::Install' => '1.15', + 'ExtUtils::Liblist' => '1.20', + 'ExtUtils::MM_Unix' => '1.107', 'ExtUtils::MakeMaker' => '5.38', 'ExtUtils::Manifest' => '1.27', - 'ExtUtils::Mkbootstrap' => '1.13 ', - 'ExtUtils::Mksymlists' => '1.12 ', - 'ExtUtils::testlib' => '1.11 ', + 'ExtUtils::Mkbootstrap' => '1.13', + 'ExtUtils::Mksymlists' => '1.12', + 'ExtUtils::testlib' => '1.11', 'Fatal' => undef, 'File::Basename' => '2.4', 'FindBin' => '1.04', @@ -455,7 +456,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'CGI::Push' => '1.00', 'CGI::Switch' => '0.05', 'CPAN' => '1.2401', - 'CPAN::FirstTime' => '1.18 ', + 'CPAN::FirstTime' => '1.18', 'CPAN::Nox' => undef, 'Class::Struct' => undef, 'Cwd' => '2.00', @@ -463,13 +464,13 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'DynaLoader' => '1.02', 'ExtUtils::Command' => '1.00', 'ExtUtils::Embed' => '1.2501', - 'ExtUtils::Install' => '1.16 ', - 'ExtUtils::Liblist' => '1.2201 ', - 'ExtUtils::MM_Unix' => '1.114 ', + 'ExtUtils::Install' => '1.16', + 'ExtUtils::Liblist' => '1.2201', + 'ExtUtils::MM_Unix' => '1.114', 'ExtUtils::MM_Win32' => undef, 'ExtUtils::MakeMaker' => '5.4002', - 'ExtUtils::Manifest' => '1.33 ', - 'ExtUtils::Mksymlists' => '1.13 ', + 'ExtUtils::Manifest' => '1.33', + 'ExtUtils::Mksymlists' => '1.13', 'ExtUtils::XSSymSet' => '1.0', 'Fcntl' => '1.03', 'File::Basename' => '2.5', @@ -536,18 +537,18 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'CGI::Push' => '1.01', 'CGI::Switch' => '0.06', 'CPAN' => '1.40', - 'CPAN::FirstTime' => '1.30 ', + 'CPAN::FirstTime' => '1.30', 'Cwd' => '2.01', 'DB_File' => '1.15', 'DynaLoader' => '1.03', 'ExtUtils::Command' => '1.01', 'ExtUtils::Embed' => '1.2505', - 'ExtUtils::Install' => '1.28 ', - 'ExtUtils::Liblist' => '1.25 ', - 'ExtUtils::MM_Unix' => '1.118 ', + 'ExtUtils::Install' => '1.28', + 'ExtUtils::Liblist' => '1.25', + 'ExtUtils::MM_Unix' => '1.118', 'ExtUtils::MakeMaker' => '5.42', - 'ExtUtils::Mkbootstrap' => '1.14 ', - 'ExtUtils::Mksymlists' => '1.16 ', + 'ExtUtils::Mkbootstrap' => '1.14', + 'ExtUtils::Mksymlists' => '1.16', 'File::Basename' => '2.6', 'File::DosGlob' => undef, 'File::Path' => '1.0402', @@ -604,15 +605,15 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'B::Xref' => undef, 'CGI::Carp' => '1.101', 'CPAN' => '1.3901', - 'CPAN::FirstTime' => '1.29 ', + 'CPAN::FirstTime' => '1.29', 'DB_File' => '1.60', 'Data::Dumper' => '2.09', 'Errno' => '1.09', 'ExtUtils::Installed' => '0.02', - 'ExtUtils::MM_Unix' => '1.12601 ', + 'ExtUtils::MM_Unix' => '1.12601', 'ExtUtils::MakeMaker' => '5.4301', - 'ExtUtils::Mkbootstrap' => '1.13 ', - 'ExtUtils::Mksymlists' => '1.17 ', + 'ExtUtils::Mkbootstrap' => '1.13', + 'ExtUtils::Mksymlists' => '1.17', 'ExtUtils::Packlist' => '0.03', 'Fatal' => '1.02', 'File::Path' => '1.0401', @@ -680,16 +681,16 @@ for my $version ( sort { $a <=> $b } keys %released ) { 5.00504 => { delta_from => 5.00503, changed => { - 'CPAN::FirstTime' => '1.36 ', + 'CPAN::FirstTime' => '1.36', 'DB_File' => '1.807', - 'ExtUtils::Install' => '1.28 ', - 'ExtUtils::Liblist' => '1.25 ', - 'ExtUtils::MM_Unix' => '1.12602 ', - 'ExtUtils::Manifest' => '1.33 ', + 'ExtUtils::Install' => '1.28', + 'ExtUtils::Liblist' => '1.25', + 'ExtUtils::MM_Unix' => '1.12602', + 'ExtUtils::Manifest' => '1.33', 'ExtUtils::Miniperl' => undef, - 'ExtUtils::Mkbootstrap' => '1.14 ', - 'ExtUtils::Mksymlists' => '1.17 ', - 'ExtUtils::testlib' => '1.11 ', + 'ExtUtils::Mkbootstrap' => '1.14', + 'ExtUtils::Mksymlists' => '1.17', + 'ExtUtils::testlib' => '1.11', 'File::Compare' => '1.1002', 'File::Spec' => '0.8', 'File::Spec::Functions' => undef, @@ -717,7 +718,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'CGI::Pretty' => '1.03', 'CGI::Switch' => undef, 'CPAN' => '1.52', - 'CPAN::FirstTime' => '1.38 ', + 'CPAN::FirstTime' => '1.38', 'Carp::Heavy' => undef, 'Class::Struct' => '0.58', 'Cwd' => '2.02', @@ -729,7 +730,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'Exporter' => '5.562', 'Exporter::Heavy' => undef, 'ExtUtils::MM_Cygwin' => undef, - 'ExtUtils::MM_Unix' => '1.12603 ', + 'ExtUtils::MM_Unix' => '1.12603', 'ExtUtils::MakeMaker' => '5.45', 'File::Copy' => '2.03', 'File::Glob' => '0.991', @@ -878,7 +879,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 5.006002 => { delta_from => 5.006001, changed => { - 'CPAN::FirstTime' => '1.53 ', + 'CPAN::FirstTime' => '1.53', 'DB_File' => '1.806', 'Data::Dumper' => '2.121', 'ExtUtils::Command' => '1.05', @@ -969,7 +970,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'CGI::Switch' => '1.00', 'CGI::Util' => '1.3', 'CPAN' => '1.59_56', - 'CPAN::FirstTime' => '1.54 ', + 'CPAN::FirstTime' => '1.54', 'CPAN::Nox' => '1.00_01', 'Carp' => '1.01', 'Carp::Heavy' => '1.01', @@ -1239,7 +1240,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'CGI' => '2.81', 'CGI::Carp' => '1.23', 'CPAN' => '1.61', - 'CPAN::FirstTime' => '1.56 ', + 'CPAN::FirstTime' => '1.56', 'CPAN::Nox' => '1.02', 'Digest::MD5' => '2.20', 'Dumpvalue' => '1.11', @@ -1390,7 +1391,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'CGI::Pretty' => '1.07_00', 'CGI::Util' => '1.31', 'CPAN' => '1.76_01', - 'CPAN::FirstTime' => '1.60 ', + 'CPAN::FirstTime' => '1.60', 'CPAN::Nox' => '1.03', 'Class::Struct' => '0.63', 'Cwd' => '2.08', @@ -11396,6 +11397,52 @@ for my $version ( sort { $a <=> $b } keys %released ) { removed => { } }, + 5.022000 => { + delta_from => 5.021011, + changed => { + 'B::Op_private' => '5.022000', + 'Config' => '5.022', + 'ExtUtils::Command::MM' => '7.04_01', + 'ExtUtils::Liblist' => '7.04_01', + 'ExtUtils::Liblist::Kid'=> '7.04_01', + 'ExtUtils::MM' => '7.04_01', + 'ExtUtils::MM_AIX' => '7.04_01', + 'ExtUtils::MM_Any' => '7.04_01', + 'ExtUtils::MM_BeOS' => '7.04_01', + 'ExtUtils::MM_Cygwin' => '7.04_01', + 'ExtUtils::MM_DOS' => '7.04_01', + 'ExtUtils::MM_Darwin' => '7.04_01', + 'ExtUtils::MM_MacOS' => '7.04_01', + 'ExtUtils::MM_NW5' => '7.04_01', + 'ExtUtils::MM_OS2' => '7.04_01', + 'ExtUtils::MM_QNX' => '7.04_01', + 'ExtUtils::MM_UWIN' => '7.04_01', + 'ExtUtils::MM_Unix' => '7.04_01', + 'ExtUtils::MM_VMS' => '7.04_01', + 'ExtUtils::MM_VOS' => '7.04_01', + 'ExtUtils::MM_Win32' => '7.04_01', + 'ExtUtils::MM_Win95' => '7.04_01', + 'ExtUtils::MY' => '7.04_01', + 'ExtUtils::MakeMaker' => '7.04_01', + 'ExtUtils::MakeMaker::Config'=> '7.04_01', + 'ExtUtils::MakeMaker::Locale'=> '7.04_01', + 'ExtUtils::MakeMaker::version'=> '7.04_01', + 'ExtUtils::MakeMaker::version::regex'=> '7.04_01', + 'ExtUtils::MakeMaker::version::vpp'=> '7.04_01', + 'ExtUtils::Mkbootstrap' => '7.04_01', + 'ExtUtils::Mksymlists' => '7.04_01', + 'ExtUtils::testlib' => '7.04_01', + 'Module::CoreList' => '5.20150520', + 'Module::CoreList::TieHashDelta'=> '5.20150520', + 'Module::CoreList::Utils'=> '5.20150520', + 'POSIX' => '1.53', + 'PerlIO::via::QuotedPrint'=> '0.08', + 'overload' => '1.26', + 'utf8' => '1.17', + }, + removed => { + } + }, ); sub is_core @@ -11600,9 +11647,8 @@ for my $version (sort { $a <=> $b } keys %delta) { }, 5.01701 => { delta_from => 5.017009 }, 5.017011 => { delta_from => 5.01701 }, - 5.017012 => { delta_from => 5.017011 }, - 5.018 => { delta_from => 5.017012 }, + 5.018 => { delta_from => 5.017011 }, 5.018001 => { delta_from => 5.018, changed => { @@ -11818,10 +11864,45 @@ for my $version (sort { $a <=> $b } keys %delta) { changed => { }, removed => { + 'CGI' => 1, + 'CGI::Apache' => 1, + 'CGI::Carp' => 1, + 'CGI::Cookie' => 1, + 'CGI::Fast' => 1, + 'CGI::Pretty' => 1, + 'CGI::Push' => 1, + 'CGI::Switch' => 1, + 'CGI::Util' => 1, + 'Module::Build' => 1, + 'Module::Build::Base' => 1, + 'Module::Build::Compat' => 1, + 'Module::Build::Config' => 1, + 'Module::Build::ConfigData'=> 1, + 'Module::Build::Cookbook'=> 1, + 'Module::Build::Dumper' => 1, + 'Module::Build::ModuleInfo'=> 1, + 'Module::Build::Notes' => 1, + 'Module::Build::PPMMaker'=> 1, + 'Module::Build::Platform::Default'=> 1, + 'Module::Build::Platform::MacOS'=> 1, + 'Module::Build::Platform::Unix'=> 1, + 'Module::Build::Platform::VMS'=> 1, + 'Module::Build::Platform::VOS'=> 1, + 'Module::Build::Platform::Windows'=> 1, + 'Module::Build::Platform::aix'=> 1, + 'Module::Build::Platform::cygwin'=> 1, + 'Module::Build::Platform::darwin'=> 1, + 'Module::Build::Platform::os2'=> 1, + 'Module::Build::PodParser'=> 1, + 'Module::Build::Version'=> 1, + 'Module::Build::YAML' => 1, + 'Package::Constants' => 1, + 'Simple' => 1, + 'inc::latest' => 1, } }, 5.021001 => { - delta_from => 5.017007, + delta_from => 5.021000, changed => { }, removed => { @@ -11911,6 +11992,13 @@ for my $version (sort { $a <=> $b } keys %delta) { removed => { } }, + 5.022000 => { + delta_from => 5.021011, + changed => { + }, + removed => { + } + }, ); for my $version (sort { $a <=> $b } keys %deprecated) { diff --git a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm b/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm index 42fb05c..129be7c 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.20150420'; +$VERSION = '5.20150520'; 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 3656660..e8f6e6f 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.20150420'; +$VERSION = '5.20150520'; sub utilities { my $perl = shift; @@ -1045,6 +1045,13 @@ my %delta = ( removed => { } }, + 5.022000 => { + delta_from => 5.021011, + changed => { + }, + removed => { + } + }, ); for my $version (sort { $a <=> $b } keys %delta) { diff --git a/embed.fnc b/embed.fnc index fc9f3f3..5302779 100644 --- a/embed.fnc +++ b/embed.fnc @@ -317,7 +317,7 @@ pRn |SV* |cv_const_sv_or_av|NULLOK const CV *const cv Apd |SV * |cv_name |NN CV *cv|NULLOK SV *sv|U32 flags Apd |void |cv_undef |NN CV* cv p |void |cv_undef_flags |NN CV* cv|U32 flags -p |void |cv_forget_slab |NN CV *cv +p |void |cv_forget_slab |NULLOK CV *cv Ap |void |cx_dump |NN PERL_CONTEXT* cx Ap |SV* |filter_add |NULLOK filter_t funcp|NULLOK SV* datasv Ap |void |filter_del |NN filter_t funcp diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm index 2a78f19..96156bf 100644 --- a/ext/POSIX/lib/POSIX.pm +++ b/ext/POSIX/lib/POSIX.pm @@ -4,7 +4,7 @@ use warnings; our ($AUTOLOAD, %SIGRT); -our $VERSION = '1.52'; +our $VERSION = '1.53'; require XSLoader; @@ -234,7 +234,7 @@ sub sprintf { } sub load_imports { -our %EXPORT_TAGS = ( +my %default_export_tags = ( assert_h => [qw(assert NDEBUG)], @@ -268,9 +268,6 @@ our %EXPORT_TAGS = ( S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG S_ISUID S_IWGRP S_IWOTH S_IWUSR)], - fenv_h => [qw(FE_DOWNWARD FE_TONEAREST FE_TOWARDZERO FE_UPWARD - fegetround fesetround)], - float_h => [qw(DBL_DIG DBL_EPSILON DBL_MANT_DIG DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP @@ -299,19 +296,13 @@ our %EXPORT_TAGS = ( LC_MONETARY LC_NUMERIC LC_TIME NULL localeconv setlocale)], - math_h => [qw(FP_ILOGB0 FP_ILOGBNAN FP_INFINITE FP_NAN FP_NORMAL - FP_SUBNORMAL FP_ZERO HUGE_VAL INFINITY Inf M_1_PI - M_2_PI M_2_SQRTPI M_E M_LN10 M_LN2 M_LOG10E M_LOG2E M_PI - M_PI_2 M_PI_4 M_SQRT1_2 M_SQRT2 NAN NaN acos acosh - asin asinh atan atanh cbrt ceil copysign cosh erf - erfc exp2 expm1 fabs fdim floor fma fmax fmin fmod - fpclassify frexp hypot ilogb isfinite isgreater - isgreaterequal isinf isless islessequal - islessgreater isnan isnormal isunordered j0 j1 jn - ldexp lgamma log10 log1p log2 logb lrint modf nan - nearbyint nextafter nexttoward pow remainder remquo - rint round scalbn signbit sinh tan tanh tgamma trunc - y0 y1 yn)], + math_h => [qw(FP_ILOGB0 FP_ILOGBNAN FP_INFINITE FP_NAN FP_NORMAL + FP_SUBNORMAL FP_ZERO + M_1_PI M_2_PI M_2_SQRTPI M_E M_LN10 M_LN2 M_LOG10E M_LOG2E + M_PI M_PI_2 M_PI_4 M_SQRT1_2 M_SQRT2 + HUGE_VAL INFINITY NAN + acos asin atan ceil cosh fabs floor fmod + frexp ldexp log10 modf pow sinh tan tanh)], pwd_h => [], @@ -343,7 +334,7 @@ our %EXPORT_TAGS = ( stdlib_h => [qw(EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX NULL RAND_MAX abort atexit atof atoi atol bsearch calloc div free getenv labs ldiv malloc mblen mbstowcs mbtowc - qsort realloc strtod strtol strtold strtoul wcstombs wctomb)], + qsort realloc strtod strtol strtoul wcstombs wctomb)], string_h => [qw(NULL memchr memcmp memcpy memmove memset strcat strchr strcmp strcoll strcpy strcspn strerror strlen @@ -398,18 +389,36 @@ our %EXPORT_TAGS = ( utime_h => [], ); -# Exporter::export_tags(); +my %other_export_tags = ( + fenv_h => [qw( + FE_DOWNWARD FE_TONEAREST FE_TOWARDZERO FE_UPWARD fegetround fesetround + )], + + math_h_c99 => [ @{$default_export_tags{math_h}}, qw( + Inf NaN acosh asinh atanh cbrt copysign erf erfc exp2 expm1 fdim fma + fmax fmin fpclassify hypot ilogb isfinite isgreater isgreaterequal + isinf isless islessequal islessgreater isnan isnormal isunordered j0 j1 + jn lgamma log1p log2 logb lrint nan nearbyint nextafter nexttoward + remainder remquo rint round scalbn signbit tgamma trunc y0 y1 yn + )], + + stdlib_h_c99 => [ @{$default_export_tags{stdlib_h}}, 'strtold' ], +); + { # De-duplicate the export list: - my %export; - @export{map {@$_} values %EXPORT_TAGS} = (); + my ( %export, %export_ok ); + @export {map {@$_} values %default_export_tags} = (); + @export_ok{map {@$_} values %other_export_tags} = (); # Doing the de-dup with a temporary hash has the advantage that the SVs in # @EXPORT are actually shared hash key scalars, which will save some memory. our @EXPORT = keys %export; our @EXPORT_OK = (qw(close lchown nice open pipe read sleep times write printf sprintf), - grep {!exists $export{$_}} keys %reimpl, keys %replacement); + grep {!exists $export{$_}} keys %reimpl, keys %replacement, keys %export_ok); + + our %EXPORT_TAGS = ( %default_export_tags, %other_export_tags ); } require Exporter; diff --git a/ext/POSIX/lib/POSIX.pod b/ext/POSIX/lib/POSIX.pod index a1179f0..d9e84b4 100644 --- a/ext/POSIX/lib/POSIX.pod +++ b/ext/POSIX/lib/POSIX.pod @@ -21,15 +21,6 @@ The POSIX module permits you to access all (or nearly all) the standard POSIX 1003.1 identifiers. Many of these identifiers have been given Perl-ish interfaces. -I with the exception of any POSIX -functions with the same name as a built-in Perl function, such as -C, C, C, C, etc.., which will be exported -only if you ask for them explicitly. This is an unfortunate backwards -compatibility feature. You can stop the exporting by saying S> and then use the fully qualified names (I, C), -or by giving an explicit import list. If you do neither, and opt for the -default, S> has to import I<553 symbols>. - This document gives a condensed list of the features available in the POSIX module. Consult your operating system's manpages for general information on most features. Consult L for functions which are noted as being @@ -41,34 +32,17 @@ and other miscellaneous objects. The remaining sections list various constants and macros in an organization which roughly follows IEEE Std 1003.1b-1993. -=head1 C99 "math" interfaces - -Mathematic functions and constants from the C99 standard are available -on many platforms. In the below functions list they are marked [C99]. - -The mathematical constants include: - - M_SQRT2 # the square root of two - M_E # the Euler's (or Napier's) constant - M_PI # the Pi - -and other related/similar ones - - M_SQRT1_2 # sqrt(1/2) - M_LN10 M_LN2 M_LOG10E M_LOG2E - M_1_PI M_2_PI M_2_SQRTPI M_PI_2 M_PI_4 # 1/Pi, ..., Pi/4 - -and the - - INFINITY - NAN - -The last two are also available as just C and C. - -The Bessel functions (j0, j1, jn, y0, y1, yn) are also available. - =head1 CAVEATS +I (with a handful of exceptions). +This is an unfortunate backwards compatibility feature and its use is +B>. +You should either prevent the exporting (by saying S>, +as usual) and then use fully qualified names (e.g. C), +or give an explicit import list. +If you do neither and opt for the default (as in S>), you +will import I of symbols into your namespace. + A few functions are not implemented because they are C specific. If you attempt to call these, they will print a message telling you that they aren't implemented, and suggest using the Perl equivalent, should one @@ -948,7 +922,15 @@ corresponding C function returns C for every byte in the string. =item C -(Also C, C, C, C, C) +=item C + +=item C + +=item C + +=item C + +=item C The Bessel function of the first kind of the order zero. @@ -2505,6 +2487,17 @@ C C C C =back +=head1 FLOATING-POINT ENVIRONMENT + +=over 8 + +=item Constants + +C C C C +on systems that support them. + +=back + =head1 LIMITS =over 8 @@ -2537,6 +2530,12 @@ on systems that support them. C +C C C C C C C +C C C C +C C C C C C C C C +C C C C +on systems with C99 support. + =back =head1 SIGNAL diff --git a/ext/POSIX/t/export.t b/ext/POSIX/t/export.t index 7e18da4..91593e0 100644 --- a/ext/POSIX/t/export.t +++ b/ext/POSIX/t/export.t @@ -10,134 +10,136 @@ plan(skip_all => "POSIX is unavailable") require POSIX; POSIX->import(); -require($ENV{PERL_CORE} ? "../../t/charset_tools.pl" : "../t/charset_tools.pl"); - -sub ascii_order { # Sort helper - return native_to_uni($a) cmp native_to_uni($b); -} - # @POSIX::EXPORT and @POSIX::EXPORT_OK are generated. The intent of this test is # to catch *unintended* changes to them introduced by bugs in refactoring. +# N.B. the data must be sorted at runtime even though it appears sorted here +# because it is given in ASCII order and we might be on a non-ASCII platform my %expect = ( - EXPORT => [qw(%SIGRT ARG_MAX B0 B110 B1200 B134 B150 B1800 B19200 B200 - B2400 B300 B38400 B4800 B50 B600 B75 B9600 BRKINT BUFSIZ - CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX CLK_TCK CLOCAL - CLOCKS_PER_SEC CREAD CS5 CS6 CS7 CS8 CSIZE CSTOPB DBL_DIG - DBL_EPSILON DBL_MANT_DIG DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP - DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP E2BIG EACCES EADDRINUSE - EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF EBADMSG EBUSY - ECANCELED ECHILD ECHO ECHOE ECHOK ECHONL ECONNABORTED - ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDOM EDQUOT - EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EIDRM EILSEQ - EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE - EMLINK EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH - ENFILE ENOBUFS ENODATA ENODEV ENOENT ENOEXEC ENOLCK ENOLINK - ENOMEM ENOMSG ENOPROTOOPT ENOSPC ENOSR ENOSTR ENOSYS ENOTBLK - ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP - ENOTTY ENXIO EOF EOPNOTSUPP EOTHER EOVERFLOW EOWNERDEAD EPERM - EPFNOSUPPORT EPIPE EPROCLIM EPROTO EPROTONOSUPPORT EPROTOTYPE - ERANGE EREMOTE ERESTART EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE - ESRCH ESTALE ETIME ETIMEDOUT ETOOMANYREFS ETXTBSY EUSERS - EWOULDBLOCK EXDEV - EXIT_FAILURE EXIT_SUCCESS FD_CLOEXEC - FE_DOWNWARD FE_TONEAREST FE_TOWARDZERO FE_UPWARD - FILENAME_MAX FLT_DIG FLT_EPSILON FLT_MANT_DIG FLT_MAX - FLT_MAX_10_EXP FLT_MAX_EXP FLT_MIN FLT_MIN_10_EXP - FLT_MIN_EXP FLT_RADIX FLT_ROUNDS FP_ILOGB0 - FP_ILOGBNAN FP_INFINITE FP_NAN FP_NORMAL - FP_SUBNORMAL FP_ZERO F_DUPFD F_GETFD F_GETFL F_GETLK - F_OK F_RDLCK F_SETFD F_SETFL F_SETLK F_SETLKW - F_UNLCK F_WRLCK HUGE_VAL HUPCL ICANON ICRNL IEXTEN - IGNBRK IGNCR IGNPAR INFINITY INLCR INPCK INT_MAX - INT_MIN ISIG ISTRIP IXOFF IXON Inf LC_ALL LC_COLLATE - LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME - LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG LDBL_MAX - LDBL_MAX_10_EXP LDBL_MAX_EXP LDBL_MIN - LDBL_MIN_10_EXP LDBL_MIN_EXP LINK_MAX LONG_MAX - LONG_MIN L_ctermid L_cuserid L_tmpname MAX_CANON - MAX_INPUT MB_CUR_MAX MB_LEN_MAX M_1_PI M_2_PI M_2_SQRTPI - M_E M_LN10 M_LN2 M_LOG10E M_LOG2E M_PI M_PI_2 M_PI_4 - M_SQRT1_2 M_SQRT2 NAME_MAX NAN NCCS NDEBUG - NGROUPS_MAX NOFLSH NULL NaN OPEN_MAX OPOST O_ACCMODE - O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY - O_RDWR O_TRUNC O_WRONLY PARENB PARMRK PARODD - PATH_MAX PIPE_BUF RAND_MAX R_OK SA_NOCLDSTOP - SA_NOCLDWAIT SA_NODEFER SA_ONSTACK SA_RESETHAND - SA_RESTART SA_SIGINFO SCHAR_MAX SCHAR_MIN SEEK_CUR - SEEK_END SEEK_SET SHRT_MAX SHRT_MIN SIGABRT SIGALRM - SIGBUS SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT - SIGKILL SIGPIPE SIGPOLL SIGPROF SIGQUIT SIGRTMAX - SIGRTMIN SIGSEGV SIGSTOP SIGSYS SIGTERM SIGTRAP - SIGTSTP SIGTTIN SIGTTOU SIGURG SIGUSR1 SIGUSR2 - SIGVTALRM SIGXCPU SIGXFSZ SIG_BLOCK SIG_DFL SIG_ERR - SIG_IGN SIG_SETMASK SIG_UNBLOCK SSIZE_MAX - STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX - S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU - S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG - S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH - S_IXUSR TCIFLUSH TCIOFF TCIOFLUSH TCION TCOFLUSH - TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW TMP_MAX - TOSTOP TZNAME_MAX UCHAR_MAX UINT_MAX ULONG_MAX - USHRT_MAX VEOF VEOL VERASE VINTR VKILL VMIN VQUIT - VSTART VSTOP VSUSP VTIME WEXITSTATUS WIFEXITED - WIFSIGNALED WIFSTOPPED WNOHANG WSTOPSIG WTERMSIG - WUNTRACED W_OK X_OK _PC_CHOWN_RESTRICTED - _PC_LINK_MAX _PC_MAX_CANON _PC_MAX_INPUT - _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX _PC_PIPE_BUF - _PC_VDISABLE _POSIX_ARG_MAX _POSIX_CHILD_MAX - _POSIX_CHOWN_RESTRICTED _POSIX_JOB_CONTROL - _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT - _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_NO_TRUNC - _POSIX_OPEN_MAX _POSIX_PATH_MAX _POSIX_PIPE_BUF - _POSIX_SAVED_IDS _POSIX_SSIZE_MAX _POSIX_STREAM_MAX - _POSIX_TZNAME_MAX _POSIX_VDISABLE _POSIX_VERSION - _SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK - _SC_JOB_CONTROL _SC_NGROUPS_MAX _SC_OPEN_MAX - _SC_PAGESIZE _SC_SAVED_IDS _SC_STREAM_MAX - _SC_TZNAME_MAX _SC_VERSION _exit abort access acos - acosh asctime asin asinh assert atan atanh atexit - atof atoi atol bsearch calloc cbrt ceil cfgetispeed - cfgetospeed cfsetispeed cfsetospeed clearerr clock - copysign cosh creat ctermid ctime cuserid difftime - div dup dup2 erf erfc errno execl execle execlp - execv execve execvp exp2 expm1 fabs fclose fdim - fdopen fegetround feof ferror fesetround fflush - fgetc fgetpos fgets floor fma fmax fmin fmod fopen - fpathconf fpclassify fprintf fputc fputs fread free - freopen frexp fscanf fseek fsetpos fstat fsync ftell - fwrite getchar getcwd getegid getenv geteuid getgid getgroups - getpid gets getuid hypot ilogb isalnum isalpha - isatty iscntrl isdigit isfinite isgraph isgreater - isgreaterequal isinf isless islessequal - islessgreater islower isnan isnormal isprint ispunct - isspace isunordered isupper isxdigit j0 j1 jn labs - ldexp ldiv lgamma localeconv log10 log1p log2 logb - longjmp lrint lseek malloc mblen mbstowcs mbtowc - memchr memcmp memcpy memmove memset mkfifo mktime - modf nan nearbyint nextafter nexttoward offsetof - pathconf pause perror pow putc putchar puts qsort - raise realloc remainder remove remquo rewind rint - round scalbn scanf setbuf setgid setjmp setlocale - setpgid setsid setuid setvbuf sigaction siglongjmp - signal signbit sigpending sigprocmask sigsetjmp - sigsuspend sinh sscanf stderr stdin stdout strcat - strchr strcmp strcoll strcpy strcspn strerror - strftime strlen strncat strncmp strncpy strpbrk - strrchr strspn strstr strtod strtok strtol strtold - strtoul strxfrm sysconf tan tanh tcdrain tcflow - tcflush tcgetattr tcgetpgrp tcsendbreak tcsetattr - tcsetpgrp tgamma tmpfile tmpnam tolower toupper - trunc ttyname tzname tzset uname ungetc vfprintf - vprintf vsprintf wcstombs wctomb y0 y1 yn )], - EXPORT_OK => [qw(abs alarm atan2 chdir chmod chown - close closedir cos exit exp fcntl fileno fork getc - getgrgid getgrnam getlogin getpgrp getppid getpwnam - getpwuid gmtime kill lchown link localtime log mkdir - nice open opendir pipe printf rand read readdir - rename rewinddir rmdir sin sleep sprintf sqrt srand - stat system time times umask unlink utime wait - waitpid write)], ); + EXPORT => [sort + # this stuff was in 5.20.2 + qw( + %SIGRT ARG_MAX B0 B110 B1200 B134 B150 B1800 B19200 B200 + B2400 B300 B38400 B4800 B50 B600 B75 B9600 BRKINT BUFSIZ + CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX CLK_TCK CLOCAL + CLOCKS_PER_SEC CREAD CS5 CS6 CS7 CS8 CSIZE CSTOPB DBL_DIG + DBL_EPSILON DBL_MANT_DIG DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP + DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP E2BIG EACCES EADDRINUSE + EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF EBADMSG EBUSY + ECANCELED ECHILD ECHO ECHOE ECHOK ECHONL ECONNABORTED + ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDOM EDQUOT + EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EIDRM EILSEQ + EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE + EMLINK EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH + ENFILE ENOBUFS ENODATA ENODEV ENOENT ENOEXEC ENOLCK ENOLINK + ENOMEM ENOMSG ENOPROTOOPT ENOSPC ENOSR ENOSTR ENOSYS ENOTBLK + ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP + ENOTTY ENXIO EOF EOPNOTSUPP EOTHER EOVERFLOW EOWNERDEAD EPERM + EPFNOSUPPORT EPIPE EPROCLIM EPROTO EPROTONOSUPPORT EPROTOTYPE + ERANGE EREMOTE ERESTART EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE + ESRCH ESTALE ETIME ETIMEDOUT ETOOMANYREFS ETXTBSY EUSERS + EWOULDBLOCK EXDEV + EXIT_FAILURE EXIT_SUCCESS FD_CLOEXEC FILENAME_MAX + FLT_DIG FLT_EPSILON FLT_MANT_DIG FLT_MAX FLT_MAX_10_EXP + FLT_MAX_EXP FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP FLT_RADIX + FLT_ROUNDS F_DUPFD F_GETFD F_GETFL F_GETLK F_OK F_RDLCK + F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK HUGE_VAL + HUPCL ICANON ICRNL IEXTEN IGNBRK IGNCR IGNPAR INLCR INPCK + INT_MAX INT_MIN ISIG ISTRIP IXOFF IXON LC_ALL LC_COLLATE + LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LDBL_DIG + LDBL_EPSILON LDBL_MANT_DIG LDBL_MAX LDBL_MAX_10_EXP + LDBL_MAX_EXP LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP LINK_MAX + LONG_MAX LONG_MIN L_ctermid L_cuserid L_tmpname MAX_CANON + MAX_INPUT MB_CUR_MAX MB_LEN_MAX NAME_MAX NCCS NDEBUG + NGROUPS_MAX NOFLSH NULL OPEN_MAX OPOST O_ACCMODE O_APPEND + O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC + O_WRONLY PARENB PARMRK PARODD PATH_MAX PIPE_BUF RAND_MAX R_OK + SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK SA_RESETHAND + SA_RESTART SA_SIGINFO SCHAR_MAX SCHAR_MIN SEEK_CUR SEEK_END + SEEK_SET SHRT_MAX SHRT_MIN SIGABRT SIGALRM SIGBUS SIGCHLD + SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGPOLL + SIGPROF SIGQUIT SIGRTMAX SIGRTMIN SIGSEGV SIGSTOP SIGSYS + SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGURG SIGUSR1 + SIGUSR2 SIGVTALRM SIGXCPU SIGXFSZ SIG_BLOCK SIG_DFL SIG_ERR + SIG_IGN SIG_SETMASK SIG_UNBLOCK SSIZE_MAX STDERR_FILENO + STDIN_FILENO STDOUT_FILENO STREAM_MAX S_IRGRP S_IROTH S_IRUSR + S_IRWXG S_IRWXO S_IRWXU S_ISBLK S_ISCHR S_ISDIR S_ISFIFO + S_ISGID S_ISREG S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP + S_IXOTH S_IXUSR TCIFLUSH TCIOFF TCIOFLUSH TCION TCOFLUSH + TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW TMP_MAX TOSTOP + TZNAME_MAX UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX VEOF VEOL + VERASE VINTR VKILL VMIN VQUIT VSTART VSTOP VSUSP VTIME + WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED WNOHANG WSTOPSIG + WTERMSIG WUNTRACED W_OK X_OK _PC_CHOWN_RESTRICTED + _PC_LINK_MAX _PC_MAX_CANON _PC_MAX_INPUT _PC_NAME_MAX + _PC_NO_TRUNC _PC_PATH_MAX _PC_PIPE_BUF _PC_VDISABLE + _POSIX_ARG_MAX _POSIX_CHILD_MAX _POSIX_CHOWN_RESTRICTED + _POSIX_JOB_CONTROL _POSIX_LINK_MAX _POSIX_MAX_CANON + _POSIX_MAX_INPUT _POSIX_NAME_MAX _POSIX_NGROUPS_MAX + _POSIX_NO_TRUNC _POSIX_OPEN_MAX _POSIX_PATH_MAX + _POSIX_PIPE_BUF _POSIX_SAVED_IDS _POSIX_SSIZE_MAX + _POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VDISABLE + _POSIX_VERSION _SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK + _SC_JOB_CONTROL _SC_NGROUPS_MAX _SC_OPEN_MAX _SC_PAGESIZE + _SC_SAVED_IDS _SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION _exit + abort access acos asctime asin assert atan atexit atof atoi + atol bsearch calloc ceil cfgetispeed cfgetospeed cfsetispeed + cfsetospeed clearerr clock cosh creat ctermid ctime cuserid + difftime div dup dup2 errno execl execle execlp execv execve + execvp fabs fclose fdopen feof ferror fflush fgetc fgetpos + fgets floor fmod fopen fpathconf fprintf fputc fputs fread + free freopen frexp fscanf fseek fsetpos fstat fsync ftell + fwrite getchar getcwd getegid getenv geteuid getgid getgroups + getpid gets getuid isalnum isalpha isatty iscntrl isdigit + isgraph islower isprint ispunct isspace isupper isxdigit labs + ldexp ldiv localeconv log10 longjmp lseek malloc mblen + mbstowcs mbtowc memchr memcmp memcpy memmove memset mkfifo + mktime modf offsetof pathconf pause perror pow putc putchar + puts qsort raise realloc remove rewind scanf setbuf setgid + setjmp setlocale setpgid setsid setuid setvbuf sigaction + siglongjmp signal sigpending sigprocmask sigsetjmp sigsuspend + sinh sscanf stderr stdin stdout strcat strchr strcmp strcoll + strcpy strcspn strerror strftime strlen strncat strncmp + strncpy strpbrk strrchr strspn strstr strtod strtok strtol + strtoul strxfrm sysconf tan tanh tcdrain tcflow tcflush + tcgetattr tcgetpgrp tcsendbreak tcsetattr tcsetpgrp tmpfile + tmpnam tolower toupper ttyname tzname tzset uname ungetc + vfprintf vprintf vsprintf wcstombs wctomb + ), + # this stuff was added in 5.21 + qw( + FP_ILOGB0 FP_ILOGBNAN FP_INFINITE FP_NAN FP_NORMAL FP_SUBNORMAL FP_ZERO + M_1_PI M_2_PI M_2_SQRTPI M_E M_LN10 M_LN2 M_LOG10E M_LOG2E M_PI + M_PI_2 M_PI_4 M_SQRT1_2 M_SQRT2 INFINITY NAN + ), + # adding new functions to EXPORT is a BACKWARD COMPATIBILITY BREAKING CHANGE + # it is OK to add new constants, but new functions may only go in EXPORT_OK + ], + EXPORT_OK => [sort + # this stuff was in 5.20.2 + qw( + abs alarm atan2 chdir chmod chown close closedir cos exit + exp fcntl fileno fork getc getgrgid getgrnam getlogin + getpgrp getppid getpwnam getpwuid gmtime kill lchown link + localtime log mkdir nice open opendir pipe printf rand + read readdir rename rewinddir rmdir sin sleep sprintf sqrt + srand stat system time times umask unlink utime wait + waitpid write + ), + # this stuff was added in 5.21 + qw( + FE_DOWNWARD FE_TONEAREST FE_TOWARDZERO FE_UPWARD + fegetround fesetround + Inf NaN + acosh asinh atanh cbrt copysign erf erfc exp2 expm1 fdim + fma fmax fmin fpclassify hypot ilogb isfinite isgreater + isgreaterequal isinf isless islessequal islessgreater isnan + isnormal isunordered j0 j1 jn lgamma log1p log2 logb lrint nan + nearbyint nextafter nexttoward remainder remquo rint round scalbn + signbit tgamma trunc y0 y1 yn strtold + ), + ], +); plan (tests => 2 * keys %expect); @@ -145,5 +147,5 @@ while (my ($var, $expect) = each %expect) { my $have = *{$POSIX::{$var}}{ARRAY}; cmp_ok(@$have, '==', @$expect, "Correct number of entries for \@POSIX::$var"); - is_deeply([sort ascii_order @$have], $expect, "Correct entries for \@POSIX::$var"); + is_deeply([sort @$have], $expect, "Correct entries for \@POSIX::$var"); } diff --git a/ext/POSIX/t/math.t b/ext/POSIX/t/math.t index 6bdb1be..7e70753 100644 --- a/ext/POSIX/t/math.t +++ b/ext/POSIX/t/math.t @@ -2,7 +2,7 @@ use strict; -use POSIX; +use POSIX ':math_h_c99'; use Test::More; use Config; @@ -54,6 +54,14 @@ between(0.76, tanh(1), 0.77, 'tanh(1)'); between(-0.77, tanh(-1), -0.76, 'tanh(-1)'); cmp_ok(tanh(1), '==', -tanh(-1), 'tanh(1) == -tanh(-1)'); +SKIP: { + skip "no fpclassify", 4 unless $Config{d_fpclassify}; + is(fpclassify(1), FP_NORMAL, "fpclassify 1"); + is(fpclassify(0), FP_ZERO, "fpclassify 0"); + is(fpclassify(INFINITY), FP_INFINITE, "fpclassify INFINITY"); + is(fpclassify(NAN), FP_NAN, "fpclassify NAN"); +} + sub near { my ($got, $want, $msg, $eps) = @_; $eps ||= 1e-6; @@ -61,7 +69,7 @@ sub near { } SKIP: { - my $C99_SKIP = 63; + my $C99_SKIP = 59; unless ($Config{d_acosh}) { skip "no acosh, suspecting no C99 math", $C99_SKIP; @@ -84,10 +92,6 @@ SKIP: { is(fdim(34, 12), 22, "fdim 34 12"); is(fmax(12, 34), 34, "fmax 12 34"); is(fmin(12, 34), 12, "fmin 12 34"); - is(fpclassify(1), FP_NORMAL, "fpclassify 1"); - is(fpclassify(0), FP_ZERO, "fpclassify 0"); - is(fpclassify(INFINITY), FP_INFINITE, "fpclassify INFINITY"); - is(fpclassify(NAN), FP_NAN, "fpclassify NAN"); is(hypot(3, 4), 5, "hypot 3 4"); near(hypot(-2, 1), sqrt(5), "hypot -1 2", 1e-9); is(ilogb(255), 7, "ilogb 255"); diff --git a/ext/VMS-Filespec/t/filespec.t b/ext/VMS-Filespec/t/filespec.t index f556703..6d421e1 100644 --- a/ext/VMS-Filespec/t/filespec.t +++ b/ext/VMS-Filespec/t/filespec.t @@ -110,6 +110,7 @@ __lyrics_:[__are_.__very_^.__sappy_]__but_^.__rhymes_^.__are_.__true_ unixify [.$(macro)] unixify $(macro)/ ^ ^+foo.tmp unixify +foo.tmp ^ [-.foo^_^_bar] unixify ../foo\ \ bar/ ^ +[]foo.tmp unixify ./foo.tmp ^ # and back again /__some_/__where_/__over_/__the_.__rainbow_ vmsify __some_:[__where_.__over_]__the_.__rainbow_ ^ @@ -135,6 +136,8 @@ foo-bar-0^.01/ vmsify [.foo-bar-0_01] [.foo-bar-0^.01] \ foo.tmp vmsify ^_foo.tmp ^ +foo.tmp vmsify ^+foo.tmp ^ ../foo\ \ bar/ vmsify [-.foo^_^_bar] ^ +./foo.tmp vmsify []foo.tmp ^ + # Fileifying directory specs __down_:[__the_.__garden_.__path_] fileify __down_:[__the_.__garden_]__path_.dir;1 ^ [.__down_.__the_.__garden_.__path_] fileify [.__down_.__the_.__garden_]__path_.dir;1 ^ diff --git a/handy.h b/handy.h index 89055c5..3e6fd52 100644 --- a/handy.h +++ b/handy.h @@ -449,6 +449,16 @@ Test two strings to see if they are equal. The C parameter indicates the number of bytes to compare. Returns true or false. (A wrapper for C). +=for apidoc Am|bool|memEQ|char* s1|char* s2|STRLEN len +Test two buffers (which may contain embedded C characters, to see if they +are equal. The C parameter indicates the number of bytes to compare. +Returns zero if equal, or non-zero if non-equal. + +=for apidoc Am|bool|memNE|char* s1|char* s2|STRLEN len +Test two buffers (which may contain embedded C characters, to see if they +are not equal. The C parameter indicates the number of bytes to compare. +Returns zero if non-equal, or non-zero if equal. + =cut */ diff --git a/hints/catamount.sh b/hints/catamount.sh index a9e8982..d9b4fd9 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.21.11 +# mkdir -p /opt/perl-catamount/lib/perl5/5.22.0 # 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.21.11 +# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.22.0 # 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/intrpvar.h b/intrpvar.h index 86c3fd7..b847ff3 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -179,7 +179,7 @@ PERLVAR(I, statgv, GV *) PERLVARI(I, statname, SV *, NULL) #ifdef HAS_TIMES -/* Will be removed soon after v5.21.11. See RT #121351 */ +/* Will be removed soon after v5.22.0. See RT #121351 */ PERLVAR(I, timesbuf, struct tms) #endif @@ -753,7 +753,7 @@ PERLVARI(I, globhook, globhook_t, NULL) PERLVARI(I, padlist_generation, U32, 1) /* id to identify padlist clones */ -/* The last unconditional member of the interpreter structure when 5.21.11 was +/* The last unconditional member of the interpreter structure when 5.22.0 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/B/Op_private.pm b/lib/B/Op_private.pm index f386e31..b07d6b0 100644 --- a/lib/B/Op_private.pm +++ b/lib/B/Op_private.pm @@ -118,7 +118,7 @@ package B::Op_private; our %bits; -our $VERSION = "5.021011"; +our $VERSION = "5.022000"; $bits{$_}{3} = 'OPpENTERSUB_AMPER' for qw(entersub rv2cv); $bits{$_}{6} = 'OPpENTERSUB_DB' for qw(entersub rv2cv); diff --git a/lib/ExtUtils/typemap b/lib/ExtUtils/typemap index 831baad..0b09641 100644 --- a/lib/ExtUtils/typemap +++ b/lib/ExtUtils/typemap @@ -388,48 +388,32 @@ T_STDIO { GV *gv = newGVgen("$Package"); PerlIO *fp = PerlIO_importFILE($var,0); - if ( fp && do_open(gv, "+<&", 3, FALSE, 0, 0, fp) ) { - SV *rv = newRV_noinc((SV*)gv); - rv = sv_bless(rv, gv_stashpv("$Package",1)); - sv_setsv($arg, rv); - SvREFCNT_dec_NN(rv); - } + if ( fp && do_open(gv, "+<&", 3, FALSE, 0, 0, fp) ) + sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1))); else $arg = &PL_sv_undef; } T_IN { GV *gv = newGVgen("$Package"); - if ( do_open(gv, "<&", 2, FALSE, 0, 0, $var) ) { - SV *rv = newRV_noinc((SV*)gv); - rv = sv_bless(rv, gv_stashpv("$Package",1)); - sv_setsv($arg, rv); - SvREFCNT_dec_NN(rv); - } + if ( do_open(gv, "<&", 2, FALSE, 0, 0, $var) ) + sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1))); else $arg = &PL_sv_undef; } T_INOUT { GV *gv = newGVgen("$Package"); - if ( do_open(gv, "+<&", 3, FALSE, 0, 0, $var) ) { - SV *rv = newRV_noinc((SV*)gv); - rv = sv_bless(rv, gv_stashpv("$Package",1)); - sv_setsv($arg, rv); - SvREFCNT_dec_NN(rv); - } + if ( do_open(gv, "+<&", 3, FALSE, 0, 0, $var) ) + sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1))); else $arg = &PL_sv_undef; } T_OUT { GV *gv = newGVgen("$Package"); - if ( do_open(gv, "+>&", 3, FALSE, 0, 0, $var) ) { - SV *rv = newRV_noinc((SV*)gv); - rv = sv_bless(rv, gv_stashpv("$Package",1)); - sv_setsv($arg, rv); - SvREFCNT_dec_NN(rv); - } + if ( do_open(gv, "+>&", 3, FALSE, 0, 0, $var) ) + sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1))); else $arg = &PL_sv_undef; } diff --git a/lib/overload.pm b/lib/overload.pm index 414c386..4a1912c 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -1,6 +1,6 @@ package overload; -our $VERSION = '1.25'; +our $VERSION = '1.26'; %ops = ( with_assign => "+ - * / % ** << >> x .", @@ -383,6 +383,7 @@ hash C<%overload::ops>: Most of the overloadable operators map one-to-one to these keys. Exceptions, including additional overloadable operations not apparent from this hash, are included in the notes which follow. +This list is subject to growth over time. A warning is issued if an attempt is made to register an operator not found above. diff --git a/lib/utf8.pm b/lib/utf8.pm index c8ec377..23fbfac 100644 --- a/lib/utf8.pm +++ b/lib/utf8.pm @@ -2,7 +2,7 @@ package utf8; $utf8::hint_bits = 0x00800000; -our $VERSION = '1.16'; +our $VERSION = '1.17'; sub import { $^H |= $utf8::hint_bits; @@ -191,7 +191,7 @@ This takes an unsigned integer (which represents the ordinal number of a character (or a code point) on the platform the program is being run on) and returns its Unicode equivalent value. Since ASCII platforms natively use the Unicode code points, this function returns its input on them. On EBCDIC -platforms it converts from EBCIDC to Unicode. +platforms it converts from EBCDIC to Unicode. A meaningless value will currently be returned if the input is not an unsigned integer. diff --git a/op.c b/op.c index 4e8f5a4..cab214a 100644 --- a/op.c +++ b/op.c @@ -1325,10 +1325,19 @@ Perl_op_sibling_splice(OP *parent, OP *start, int del_count, OP* insert) if (!parent) goto no_parent; + /* ought to use OP_CLASS(parent) here, but that can't handle + * ex-foo OP_NULL ops. Also note that XopENTRYCUSTOM() can't + * either */ type = parent->op_type; - if (type == OP_NULL) - type = parent->op_targ; - type = PL_opargs[type] & OA_CLASS_MASK; + if (type == OP_CUSTOM) { + dTHX; + type = XopENTRYCUSTOM(parent, xop_class); + } + else { + if (type == OP_NULL) + type = parent->op_targ; + type = PL_opargs[type] & OA_CLASS_MASK; + } lastop = last_ins ? last_ins : start ? start : NULL; if ( type == OA_BINOP @@ -11118,11 +11127,11 @@ Perl_ck_stringify(pTHX_ OP *o) { OP * const kid = OpSIBLING(cUNOPo->op_first); PERL_ARGS_ASSERT_CK_STRINGIFY; - if (kid->op_type == OP_JOIN || kid->op_type == OP_QUOTEMETA - || kid->op_type == OP_LC || kid->op_type == OP_LCFIRST - || kid->op_type == OP_UC || kid->op_type == OP_UCFIRST) + if (( kid->op_type == OP_JOIN || kid->op_type == OP_QUOTEMETA + || kid->op_type == OP_LC || kid->op_type == OP_LCFIRST + || kid->op_type == OP_UC || kid->op_type == OP_UCFIRST) + && !OpHAS_SIBLING(kid)) /* syntax errs can leave extra children */ { - assert(!OpHAS_SIBLING(kid)); op_sibling_splice(o, cUNOPo->op_first, -1, NULL); op_free(o); return kid; @@ -11408,11 +11417,12 @@ Perl_ck_entersub_args_proto(pTHX_ OP *entersubop, GV *namegv, SV *protosv) case '&': proto++; arg++; - if (o3->op_type != OP_SREFGEN - || ( cUNOPx(cUNOPx(o3)->op_first)->op_first->op_type - != OP_ANONCODE - && cUNOPx(cUNOPx(o3)->op_first)->op_first->op_type - != OP_RV2CV)) + if ( o3->op_type != OP_UNDEF + && (o3->op_type != OP_SREFGEN + || ( cUNOPx(cUNOPx(o3)->op_first)->op_first->op_type + != OP_ANONCODE + && cUNOPx(cUNOPx(o3)->op_first)->op_first->op_type + != OP_RV2CV))) bad_type_gv(arg, namegv, o3, arg == 1 ? "block or sub {}" : "sub {}"); break; @@ -11711,7 +11721,7 @@ The C-level function pointer is returned in I<*ckfun_p>, and an SV argument for it is returned in I<*ckobj_p>. The function is intended to be called in this manner: - entersubop = (*ckfun_p)(aTHX_ entersubop, namegv, (*ckobj_p)); + entersubop = (*ckfun_p)(aTHX_ entersubop, namegv, (*ckobj_p)); In this call, I is a pointer to the C op, which may be replaced by the check function, and I is a GV diff --git a/pad.c b/pad.c index 2d33779..f5ce5f5 100644 --- a/pad.c +++ b/pad.c @@ -79,11 +79,14 @@ the variable. The COP_SEQ_RANGE_LOW and _HIGH fields form a range valid. During compilation, these fields may hold the special value PERL_PADSEQ_INTRO to indicate various stages: - COP_SEQ_RANGE_LOW _HIGH - ----------------- ----- - PERL_PADSEQ_INTRO 0 variable not yet introduced: { my ($x - valid-seq# PERL_PADSEQ_INTRO variable in scope: { my ($x) - valid-seq# valid-seq# compilation of scope complete: { my ($x) } + COP_SEQ_RANGE_LOW _HIGH + ----------------- ----- + PERL_PADSEQ_INTRO 0 variable not yet introduced: + { my ($x + valid-seq# PERL_PADSEQ_INTRO variable in scope: + { my ($x) + valid-seq# valid-seq# compilation of scope complete: + { my ($x) } For typed lexicals PadnameTYPE points at the type stash. For C lexicals, PadnameOURSTASH points at the stash of the associated global (so @@ -159,7 +162,7 @@ Perl_set_padlist(CV * cv, PADLIST *padlist){ # if PTRSIZE == 8 assert((Size_t)padlist != UINT64_C(0xEFEFEFEFEFEFEFEF)); # elif PTRSIZE == 4 - assert((Size_t)padlist != UINT64_C(0xEFEFEFEF)); + assert((Size_t)padlist != 0xEFEFEFEF); # else # error unknown pointer size # endif @@ -497,11 +500,12 @@ finished its job, so it can forget the slab. void Perl_cv_forget_slab(pTHX_ CV *cv) { - const bool slabbed = !!CvSLABBED(cv); + bool slabbed; OPSLAB *slab = NULL; - PERL_ARGS_ASSERT_CV_FORGET_SLAB; - + if (!cv) + return; + slabbed = cBOOL(CvSLABBED(cv)); if (!slabbed) return; CvSLABBED_off(cv); @@ -582,9 +586,9 @@ identifies the type. If I is non-null, it's a lexical reference to a package variable, and this identifies the package. The following flags can be OR'ed together: - padadd_OUR redundantly specifies if it's a package var - padadd_STATE variable will retain value persistently - padadd_NO_DUP_CHECK skip check for lexical shadowing + padadd_OUR redundantly specifies if it's a package var + padadd_STATE variable will retain value persistently + padadd_NO_DUP_CHECK skip check for lexical shadowing =cut */ @@ -959,6 +963,10 @@ Perl_pad_findmy_pvn(pTHX_ const char *namepv, STRLEN namelen, U32 flags) Perl_croak(aTHX_ "panic: pad_findmy_pvn illegal flag bits 0x%" UVxf, (UV)flags); + /* compilation errors can zero PL_compcv */ + if (!PL_compcv) + return NOT_IN_PAD; + offset = pad_findlex(namepv, namelen, flags, PL_compcv, PL_cop_seqmax, 1, NULL, &out_pn, &out_flags); if ((PADOFFSET)offset != NOT_IN_PAD) diff --git a/patchlevel.h b/patchlevel.h index 6269243..a0ad78b 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -14,8 +14,8 @@ * exactly on the third column */ #define PERL_REVISION 5 /* age */ -#define PERL_VERSION 21 /* epoch */ -#define PERL_SUBVERSION 11 /* generation */ +#define PERL_VERSION 22 /* epoch */ +#define PERL_SUBVERSION 0 /* generation */ /* The following numbers describe the earliest compatible version of Perl ("compatibility" here being defined as sufficient binary/API @@ -35,8 +35,8 @@ changing them should not be necessary. */ #define PERL_API_REVISION 5 -#define PERL_API_VERSION 21 -#define PERL_API_SUBVERSION 11 +#define PERL_API_VERSION 22 +#define PERL_API_SUBVERSION 0 /* XXX Note: The selection of non-default Configure options, such as -Duselonglong may invalidate these settings. Currently, Configure diff --git a/plan9/config.plan9 b/plan9/config.plan9 index b89da33..da0454b 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.21.11" /**/ -#define PRIVLIB_EXP "/sys/lib/perl/5.21.11" /**/ +#define PRIVLIB "/sys/lib/perl/5.22.0" /**/ +#define PRIVLIB_EXP "/sys/lib/perl/5.22.0" /**/ /* 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.21.11/site_perl" /**/ -#define SITELIB_EXP "/sys/lib/perl/5.21.11/site_perl" /**/ -#define SITELIB_STEM "/sys/lib/perl/5.21.11/site_perl" /**/ +#define SITELIB "/sys/lib/perl/5.22.0/site_perl" /**/ +#define SITELIB_EXP "/sys/lib/perl/5.22.0/site_perl" /**/ +#define SITELIB_STEM "/sys/lib/perl/5.22.0/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 ad79185..907493d 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -32,12 +32,12 @@ alignbytes='4' ansi2knr='' aphostname='/bin/uname -n' api_revision='5' -api_subversion='11' -api_version='21' -api_versionstring='5.21.11' +api_subversion='0' +api_version='22' +api_versionstring='5.22.0' ar='ar' -archlib='/sys/lib/perl5/5.21.11/386' -archlibexp='/sys/lib/perl5/5.21.11/386' +archlib='/sys/lib/perl5/5.22.0/386' +archlibexp='/sys/lib/perl5/5.22.0/386' archname64='' archname='386' archobjs='' @@ -787,17 +787,17 @@ inc_version_list=' ' inc_version_list_init='0' incpath='' inews='' -installarchlib='/sys/lib/perl/5.21.11/386' +installarchlib='/sys/lib/perl/5.22.0/386' installbin='/usr/bin' installman1dir='/sys/man/1pub' installman3dir='/sys/man/2pub' installprefix='/usr' installprefixexp='/usr' -installprivlib='/sys/lib/perl/5.21.11' +installprivlib='/sys/lib/perl/5.22.0' installscript='/usr/bin' -installsitearch='/sys/lib/perl/5.21.11/site_perl/386' +installsitearch='/sys/lib/perl/5.22.0/site_perl/386' installsitebin='/usr/bin' -installsitelib='/sys/lib/perl/5.21.11/site_perl' +installsitelib='/sys/lib/perl/5.22.0/site_perl' installstyle='lib/perl5' installusrbinperl='undef' installvendorarch='' @@ -918,8 +918,8 @@ pmake='' pr='' prefix='/usr' prefixexp='/usr' -privlib='/sys/lib/perl/5.21.11' -privlibexp='/sys/lib/perl/5.21.11' +privlib='/sys/lib/perl/5.22.0' +privlibexp='/sys/lib/perl/5.22.0' procselfexe='' prototype='define' ptrsize='4' @@ -984,13 +984,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.21.11/site_perl/386' +sitearch='/sys/lib/perl/5.22.0/site_perl/386' sitearchexp='/sys/lib/perl/site_perl/386' sitebin='/usr/bin' sitebinexp='/usr/bin' -sitelib='/sys/lib/perl/5.21.11/site_perl' -sitelib_stem='/sys/lib/perl/5.21.11/site_perl' -sitelibexp='/sys/lib/perl/5.21.11/site_perl' +sitelib='/sys/lib/perl/5.22.0/site_perl' +sitelib_stem='/sys/lib/perl/5.22.0/site_perl' +sitelibexp='/sys/lib/perl/5.22.0/site_perl' siteprefix='/usr' siteprefixexp='/usr' sizesize='4' @@ -1023,7 +1023,7 @@ stdio_stream_array='' strerror_r_proto='0' strings='/sys/include/ape/string.h' submit='' -subversion='11' +subversion='0' sysman='/sys/man/1pub' tail='' tar='' @@ -1105,8 +1105,8 @@ vendorlib_stem='' vendorlibexp='' vendorprefix='' vendorprefixexp='' -version='5.21.11' -version_patchlevel_string='version 21 subversion 11' +version='5.22.0' +version_patchlevel_string='version 22 subversion 0' versiononly='undef' vi='' xlibpth='' @@ -1119,10 +1119,10 @@ config_arg0='./Configure' config_args='' config_argc=0 PERL_REVISION=5 -PERL_VERSION=21 -PERL_SUBVERSION=11 +PERL_VERSION=22 +PERL_SUBVERSION=0 PERL_API_REVISION=5 -PERL_API_VERSION=21 -PERL_API_SUBVERSION=11 +PERL_API_VERSION=22 +PERL_API_SUBVERSION=0 PERL_PATCHLEVEL= PERL_CONFIG_SH=true diff --git a/pod/.gitignore b/pod/.gitignore index 8246687..e6a3ab3 100644 --- a/pod/.gitignore +++ b/pod/.gitignore @@ -53,7 +53,7 @@ /roffitall # generated -/perl52111delta.pod +/perl5220delta.pod /perlapi.pod /perlintern.pod *.html diff --git a/pod/perl.pod b/pod/perl.pod index a3e99d9..364e957 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -180,6 +180,7 @@ aux c2ph h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp perlhist Perl history records perldelta Perl changes since previous version + perl52111delta Perl changes in version 5.21.11 perl52110delta Perl changes in version 5.21.10 perl5219delta Perl changes in version 5.21.9 perl5218delta Perl changes in version 5.21.8 diff --git a/pod/perl52111delta.pod b/pod/perl52111delta.pod new file mode 100644 index 0000000..90c95dd --- /dev/null +++ b/pod/perl52111delta.pod @@ -0,0 +1,432 @@ +=encoding utf8 + +=head1 NAME + +perl52111delta - what is new for perl v5.21.11 + +=head1 DESCRIPTION + +This document describes differences between the 5.21.10 release and the 5.21.11 +release. + +If you are upgrading from an earlier release such as 5.21.9, first read +L, which describes differences between 5.21.9 and 5.21.10. + +=head1 Deprecations + +=head2 Making all warnings fatal is discouraged + +The documentation for L notes that +C<< use warnings FATAL => 'all' >> is discouraged and provides stronger +language about the risks of fatal warnings in general. + +=head1 Modules and Pragmata + +=head2 Updated Modules and Pragmata + +=over 4 + +=item * + +L has been upgraded from version 0.26 to 0.27. + +=item * + +L has been upgraded from version 1.57 to 1.58. + +=item * + +L has been upgraded from version 1.34 to 1.35. + +C<< <<>> >> is now correctly deparsed. + +=item * + +L has been upgraded from version 0.23 to 0.24. + +=item * + +L has been upgraded from version 2.10 to 2.11. + +=item * + +L has been upgraded from version 3.55 to 3.56. + +=item * + +L has been upgraded from version 1.04 to 1.05. + +=item * + +L has been upgraded from version 3.27 to 3.28. + +=item * + +L has been upgraded from version 3.25 to 3.28. + +=item * + +L has been upgraded from version 3.55 to 3.56. + +=item * + +L has been upgraded from version 0.0603 to 0.0604. + +The documentation now notes that this module also works with C. + +=item * + +L has been upgraded from version 0.36 to 0.37. + +=item * + +L has been upgraded from version 5.20150320 to 5.20150420. + +Updated to cover the latest releases of Perl. Also fixes a fencepost error in +is_core() and copes with versions that do not match x.yyyzzz. + +=item * + +L has been upgraded from 1.48 to 1.49. + +The debugger would cause an assertion failure. +L<[perl #124127]|https://rt.perl.org/Ticket/Display.html?id=124127> + +=item * + +L has been upgraded from version 0.013 to 0.014. + +=item * + +L has been upgraded from version 1.15 to 1.16. + +Minor documentation update only. + +=item * + +L has been upgraded from version 1.31 to 1.32. + +=back + +=head1 Documentation + +=head2 Changes to Existing Documentation + +=head3 L + +=over 4 + +=item * + +This document has been significantly updated in the light of recent +improvements to EBCDIC support. + +=back + +=head3 L + +=over 4 + +=item * + +Mention that C is currently a no-op. + +=back + +=head3 L + +=over 4 + +=item * + +The OOK example has been updated to account for COW changes and a change in the +storage of the offset. + +=back + +=head3 L + +=over 4 + +=item * + +Documentation has been added illustrating the perils of assuming the contents +of static memory pointed to by the return values of Perl wrappers for C library +functions doesn't change. + +=back + +=head3 L + +=over 4 + +=item * + +Out-of-date VMS-specific information has been fixed/simplified. + +=back + +=head3 L + +=over 4 + +=item * + +Advice for how to make sure your strings and regular expression patterns are +interpreted as Unicode has been revised to account for the new Perl 5.22 EBCDIC +handling. + +=back + +=head3 L + +=over 4 + +=item * + +Out-of-date and/or incorrect material has been removed. + +=back + +=head1 Testing + +=over 4 + +=item * + +F has been added to test that L and its +dependencies only use the subset of the C<$1..$n> capture vars that +Perl_save_re_context() is hard-coded to localize, because that function has no +efficient way of determining at runtime what vars to localize. + +=back + +=head1 Platform Support + +=head2 Platform-Specific Notes + +=over 4 + +=item Win32 + +F is now built with C<-fno-strict-aliasing>, allowing 64-bit +builds to complete on GCC 4.8. +L<[perl #123976]|https://rt.perl.org/Ticket/Display.html?id=123976> + +C again depends on C for GCC builds. +L<[perl #124221]|https://rt.perl.org/Ticket/Display.html?id=124221> + +=back + +=head1 Internal Changes + +=over 4 + +=item * + +Perl 5.21.2 introduced a new build option, C<-DPERL_OP_PARENT>, which causes +the last C pointer to refer back to the parent rather than being +C, and where instead a new flag indicates the end of the chain. In this +release, the new implementation has been revised; in particular: + +=over 4 + +=item * + +On C builds, the C field has been renamed +C to reflect its new dual purpose. Since the intention is that +this field should primarily be accessed via macros, this change should be +transparent for code written to work under C. + +=item * + +The newly-introduced C flag bit has been renamed C and +its logic inverted; i.e. it is initialised to zero in a new op, and is changed +to 1 when an op gains a sibling. + +=item * + +The function C is now only available on C +builds. Using it on a plain build will be a compile-timer error. + +=item * + +Three new macros, C, C, C have +been added, which are intended to be a low-level portable way to set +C / C while also updating C. The first +sets the sibling pointer to a new sibling, the second makes the op the last +sibling, and the third conditionally does the first or second action. The +C function is retained as a higher-level interface that +can also maintain consistency in the parent at the same time (e.g. by updating +C and C where appropriate). + +=item * + +The macro C, added in Perl 5.21.2, has been removed. It didn't +manipulate C and has been superseded by C et al. + +=item * + +The C function now accepts a null C argument where +the splicing doesn't affect the first or last ops in the sibling chain, and +thus where the parent doesn't need to be updated accordingly. + +=back + +=back + +=head1 Selected Bug Fixes + +=over 4 + +=item * + +C and C now zero the padding on x86 long double +builds. GCC 4.8 and later, under some build options, would either overwrite +the zero-initialized padding, or bypass the initialized buffer entirely. This +caused F to fail. +L<[perl #123971]|https://rt.perl.org/Ticket/Display.html?id=123971> + +=item * + +Extending an array cloned from a parent thread could result in "Modification of +a read-only value attempted" errors when attempting to modify the new elements. +L<[perl #124127]|https://rt.perl.org/Ticket/Display.html?id=124127> + +=item * + +An assertion failure and subsequent crash with C<< *x= >> has been fixed. +L<[perl #123790]|https://rt.perl.org/Ticket/Display.html?id=123790> + +=item * + +An optimization for state variable initialization introduced in Perl 5.21.6 has +been reverted because it was found to exacerbate some other existing buggy +behaviour. +L<[perl #124160]|https://rt.perl.org/Ticket/Display.html?id=124160> + +=item * + +The extension of another optimization to cover more ops in Perl 5.21 has also +been reverted to its Perl 5.20 state as a temporary fix for regression issues +that it caused. +L<[perl #123790]|https://rt.perl.org/Ticket/Display.html?id=123790> + +=item * + +New bitwise ops added in Perl 5.21.9 accidentally caused C<$^H |= 0x1c020000> +to enable all features. This has now been fixed. + +=item * + +A possible crashing/looping bug has been fixed. +L<[perl #124099]|https://rt.perl.org/Ticket/Display.html?id=124099> + +=item * + +UTF-8 variable names used in array indexes, unquoted UTF-8 HERE-document +terminators and UTF-8 function names all now work correctly. +L<[perl #124113]|https://rt.perl.org/Ticket/Display.html?id=124113> + +=item * + +Breakage in C (with parentheses), introduced in Perl 5.21.6, +has been fixed. +L<[perl #124135]|https://rt.perl.org/Ticket/Display.html?id=124135> + +=item * + +Wide char warnings, wrongly raised in UTF-8 locales since Perl 5.21.8, are now +suppressed. +L<[perl #123527]|https://rt.perl.org/Ticket/Display.html?id=123527> + +=item * + +A subtle bug introduced in Perl 5.21.4 involving UTF-8 in regular expressions +and sometimes causing a crash has been fixed. A new test script has been added +to test this fix; see under L. +L<[perl #124109]|https://rt.perl.org/Ticket/Display.html?id=124109> + +=item * + +A change introduced in Perl 5.21.10 that broke the autovivification CPAN module +has been reverted. + +=item * + +A bug whereby C<< 'FOO'->f() >> lost the read-only status of C, introduced +in Perl 5.21.7, has been fixed. +L<[perl #123619]|https://rt.perl.org/Ticket/Display.html?id=123619> + +=item * + +A regression in Perl 5.21 in the matching of C has been fixed. + +=back + +=head1 Acknowledgements + +Perl 5.21.11 represents approximately 4 weeks of development since Perl 5.21.10 +and contains approximately 5,800 lines of changes across 240 files from 24 +authors. + +Excluding auto-generated files, documentation and release tools, there were +approximately 1,700 lines of changes to 160 .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.21.11: + +Alex Vandiver, Andreas König, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel +Dragan, David Golden, David Mitchell, Father Chrysostomos, H.Merijn Brand, +Herbert Breunung, Hugo van der Sanden, James E Keenan, James McCoy, Karl +Williamson, Matthew Horsfall, Max Maischein, Nicholas Clark, Rafael +Garcia-Suarez, Randy Stauner, Ricardo Signes, Shirakata Kentaro, Steffen +Müller, 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 +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 567f5ae..9672e79 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -2,395 +2,4001 @@ =head1 NAME -perldelta - what is new for perl v5.21.11 +perldelta - what is new for perl v5.22.0 =head1 DESCRIPTION -This document describes differences between the 5.21.10 release and the 5.21.11 +This document describes differences between the 5.20.0 release and the 5.22.0 release. -If you are upgrading from an earlier release such as 5.21.9, first read -L, which describes differences between 5.21.9 and 5.21.10. +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 Core Enhancements + +=head2 New bitwise operators + +A new experimental facility has been added that makes the four standard +bitwise operators (C<& | ^ ~>) treat their operands consistently as +numbers, and introduces four new dotted operators (C<&. |. ^. ~.>) that +treat their operands consistently as strings. The same applies to the +assignment variants (C<&= |= ^= &.= |.= ^.=>). + +To use this, enable the "bitwise" feature and disable the +"experimental::bitwise" warnings category. See L for details. +L<[perl #123466]|https://rt.perl.org/Ticket/Display.html?id=123466>. + +=head2 New double-diamond operator + +C<<< <<>> >>> is like C<< <> >> but uses three-argument C to open +each file in C<@ARGV>. This means that each element of C<@ARGV> will be treated +as an actual file name, and C<"|foo"> won't be treated as a pipe open. + +=head2 New C<\b> boundaries in regular expressions + +=head3 C + +C stands for Grapheme Cluster Boundary. It is a Unicode property +that finds the boundary between sequences of characters that look like a +single character to a native speaker of a language. Perl has long had +the ability to deal with these through the C<\X> regular escape +sequence. Now, there is an alternative way of handling these. See +L for details. + +=head3 C + +C stands for Word Boundary. It is a Unicode property +that finds the boundary between words. This is similar to the plain +C<\b> (without braces) but is more suitable for natural language +processing. It knows, for example, that apostrophes can occur in the +middle of words. See L for details. + +=head3 C + +C stands for Sentence Boundary. It is a Unicode property +to aid in parsing natural language sentences. +See L for details. + +=head2 Non-Capturing Regular Expression Flag + +Regular expressions now support a C flag that disables capturing +and filling in C<$1>, C<$2>, etc inside of groups: + + "hello" =~ /(hi|hello)/n; # $1 is not set + +This is equivalent to putting C at the beginning of every capturing group. + +See L for more information. + +=head2 C + +This applies stricter syntax rules to regular expression patterns +compiled within its scope. This will hopefully alert you to typos and +other unintentional behavior that backwards-compatibility issues prevent +us from reporting in normal regular expression compilations. Because the +behavior of this is subject to change in future Perl releases as we gain +experience, using this pragma will raise a warning of category +C. +See L<'strict' in re|re/'strict' mode>. + +=head2 Unicode 7.0 (with correction) is now supported + +For details on what is in this release, see +L. +The version of Unicode 7.0 that comes with Perl includes +a correction dealing with glyph shaping in Arabic +(see L). + + +=head2 S> can restrict which locale categories are affected + +It is now possible to pass a parameter to S> to specify +a subset of locale categories to be locale-aware, with the remaining +ones unaffected. See L for details. + +=head2 Perl now supports POSIX 2008 locale currency additions + +On platforms that are able to handle POSIX.1-2008, the +hash returned by +L|perllocale/The localeconv function> +includes the international currency fields added by that version of the +POSIX standard. These are +C, +C, +C, +C, +C, +and +C. + +=head2 Better heuristics on older platforms for determining locale UTF-8ness + +On platforms that implement neither the C99 standard nor the POSIX 2001 +standard, determining if the current locale is UTF-8 or not depends on +heuristics. These are improved in this release. + +=head2 Aliasing via reference + +Variables and subroutines can now be aliased by assigning to a reference: + + \$c = \$d; + \&x = \&y; + +Aliasing can also be accomplished +by using a backslash before a C iterator variable; this is +perhaps the most useful idiom this feature provides: + + foreach \%hash (@array_of_hash_refs) { ... } + +This feature is experimental and must be enabled via S>. It will warn unless the C +warnings category is disabled. + +See L + +=head2 C with no arguments + +C with no arguments now infers C<$_>. +L<[perl #123514]|https://rt.perl.org/Ticket/Display.html?id=123514>. + +=head2 New C<:const> subroutine attribute + +The C attribute can be applied to an anonymous subroutine. It +causes the new sub to be executed immediately whenever one is created +(I when the C expression is evaluated). Its value is captured +and used to create a new constant subroutine that is returned. This +feature is experimental. See L. + +=head2 C now works on directory handles + +When the relevant support is available in the operating system, the +C builtin now works on directory handles, yielding the +underlying file descriptor in the same way as for filehandles. On +operating systems without such support, C on a directory handle +continues to return the undefined value, as before, but also sets C<$!> to +indicate that the operation is not supported. + +Currently, this uses either a C member in the OS C +structure, or a C function as specified by POSIX.1-2008. + +=head2 List form of pipe open implemented for Win32 + +The list form of pipe: + + open my $fh, "-|", "program", @arguments; + +is now implemented on Win32. It has the same limitations as C on Win32, since the Win32 API doesn't accept program arguments +as a list. + +=head2 Assignment to list repetition + +C<(...) x ...> can now be used within a list that is assigned to, as long +as the left-hand side is a valid lvalue. This allows S> to be written as S>. + +=head2 Infinity and NaN (not-a-number) handling improved + +Floating point values are able to hold the special values infinity, negative +infinity, and NaN (not-a-number). Now we more robustly recognize and +propagate the value in computations, and on output normalize them to the strings +C, C<-Inf>, and C. + +See also the L enhancements. + +=head2 Floating point parsing has been improved + +Parsing and printing of floating point values has been improved. + +As a completely new feature, hexadecimal floating point literals +(like C<0x1.23p-4>) are now supported, and they can be output with +S>. See L for more +details. + +=head2 Packing infinity or not-a-number into a character is now fatal + +Before, when trying to pack infinity or not-a-number into a +(signed) character, Perl would warn, and assumed you tried to +pack C<< 0xFF >>; if you gave it as an argument to C<< chr >>, +C<< U+FFFD >> was returned. + +But now, all such actions (C<< pack >>, C<< chr >>, and C<< print '%c' >>) +result in a fatal error. + +=head2 Experimental C Backtrace API + +Perl now supports (via a C level API) retrieving +the C level backtrace (similar to what symbolic debuggers like gdb do). + +The backtrace returns the stack trace of the C call frames, +with the symbol names (function names), the object names (like "perl"), +and if it can, also the source code locations (file:line). + +The supported platforms are Linux and OS X (some *BSD might work at +least partly, but they have not yet been tested). + +The feature needs to be enabled with C. + +See L for more information. + +=head1 Security + +=head2 Perl is now compiled with C<-fstack-protector-strong> if available + +Perl has been compiled with the anti-stack-smashing option +C<-fstack-protector> since 5.10.1. Now Perl uses the newer variant +called C<-fstack-protector-strong>, if available. + +=head2 The L module could allow outside packages to be replaced + +Critical bugfix: outside packages could be replaced. L has +been patched to 2.38 to address this. + +=head2 Perl is now always compiled with C<-D_FORTIFY_SOURCE=2> if available + +The 'code hardening' option called C<_FORTIFY_SOURCE>, available in +gcc 4.*, is now always used for compiling Perl, if available. + +Note that this isn't necessarily a huge step since in many platforms +the step had already been taken several years ago: many Linux +distributions (like Fedora) have been using this option for Perl, +and OS X has enforced the same for many years. + +=head1 Incompatible Changes + +=head2 Subroutine signatures moved before attributes + +The experimental sub signatures feature, as introduced in 5.20, parsed +signatures after attributes. In this release, following feedback from users +of the experimental feature, the positioning has been moved such that +signatures occur after the subroutine name (if any) and before the attribute +list (if any). + +=head2 C<&> and C<\&> prototypes accepts only subs + +The C<&> prototype character now accepts only anonymous subs (C), things beginning with C<\&>, or an explicit C. Formerly +it erroneously also allowed references to arrays, hashes, and lists. +L<[perl #4539]|https://rt.perl.org/Ticket/Display.html?id=4539>. +L<[perl #123062]|https://rt.perl.org/Ticket/Display.html?id=123062>. +L<[perl #123062]|https://rt.perl.org/Ticket/Display.html?id=123475>. + +In addition, the C<\&> prototype was allowing subroutine calls, whereas +now it only allows subroutines: C<&foo> is still permitted as an argument, +while C<&foo()> and C no longer are. +L<[perl #77860]|https://rt.perl.org/Ticket/Display.html?id=77860>. + +=head2 C is now lexical + +The L pragma's effect is now limited to lexical scope. This +pragma is deprecated, but in the meantime, it could adversely affect +unrelated modules that are included in the same program; this change +fixes that. + +=head2 List slices returning empty lists + +List slices now return an empty list only if the original list was empty +(or if there are no indices). Formerly, a list slice would return an empty +list if all indices fell outside the original list; now it returns a list +of C values in that case. +L<[perl #114498]|https://rt.perl.org/Ticket/Display.html?id=114498>. + +=head2 C<\N{}> with a sequence of multiple spaces is now a fatal error + +E.g. SEMANY SPACES}>> or S>. +This has been deprecated since v5.18. + +=head2 S> is now a fatal error + +Importing functions from C has been deprecated since v5.12, and +is now a fatal error. S> without any arguments is still +allowed. + +=head2 In double-quotish C<\cI>, I must now be a printable ASCII character + +In prior releases, failure to do this raised a deprecation warning. + +=head2 Splitting the tokens C<(?> and C<(*> in regular expressions is now a fatal compilation error. + +These had been deprecated since v5.18. + +=head2 C now ignores all Unicode pattern white space + +The C regular expression modifier allows the pattern to contain +white space and comments (both of which are ignored) for improved +readability. Until now, not all the white space characters that Unicode +designates for this purpose were handled. The additional ones now +recognized are: + + U+0085 NEXT LINE + U+200E LEFT-TO-RIGHT MARK + U+200F RIGHT-TO-LEFT MARK + U+2028 LINE SEPARATOR + U+2029 PARAGRAPH SEPARATOR + +The use of these characters with C outside bracketed character +classes and when not preceded by a backslash has raised a deprecation +warning since v5.18. Now they will be ignored. + +=head2 Comment lines within S> are now ended only by a C<\n> + +S> is an experimental feature, introduced in v5.18. It operates +as if C is always enabled. But there was a difference: comment +lines (following a C<#> character) were terminated by anything matching +C<\R> which includes all vertical whitespace, such as form feeds. For +consistency, this is now changed to match what terminates comment lines +outside S>, namely a C<\n> (even if escaped), which is the +same as what terminates a heredoc string and formats. + +=head2 C<(?[...])> operators now follow standard Perl precedence + +This experimental feature allows set operations in regular expression patterns. +Prior to this, the intersection operator had the same precedence as the other +binary operators. Now it has higher precedence. This could lead to different +outcomes than existing code expects (though the documentation has always noted +that this change might happen, recommending fully parenthesizing the +expressions). See L. + +=head2 Omitting C<%> and C<@> on hash and array names is no longer permitted + +Really old Perl let you omit the C<@> on array names and the C<%> on hash +names in some spots. This has issued a deprecation warning since Perl +5.000, and is no longer permitted. + +=head2 C<"$!"> text is now in English outside the scope of C + +Previously, the text, unlike almost everything else, always came out +based on the current underlying locale of the program. (Also affected +on some systems is C<"$^E">.) For programs that are unprepared to +handle locale differences, this can cause garbage text to be displayed. +It's better to display text that is translatable via some tool than +garbage text which is much harder to figure out. + +=head2 C<"$!"> text will be returned in UTF-8 when appropriate + +The stringification of C<$!> and C<$^E> will have the UTF-8 flag set +when the text is actually non-ASCII UTF-8. This will enable programs +that are set up to be locale-aware to properly output messages in the +user's native language. Code that needs to continue the 5.20 and +earlier behavior can do the stringification within the scopes of both +S> and S>. Within these two +scopes, no other Perl operations will +be affected by locale; only C<$!> and C<$^E> stringification. The +C pragma causes the UTF-8 flag to not be set, just as in previous +Perl releases. This resolves +L<[perl #112208]|https://rt.perl.org/Ticket/Display.html?id=112208>. + +=head2 Support for C without explicit operator has been removed + +The C construct, which allows matching a regex only once, +previously had an alternative form that was written directly with a question +mark delimiter, omitting the explicit C operator. This usage has produced +a deprecation warning since 5.14.0. It is now a syntax error, so that the +question mark can be available for use in new operators. + +=head2 C and C are now fatal errors + +These have been deprecated since v5.6.1 and have raised deprecation +warnings since v5.16. + +=head2 Using a hash or an array as a reference are now fatal errors + +For example, C<< %foo->{"bar"} >> now causes a fatal compilation +error. These have been deprecated since before v5.8, and have raised +deprecation warnings since then. + +=head2 Changes to the C<*> prototype + +The C<*> character in a subroutine's prototype used to allow barewords to take +precedence over most, but not all, subroutine names. It was never +consistent and exhibited buggy behavior. + +Now it has been changed, so subroutines always take precedence over barewords, +which brings it into conformity with similarly prototyped built-in functions: + + sub splat(*) { ... } + sub foo { ... } + splat(foo); # now always splat(foo()) + splat(bar); # still splat('bar') as before + close(foo); # close(foo()) + close(bar); # close('bar') =head1 Deprecations -=head2 Making all warnings fatal is discouraged +=head2 Setting C<${^ENCODING}> to anything but C + +This variable allows Perl scripts to be written in an encoding other than +ASCII or UTF-8. However, it affects all modules globally, leading +to wrong answers and segmentation faults. New scripts should be written +in UTF-8; old scripts should be converted to UTF-8, which is easily done +with the L utility. + +=head2 Use of non-graphic characters in single-character variable names + +The syntax for single-character variable names is more lenient than +for longer variable names, allowing the one-character name to be a +punctuation character or even invisible (a non-graphic). Perl v5.20 +deprecated the ASCII-range controls as such a name. Now, all +non-graphic characters that formerly were allowed are deprecated. +The practical effect of this occurs only when not under C>, and affects just the C1 controls (code points 0x80 through +0xFF), NO-BREAK SPACE, and SOFT HYPHEN. + +=head2 Inlining of C with observable side-effects + +In many cases Perl makes S> into an inlinable constant +subroutine, capturing the value of C<$var> at the time the C expression +is evaluated. This can break the closure behavior in those cases where +C<$var> is subsequently modified, since the subroutine won't return the +changed value. (Note that this all only applies to anonymous subroutines +with an empty prototype (S>).) + +This usage is now deprecated in those cases where the variable could be +modified elsewhere. Perl detects those cases and emits a deprecation +warning. Such code will likely change in the future and stop producing a +constant. + +If your variable is only modified in the place where it is declared, then +Perl will continue to make the sub inlinable with no warnings. + + sub make_constant { + my $var = shift; + return sub () { $var }; # fine + } + + sub make_constant_deprecated { + my $var; + $var = shift; + return sub () { $var }; # deprecated + } + + sub make_constant_deprecated2 { + my $var = shift; + log_that_value($var); # could modify $var + return sub () { $var }; # deprecated + } + +In the second example above, detecting that C<$var> is assigned to only once +is too hard to detect. That it happens in a spot other than the C +declaration is enough for Perl to find it suspicious. + +This deprecation warning happens only for a simple variable for the body of +the sub. (A C block or C statement inside the sub is ignored, +because it does not become part of the sub's body.) For more complex +cases, such as S> the behavior has +changed such that inlining does not happen if the variable is modifiable +elsewhere. Such cases should be rare. + +=head2 Use of multiple C regexp modifiers + +It is now deprecated to say something like any of the following: + + qr/foo/xx; + /(?xax:foo)/; + use re qw(/amxx); + +That is, now C should only occur once in any string of contiguous +regular expression pattern modifiers. We do not believe there are any +occurrences of this in all of CPAN. This is in preparation for a future +Perl release having C permit white-space for readability in +bracketed character classes (those enclosed in square brackets: +C<[...]>). + +=head2 Using a NO-BREAK space in a character alias for C<\N{...}> is now deprecated + +This non-graphic character is essentially indistinguishable from a +regular space, and so should not be allowed. See +L. + +=head2 A literal C<"{"> should now be escaped in a pattern + +If you want a literal left curly bracket (also called a left brace) in a +regular expression pattern, you should now escape it by either +preceding it with a backslash (C<"\{">) or enclosing it within square +brackets C<"[{]">, or by using C<\Q>; otherwise a deprecation warning +will be raised. This was first announced as forthcoming in the v5.16 +release; it will allow future extensions to the language to happen. + +=head2 Making all warnings fatal is discouraged + +The documentation for L notes that +C<< use warnings FATAL => 'all' >> is discouraged, and provides stronger +language about the risks of fatal warnings in general. + +=head1 Performance Enhancements + +=over 4 + +=item * + +If a method or class name is known at compile time, a hash is precomputed +to speed up run-time method lookup. Also, compound method names like +C are parsed at compile time, to save having to parse them at +run time. + +=item * + +Array and hash lookups (especially nested ones) that use only constants +or simple variables as keys, are now considerably faster. See +L for more details. + +=item * + +C<(...)x1>, C<("constant")x0> and C<($scalar)x0> are now optimised in list +context. If the right-hand argument is a constant 1, the repetition +operator disappears. If the right-hand argument is a constant 0, the whole +expression is optimised to the empty list, so long as the left-hand +argument is a simple scalar or constant. (That is, C<(foo())x0> is not +subject to this optimisation.) + +=item * + +C assignment is now optimised into 4-argument C at the end +of a subroutine (or as the argument to C). Previously, this +optimisation only happened in void context. + +=item * + +In C<"\L...">, C<"\Q...">, etc., the extra "stringify" op is now optimised +away, making these just as fast as C, C, etc. + +=item * + +Assignment to an empty list is now sometimes faster. In particular, it +never calls C on tied arguments on the right-hand side, whereas it +used to sometimes. + +=item * + +There is a performance improvement of up to 20% when C is applied to +a non-magical, non-tied string, and either C is in scope or the +string doesn't use UTF-8 internally. + +=item * + +On most perl builds with 64-bit integers, memory usage for non-magical, +non-tied scalars containing only a floating point value has been reduced +by between 8 and 32 bytes, depending on OS. + +=item * + +In C<@array = split>, the assignment can be optimized away, so that C +writes directly to the array. This optimisation was happening only for +package arrays other than C<@_>, and only sometimes. Now this +optimisation happens almost all the time. + +=item * + +C is now subject to constant folding. So for example +S> is converted at compile-time to C<"a-b">. +Moreover, C with a scalar or constant for the separator and a +single-item list to join is simplified to a stringification, and the +separator doesn't even get evaluated. + +=item * + +C is implemented using two ops: a stringify op and a join op. +If the C contains nothing but a single array, the stringification is +optimized away. + +=item * + +S> and S> in void context are no longer evaluated at +run time. Even a whole sequence of S> statements will simply be +skipped over. The same applies to C variables. + +=item * + +Many internal functions have been refactored to improve performance and reduce +their memory footprints. +L<[perl #121436]|https://rt.perl.org/Ticket/Display.html?id=121436> +L<[perl #121906]|https://rt.perl.org/Ticket/Display.html?id=121906> +L<[perl #121969]|https://rt.perl.org/Ticket/Display.html?id=121969> + +=item * + +C<-T> and C<-B> filetests will return sooner when an empty file is detected. +L<[perl #121489]|https://rt.perl.org/Ticket/Display.html?id=121489> + +=item * + +Hash lookups where the key is a constant are faster. + +=item * + +Subroutines with an empty prototype and a body containing just C are now +eligible for inlining. +L<[perl #122728]|https://rt.perl.org/Ticket/Display.html?id=122728> + +=item * + +Subroutines in packages no longer need to be stored in typeglobs: +declaring a subroutine will now put a simple sub reference directly in the +stash if possible, saving memory. The typeglob still notionally exists, +so accessing it will cause the stash entry to be upgraded to a typeglob +(I this is just an internal implementation detail). +This optimization does not currently apply to XSUBs or exported +subroutines, and method calls will undo it, since they cache things in +typeglobs. +L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> + +=item * + +The functions C and C +(see L) are now optimized out on ASCII platforms. There is now not even +a minimal performance hit in writing code portable between ASCII and EBCDIC +platforms. + +=item * + +Win32 Perl uses 8 KB less of per-process memory than before for every perl +process, because some data is now memory mapped from disk and shared +between processes from the same perl binary. + +=back + +=head1 Modules and Pragmata + +=head2 Updated Modules and Pragmata + +Many of the libraries distributed with perl have been upgraded since v5.20.0. +For a complete list of changes, run: + + corelist --diff 5.20.0 5.22.0 + +You can substitute your favorite version in place of 5.20.0, too. + +Some notable changes include: + +=over 4 + +=item * + +L has been upgraded to version 2.04. + +Tests can now be run in parallel. + +=item * + +L has been upgraded to version 0.27. + +The usage of C in the XS has been corrected. +L<[perl #122701]|https://rt.perl.org/Ticket/Display.html?id=122701> + +Avoid reading beyond the end of a buffer. [perl #122629] + +=item * + +L has been upgraded to version 1.58. + +It provides a new C function, based on the existing +C<< B::GV->SAFENAME >>, that converts C<\cOPEN> to C<^OPEN>. + +Nulled COPs are now of class C, rather than C. + +C objects now provide a C method for accessing the +implicit CV associated with C things containing code blocks, and a +C method that returns the pertinent flags originating from the +C op. + +C now provides a C method returning a C object. +Two new classes, C and C, have been introduced. + +A bug where, after an ithread creation or psuedofork, special/immortal SVs in +the child ithread/psuedoprocess did not have the correct class of +C, has been fixed. +The C and C PADLIST methods have been added. + +=item * + +L has been upgraded to version 0.996. + +Null ops that are part of the execution chain are now given sequence +numbers. + +Private flags for nulled ops are now dumped with mnemonics as they would be +for the non-nulled counterparts. + +=item * + +L has been upgraded to version 1.35. + +It now deparses C<+sub : attr { ... }> correctly at the start of a +statement. Without the initial C<+>, C would be a statement label. + +C blocks are now emitted in the right place most of the time, but +the change unfortunately introduced a regression, in that C blocks +occurring just before the end of the enclosing block may appear below it +instead. + +C no longer puts erroneous C here and there, such as for +C. [perl #119815] + +Adjacent C statements are no longer accidentally nested if one +contains a C block. [perl #115066] + +Parenthesised arrays in lists passed to C<\> are now correctly deparsed +with parentheses (I, C<\(@a, (@b), @c)> now retains the parentheses +around @b), thus preserving the flattening behavior of referenced +parenthesised arrays. Formerly, it only worked for one array: C<\(@a)>. + +C is now deparsed correctly, with the C included. + +C was deparsed without the C (or C). +This has been fixed. + +Core keywords that conflict with lexical subroutines are now deparsed with +the C prefix. + +C now deparses correctly with C and +not C. + +C now deparses correctly with C in those +cases where the assignment is optimized away. + +It now deparses C)> and typed lexical (C) correctly. + +Deparse C<$#_> as that instead of as C<$#{_}>. +L<[perl #123947]|https://rt.perl.org/Ticket/Display.html?id=123947> + +BEGIN blocks at the end of the enclosing scope are now deparsed in the +right place. [perl #77452] + +BEGIN blocks were sometimes deparsed as __ANON__, but are now always called +BEGIN. + +Lexical subroutines are now fully deparsed. [perl #116553] + +C with C no longer omits the left-hand operand. + +The op trees that make up regexp code blocks are now deparsed for real. +Formerly, the original string that made up the regular expression was used. +That caused problems with CEheredoc})/> and multiline code blocks, +which were deparsed incorrectly. [perl #123217] [perl #115256] + +C<$;> at the end of a statement no longer loses its semicolon. +[perl #123357] + +Some cases of subroutine declarations stored in the stash in shorthand form +were being omitted. + +Non-ASCII characters are now consistently escaped in strings, instead of +some of the time. (There are still outstanding problems with regular +expressions and identifiers that have not been fixed.) + +When prototype sub calls are deparsed with C<&> (I, under the B<-P> +option), C is now added where appropriate, to force the scalar +context implied by the prototype. + +C, C, C and similar constructs with +loop controls are now deparsed correctly. The outer parentheses are not +optional. + +Whitespace is no longer escaped in regular expressions, because it was +getting erroneously escaped within C<(?x:...)> sections. + +C is now deparsed with those mandatory parentheses. + +C is now deparsed as a regular expression, and not just +C<@array>. + +C, C and C<$#{1}> are now deparsed with the braces, which +are mandatory in these cases. + +In deparsing feature bundles, C was emitting C first +instead of C. This has been fixed. + +C is now deparsed without quotation marks. + +C<\my @a> is now deparsed without parentheses. (Parenthese would flatten +the array.) + +C and C followed by a block are now deparsed correctly. +Formerly there was an erroneous C before the block. + +C<< use constant QR =E qr/.../flags >> followed by C<"" =~ QR> is no longer +without the flags. + +Deparsing C with the B<-w> switch enabled started to +emit 'uninitialized' warnings in Perl 5.14. This has been fixed. + +Deparsing calls to subs with a C<(;+)> prototype resulted in an infinite +loop. The C<(;$>) C<(_)> and C<(;_)> prototypes were given the wrong +precedence, causing C$b)> to be deparsed without the parentheses. + +Deparse now provides a defined state sub in inner subs. + +=item * + +L has been added. + +L provides detailed information about the flags used in the +C field of perl opcodes. + +=item * + +L, L, L have been upgraded to version 0.39. + +Document in CAVEATS that using strings as numbers won't always invoke +the big number overloading, and how to invoke it. [rt.perl.org #123064] + +=item * + +L has been upgraded to version 1.36. + +C now ignores version mismatches with Carp if Carp is newer +than 1.12, since C's guts were merged into Carp at that +point. +L<[perl #121574]|https://rt.perl.org/Ticket/Display.html?id=121574> + +Carp now handles non-ASCII platforms better. + +Off-by-one error fix for Perl E 5.14. + +=item * + +L has been upgraded to version 1.33. + +It now accepts fully-qualified constant names, allowing constants to be defined +in packages other than the caller. + +=item * + +L has been upgraded to version 2.11. + +Add support for C and introduce workaround for a misbehavior +seen on Strawberry Perl 5.20.1. + +Fix C after building dependencies bug. + +Introduce experimental support for plugins/hooks. + +Integrate the C sources. + +Do not check recursion on optional dependencies. + +Sanity check F to contain a hash. +L<[cpan #95271]|https://rt.cpan.org/Ticket/Display.html?id=95271> + +=item * + +L has been upgraded to version 2.132. + +Works around limitations in C detecting v-string magic and adds +support for forthcoming L bootstrap F for +Perls older than 5.10.0. + +=item * + +L has been upgraded to version 2.158. + +Fixes CVE-2014-4330 by adding a configuration variable/option to limit +recursion when dumping deep data structures. + +Changes to resolve Coverity issues. +XS dumps incorrectly stored the name of code references stored in a +GLOB. +L<[perl #122070]|https://rt.perl.org/Ticket/Display.html?id=122070> + +=item * + +L has been upgraded to version 1.32. + +Remove C global if unused in Dynaloader. [perl #122926] + +=item * + +L has been upgraded to version 2.72. + +C now has better error handling when the encoding name is nonexistent, +and a build breakage when upgrading L in perl-5.8.2 and earlier has +been fixed. + +Building in C++ mode on Windows now works. + +=item * + +L has been upgraded to version 1.23. + +Add C<-P> to the preprocessor command-line on GCC 5. GCC added extra +line directives, breaking parsing of error code definitions. [rt.perl.org +#123784] + +=item * + +L has been upgraded to version 0.013. + +Hardcodes features for Perls older than 5.15.7. + +=item * + +L has been upgraded to version 0.280221. + +Fixes a regression on Android. +L<[perl #122675]|https://rt.perl.org/Ticket/Display.html?id=122675> + +=item * + +L has been upgraded to version 1.70. + +Fixes a bug with C's handling of quoted filenames and improves +C to follow symlinks. +L<[perl #122415]|https://rt.perl.org/Ticket/Display.html?id=122415> + +=item * + +L has been upgraded to version 3.28. + +Only declare C unused if we actually define it. +Improve generated C code generation to avoid repeated +references to C. [perl #123278] +Broaden and document the C to C typemap optimization +for the C method. [perl #123418] + +=item * + +L has been upgraded to version 1.13. + +Add support for the Linux pipe buffer size C commands. + +=item * + +L has been upgraded to version 1.29. + +C and C will now warn if passed inappropriate or +misspelled options. + +=item * + +L has been upgraded to version 1.24. + +Avoid C expanding to call C three times in a few +places. [perl #123606] + +=item * + +L has been upgraded to version 0.054. + +C is now fork-safe and thread-safe. + +=item * + +L has been upgraded to version 1.35. + +The XS implementation has been fixed for the sake of older Perls. + +=item * + +L has been upgraded to version 1.38. + +Document the limitations of the C method. [perl #123096] + +=item * + +L has been upgraded to version 0.37. + +A better fix for subclassing C. +L<[cpan #95983]|https://rt.cpan.org/Ticket/Display.html?id=95983> +L<[cpan #97050]|https://rt.cpan.org/Ticket/Display.html?id=97050> + +Implements Timeout for C. +L<[cpan #92075]|https://rt.cpan.org/Ticket/Display.html?id=92075> + +=item * + +The libnet collection of modules has been upgraded to version 3.05. + +Support for IPv6 and SSL to C, C, C and C. +Improvements in C authentication. + +=item * + +L has been upgraded to version 3.34. + +Fixed a bug in the scripts used to extract data from spreadsheets that +prevented the SHP currency code from being found. +L<[cpan #94229]|https://rt.cpan.org/Ticket/Display.html?id=94229> + +New codes have been added. + +=item * + +L has been upgraded to version 1.9997. + +Synchronize POD changes from the CPAN release. +C<< Math::BigFloat->blog(x) >> would sometimes return C when +the accuracy was greater than 70 digits. +The result of C<< Math::BigFloat->bdiv() >> in list context now +satisfies C<< x = quotient * divisor + remainder >>. + +Correct handling of subclasses. +L<[cpan #96254]|https://rt.cpan.org/Ticket/Display.html?id=96254> +L<[cpan #96329]|https://rt.cpan.org/Ticket/Display.html?id=96329> + +=item * + +L has been upgraded to version 1.000026. + +Support installations on older perls with an L earlier +than 6.63_03 + +=item * + +L has been upgraded to version 1.26. + +A redundant C check has been removed. + +=item * + +The PathTools module collection has been upgraded to version 3.56. + +A warning from the B compiler is now avoided when building the XS. + +Don't turn leading C into C on Cygwin. [perl #122635] + +=item * + +L has been upgraded to version 1.49. + +The debugger would cause an assertion failure. +L<[perl #124127]|https://rt.perl.org/Ticket/Display.html?id=124127> + +C in the debugger under C will now create a new window for +the forked process. L<[perl +#121333]|https://rt.perl.org/Ticket/Display.html?id=121333> + +The debugger now saves the current working directory on startup and +restores it when you restart your program with C or C. L<[perl +#121509]|https://rt.perl.org/Ticket/Display.html?id=121509> + +=item * + +L has been upgraded to version 0.22. + +Reading from a position well past the end of the scalar now correctly +returns end of file. [perl #123443] + +Seeking to a negative position still fails, but no longer leaves the +file position set to a negation location. + +C on a C handle now properly returns true when +the file position is past the 2GB mark on 32-bit systems. + +Attempting to write at file positions impossible for the platform now +fail early rather than wrapping at 4GB. + +=item * + +L has been upgraded to version 3.25. + +Filehandles opened for reading or writing now have C<:encoding(UTF-8)> set. +L<[cpan #98019]|https://rt.cpan.org/Ticket/Display.html?id=98019> + +=item * + +L has been upgraded to version 1.53. + +The C99 math functions and constants (for example C, C, C, C, +C; C, C, C) have been added. + +C now produces a deprecation warning. [perl #122005] + +=item * + +L has been upgraded to version 2.39. + +C was not propagating void context properly. + +=item * + +Scalar-List-Utils has been upgraded to version 1.41. + +A new module, L, has been added, containing functions related to +CODE refs, including C (inspired by C) and C +(copied and renamed from C). +The use of C in C has also been fixed. +L<[cpan #63211]|https://rt.cpan.org/Ticket/Display.html?id=63211> + +=item * + +L has been upgraded to version 1.13. + +Simplified the build process. [perl #123413] + +=item * + +L has been upgraded to version 1.29. + +When pretty printing negative C, the "minus" is no longer lost. + +=item * + +L has been upgraded to version 1.12. + +Version 0.67's improved discontiguous contractions is invalidated by default +and is supported as a parameter C. + +=item * + +L has been upgraded to version 1.18. + +The XSUB implementation has been removed in favor of pure Perl. + +=item * + +L has been upgraded to version 0.61. + +A new function L +has been added to return a given property's possible values. + +A new function L +has been added to return the value of a given property for a given code +point. + +A new function L +has been added to return the values of all Unicode properties for a +given code point. + +A bug has been fixed so that L +returns the correct short and long names for the Perl extensions where +it was incorrect. + +A bug has been fixed so that +L +returns C instead of a wrong result for properties that are Perl +extensions. + +This module now works on EBCDIC platforms. + +=item * + +L has been upgraded to version 1.17 + +A mismatch between the documentation and the code in C +was fixed in favor of the documentation. The optional second argument +is now correctly treated as a perl boolean (true/false semantics) and +not as an integer. + +=item * + +L has been upgraded to version 0.9909. + +Numerous changes. See the F file in the CPAN distribution for +details. + +=item * + +L has been upgraded to version 0.51. + +C now supports Windows 8.1, and building in C++ mode now works. + +=item * + +L has been upgraded to version 0.1202 + +Building in C++ mode now works. + +=item * + +L has been upgraded to version 0.20. + +Allow XSLoader to load modules from a different namespace. +[perl #122455] + +=back + +=head2 Removed Modules and Pragmata + +The following modules (and associated modules) have been removed from the core +perl distribution: + +=over 4 + +=item * + +L + +=item * + +L + +=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 + +=over 4 + +=item * + +A note on long doubles has been added. + +=back + + +=head3 L + +=over 4 + +=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. + +=item * + +Some documentation that was previously missing due to formatting errors is +now included. + +=item * + +Entries are now organized into groups rather than by the file where they +are found. + +=item * + +Alphabetical sorting of entries is now done consistently (automatically +by the POD generator) to make entries easier to find when scanning. + +=back + +=head3 L + +=over 4 + +=item * + +The syntax of single-character variable names has been brought +up-to-date and more fully explained. + +=item * + +Hexadecimal floating point numbers are described, as are infinity and +NaN. + +=back + +=head3 L + +=over 4 + +=item * + +This document has been significantly updated in the light of recent +improvements to EBCDIC support. + +=back + +=head3 L + +=over 4 + +=item * + +Added a L section. + +=back + + +=head3 L + +=over 4 + +=item * + +Mention that C is currently a no-op. + +=item * + +Calling C or C on array values is now described as "strongly +discouraged" rather than "deprecated". + +=item * + +Improve documentation of C<< our >>. + +=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 and C may fall back to the shell on +Win32. Only the indirect-object syntax C and +C 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> + +=back + +=head3 L + +=over 4 + +=item * + +The OOK example has been updated to account for COW changes and a change in the +storage of the offset. + +=item * + +Details on C level symbols and libperl.t added. + +=item * + +Information on Unicode handling has been added + +=item * + +Information on EBCDIC handling has been added + +=back + +=head3 L + +=over 4 + +=item * + +A note has been added about running on platforms with non-ASCII +character sets + +=item * + +A note has been added about performance testing + +=back + +=head3 L + +=over 4 + +=item * + +Documentation has been added illustrating the perils of assuming that +there is no change to the contents of static memory pointed to by the +return values of Perl's wrappers for C library functions. + +=item * + +Replacements for C, C, C, and C are now +recommended. + +=item * + +Updated documentation for the C C target. +L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431> + +=item * + +Information is given about writing test files portably to non-ASCII +platforms. + +=item * + +A note has been added about how to get a C language stack backtrace. + +=back + +=head3 L + +=over 4 + +=item * + +Note that the message "Redeclaration of "sendpath" with a different +storage class specifier" is harmless. + +=back + +=head3 L + +=over 4 + +=item * + +Updated for the enhancements in v5.22, along with some clarifications. + +=back + +=head3 L + +=over 4 + +=item * + +Instead of pointing to the module list, we are now pointing to +L. + +=back + +=head3 L + +=over 4 + +=item * + +Updated for the enhancements in v5.22, along with some clarifications. + +=back + +=head3 L + +=over 4 + +=item * + +The specification of the pod language is changing so that the default +encoding of pods that aren't in UTF-8 (unless otherwise indicated) is +CP1252 instead of ISO 8859-1 (Latin1). + +=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 >>. + +=item * + +The conditions for marking an experimental feature as non-experimental are now +set out. + +=item * + +Clarification has been made as to what sorts of changes are permissible in +maintenance releases. + +=back + +=head3 L + +=over 4 + +=item * + +Out-of-date VMS-specific information has been fixed and/or simplified. + +=item * + +Notes about EBCDIC have been added. + +=back + +=head3 L + +=over 4 + +=item * + +The description of the C modifier has been clarified to note that +comments cannot be continued onto the next line by escaping them; and +there is now a list of all the characters that are considered whitespace +by this modifier. + +=item * + +The new C modifier is described. + +=item * + +A note has been added on how to make bracketed character class ranges +portable to non-ASCII machines. + +=back + +=head3 L + +=over 4 + +=item * + +Added documentation of C<\b{sb}>, C<\b{wb}>, C<\b{gcb}>, and C<\b{g}>. + +=back + +=head3 L + +=over 4 + +=item * + +Clarifications have been added to L +to the effect C<[A-Z]>, C<[a-z]>, C<[0-9]> and +any subranges thereof in regular expression bracketed character classes +are guaranteed to match exactly what a naive English speaker would +expect them to match, even on platforms (such as EBCDIC) where perl +has to do extra work to accomplish this. + +=item * + +The documentation of Bracketed Character Classes has been expanded to cover the +improvements in C (see under L). + +=back + +=head3 L + +=over 4 + +=item * + +A new section has been added +L + +=back + +=head3 L + +=over 4 + +=item * + +Comments added on algorithmic complexity and tied hashes. + +=back + +=head3 L + +=over 4 + +=item * + +An ambiguity in the documentation of the C<...> statement has been corrected. +L<[perl #122661]|https://rt.perl.org/Ticket/Display.html?id=122661> + +=item * + +The empty conditional in C<< for >> and C<< while >> is now documented +in L<< perlsyn >>. + +=back + +=head3 L + +=over 4 + +=item * + +This has had extensive revisions to bring it up-to-date with current +Unicode support and to make it more readable. Notable is that Unicode +7.0 changed what it should do with non-characters. Perl retains the old +way of handling for reasons of backward compatibility. See +L. + +=back + +=head3 L + +=over 4 + +=item * + +Advice for how to make sure your strings and regular expression patterns are +interpreted as Unicode has been updated. + +=back + +=head3 L + +=over 4 + +=item * + +C<$]> is no longer listed as being deprecated. Instead, discussion has +been added on the advantages and disadvantages of using it versus +C<$^V>. + +=item * + +C<${^ENCODING}> is now marked as deprecated. + +=item * + +The entry for C<%^H> has been clarified to indicate it can only handle +simple values. + +=back + +=head3 L + +=over 4 + +=item * + +Out-of-date and/or incorrect material has been removed. + +=item * + +Updated documentation on environment and shell interaction in VMS. + +=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 New Diagnostics + +=head3 New Errors + +=over 4 + +=item * + +L + +(P) An internal request asked to add a scalar entry to something that +wasn't a symbol table entry. + +=item * + +L + +(F) You tried to use a hash as a reference, as in +C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>. Versions of perl E= 5.6.1 +used to allow this syntax, but shouldn't have. + +=item * + +L + +(F) You tried to use an array as a reference, as in +C<< @foo->[23] >> or C<< @$ref->[99] >>. Versions of perl E= 5.6.1 used to +allow this syntax, but shouldn't have. + +=item * + +L + +(F) C is not useful on arrays because it +checks for an undefined I value. If you want to see if the +array is empty, just use S> for example. + +=item * + +L + +(F) C is not usually right on hashes. + +Although S> is false on a plain not-yet-used hash, it +becomes true in several non-obvious circumstances, including iterators, +weak references, stash names, even remaining true after S>. +These things make S> fairly useless in practice, so it now +generates a fatal error. + +If a check for non-empty is what you wanted then just put it in boolean +context (see L): + + if (%hash) { + # not empty + } + +If you had S> to check whether such a package +variable exists then that's never really been reliable, and isn't +a good way to enquire about the features of a package, or whether +it's loaded, etc. + +=item * + +L + +(F) You passed an invalid number (like an infinity or not-a-number) to +C. + +=item * + +L + +(F) You tried converting an infinity or not-a-number to an unsigned +character, which makes no sense. + +=item * + +L + +(F) You tried converting an infinity or not-a-number to a character, +which makes no sense. + +=item * + +L + +(F) You tried printing an infinity or not-a-number as a character (C<%c>), +which makes no sense. Maybe you meant C<'%s'>, or just stringifying it? + +=item * + +L + +(F) You defined a character name which had multiple space +characters in a row. Change them to single spaces. Usually these +names are defined in the C<:alias> import argument to C, but +they could be defined by a translator installed into C<$^H{charnames}>. +See L. + +=item * + +L + +(F) You defined a character name which ended in a space +character. Remove the trailing space(s). Usually these names are +defined in the C<:alias> import argument to C, but they +could be defined by a translator installed into C<$^H{charnames}>. +See L. + +=item * + +L<:const is not permitted on named subroutines|perldiag/":const is not permitted on named subroutines"> + +(F) The C attribute causes an anonymous subroutine to be run and +its value captured at the time that it is cloned. Named subroutines are +not cloned like this, so the attribute does not make sense on them. + +=item * + +L + +(F) Something went horribly bad in hexadecimal float handling. + +=item * + +L + +(F) You have configured Perl to use long doubles but +the internals of the long double format are unknown, +therefore the hexadecimal float output is impossible. + +=item * + +L + +(F) The script run under suidperl was somehow illegal. + +=item * + +L in mE%sE|perldiag/"In '(?...)', the '(' and '?' must be adjacent in regex; marked by <-- HERE in m/%s/"> + +(F) The two-character sequence C<"(?"> in +this context in a regular expression pattern should be an +indivisible token, with nothing intervening between the C<"("> +and the C<"?">, but you separated them. + +=item * + +L in mE%sE|perldiag/"In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by <-- HERE in m/%s/"> + +(F) The two-character sequence C<"(*"> in +this context in a regular expression pattern should be an +indivisible token, with nothing intervening between the C<"("> +and the C<"*">, but you separated them. + +=item * + +L%sE|perldiag/"Invalid quantifier in {,} in regex; marked by <-- HERE in m/%s/"> + +(F) The pattern looks like a {min,max} quantifier, but the min or max could not +be parsed as a valid number: either it has leading zeroes, or it represents +too big a number to cope with. The S<<-- HERE> shows where in the regular +expression the problem was discovered. See L. + +=item * + +L<'%s' is an unknown bound type in regex|perldiag/"'%s' is an unknown bound type in regex; marked by <-- HERE in m/%s/"> + +(F) You used C<\b{...}> or C<\B{...}> and the C<...> is not known to +Perl. The current valid ones are given in +L. + +=item * + +L + +(F) You tried to call C with no argument or with an undefined +value as an argument. C expects either a package name or a +file-specification as an argument. See L. + +Formerly, C with no argument or C warned about a Null filename. + +=back + +=head3 New Warnings + +=over 4 + +=item * + +L<\C is deprecated in regex|perldiag/"\C is deprecated in regex; marked by <-- HERE in m/%s/"> + +(D deprecated) The C<< /\C/ >> character class was deprecated in v5.20, and +now emits a warning. It is intended that it will become an error in v5.24. +This character class matches a single byte even if it appears within a +multi-byte character, breaks encapsulation, and can corrupt UTF-8 +strings. + +=item * + +L<"%s" is more clearly written simply as "%s" in regex; marked by E-- HERE in mE%sE|perldiag/"%s" is more clearly written simply as "%s" in regex; marked by <-- HERE in mE%sE> + +(W regexp) (only under C> or within C<(?[...])>) + +You specified a character that has the given plainer way of writing it, +and which is also portable to platforms running with different character +sets. + +=item * + +L + +(W numeric) The indicated string was fed as an argument to the C<++> operator +which expects either a number or a string matching C. +See L for details. + +=item * + +L-- HERE in mE%sE|perldiag/"Both or neither range ends should be Unicode in regex; marked by <-- HERE in m/%s/"> + +(W regexp) (only under C> or within C<(?[...])>) + +In a bracketed character class in a regular expression pattern, you +had a range which has exactly one end of it specified using C<\N{}>, and +the other end is specified using a non-portable mechanism. Perl treats +the range as a Unicode range, that is, all the characters in it are +considered to be the Unicode characters, and which may be different code +points on some platforms Perl runs on. For example, C<[\N{U+06}-\x08]> +is treated as if you had instead said C<[\N{U+06}-\N{U+08}]>, that is it +matches the characters whose code points in Unicode are 6, 7, and 8. +But that C<\x08> might indicate that you meant something different, so +the warning gets raised. + +=item * + +L + +(W locale) You are 1) running under "C"; 2) the current +locale is not a UTF-8 one; 3) you tried to do the designated case-change +operation on the specified Unicode character; and 4) the result of this +operation would mix Unicode and locale rules, which likely conflict. + +The warnings category C is new. + +=item * + +L<:const is experimental|perldiag/":const is experimental"> + +(S experimental::const_attr) The C attribute is experimental. +If you want to use the feature, disable the warning with C, but know that in doing so you are taking +the risk that your code may break in a future Perl version. + +=item * + +L + +(W overflow) You called C with a number that it could not handle: +too large, too small, or NaN. The returned value is C. + +=item * + +L + +(W overflow) The hexadecimal floating point has larger exponent +than the floating point supports. + +=item * + +L + +(W overflow) The hexadecimal floating point has smaller exponent +than the floating point supports. + +=item * + +L + +(W overflow) The hexadecimal floating point literal had more bits in +the mantissa (the part between the C<0x> and the exponent, also known as +the fraction or the significand) than the floating point supports. + +=item * + +L + +(W overflow) The hexadecimal floating point had internally more +digits than could be output. This can be caused by unsupported +long double formats, or by 64-bit integers not being available +(needed to retrieve the digits under some configurations). + +=item * + +L + +(W locale) You are using the named locale, which is a non-UTF-8 one, and +which perl has determined is not fully compatible with what it can +handle. The second C<%s> gives a reason. + +The warnings category C is new. + +=item * + +L + +(W overflow) You called C with a number that it could not handle: +too large, too small, or NaN. The returned value is C. + +=item * + +L + +(W numeric) You tried to execute the +L|perlop/Multiplicative Operators> repetition operator fewer than 0 +times, which doesn't make sense. + +=item * + +L + +(D deprecated) You defined a character name which contained a no-break +space character. Change it to a regular space. Usually these names are +defined in the C<:alias> import argument to C, but they +could be defined by a translator installed into C<$^H{charnames}>. See +L. + +=item * + +L + +(W numeric) You tried to execute the +L|perlop/Multiplicative Operators> repetition operator C (or +C<-Inf>) or NaN times, which doesn't make sense. + +=item * + +L + +(S experimental::win32_perlio) The C<:win32> PerlIO layer is +experimental. If you want to take the risk of using this layer, +simply disable this warning: + + no warnings "experimental::win32_perlio"; + +=item * + +L-- HERE in mE%sE|perldiag/"Ranges of ASCII printables should be some subset of "0-9", "A-Z", or "a-z" in regex; marked by <-- HERE in mE%sE"> + +(W regexp) (only under C> or within C<(?[...])>) + +Stricter rules help to find typos and other errors. Perhaps you didn't +even intend a range here, if the C<"-"> was meant to be some other +character, or should have been escaped (like C<"\-">). If you did +intend a range, the one that was used is not portable between ASCII and +EBCDIC platforms, and doesn't have an obvious meaning to a casual +reader. + + [3-7] # OK; Obvious and portable + [d-g] # OK; Obvious and portable + [A-Y] # OK; Obvious and portable + [A-z] # WRONG; Not portable; not clear what is meant + [a-Z] # WRONG; Not portable; not clear what is meant + [%-.] # WRONG; Not portable; not clear what is meant + [\x41-Z] # WRONG; Not portable; not obvious to non-geek + +(You can force portability by specifying a Unicode range, which means that +the endpoints are specified by +L|perlrecharclass/Character Ranges>, but the meaning may +still not be obvious.) +The stricter rules require that ranges that start or stop with an ASCII +character that is not a control have all their endpoints be a literal +character, and not some escape sequence (like C<"\x41">), and the ranges +must be all digits, or all uppercase letters, or all lowercase letters. + +=item * + +L-- HERE in mE%sE|perldiag/"Ranges of digits should be from the same group in regex; marked by <-- HERE in m/%s/"> + +(W regexp) (only under C> or within C<(?[...])>) + +Stricter rules help to find typos and other errors. You included a +range, and at least one of the end points is a decimal digit. Under the +stricter rules, when this happens, both end points should be digits in +the same group of 10 consecutive digits. + +=item * + +L + +(W redundant) You called a function with more arguments than were +needed, as indicated by information within other arguments you supplied +(I. a printf format). Currently only emitted when a printf-type format +required fewer arguments than were supplied, but might be used in the +future for I L. + +The warnings category C<< redundant >> is new. See also +L<[perl #121025]|https://rt.perl.org/Ticket/Display.html?id=121025>. + +=item * + +L + +This is not a new diagnostic, but in earlier releases was accidentally +not displayed if the transliteration contained wide characters. This is +now fixed, so that you may see this diagnostic in places where you +previously didn't (but should have). + +=item * + +L + +(W locale) You are matching a regular expression using locale rules, +and a Unicode boundary is being matched, but the locale is not a Unicode +one. This doesn't make sense. Perl will continue, assuming a Unicode +(UTF-8) locale, but the results could well be wrong except if the locale +happens to be ISO-8859-1 (Latin1) where this message is spurious and can +be ignored. + +The warnings category C is new. + +=item * + +L<< Using Eu for '%s' instead of E%s in regex; marked by E-- HERE in mE%sE|perldiag/"Using Eu for '%s' instead of E%s in regex; marked by <-- HERE in mE%sE" >> + +(W regexp) You used a Unicode boundary (C<\b{...}> or C<\B{...}>) in a +portion of a regular expression where the character set modifiers C +or C are in effect. These two modifiers indicate an ASCII +interpretation, and this doesn't make sense for a Unicode definition. +The generated regular expression will compile so that the boundary uses +all of Unicode. No other portion of the regular expression is affected. + +=item * + +L + +(S experimental::bitwise) This warning is emitted if you use bitwise +operators (C<& | ^ ~ &. |. ^. ~.>) with the "bitwise" feature enabled. +Simply suppress the warning if you want to use the feature, but know +that in doing so you are taking the risk of using an experimental +feature which may change or be removed in a future Perl version: + + no warnings "experimental::bitwise"; + use feature "bitwise"; + $x |.= $y; + +=item * + +L%sE|perldiag/"Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%s/"> + +(D deprecated, regexp) You used a literal C<"{"> character in a regular +expression pattern. You should change to use C<"\{"> instead, because a future +version of Perl (tentatively v5.26) will consider this to be a syntax error. If +the pattern delimiters are also braces, any matching right brace +(C<"}">) should also be escaped to avoid confusing the parser, for +example, + + qr{abc\{def\}ghi} + +=item * + +L + +(D deprecated) Using literal non-graphic (including control) +characters in the source to refer to the I<^FOO> variables, like C<$^X> and +C<${^GLOBAL_PHASE}> is now deprecated. + +=item * + +L + +(W misc) The C attribute has no effect except +on anonymous closure prototypes. You applied it to +a subroutine via L. This is only useful +inside an attribute handler for an anonymous subroutine. + +=item * + +Ld modifier in transliteration operator|perldiag/"Useless use of /d modifier in transliteration operator"> + +This is not a new diagnostic, but in earlier releases was accidentally +not displayed if the transliteration contained wide characters. This is +now fixed, so that you may see this diagnostic in places where you +previously didn't (but should have). + +=item * + +Luse re 'strict'E is experimental|perldiag/"use re 'strict'" is experimental> + +(S experimental::re_strict) The things that are different when a regular +expression pattern is compiled under C<'strict'> are subject to change +in future Perl releases in incompatible ways; there are also proposals +to change how to enable strict checking instead of using this subpragma. +This means that a pattern that compiles today may not in a future Perl +release. This warning is to alert you to that risk. + +=item * + +L + +L + +(S io) Previously, perl silently ignored any errors when doing an implicit +close of a filehandle, I where the reference count of the filehandle +reached zero and the user's code hadn't already called C; I + + { + open my $fh, '>', $file or die "open: '$file': $!\n"; + print $fh, $data or die; + } # implicit close here + +In a situation such as disk full, due to buffering, the error may only be +detected during the final close, so not checking the result of the close is +dangerous. + +So perl now warns in such situations. + +=item * + +L + +(W locale) While in a single-byte locale (I, a non-UTF-8 +one), a multi-byte character was encountered. Perl considers this +character to be the specified Unicode code point. Combining non-UTF-8 +locales and Unicode is dangerous. Almost certainly some characters +will have two different representations. For example, in the ISO 8859-7 +(Greek) locale, the code point 0xC3 represents a Capital Gamma. But so +also does 0x393. This will make string comparisons unreliable. + +You likely need to figure out how this multi-byte character got mixed up +with your single-byte locale (or perhaps you thought you had a UTF-8 +locale, but Perl disagrees). + +The warnings category C is new. + +=back + +=head2 Changes to Existing Diagnostics + +=over 4 + +=item * + +<> should be quotes + +This warning has been changed to +L<< <> at require-statement should be quotes|perldiag/"<> at require-statement should be quotes" >> +to make the issue more identifiable. + +=item * + +L + +The L entry for this warning has added this clarifying note: + + Note that for the Inf and NaN (infinity and not-a-number) the + definition of "numeric" is somewhat unusual: the strings themselves + (like "Inf") are considered numeric, and anything following them is + considered non-numeric. + +=item * + +L + +This message has had '(did you forget to declare "my %s"?)' appended to it, to +make it more helpful to new Perl programmers. +L<[perl #121638]|https://rt.perl.org/Ticket/Display.html?id=121638> + +=item * + +'"my" variable &foo::bar can't be in a package' has been reworded to say +'subroutine' instead of 'variable'. + +=item * + +L<<< \N{} in character class restricted to one character in regex; marked by +S<< <-- HERE >> in mE%sE|perldiag/"\N{} in inverted character +class or as a range end-point is restricted to one character in regex; +marked by <-- HERE in m/%s/" >>> + +This message has had I changed to I to reflect improvements in +C (see under L). + +=item * + +L + +This message has had ': C<%f>' appended to it, to show what the offending +floating point number is. + +=item * + +I reworded as +L. + +=item * + +L + +This warning is now only produced when the newline is at the end of +the filename. + +=item * + +"Variable C<%s> will not stay shared" has been changed to say "Subroutine" +when it is actually a lexical sub that will not stay shared. + +=item * + +L%sE|perldiag/"Variable length lookbehind not implemented in regex m/%s/"> + +The L entry for this warning has had information about Unicode +behavior added. + +=back + +=head2 Diagnostic Removals + +=over + +=item * + +"Ambiguous use of -foo resolved as -&foo()" + +There is actually no ambiguity here, and this impedes the use of negated +constants; I, C<-Inf>. + +=item * + +"Constant is not a FOO reference" + +Compile-time checking of constant dereferencing (I, C<< my_constant->() >>) +has been removed, since it was not taking overloading into account. +L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456> +L<[perl #122607]|https://rt.perl.org/Ticket/Display.html?id=122607> + +=back + +=head1 Utility Changes + +=head2 F, F and F removal + +=over 4 + +=item * + +The F directory has been removed from the Perl core. + +This removes find2perl, s2p and a2p. They have all been released to CPAN as +separate distributions (C, C, C). + +=back + +=head2 L + +=over 4 + +=item * + +F now handles hexadecimal constants in the compiler's predefined +macro definitions, as visible in C<$Config{cppsymbols}>. +L<[perl #123784]|https://rt.perl.org/Ticket/Display.html?id=123784>. + +=back + +=head2 L + +=over 4 + +=item * + +No longer depends on non-core modules. + +=back + +=head1 Configuration and Compilation + +=over 4 + +=item * + +F now checks for C, C, C, and +C. + +=item * + +F with C<-Dmksymlinks> should now be faster. +L<[perl #122002]|https://rt.perl.org/Ticket/Display.html?id=122002>. + +=item * + +The C and C libraries will be linked by default if present. +This allows XS modules that require threading to work on non-threaded +perls. Note that you must still pass C<-Dusethreads> if you want a +threaded perl. + +=item * + +For long doubles (to get more precision and range for floating point numbers) +one can now use the GCC quadmath library which implements the quadruple +precision floating point numbers on x86 and IA-64 platforms. See +F for details. + +=item * + +MurmurHash64A and MurmurHash64B can now be configured as the internal hash +function. + +=item * + +C now supports parallel testing. + +For example: + + TEST_JOBS=9 make test.valgrind + +See L for more information. + +L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431> + +=item * + +The MAD (Misc Attribute Decoration) build option has been removed + +This was an unmaintained attempt at preserving +the Perl parse tree more faithfully so that automatic conversion of +Perl 5 to Perl 6 would have been easier. + +This build-time configuration option had been unmaintained for years, +and had probably seriously diverged on both Perl 5 and Perl 6 sides. + +=item * + +A new compilation flag, C<< -DPERL_OP_PARENT >> is available. For details, +see the discussion below at L<< /Internal Changes >>. + +=item * + +Pathtools no longer tries to load XS on miniperl. This speeds up building perl +slightly. + +=back + +=head1 Testing + +=over 4 + +=item * + +F has been added to test that L and its +dependencies only use the subset of the C<$1..$n> capture vars that +C is hard-coded to localize, because that function +has no efficient way of determining at runtime what vars to localize. + +=item * + +Tests for performance issues have been added in the file F. + +=item * + +Some regular expression tests are written in such a way that they will +run very slowly if certain optimizations break. These tests have been +moved into new files, F<< t/re/speed.t >> and F<< t/re/speed_thr.t >>, +and are run with a C<< watchdog() >>. + +=item * + +C<< test.pl >> now allows C<< plan skip_all => $reason >>, to make it +more compatible with C<< Test::More >>. + +=item * + +A new test script, F, has been added to test if infinity and NaN are +working correctly. See L. + +=back + +=head1 Platform Support + +=head2 Regained Platforms + +=over 4 + +=item IRIX and Tru64 platforms are working again. + +Some C failures remain: +L<[perl #123977]|https://rt.perl.org/Ticket/Display.html?id=123977> +and L<[perl #125298]|https://rt.perl.org/Ticket/Display.html?id=125298> +for IRIX; L<[perl #124212]|https://rt.perl.org/Ticket/Display.html?id=124212>, +L<[cpan #99605]|https://rt.cpan.org/Public/Bug/Display.html?id=99605>, and +L<[cpan #104836|https://rt.cpan.org/Ticket/Display.html?id=104836> for Tru64. + +=item z/OS running EBCDIC Code Page 1047 + +Core perl now works on this EBCDIC platform. Earlier perls also worked, but, +even though support wasn't officially withdrawn, recent perls would not compile +and run well. Perl 5.20 would work, but had many bugs which have now been +fixed. Many CPAN modules that ship with Perl still fail tests, including +C. However the version of C currently on CPAN should work; +it was fixed too late to include in Perl 5.22. Work is under way to fix many +of the still-broken CPAN modules, which likely will be installed on CPAN when +completed, so that you may not have to wait until Perl 5.24 to get a working +version. + +=back + +=head2 Discontinued Platforms + +=over 4 + +=item NeXTSTEP/OPENSTEP + +NeXTSTEP was a proprietary operating system bundled with NeXT's +workstations in the early to mid 90s; OPENSTEP was an API specification +that provided a NeXTSTEP-like environment on a non-NeXTSTEP system. Both +are now long dead, so support for building Perl on them has been removed. + +=back + +=head2 Platform-Specific Notes + +=over 4 + +=item EBCDIC + +Special handling is required of the perl interpreter on EBCDIC platforms +to get C to match only C<"i"> and C<"j">, since there are 7 +characters between the +code points for C<"i"> and C<"j">. This special handling had only been +invoked when both ends of the range are literals. Now it is also +invoked if any of the C<\N{...}> forms for specifying a character by +name or Unicode code point is used instead of a literal. See +L. + +=item HP-UX + +The archname now distinguishes use64bitint from use64bitall. + +=item Android + +Build support has been improved for cross-compiling in general and for +Android in particular. + +=item VMS + +=over 4 + +=item * + +When spawning a subprocess without waiting, the return value is now +the correct PID. + +=item * + +Fix a prototype so linking doesn't fail under the VMS C++ compiler. + +=item * + +C, C, and C detection has been added to +C, environment handling has had some minor changes, and +a fix for legacy feature checking status. + +=back + +=item Win32 + +=over 4 + +=item * + +F is now built with C<-fno-strict-aliasing>, allowing 64-bit +builds to complete on GCC 4.8. +L<[perl #123976]|https://rt.perl.org/Ticket/Display.html?id=123976> + +=item * + +C now works on Win32. Due to dependency issues you +need to build C first, and a small number of the +tests fail. +L<[perl #123394]|https://rt.perl.org/Ticket/Display.html?id=123394> + +=item * + +Perl can now be built in C++ mode on Windows by setting the makefile macro +C to the value "define". + +=item * + +The list form of piped open has been implemented for Win32. Note: unlike +C this does not fall back to the shell. +L<[perl #121159]|https://rt.perl.org/Ticket/Display.html?id=121159> + +=item * + +New C and C configuration options added to +Windows makefiles. + +=item * + +Previously, compiling XS modules (including CPAN ones) using Visual C++ for +Win64 resulted in around a dozen warnings per file from F. These +warnings have been silenced. + +=item * + +Support for building without PerlIO has been removed from the Windows +makefiles. Non-PerlIO builds were all but deprecated in Perl 5.18.0 and are +already not supported by F on POSIX systems. + +=item * + +Between 2 and 6 milliseconds and seven I/O calls have been saved per attempt +to open a perl module for each path in C<@INC>. + +=item * + +Intel C builds are now always built with C99 mode on. + +=item * + +C<%I64d> is now being used instead of C<%lld> for MinGW. + +=item * + +In the experimental C<:win32> layer, a crash in C was fixed. Also +opening F (which works under Win32 Perl's default C<:unix> +layer) was implemented for C<:win32>. +L<[perl #122224]|https://rt.perl.org/Ticket/Display.html?id=122224> + +=item * + +A new makefile option, C, has been added to the Windows +dmake makefile for gcc builds only. Set this to "define" if you want perl to +use long doubles to give more accuracy and range for floating point numbers. + +=back + +=item OpenBSD + +On OpenBSD, Perl will now default to using the system C due to the +security features it provides. Perl's own malloc wrapper has been in use +since v5.14 due to performance reasons, but the OpenBSD project believes +the tradeoff is worth it and would prefer that users who need the speed +specifically ask for it. + +L<[perl #122000]|https://rt.perl.org/Ticket/Display.html?id=122000>. + +=item Solaris + +=over 4 + +=item * + +We now look for the Sun Studio compiler in both F and +F. + +=item * + +Builds on Solaris 10 with C<-Dusedtrace> would fail early since make +didn't follow implied dependencies to build C. Added an +explicit dependency to C. +L<[perl #120120]|https://rt.perl.org/Ticket/Display.html?id=120120> + +=item * + +C99 options have been cleaned up; hints look for C +as well as C; and support for native C has been added. + +=back + +=back + +=head1 Internal Changes + +=over 4 + +=item * + +Experimental support has been added to allow ops in the optree to locate +their parent, if any. This is enabled by the non-default build option +C<-DPERL_OP_PARENT>. It is envisaged that this will eventually become +enabled by default, so XS code which directly accesses the C +field of ops should be updated to be future-proofed. + +On C builds, the C field has been renamed +C and a new flag, C, added. On the last op in a +sibling chain, C is false and C points to the +parent (if any) rather than being C. + +To make existing code work transparently whether using C +or not, a number of new macros and functions have been added that should +be used, rather than directly manipulating C. + +For the case of just reading C to determine the next sibling, +two new macros have been added. A simple scan through a sibling chain +like this: + + for (; kid->op_sibling; kid = kid->op_sibling) { ... } + +should now be written as: + + for (; OpHAS_SIBLING(kid); kid = OpSIBLING(kid)) { ... } + +For altering optrees, a general-purpose function C +has been added, which allows for manipulation of a chain of sibling ops. +By analogy with the Perl function C, it allows you to cut out +zero or more ops from a sibling chain and replace them with zero or more +new ops. It transparently handles all the updating of sibling, parent, +op_last pointers etc. + +If you need to manipulate ops at a lower level, then three new macros, +C, C and C are intended to +be a low-level portable way to set C / C while +also updating C. The first sets the sibling pointer to a new +sibling, the second makes the op the last sibling, and the third +conditionally does the first or second action. Note that unlike +C these macros won't maintain consistency in the +parent at the same time (I by updating C and C where +appropriate). + +A C-level C function and a Perl-level C +method have been added. The C function only exists under +C builds (using it is build-time error on vanilla +perls). C exists always, but on a vanilla build it +always returns C. Under C, they return the parent +of the current op, if any. The variable C<$B::OP::does_parent> allows you +to determine whether C supports retrieving an op's parent. + +C was introduced in 5.21.2, but the interface was +changed considerably in 5.21.11. If you updated your code before the +5.21.11 changes, it may require further revision. The main changes after +5.21.2 were: + +=over 4 + +=item * + +The C and C macros have been renamed +C and C for consistency with other +op-manipulating macros. + +=item * + +The C field has been renamed C, and its meaning +inverted. + +=item * + +The macro C has been removed, and has been superseded by +C I. + +=item * + +The C function now accepts a null C argument +where the splicing doesn't affect the first or last ops in the sibling +chain + +=back + +=item * + +Macros have been created to allow XS code to better manipulate the POSIX locale +category C. See L. + +=item * + +The previous C I replacement function, C, has now been +superseded by C. See L for details. + +=item * + +A new function, C, has been added which allows you +retrieve the weak references, if any, which point at an SV. + +=item * + +The C function has been removed. Although marked as +public API, it was undocumented and had no usage in CPAN modules. Calling +it has been fatal since 5.17.0. + +=item * + +The C, C, C and C +functions have been added to the API. + +=item * + +The internal C function in F has been renamed +C and added to the API. + +=item * + +The C function no longer forbids "ext" magic on read-only +values. After all, perl can't know whether the custom magic will modify +the SV or not. +L<[perl #123103]|https://rt.perl.org/Ticket/Display.html?id=123103>. + +=item * + +Accessing L on an XSUB is now forbidden. + +The C field has been reused for a different internal purpose +for XSUBs. So in particular, you can no longer rely on it being NULL as a +test of whether a CV is an XSUB. Use C instead. + +=item * + +SVs of type C are now sometimes bodiless when the build +configuration and platform allow it: specifically, when C<< sizeof(NV) <= +sizeof(IV) >>. "Bodiless" means that the NV value is stored directly in +the head of an SV, without requiring a separate body to be allocated. This +trick has already been used for IVs since 5.9.2 (though in the case of +IVs, it is always used, regardless of platform and build configuration). + +=item * + +The C<$DB::single>, C<$DB::signal> and C<$DB::trace> variables now have set- and +get-magic that stores their values as IVs, and those IVs are used when +testing their values in C. This prevents perl from +recursing infinitely if an overloaded object is assigned to any of those +variables. +L<[perl #122445]|https://rt.perl.org/Ticket/Display.html?id=122445>. + +=item * + +C, which is marked as public API but is undocumented, has +been removed from the public API. This change does not affect XS code that +uses the C macro to pre-extend the mortal stack. + +=item * + +Perl's internals no longer sets or uses the C flag. +C now returns a true value for anything not marked C +and C is now defined as 0. + +=item * + +The macros C and C have been removed. They were no longer used +in the core since commit 6f1401dc2a five years ago, and have not been +found present on CPAN. + +=item * + +The C<< SvFAKE >> bit (unused on HVs) got informally reserved by +David Mitchell for future work on vtables. + +=item * + +The C function accepts C and C +flags, which specify whether the appended string is bytes or UTF-8, +respectively. (These flags have in fact been present since 5.16.0, but +were formerly not regarded as part of the API.) + +=item * + +A new opcode class, C<< METHOP >>, has been introduced. It holds +information used at runtime to improve the performance +of class/object method calls. + +C<< OP_METHOD >> and C<< OP_METHOD_NAMED >> have changed from being +C<< UNOP/SVOP >> to being C<< METHOP >>. + +=item * + +C is a new API function that can be passed a CV or GV. It +returns an SV containing the name of the subroutine, for use in +diagnostics. + +L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735> +L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> + +=item * + +C is a new API function that works like +C, except that it allows the caller to specify +whether the call checker requires a full GV for reporting the subroutine's +name, or whether it could be passed a CV instead. Whatever value is +passed will be acceptable to C. C +guarantees there will be a GV, but it may have to create one on the fly, +which is inefficient. +L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735> + +=item * + +C (which is not part of the API) is now a more complex macro, which may +call a function and reify a GV. For those cases where it has been used as a +boolean, C has been added, which will return true for CVs that +notionally have GVs, but without reifying the GV. C also returns a GV +now for lexical subs. +L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> + +=item * + +The L function has been added to the public API. +Changing the program's locale should be avoided by XS code. Nevertheless, +certain non-Perl libraries called from XS need to do so, such as C. +When this happens, Perl needs to be told that the locale has +changed. Use this function to do so, before returning to Perl. + +=item * + +The defines and labels for the flags in the C field of OPs are now +auto-generated from data in F. The noticeable effect of this +is that some of the flag output of C might differ slightly, and the +flag output of S> may differ considerably (they both use the same set +of labels now). Also, debugging builds now have a new assertion in +C to ensure that the op doesn't have any unrecognized flags set in +C. + +=item * + +The deprecated variable C has been removed. + +=item * + +Perl now tries to keep the locale category C set to "C" +except around operations that need it to be set to the program's +underlying locale. This protects the many XS modules that cannot cope +with the decimal radix character not being a dot. Prior to this +release, Perl initialized this category to "C", but a call to +C would change it. Now such a call will change the +underlying locale of the C category for the program, but the +locale exposed to XS code will remain "C". There are new macros +to manipulate the LC_NUMERIC locale, including +C and +C. +See L. + +=item * + +A new macro L|perlapi/isUTF8_CHAR> has been written which +efficiently determines if the string given by its parameters begins +with a well-formed UTF-8 encoded character. + +=item * + +The following private API functions had their context parameter removed: +C, C, C, C, +C, C, C, C, +C, C, C, C. + +Note that the prefix-less versions of those functions that are part of the +public API, such as C, remain unaffected. + +=item * + +The C and C types are now separate types, and no +longer simply aliases for SV and AV. +L<[perl #123223]|https://rt.perl.org/Ticket/Display.html?id=123223>. + +=item * + +Pad names are now always UTF-8. The C macro always returns +true. Previously, this was effectively the case already, but any support +for two different internal representations of pad names has now been +removed. + +=item * + +A new op class, C, has been added. This is a subclass of +C with an C field added, which points to an array of unions +of UV, SV* etc. It is intended for where an op needs to store more data +than a simple C or whatever. Currently the only op of this type is +C (see next item). + +=item * + +A new op has been added, C, which performs one or more +nested array and hash lookups where the key is a constant or simple +variable. For example the expression C<$a[0]{$k}[$i]>, which previously +involved ten C, C, C and C ops is now performed +by a single C op. It can also handle C, C and +C. A non-simple index expression, such as C<[$i+1]> is still done +using C/C, and single-level array lookup with a small constant +index is still done using C. + +=back + +=head1 Selected Bug Fixes + +=over 4 + +=item * + +C now sets C<$!> + +When an I/O error occurs, the fact that there has been an error is recorded +in the handle. C returns false for such a handle. Previously, the +value of C<$!> would be untouched by C, so the common convention of +writing S> did not work reliably. Now the handle +records the value of C<$!>, too, and C restores it. + +=item * + +C now can turn off everything that C enables + +Previously, running C would turn off only a few things. Now it +can turn off all the enabled things. For example, the only way to +stop debugging, once enabled, was to exit the enclosing block; that is +now fixed. + +=item * + +C and C now zero the padding on x86 long +double builds. Under some build options on GCC 4.8 and later, they used +to either overwrite the zero-initialized padding, or bypass the +initialized buffer entirely. This caused F to fail. +L<[perl #123971]|https://rt.perl.org/Ticket/Display.html?id=123971> + +=item * + +Extending an array cloned from a parent thread could result in "Modification of +a read-only value attempted" errors when attempting to modify the new elements. +L<[perl #124127]|https://rt.perl.org/Ticket/Display.html?id=124127> + +=item * + +An assertion failure and subsequent crash with C<< *x= >> has been fixed. +L<[perl #123790]|https://rt.perl.org/Ticket/Display.html?id=123790> + +=item * + +A possible crashing/looping bug related to compiling lexical subs has been +fixed. +L<[perl #124099]|https://rt.perl.org/Ticket/Display.html?id=124099> + +=item * + +UTF-8 now works correctly in function names, in unquoted HERE-document +terminators, and in variable names used as array indexes. +L<[perl #124113]|https://rt.perl.org/Ticket/Display.html?id=124113> + +=item * + +Repeated global pattern matches in scalar context on large tainted strings were +exponentially slow depending on the current match position in the string. +L<[perl #123202]|https://rt.perl.org/Ticket/Display.html?id=123202> + +=item * + +Various crashes due to the parser getting confused by syntax errors have been +fixed. +L<[perl #123801]|https://rt.perl.org/Ticket/Display.html?id=123801> +L<[perl #123802]|https://rt.perl.org/Ticket/Display.html?id=123802> +L<[perl #123955]|https://rt.perl.org/Ticket/Display.html?id=123955> +L<[perl #123995]|https://rt.perl.org/Ticket/Display.html?id=123995> + +=item * + +C in the scope of lexical C<$_> has been fixed not to fail assertions. +L<[perl #123763]|https://rt.perl.org/Ticket/Display.html?id=123763> + +=item * + +C syntax inside various list operators no longer fails +assertions. +L<[perl #123817]|https://rt.perl.org/Ticket/Display.html?id=123817> + +=item * + +An C<@> sign in quotes followed by a non-ASCII digit (which is not a valid +identifier) would cause the parser to crash, instead of simply trying the +C<@> as literal. This has been fixed. +L<[perl #123963]|https://rt.perl.org/Ticket/Display.html?id=123963> + +=item * + +C<*bar::=*foo::=*glob_with_hash> has been crashing since Perl 5.14, but no +longer does. +L<[perl #123847]|https://rt.perl.org/Ticket/Display.html?id=123847> + +=item * + +C in scalar context was not pushing an item on to the stack, resulting +in bugs. (S> would print 5.) +It has been fixed to return C. +L<[perl #124004]|https://rt.perl.org/Ticket/Display.html?id=124004> + +=item * + +Several cases of data used to store environment variable contents in core C +code being potentially overwritten before being used have been fixed. +L<[perl #123748]|https://rt.perl.org/Ticket/Display.html?id=123748> + +=item * + +Some patterns starting with C matched against long strings have +been slow since v5.8, and some of the form C have been slow +since v5.18. They are now all fast again. +L<[perl #123743]|https://rt.perl.org/Ticket/Display.html?id=123743>. + +=item * + +The original visible value of C<$/> is now preserved when it is set to +an invalid value. Previously if you set C<$/> to a reference to an +array, for example, perl would produce a runtime error and not set +C, but Perl code that checked C<$/> would see the array +reference. +L<[perl #123218]|https://rt.perl.org/Ticket/Display.html?id=123218>. + +=item * + +In a regular expression pattern, a POSIX class, like C<[:ascii:]>, must +be inside a bracketed character class, like C. A +warning is issued when something looking like a POSIX class is not +inside a bracketed class. That warning wasn't getting generated when +the POSIX class was negated: C<[:^ascii:]>. This is now fixed. + +=item * + +Perl 5.14.0 introduced a bug whereby S> would crash. This +has been fixed. +L<[perl #123652]|https://rt.perl.org/Ticket/Display.html?id=123652>. + +=item * + +Various crashes due to the parser getting confused by syntax errors have +been fixed. +L<[perl #123617]|https://rt.perl.org/Ticket/Display.html?id=123617>. +L<[perl #123737]|https://rt.perl.org/Ticket/Display.html?id=123737>. +L<[perl #123753]|https://rt.perl.org/Ticket/Display.html?id=123753>. +L<[perl #123677]|https://rt.perl.org/Ticket/Display.html?id=123677>. + +=item * + +Code like C used to read the next line of input and treat it as +though it came immediately after the opening bracket. Some invalid code +consequently would parse and run, but some code caused crashes, so this is +now disallowed. +L<[perl #123712]|https://rt.perl.org/Ticket/Display.html?id=123712>. + +=item * + +Fix argument underflow for C. +L<[perl #123874]|https://rt.perl.org/Ticket/Display.html?id=123874>. + +=item * + +Fix handling of non-strict C<\x{}>. Now C<\x{}> is equivalent to C<\x{0}> +instead of faulting. + +=item * + +C is now no longer treated as stackable, just like C<-t stat>. +L<[perl #123816]|https://rt.perl.org/Ticket/Display.html?id=123816>. + +=item * + +The following no longer causes a SEGV: C. + +=item * + +Fixed infinite loop in parsing backrefs in regexp patterns. + +=item * + +Several minor bug fixes in behavior of Infinity and NaN, including +warnings when stringifying Infinity-like or NaN-like strings. For example, +"NaNcy" doesn't numify to NaN anymore. + +=item * + +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 while taking into account the current POSIX locale (which 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>. + +=item * + +C now works on very long strings (where there are more than 2 +billion iterations) instead of dying with 'Substitution loop'. +L<[perl #103260]|https://rt.perl.org/Ticket/Display.html?id=103260>. +L<[perl #123071]|https://rt.perl.org/Ticket/Display.html?id=123071>. + +=item * + +C no longer crashes with not-a-number values. +L<[perl #123495]|https://rt.perl.org/Ticket/Display.html?id=123495>. + +=item * + +C<\()> (a reference to an empty list), and C with lexical C<$_> in +scope, could both do a bad write past the end of the stack. They have +both been fixed to extend the stack first. + +=item * + +C with no arguments used to read the previous item on the +stack, so S> would print foo's prototype. +It has been fixed to infer C<$_> instead. +L<[perl #123514]|https://rt.perl.org/Ticket/Display.html?id=123514>. + +=item * + +Some cases of lexical state subs declared inside predeclared subs could +crash, for example when evalling a string including the name of an outer +variable, but no longer do. + +=item * + +Some cases of nested lexical state subs inside anonymous subs could cause +'Bizarre copy' errors or possibly even crashes. -The documentation for L notes that -C<< use warnings FATAL => 'all' >> is discouraged and provides stronger -language about the risks of fatal warnings in general. +=item * -=head1 Modules and Pragmata +When trying to emit warnings, perl's default debugger (F) was +sometimes giving 'Undefined subroutine &DB::db_warn called' instead. This +bug, which started to occur in Perl 5.18, has been fixed. +L<[perl #123553]|https://rt.perl.org/Ticket/Display.html?id=123553>. -=head2 Updated Modules and Pragmata +=item * -=over 4 +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 till 5.16.) The crash has, of course, been fixed. +L<[perl #123542]|https://rt.perl.org/Ticket/Display.html?id=123542>. =item * -L has been upgraded from version 0.26 to 0.27. +Fix a couple of string grow size calculation overflows; in particular, +a repeat expression like S> could cause a large buffer +overflow since the new output buffer size was not correctly handled by +C. An expression like this now properly produces a memory wrap +panic. +L<[perl #123554]|https://rt.perl.org/Ticket/Display.html?id=123554>. =item * -L has been upgraded from version 1.57 to 1.58. +C<< formline("@...", "a"); >> would crash. The C case in +C 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>. =item * -L has been upgraded from version 1.34 to 1.35. +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>. -C<< <<>> >> is now correctly deparsed. +=item * + +C and C now set C<$!> when they fail due to being +passed a closed file handle. +L<[perl #122703]|https://rt.perl.org/Ticket/Display.html?id=122703>. =item * -L has been upgraded from version 0.23 to 0.24. +C and C no longer crash due to a stack overflow +when freeing a deeply recursive op tree. +L<[perl #108276]|https://rt.perl.org/Ticket/Display.html?id=108276>. =item * -L has been upgraded from version 2.10 to 2.11. +In Perl 5.20.0, C<$^N> accidentally had the internal UTF-8 flag turned off +if accessed from a code block within a regular expression, effectively +UTF-8-encoding the value. This has been fixed. +L<[perl #123135]|https://rt.perl.org/Ticket/Display.html?id=123135>. =item * -L has been upgraded from version 3.55 to 3.56. +A failed C call no longer overwrites existing items on the stack, +which means that C<(semctl(-1,0,0,0))[0]> no longer gives an +"uninitialized" warning. =item * -L has been upgraded from version 1.04 to 1.05. +C with no space before C is now better at assigning the +right line number to that statement. +L<[perl #122695]|https://rt.perl.org/Ticket/Display.html?id=122695>. =item * -L has been upgraded from version 3.27 to 3.28. +Sometimes the assignment in C<@array = split> gets optimised so that C +itself writes directly to the array. This caused a bug, preventing this +assignment from being used in lvalue context. So +C<(@a=split//,"foo")=bar()> was an error. (This bug probably goes back to +Perl 3, when the optimisation was added.) It has now been fixed. +L<[perl #123057]|https://rt.perl.org/Ticket/Display.html?id=123057>. =item * -L has been upgraded from version 3.25 to 3.28. +When an argument list fails the checks specified by a subroutine +signature (which is still an experimental feature), the resulting error +messages now give the file and line number of the caller, not of the +called subroutine. +L<[perl #121374]|https://rt.perl.org/Ticket/Display.html?id=121374>. =item * -L has been upgraded from version 3.55 to 3.56. +The flip-flop operators (C<..> and C<...> in scalar context) used to maintain +a separate state for each recursion level (the number of times the +enclosing sub was called recursively), contrary to the documentation. Now +each closure has one internal state for each flip-flop. +L<[perl #122829]|https://rt.perl.org/Ticket/Display.html?id=122829>. =item * -L has been upgraded from version 0.0603 to 0.0604. +The flip-flop operator (C<..> in scalar context) would return the same +scalar each time, unless the containing subroutine was called recursively. +Now it always returns a new scalar. +L<[perl #122829]|https://rt.perl.org/Ticket/Display.html?id=122829>. + +=item * -The documentation now notes that this module also works with C. +C, C, statement labels, special blocks (C) and pod are now +permitted as the first thing in a C or C block, the block after +C or C (or other functions) returning a handle, and within +C<${...}>, C<@{...}>, etc. +L<[perl #122782]|https://rt.perl.org/Ticket/Display.html?id=122782>. =item * -L has been upgraded from version 0.36 to 0.37. +The repetition operator C now propagates lvalue context to its left-hand +argument when used in contexts like C. That allows +S> to work as expected if the loop modifies +C<$_>. =item * -L has been upgraded from version 5.20150320 to 5.20150420. +C<(...) x ...> in scalar context used to corrupt the stack if one operand +was an object with "x" overloading, causing erratic behavior. +L<[perl #121827]|https://rt.perl.org/Ticket/Display.html?id=121827>. -Updated to cover the latest releases of Perl. Also fixes a fencepost error in -is_core() and copes with versions that do not match x.yyyzzz. +=item * + +Assignment to a lexical scalar is often optimised away; for example in +C, the assign operator is optimised away and the add +operator writes its result directly to C<$x>. Various bugs related to +this optimisation have been fixed. Certain operators on the right-hand +side would sometimes fail to assign the value at all or assign the wrong +value, or would call STORE twice or not at all on tied variables. The +operators affected were C<$foo++>, C<$foo-->, and C<-$foo> under C, C, C and C. =item * -L has been upgraded from 1.48 to 1.49. +List assignments were sometimes buggy if the same scalar ended up on both +sides of the assignment due to use of C, C or C. The +result would be the wrong value getting assigned. -The debugger would cause an assertion failure. -L<[perl #124127]|https://rt.perl.org/Ticket/Display.html?id=124127> +=item * + +C (with one argument) was accidentally changed in 5.16 +to mean C. This has been fixed. =item * -L has been upgraded from version 0.013 to 0.014. +C<__SUB__> could return the wrong value or even corrupt memory under the +debugger (the C<-d> switch) and in subs containing C. =item * -L has been upgraded from version 1.15 to 1.16. +When S> becomes inlinable, it now returns a different +scalar each time, just as a non-inlinable sub would, though Perl still +optimises the copy away in cases where it would make no observable +difference. + +=item * -Minor documentation update only. +S> and S> are no longer +eligible for inlining. The former would crash; the latter would just +throw the attributes away. An exception is made for the little-known +C<:method> attribute, which does nothing much. =item * -L has been upgraded from version 1.31 to 1.32. +Inlining of subs with an empty prototype is now more consistent than +before. Previously, a sub with multiple statements, of which all but the last +were optimised away, would be inlinable only if it were an anonymous sub +containing a string C or C declaration or closing over an +outer lexical variable (or any anonymous sub under the debugger). Now any +sub that gets folded to a single constant after statements have been +optimised away is eligible for inlining. This applies to things like C. -=back +Some subroutines with an explicit C were being made inlinable, +contrary to the documentation, Now C always prevents inlining. -=head1 Documentation +=item * -=head2 Changes to Existing Documentation +On some systems, such as VMS, C can return a non-ASCII string. If a +scalar assigned to had contained a UTF-8 string previously, then C +would not turn off the UTF-8 flag, thus corrupting the return value. This +would happen with S>. -=head3 L +=item * -=over 4 +C no longer calls C twice on a tied first argument. =item * -This document has been significantly updated in the light of recent -improvements to EBCDIC support. +An unterminated here-doc on the last line of a quote-like operator +(C, C) no longer causes a double free. It +started doing so in 5.18. -=back +=item * -=head3 L +C and C no longer crash when used on strings over 2GB in +size. +L<[perl #121562]|https://rt.perl.org/Ticket/Display.html?id=121562>. -=over 4 +=item * + +A small, previously intentional, memory leak in +C/C on Win32 builds was fixed. This might +affect embedders who repeatedly create and destroy perl engines within +the same process. =item * -Mention that C is currently a no-op. +C now returns the data for the program's underlying +locale even when called from outside the scope of S>. -=back +=item * -=head3 L +C now works properly on platforms which don't have +C and/or C, or for which Perl has been compiled +to disregard either or both of these locale categories. In such +circumstances, there are now no entries for the corresponding values in +the hash returned by C. -=over 4 +=item * + +C now marks appropriately the values it returns as +UTF-8 or not. Previously they were always returned as bytes, even if +they were supposed to be encoded as UTF-8. =item * -The OOK example has been updated to account for COW changes and a change in the -storage of the offset. +On Microsoft Windows, within the scope of C>, the following +POSIX character classes gave results for many locales that did not +conform to the POSIX standard: +C<[[:alnum:]]>, +C<[[:alpha:]]>, +C<[[:blank:]]>, +C<[[:digit:]]>, +C<[[:graph:]]>, +C<[[:lower:]]>, +C<[[:print:]]>, +C<[[:punct:]]>, +C<[[:upper:]]>, +C<[[:word:]]>, +and +C<[[:xdigit:]]>. +This was because the underlying Microsoft implementation does not +follow the standard. Perl now takes special precautions to correct for +this. -=back +=item * -=head3 L +Many issues have been detected by L and +fixed. -=over 4 +=item * + +C and friends should now work properly on more Android builds. + +Due to an oversight, the value specified through C<-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 C +instead of C, and so would fail for the vast majority +of devices, leaving C<$!> as C. =item * -Documentation has been added illustrating the perils of assuming the contents -of static memory pointed to by the return values of Perl wrappers for C library -functions doesn't change. +C, +C, +and +C +now work. Previously it was impossible to escape these three +left-characters with a backslash within a regular expression pattern +where otherwise they would be considered metacharacters, and the pattern +opening delimiter was the character, and the closing delimiter was its +mirror character. -=back +=item * -=head3 L +C<< s///e >> on tainted UTF-8 strings corrupted C<< pos() >>. This bug, +introduced in 5.20, is now fixed. +L<[perl #122148]|https://rt.perl.org/Ticket/Display.html?id=122148>. -=over 4 +=item * + +A non-word boundary in a regular expression (C<< \B >>) did not always +match the end of the string; in particular C<< q{} =~ /\B/ >> did not +match. This bug, introduced in perl 5.14, is now fixed. +L<[perl #122090]|https://rt.perl.org/Ticket/Display.html?id=122090>. =item * -Out-of-date VMS-specific information has been fixed/simplified. +C<< " P" =~ /(?=.*P)P/ >> should match, but did not. This is now fixed. +L<[perl #122171]|https://rt.perl.org/Ticket/Display.html?id=122171>. -=back +=item * -=head3 L +Failing to compile C in an C could leave a spurious +C subroutine definition, which would produce a "Subroutine +BEGIN redefined" warning on the next use of C, or other C +block. +L<[perl #122107]|https://rt.perl.org/Ticket/Display.html?id=122107>. -=over 4 +=item * + +C syntax now correctly parses the arguments if they +begin with an opening brace. +L<[perl #46947]|https://rt.perl.org/Ticket/Display.html?id=46947>. =item * -Advice for how to make sure your strings and regular expression patterns are -interpreted as Unicode has been revised to account for the new Perl 5.22 EBCDIC -handling. +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 +=item * -=head3 L +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>. -=over 4 +=item * + +Dereferencing of constants now works correctly for typeglob constants. Previously +the glob was stringified and its name looked up. Now the glob itself is used. +L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456> =item * -Out-of-date and/or incorrect material has been removed. +When parsing a sigil (C<$> C<@> C<%> C<&)> followed by braces, +the parser no +longer tries to guess whether it is a block or a hash constructor (causing a +syntax error when it guesses the latter), since it can only be a block. -=back +=item * -=head1 Testing +S> now frees the referent immediately, instead of hanging on +to it until the next statement. +L<[perl #122556]|https://rt.perl.org/Ticket/Display.html?id=122556> -=over 4 +=item * + +Various cases where the name of a sub is used (autoload, overloading, error +messages) used to crash for lexical subs, but have been fixed. =item * -F has been added to test that L and its -dependencies only use the subset of the C<$1..$n> capture vars that -Perl_save_re_context() is hard-coded to localize, because that function has no -efficient way of determining at runtime what vars to localize. +Bareword lookup now tries to avoid vivifying packages if it turns out the +bareword is not going to be a subroutine name. -=back +=item * -=head1 Platform Support +Compilation of anonymous constants (I, C) no longer deletes +any subroutine named C<__ANON__> in the current package. Not only was +C<*__ANON__{CODE}> cleared, but there was a memory leak, too. This bug goes +back to Perl 5.8.0. -=head2 Platform-Specific Notes +=item * -=over 4 +Stub declarations like C and C no longer wipe out constants +of the same name declared by C. This bug was introduced in Perl +5.10.0. -=item Win32 +=item * -F is now built with C<-fno-strict-aliasing>, allowing 64-bit -builds to complete on GCC 4.8. -L<[perl #123976]|https://rt.perl.org/Ticket/Display.html?id=123976> +C now works properly in many instances. + +Some names +known to C<\N{...}> refer to a sequence of multiple characters, instead of the +usual single character. Bracketed character classes generally only match +single characters, but now special handling has been added so that they can +match named sequences, but not if the class is inverted or the sequence is +specified as the beginning or end of a range. In these cases, the only +behavior change from before is a slight rewording of the fatal error message +given when this class is part of a C construct. When the C<[...]> +stands alone, the same non-fatal warning as before is raised, and only the +first character in the sequence is used, again just as before. + +=item * + +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> + +=item * + +S>, which vivifies a handle with a name like +C<"main::_GEN_0">, was not giving the handle the right reference count, so +a double free could happen. + +=item * + +When deciding that a bareword was a method name, the parser would get confused +if an C sub with the same name existed, and look up the method in the +package of the C sub, instead of the package of the invocant. + +=item * + +The parser no longer gets confused by C<\U=> within a double-quoted string. It +used to produce a syntax error, but now compiles it correctly. +L<[perl #80368]|https://rt.perl.org/Ticket/Display.html?id=80368> + +=item * + +It has always been the intention for the C<-B> and C<-T> file test operators to +treat UTF-8 encoded files as text. (L has +been updated to say this.) Previously, it was possible for some files to be +considered UTF-8 that actually weren't valid UTF-8. This is now fixed. The +operators now work on EBCDIC platforms as well. + +=item * + +Under some conditions warning messages raised during regular expression pattern +compilation were being output more than once. This has now been fixed. + +=item * + +Perl 5.20.0 introduced a regression in which a UTF-8 encoded regular +expression pattern that contains a single ASCII lowercase letter did not +match its uppercase counterpart. That has been fixed in both 5.20.1 and +5.22.0. +L<[perl #122655]|https://rt.perl.org/Ticket/Display.html?id=122655> + +=item * + +Constant folding could incorrectly suppress warnings if lexical warnings +(C or C) were not in effect and C<$^W> were +false at compile time and true at run time. + +=item * + +Loading Unicode 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> + +=item * + +Thread cloning used to work incorrectly for lexical subs, possibly causing +crashes or double frees on exit. + +=item * + +Since Perl 5.14.0, deleting C<$SomePackage::{__ANON__}> and then undefining an +anonymous subroutine could corrupt things internally, resulting in +L crashing or L giving nonsensical data. This has been +fixed. + +=item * + +S> now reports names of lexical subs, instead of +treating them as C<"(unknown)">. + +=item * + +C now supports using a lexical sub as the comparison +routine. + +=item * + +Aliasing (I, via S>) could confuse list assignments that mention the +two names for the same variable on either side, causing wrong values to be +assigned. +L<[perl #15667]|https://rt.perl.org/Ticket/Display.html?id=15667> + +=item * + +Long here-doc terminators could cause a bad read on short lines of input. This +has been fixed. It is doubtful that any crash could have occurred. This bug +goes back to when here-docs were introduced in Perl 3.000 twenty-five years +ago. + +=item * + +An optimization in C to treat S> like S> had the +unfortunate side-effect of also treating S> like S>, +which it should not. This has been fixed. (Note, however, that S> +does not behave like S>, which is also considered to be a bug and +will be fixed in a future version.) +L<[perl #122761]|https://rt.perl.org/Ticket/Display.html?id=122761> + +=item * + +The little-known S> syntax (see L and L) +could get confused in the scope of C if C were a constant +whose value contained Latin-1 characters. + +=item * + +Locking and unlocking values via L or C +no longer has any effect on values that were read-only to begin with. +Previously, unlocking such values could result in crashes, hangs or +other erratic behavior. + +=item * + +Some unterminated C<(?(...)...)> constructs in regular expressions would +either crash or give erroneous error messages. C is one such +example. + +=item * + +S> no longer calls FETCH twice. + +=item * + +List assignments like S> now work correctly if C<$x> and +C<$y> have been aliased by C. + +=item * + +Some patterns including code blocks with syntax errors, such as +S>, would hang or fail assertions on debugging builds. Now +they produce errors. + +=item * + +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 * + +S> could do a bad read and produce junk +results. + +=item * + +In S>, the S> at the beginning no longer confuses +the optimizer into assuming a limit of 1. + +=item * + +Fatal warnings no longer prevent the output of syntax errors. +L<[perl #122966]|https://rt.perl.org/Ticket/Display.html?id=122966>. + +=item * + +Fixed a NaN double-to-long-double conversion error on VMS. For quiet NaNs +(and only on Itanium, not Alpha) negative infinity instead of NaN was +produced. + +=item * + +Fixed the issue that caused C<< make distclean >> to incorrectly leave some +files behind. +L<[perl #122820]|https://rt.perl.org/Ticket/Display.html?id=122820>. + +=item * + +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>. + +=item * + +The optimization phase of a regexp compilation could run "forever" and +exhaust all memory under certain circumstances; now fixed. +L<[perl #122283]|https://rt.perl.org/Ticket/Display.html?id=122283>. + +=item * + +The test script F<< t/op/crypt.t >> now uses the SHA-256 algorithm if the +default one is disabled, rather than giving failures. +L<[perl #121591]|https://rt.perl.org/Ticket/Display.html?id=121591>. + +=item * + +Fixed an off-by-one error when setting the size of a shared array. +L<[perl #122950]|https://rt.perl.org/Ticket/Display.html?id=122950>. + +=item * + +Fixed a bug that could cause perl to enter an infinite loop during +compilation. In particular, a C within a sublist, I + + sub foo { () = ($a, my $b, ($c, do { while(1) {} })) } + +The bug was introduced in 5.20.0 +L<[perl #122995]|https://rt.perl.org/Ticket/Display.html?id=122995>. -C again depends on C for GCC builds. -L<[perl #124221]|https://rt.perl.org/Ticket/Display.html?id=124221> +=item * + +On Win32, if a variable was C-ized in a pseudo-process that later +forked, restoring the original value in the child pseudo-process caused +memory corruption and a crash in the child pseudo-process (and therefore the +OS process). +L<[perl #40565]|https://rt.perl.org/Ticket/Display.html?id=40565>. + +=item * + +Calling C on a format with a C<^**> field could produce a panic +in C 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 * + +Non-ASCII lexical sub names now appear without trailing junk when they +appear in error messages. + +=item * + +The C<\@> subroutine prototype no longer flattens parenthesized arrays +(taking a reference to each element), but takes a reference to the array +itself. +L<[perl #47363]|https://rt.perl.org/Ticket/Display.html?id=47363>. + +=item * + +A block containing nothing except a C-style C loop could corrupt the +stack, causing lists outside the block to lose elements or have elements +overwritten. This could happen with C and with +lists containing C. +L<[perl #123286]|https://rt.perl.org/Ticket/Display.html?id=123286>. + +=item * + +C now propagates lvalue context, so that +S> can modify C<$#foo> through C<$_>. + +=item * + +C no longer dies with "Bizarre copy of ARRAY". +L<[perl #123344]|https://rt.perl.org/Ticket/Display.html?id=123344>. + +=item * + +S> in nested named subroutines would sometimes look up a +global variable even with a lexical variable in scope. + +=item * + +In perl 5.20.0, C where 'fake' is anything other than a +keyword, started chopping off the last 6 characters and treating the result +as a sort sub name. The previous behavior of treating C as a +sort sub name has been restored. +L<[perl #123410]|https://rt.perl.org/Ticket/Display.html?id=123410>. + +=item * + +Outside of C, a single-character Latin-1 lexical variable is +disallowed. The error message for it, "Can't use global C<$foo>...", was +giving garbage instead of the variable name. + +=item * + +C on a nonexistent handle was causing C<${^LAST_FH}> to produce a +reference to an undefined scalar (or fail an assertion). Now +C<${^LAST_FH}> ends up undefined. + +=item * + +C<(...) x ...> in void context now applies scalar context to the left-hand +argument, instead of the context the current sub was called in. +L<[perl #123020]|https://rt.perl.org/Ticket/Display.html?id=123020>. =back -=head1 Internal Changes +=head1 Known Problems =over 4 =item * -Perl 5.21.2 introduced a new build option, C<-DPERL_OP_PARENT>, which causes -the last C pointer to refer back to the parent rather than being -C, and where instead a new flag indicates the end of the chain. In this -release, the new implementation has been revised; in particular: +C-ing a NaN on a perl compiled with Visual C 6 does not behave properly, +leading to a test failure in F. +L<[perl 125203]|https://rt.perl.org/Ticket/Display.html?id=125203> -=over 4 +=item * + +A goal is for Perl to be able to be recompiled to work reasonably well on any +Unicode version. In Perl 5.22, though, the earliest such version is Unicode +5.1 (current is 7.0). =item * -On C builds, the C field has been renamed -C to reflect its new dual purpose. Since the intention is that -this field should primarily be accessed via macros, this change should be -transparent for code written to work under C. +EBCDIC platforms + +=over 4 =item * -The newly-introduced C flag bit has been renamed C and -its logic inverted; i.e. it is initialised to zero in a new op, and is changed -to 1 when an op gains a sibling. +The C (and hence C) operators do not necessarily give the +correct results when both operands are UTF-EBCDIC encoded strings and +there is a mixture of ASCII and/or control characters, along with other +characters. =item * -The function C is now only available on C -builds. Using it on a plain build will be a compile-timer error. +Ranges containing C<\N{...}> in the C (and C) +transliteration operators are treated differently than the equivalent +ranges in regular expression patterns. They should, but don't, cause +the values in the ranges to all be treated as Unicode code points, and +not native ones. (L gives +details as to how it should work.) =item * -Three new macros, C, C, C have -been added, which are intended to be a low-level portable way to set -C / C while also updating C. The first -sets the sibling pointer to a new sibling, the second makes the op the last -sibling, and the third conditionally does the first or second action. The -C function is retained as a higher-level interface that -can also maintain consistency in the parent at the same time (e.g. by updating -C and C where appropriate). +Encode and encoding are mostly broken. =item * -The macro C, added in Perl 5.21.2, has been removed. It didn't -manipulate C and has been superseded by C et al. +Many CPAN modules that are shipped with core show failing tests. =item * -The C function now accepts a null C argument where -the splicing doesn't affect the first or last ops in the sibling chain, and -thus where the parent doesn't need to be updated accordingly. +C/C with C<"U0"> format may not work properly. =back -=back +=item * -=head1 Selected Bug Fixes +The following modules are known to have test failures with this version of +Perl. In many cases, patches have been submitted, so there will hopefully be +new releases soon: -=over 4 +=over =item * -C and C now zero the padding on x86 long double -builds. GCC 4.8 and later, under some build options, would either overwrite -the zero-initialized padding, or bypass the initialized buffer entirely. This -caused F to fail. -L<[perl #123971]|https://rt.perl.org/Ticket/Display.html?id=123971> +L version 1.50 =item * -Extending an array cloned from a parent thread could result in "Modification of -a read-only value attempted" errors when attempting to modify the new elements. -L<[perl #124127]|https://rt.perl.org/Ticket/Display.html?id=124127> +L version 0.25 =item * -An assertion failure and subsequent crash with C<< *x= >> has been fixed. -L<[perl #123790]|https://rt.perl.org/Ticket/Display.html?id=123790> +L version 6.42 =item * -An optimization for state variable initialization introduced in Perl 5.21.6 has -been reverted because it was found to exacerbate some other existing buggy -behaviour. -L<[perl #124160]|https://rt.perl.org/Ticket/Display.html?id=124160> +L version 1.3130 =item * -The extension of another optimization to cover more ops in Perl 5.21 has also -been reverted to its Perl 5.20 state as a temporary fix for regression issues -that it caused. -L<[perl #123790]|https://rt.perl.org/Ticket/Display.html?id=123790> +L version 1.18 =item * -New bitwise ops added in Perl 5.21.9 accidentally caused C<$^H |= 0x1c020000> -to enable all features. This has now been fixed. +L version 2.38 =item * -A possible crashing/looping bug has been fixed. -L<[perl #124099]|https://rt.perl.org/Ticket/Display.html?id=124099> +L version 0.63 =item * -UTF-8 variable names used in array indexes, unquoted UTF-8 HERE-document -terminators and UTF-8 function names all now work correctly. -L<[perl #124113]|https://rt.perl.org/Ticket/Display.html?id=124113> +L version 0.07 =item * -Breakage in C (with parentheses), introduced in Perl 5.21.6, -has been fixed. -L<[perl #124135]|https://rt.perl.org/Ticket/Display.html?id=124135> +L version 0.34 =item * -Wide char warnings, wrongly raised in UTF-8 locales since Perl 5.21.8, are now -suppressed. -L<[perl #123527]|https://rt.perl.org/Ticket/Display.html?id=123527> +L version 0.009 =item * -A subtle bug introduced in Perl 5.21.4 involving UTF-8 in regular expressions -and sometimes causing a crash has been fixed. A new test script has been added -to test this fix; see under L. -L<[perl #124109]|https://rt.perl.org/Ticket/Display.html?id=124109> +L version 0.000018 =item * -A change introduced in Perl 5.21.10 that broke the autovivification CPAN module -has been reverted. +L version 2.22 =item * -A bug whereby C<< 'FOO'->f() >> lost the read-only status of C, introduced -in Perl 5.21.7, has been fixed. -L<[perl #123619]|https://rt.perl.org/Ticket/Display.html?id=123619> +L version 0.02 =item * -A regression in Perl 5.21 in the matching of C has been fixed. +L version 1.00 + +=item * + +L 0.08 + +=back =back +=head1 Obituary + +Brian McCauley died on May 8, 2015. He was a frequent poster to Usenet, Perl +Monks, and other Perl forums, and made several CPAN contributions under the +nick NOBULL, including to the Perl FAQ. He attended almost every +YAPC::Europe, and indeed, helped organise YAPC::Europe 2006 and the QA +Hackathon 2009. His wit and his delight in intricate systems were +particularly apparent in his love of board games; many Perl mongers will +have fond memories of playing Fluxx and other games with Brian. He will be +missed. + =head1 Acknowledgements -Perl 5.21.11 represents approximately 4 weeks of development since Perl 5.21.10 -and contains approximately 5,800 lines of changes across 240 files from 24 +Perl 5.22.0 represents approximately 12 months of development since Perl 5.20.0 +and contains approximately 590,000 lines of changes across 2,400 files from 94 authors. Excluding auto-generated files, documentation and release tools, there were -approximately 1,700 lines of changes to 160 .pm, .t, .c and .h files. +approximately 370,000 lines of changes to 1,500 .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.21.11: - -Alex Vandiver, Andreas König, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel -Dragan, David Golden, David Mitchell, Father Chrysostomos, H.Merijn Brand, -Herbert Breunung, Hugo van der Sanden, James E Keenan, James McCoy, Karl -Williamson, Matthew Horsfall, Max Maischein, Nicholas Clark, Rafael -Garcia-Suarez, Randy Stauner, Ricardo Signes, Shirakata Kentaro, Steffen -Müller, Steve Hay, Tony Cook. +of users and developers. The following people are known to have contributed the +improvements that became Perl 5.22.0: + +Aaron Crane, Abhijit Menon-Sen, Abigail, Alberto Simões, Alex Solovey, Alex +Vandiver, Alexandr Ciornii, Alexandre (Midnite) Jousset, Andreas König, +Andreas Voegele, Andrew Fresh, Andy Dougherty, Anthony Heading, Aristotle +Pagaltzis, brian d foy, Brian Fraser, Chad Granum, Chris 'BinGOs' Williams, +Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, Darin McBride, Dave +Rolsky, David Golden, David Mitchell, David Wheeler, Dmitri Tikhonov, Doug +Bell, E. Choroba, Ed J, Eric Herman, Father Chrysostomos, George Greer, Glenn +D. Golden, Graham Knop, H.Merijn Brand, Herbert Breunung, Hugo van der Sanden, +James E Keenan, James McCoy, James Raspass, Jan Dubois, Jarkko Hietaniemi, +Jasmine Ngan, Jerry D. Hedden, Jim Cromie, John Goodyear, kafka, Karen +Etheridge, Karl Williamson, Kent Fredric, kmx, Lajos Veres, Leon Timmermans, +Lukas Mai, Mathieu Arnold, Matthew Horsfall, Max Maischein, Michael Bunk, +Nicholas Clark, Niels Thykier, Niko Tyni, Norman Koch, Olivier Mengué, Peter +John Acklam, Peter Martini, Petr Písař, Philippe Bruhat (BooK), Pierre +Bogossian, Rafael Garcia-Suarez, Randy Stauner, Reini Urban, Ricardo Signes, +Rob Hoelz, Rostislav Skudnov, Sawyer X, Shirakata Kentaro, Shlomi Fish, +Sisyphus, Slaven Rezic, Smylers, Steffen Müller, Steve Hay, Sullivan Beck, +syber, Tadeusz Sośnierz, Thomas Sibley, Todd Rinaldo, Tony Cook, Vincent Pit, +Vladimir Marek, Yaroslav Kuzmin, 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 +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 +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 @@ -400,8 +4006,8 @@ the F file in the Perl source distribution. 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. +L. There may also be information at +L, 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 diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 0f57f28..47c23eb 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -3043,8 +3043,8 @@ likely fix this error. =item Locale '%s' may not work well.%s (W locale) You are using the named locale, which is a non-UTF-8 one, and -which Perl has determined is not fully compatible with Perl. The second -C<%s> gives a reason. +which perl has determined is not fully compatible with what it can +handle. The second C<%s> gives a reason. By far the most common reason is that the locale has characters in it that are represented by more than one byte. The only such locales that @@ -3612,8 +3612,7 @@ bracketed character class, for the same reason that C<.> in a character class loses its specialness: it matches almost everything, which is probably not what you want. -=item \N{} in inverted character class or as a range end-point is restricted to one character in regex; marked -by S<<-- HERE> in m/%s/ +=item \N{} in inverted character class or as a range end-point is restricted to one character in regex; marked by <-- HERE in m/%s/ (F) Named Unicode character escapes (C<\N{...}>) may return a multi-character sequence. Even though a character class is @@ -7106,7 +7105,7 @@ filehandle with an encoding, see L and L. (W locale) While in a single-byte locale (I, a non-UTF-8 one), a multi-byte character was encountered. Perl considers this -character to be the specified Unicode code point. Combining non-UTF8 +character to be the specified Unicode code point. Combining non-UTF-8 locales and Unicode is dangerous. Almost certainly some characters will have two different representations. For example, in the ISO 8859-7 (Greek) locale, the code point 0xC3 represents a Capital Gamma. But so diff --git a/pod/perlebcdic.pod b/pod/perlebcdic.pod index b7e69f8..d88291a 100644 --- a/pod/perlebcdic.pod +++ b/pod/perlebcdic.pod @@ -152,19 +152,22 @@ Character code set ID 0037 is a mapping of the ASCII plus Latin-1 characters (i.e. ISO 8859-1) to an EBCDIC set. 0037 is used in North American English locales on the OS/400 operating system that runs on AS/400 computers. CCSID 0037 differs from ISO 8859-1 -in 237 places; in other words they agree on only 19 code point values. +in 236 places; in other words they agree on only 20 code point values. =item B<1047> Character code set ID 1047 is also a mapping of the ASCII plus Latin-1 characters (i.e. ISO 8859-1) to an EBCDIC set. 1047 is used under Unix System Services for OS/390 or z/OS, and OpenEdition -for VM/ESA. CCSID 1047 differs from CCSID 0037 in eight places. +for VM/ESA. CCSID 1047 differs from CCSID 0037 in eight places, +and from ISO 8859-1 in 236. =item B The EBCDIC code page in use on Siemens' BS2000 system is distinct from 1047 and 0037. It is identified below as the POSIX-BC set. +Like 0037 and 1047, it is the same as ISO 8859-1 in 20 code point +values. =back @@ -1839,6 +1842,22 @@ XXX. =item * +The C (and hence C) operators do not necessarily give the +correct results when both operands are UTF-EBCDIC encoded strings and +there is a mixture of ASCII and/or control characters, along with other +characters. + +=item * + +Ranges containing C<\N{...}> in the C (and C) +transliteration operators are treated differently than the equivalent +ranges in regular expression pattersn. They should, but don't, cause +the values in the ranges to all be treated as Unicode code points, and +not native ones. (L gives +details as to how it should work.) + +=item * + Not all shells will allow multiple C<-e> string arguments to perl to be concatenated together properly as recipes in this document 0, 2, 4, 5, and 6 might @@ -1864,6 +1883,13 @@ L are not supported under EBCDIC; likewise for the L partially works. +=item * + +In earlier versions, when byte and character data were concatenated, +the new string was sometimes created by +decoding the byte strings as I, even if the +old Unicode string used EBCDIC. + =back =head1 SEE ALSO diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 3685b34..ba77638 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -1701,7 +1701,7 @@ but in a different order: print "$key=$value\n"; } -Starting with Perl 5.14, C can take a scalar EXPR, which must hold +Starting with Perl 5.14, C can take a scalar EXPR, which must hold a reference to an unblessed hash or array. The argument will be dereferenced automatically. This aspect of C is considered highly experimental. The exact behaviour may change in a future version of Perl. @@ -4973,7 +4973,7 @@ will not in general equal $foo. =item * Pack and unpack can operate in two modes: character mode (C mode) where -the packed string is processed per character, and UTF-8 mode (C mode) +the packed string is processed per character, and UTF-8 byte mode (C mode) where the packed string is processed in its UTF-8-encoded Unicode form on a byte-by-byte basis. Character mode is the default unless the format string starts with C. You @@ -6901,14 +6901,22 @@ eliminate any Cs from the input list. @result = sort { $a <=> $b } grep { $_ == $_ } @input; -=item splice ARRAY or EXPR,OFFSET,LENGTH,LIST +=item splice ARRAY,OFFSET,LENGTH,LIST X -=item splice ARRAY or EXPR,OFFSET,LENGTH +=item splice ARRAY,OFFSET,LENGTH -=item splice ARRAY or EXPR,OFFSET +=item splice ARRAY,OFFSET -=item splice ARRAY or EXPR +=item splice ARRAY + +=item splice EXPR,OFFSET,LENGTH,LIST + +=item splice EXPR,OFFSET,LENGTH + +=item splice EXPR,OFFSET + +=item splice EXPR =for Pod::Functions add or remove elements anywhere in an array diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 27f7540..a58d7ad 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -1365,7 +1365,7 @@ aware that the behavior may change in the future, umm, without warning. The perl tie function associates a variable with an object that implements the various GET, SET, etc methods. To perform the equivalent of the perl tie function from an XSUB, you must mimic this behaviour. The code below -carries out the necessary steps - firstly it creates a new hash, and then +carries out the necessary steps -- firstly it creates a new hash, and then creates a second hash which it blesses into the class which will implement the tie methods. Lastly it ties the two hashes together, and returns a reference to the new tied hash. Note that the code below does NOT call the @@ -2729,7 +2729,7 @@ macros is faster than using C. =head2 Source Documentation There's an effort going on to document the internal functions and -automatically produce reference manuals from them - L is one +automatically produce reference manuals from them -- L is one such manual which details all the functions which are available to XS writers. L is the autogenerated manual for the functions which are not part of the API and are supposedly for internal use only. @@ -2800,20 +2800,27 @@ characters, and the one Perl uses is called UTF-8. UTF-8 uses a variable number of bytes to represent a character. You can learn more about Unicode and Perl's Unicode model in L. +(On EBCDIC platforms, Perl uses instead UTF-EBCDIC, which is a form of +UTF-8 adapted for EBCDIC platforms. Below, we just talk about UTF-8. +UTF-EBCDIC is like UTF-8, but the details are different. The macros +hide the differences from you, just remember that the particular numbers +and bit patterns presented below will differ in UTF-EBCDIC.) + =head2 How can I recognise a UTF-8 string? You can't. This is because UTF-8 data is stored in bytes just like non-UTF-8 data. The Unicode character 200, (C<0xC8> for you hex types) capital E with a grave accent, is represented by the two bytes C. Unfortunately, the non-Unicode string C -has that byte sequence as well. So you can't tell just by looking - this +has that byte sequence as well. So you can't tell just by looking -- this is what makes Unicode input an interesting problem. In general, you either have to know what you're dealing with, or you have to guess. The API function C can help; it'll tell -you if a string contains only valid UTF-8 characters. However, it can't -do the work for you. On a character-by-character basis, -C +you if a string contains only valid UTF-8 characters, and the chances +of a non-UTF-8 string looking like valid UTF-8 become very small very +quickly with increasing string length. On a character-by-character +basis, C will tell you whether the current character in a string is valid UTF-8. =head2 How does UTF-8 represent Unicode characters? @@ -2823,8 +2830,9 @@ character. Characters with values 0...127 are stored in one byte, just like good ol' ASCII. Character 128 is stored as C; this continues up to character 191, which is C. Now we've run out of bits (191 is binary -C<10111111>) so we move on; 192 is C. And +C<10111111>) so we move on; character 192 is C. And so it goes on, moving to three bytes at character 2048. +L has pictures of how this works. Assuming you know you're dealing with a UTF-8 string, you can find out how long the first character in it is with the C macro: @@ -2843,7 +2851,7 @@ lightly. All bytes in a multi-byte UTF-8 character will have the high bit set, so you can test if you need to do something special with this -character like this (the UTF8_IS_INVARIANT() is a macro that tests +character like this (the C is a macro that tests whether the byte is encoded as a single byte even in UTF-8): U8 *utf; @@ -2862,7 +2870,7 @@ You can also see in that example that we use C to get the value of the character; the inverse function C is available for putting a UV into UTF-8: - if (!UTF8_IS_INVARIANT(uv)) + if (!UVCHR_IS_INVARIANT(uv)) /* Must treat this as UTF8 */ utf8 = uvchr_to_utf8(utf8, uv); else @@ -2877,16 +2885,19 @@ for instance, if your UTF-8 string contains C, and you skip that character, you can never match a C in a non-UTF-8 string. So don't do that! +(Note that we don't have to test for invariant characters in the +examples above. The functions work on any well-formed UTF-8 input. +It's just that its faster to avoid the function overhead when it's not +needed.) + =head2 How does Perl store UTF-8 strings? -Currently, Perl deals with Unicode strings and non-Unicode strings +Currently, Perl deals with UTF-8 strings and non-UTF-8 strings slightly differently. A flag in the SV, C, indicates that the string is internally encoded as UTF-8. Without it, the byte value is the -codepoint number and vice versa (in other words, the string is encoded -as iso-8859-1, but C is needed to get iso-8859-1 -semantics). This flag is only meaningful if the SV is C -or immediately after stringification via C or a similar -macro. You can check and manipulate this flag with the +codepoint number and vice versa. This flag is only meaningful if the SV +is C or immediately after stringification via C or a +similar macro. You can check and manipulate this flag with the following macros: SvUTF8(sv) @@ -2894,16 +2905,16 @@ following macros: SvUTF8_off(sv) This flag has an important effect on Perl's treatment of the string: if -Unicode data is not properly distinguished, regular expressions, +UTF-8 data is not properly distinguished, regular expressions, C, C and other string handling operations will have -undesirable results. +undesirable (wrong) results. The problem comes when you have, for instance, a string that isn't -flagged as UTF-8, and contains a byte sequence that could be UTF-8 - +flagged as UTF-8, and contains a byte sequence that could be UTF-8 -- especially when combining non-UTF-8 and UTF-8 strings. -Never forget that the C flag is separate to the PV value; you -need be sure you don't accidentally knock it off while you're +Never forget that the C flag is separate from the PV value; you +need to be sure you don't accidentally knock it off while you're manipulating SVs. More specifically, you cannot expect to do this: SV *sv; @@ -2921,23 +2932,44 @@ old SV has the UTF8 flag set (I the C call), and act accordingly: p = SvPV(sv, len); - frobnicate(p); + is_utf8 = SvUTF8(sv); + frobnicate(p, is_utf8); nsv = newSVpvn(p, len); - if (SvUTF8(sv)) + if (is_utf8) SvUTF8_on(nsv); -In fact, your C function should be made aware of whether or -not it's dealing with UTF-8 data, so that it can handle the string -appropriately. +In the above, your C function has been changed to be made +aware of whether or not it's dealing with UTF-8 data, so that it can +handle the string appropriately. Since just passing an SV to an XS function and copying the data of the SV is not enough to copy the UTF8 flags, even less right is just -passing a C to an XS function. +passing a S> to an XS function. + +For full generality, use the L macro to see if the +string in an SV is to be I as UTF-8. This takes into account +if the call to the XS function is being made from within the scope of +L>|bytes>. If so, the underlying bytes that comprise the +UTF-8 string are to be exposed, rather than the character they +represent. But this pragma should only really be used for debugging and +perhaps low-level testing at the byte level. Hence most XS code need +not concern itself with this, but various areas of the perl core do need +to support it. + +And this isn't the whole story. Starting in Perl v5.12, strings that +aren't encoded in UTF-8 may also be treated as Unicode under various +conditions (see L). +This is only really a problem for characters whose ordinals are between +128 and 255, and their behavior varies under ASCII versus Unicode rules +in ways that your code cares about (see L). +There is no published API for dealing with this, as it is subject to +change, but you can look at the code for C in F for an +example as to how it's currently done. =head2 How do I convert a string to UTF-8? If you're mixing UTF-8 and non-UTF-8 strings, it is necessary to upgrade -one of the strings to UTF-8. If you've got an SV, the easiest way to do +the non-UTF-8 strings to UTF-8. If you've got an SV, the easiest way to do this is: sv_utf8_upgrade(sv); @@ -2958,6 +2990,21 @@ C to go the other way, but naturally, this will fail if the string contains any characters above 255 that can't be represented in a single byte. +=head2 How do I compare strings? + +L and L do a lexigraphic +comparison of two SV's, and handle UTF-8ness properly. Note, however, +that Unicode specifies a much fancier mechanism for collation, available +via the L module. + +To just compare two strings for equality/non-equality, you can just use +L|perlapi/memEQ> and L|perlapi/memEQ> as usual, +except the strings must be both UTF-8 or not UTF-8 encoded. + +To compare two strings case-insensitively, use +L|perlapi/foldEQ_utf8> (the strings don't have to have +the same UTF-8ness). + =head2 Is there anything else I need to know? Not really. Just remember these things: @@ -2966,11 +3013,15 @@ Not really. Just remember these things: =item * -There's no way to tell if a string is UTF-8 or not. You can tell if an SV -is UTF-8 by looking at its C flag after stringifying it -with C or a similar macro. Don't forget to set the flag if -something should be UTF-8. Treat the flag as part of the PV, even though -it's not - if you pass on the PV to somewhere, pass on the flag too. +There's no way to tell if a S> or S> string is UTF-8 +or not. But you can tell if an SV is to be treated as UTF-8 by calling +C on it, after stringifying it with C or a similar +macro. And, you can tell if SV is actually UTF-8 (even if it is not to +be treated as such) by looking at its C flag (again after +stringifying it). Don't forget to set the flag if something should be +UTF-8. +Treat the flag as part of the PV, even though it's not -- if you pass on +the PV to somewhere, pass on the flag too. =item * @@ -2979,8 +3030,8 @@ unless C in which case you can use C<*s>. =item * -When writing a character C to a UTF-8 string, B use -C, unless C in which case +When writing a character UV to a UTF-8 string, B use +C, unless C in which case you can use C<*s = uv>. =item * @@ -3003,8 +3054,8 @@ C.) This feature is implemented as a new op type, C. The Perl core does not "know" anything special about this op type, and so it will not be involved in any optimizations. This also means that you can -define your custom ops to be any op structure - unary, binary, list and -so on - you like. +define your custom ops to be any op structure -- unary, binary, list and +so on -- you like. It's important to know what custom operators won't do for you. They won't let you add new syntax to Perl, directly. They won't even let you diff --git a/pod/perlhacktips.pod b/pod/perlhacktips.pod index 6d7a098..f7cd08d 100644 --- a/pod/perlhacktips.pod +++ b/pod/perlhacktips.pod @@ -289,7 +289,7 @@ direction. If you need the string representation of a character that doesn't have a mnemonic name in C, you should add it to the list in -F, and have Perl create C<#define>s for you, +F, and have Perl create C<#define>'s for you, based on the current platform. Note that the C> and C> macros in F work @@ -298,7 +298,9 @@ properly on native code points and strings. Also, the range 'A' - 'Z' in ASCII is an unbroken sequence of 26 upper case alphabetic characters. That is not true in EBCDIC. Nor for 'a' to 'z'. But '0' - '9' is an unbroken range in both systems. Don't assume -anything about other ranges. +anything about other ranges. (Note that special handling of ranges in +regular expression patterns makes it appear to Perl +code that the aforementioned ranges are all unbroken.) Many of the comments in the existing code ignore the possibility of EBCDIC, and may be wrong therefore, even if the code works. This is @@ -321,6 +323,31 @@ EBCDIC machines, but as long as the code itself uses the C macro appropriately, it works, even if the comments are wrong. +As noted in L, when writing test scripts, the file +F contains some helpful functions for writing tests +valid on both ASCII and EBCDIC platforms. Sometimes, though, a test +can't use a function and it's inconvenient to have different test +versions depending on the platform. There are 20 code points that are +the same in all 4 character sets currently recognized by Perl (the 3 +EBCDIC code pages plus ISO 8859-1 (ASCII/Latin1)). These can be used in +such tests, though there is a small possibility that Perl will become +available in yet another character set, breaking your test. All but one +of these code points are C0 control characters. The most significant +controls that are the same are C<\0>, C<\r>, and C<\N{VT}> (also +specifiable as C<\cK>, C<\x0B>, C<\N{U+0B}>, or C<\013>). The single +non-control is U+00B6 PILCROW SIGN. The controls that are the same have +the same bit pattern in all 4 character sets, regardless of the UTF8ness +of the string containing them. The bit pattern for U+B6 is the same in +all 4 for non-UTF8 strings, but differs in each when its containing +string is UTF-8 encoded. The only other code points that have some sort +of sameness across all 4 character sets are the pair 0xDC and 0xFC. +Together these represent upper- and lowercase LATIN LETTER U WITH +DIAERESIS, but which is upper and which is lower may be reversed: 0xDC +is the capital in Latin1 and 0xFC is the small letter, while 0xFC is the +capital in EBCDIC and 0xDC is the small one. This factoid may be +exploited in writing case insensitive tests that are the same across all +4 character sets. + =item * Assuming the character set is just ASCII diff --git a/pod/perlhist.pod b/pod/perlhist.pod index 9696c4d..c150e69 100644 --- a/pod/perlhist.pod +++ b/pod/perlhist.pod @@ -554,6 +554,10 @@ the strings?). Steve 5.21.10 2015-Mar-20 Steve 5.21.11 2015-Apr-20 + Ricardo 5.22.0-RC1 2015-May-19 The 5.22 maintenance track + Ricardo 5.22.0-RC2 2015-May-21 + Ricardo 5.22.0 2015-Jun-01 + =head2 SELECTED RELEASE SIZES For example the notation "core: 212 29" in the release 1.000 means that @@ -634,6 +638,7 @@ explained below. 5.16.0 5562 109 1077 80 20504 2702 8750 2375 4815 152 5.18.0 5892 113 1088 79 20077 2760 9365 2439 4943 154 5.20.0 6243 115 1187 75 19499 2701 9620 2457 5145 159 + 5.22.0 7819 115 1284 77 19121 2635 9772 2434 5615 176 The "core"..."doc" mean the following files from the Perl source code distribution. The glob notation ** means recursively, (.) means @@ -938,25 +943,25 @@ the Perl source distribution for somewhat more selected releases. ====================================================================== - 5.20.0 - - Configure 552 1 - Cross 118 15 - NetWare 467 61 - Porting 1204 68 - djgpp 18 7 - h2pl 13 15 - hints 355 90 - mad 174 8 - os2 510 70 - plan9 316 17 - qnx 1 4 - symbian 290 54 - utils 241 27 - vms 538 12 - vos 8 7 - win32 1183 64 - x2p 341 19 + 5.20.0 5.22.0 + + Configure 552 1 570 1 + Cross 118 15 118 15 + djgpp 18 7 17 7 + h2pl 13 15 13 15 + hints 355 90 356 87 + mad 174 8 - - + NetWare 467 61 466 61 + os2 510 70 510 70 + plan9 316 17 317 17 + Porting 1204 68 1393 71 + qnx 1 4 1 4 + symbian 290 54 291 54 + utils 241 27 242 27 + vms 538 12 532 12 + vos 8 7 8 7 + win32 1183 64 1201 64 + x2p 341 19 - - =head2 SELECTED PATCH SIZES diff --git a/pod/perlintro.pod b/pod/perlintro.pod index 77465a1..9559cb1 100644 --- a/pod/perlintro.pod +++ b/pod/perlintro.pod @@ -474,7 +474,7 @@ detail.) = assignment . string concatenation x string multiplication - .. range operator (creates a list of numbers) + .. range operator (creates a list of numbers or strings) =back diff --git a/pod/perlobj.pod b/pod/perlobj.pod index 61e636b..fc8770a 100644 --- a/pod/perlobj.pod +++ b/pod/perlobj.pod @@ -949,7 +949,7 @@ C module on CPAN. If your C method issues a warning during global destruction, the Perl interpreter will append the string " during global -destruction" the warning. +destruction" to the warning. During global destruction, Perl will always garbage collect objects before unblessed references. See L diff --git a/pod/perlop.pod b/pod/perlop.pod index 3c364c1..018698e 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -3232,7 +3232,7 @@ strings: $foo = '150' | 105; # yields 255 $foo = 150 | '105'; # yields 255 $foo = '150' | '105'; # yields 255 - $foo = 150 |. 105; # yields string '155' (under ASCII) + $foo = 150 |. 105; # yields string '155' $foo = '150' |. 105; # yields string '155' $foo = 150 |.'105'; # yields string '155' $foo = '150' |.'105'; # yields string '155' @@ -3243,6 +3243,10 @@ strings: The assignment variants of these operators (C<&= |= ^= &.= |.= ^.=>) behave likewise under the feature. +The behavior of these operators is problematic (and subject to change) +if either or both of the strings are encoded in UTF-8 (see +L. + See L for information on how to manipulate individual bits in a bit vector. diff --git a/pod/perlperf.pod b/pod/perlperf.pod index 007a02b..ad9d493 100644 --- a/pod/perlperf.pod +++ b/pod/perlperf.pod @@ -82,7 +82,7 @@ key into a consistent string can be an efficient way to build a single string to compare, instead of using multiple sort keys, which makes it possible to use the standard, written in C and fast, perl C function on the output, and is the basis of the C (Guttman Rossler Transform). Some string -combinations can slow the C down, by just being too plain complex for it's +combinations can slow the C down, by just being too plain complex for its own good. For applications using database backends, the standard C namespace has @@ -952,7 +952,7 @@ the first program run, this is where the Unix system C utility comes in. BTW. Beware too of pressure from managers who see you speed a program up by 50% of the runtime once, only to get a request one month later to do the same again -(true story) - you'll just have to point out your only human, even if you are a +(true story) - you'll just have to point out you're only human, even if you are a Perl programmer, and you'll see what you can do... =head1 LOGGING @@ -971,7 +971,7 @@ The problem is that this code will always be parsed and executed, even when the debug level set in the logging configuration file is zero. Once the debug() subroutine has been entered, and the internal C<$debug> variable confirmed to be zero, for example, the message which has been sent in will be discarded and -the program will continue. In the example given though, the \%INC hash will +the program will continue. In the example given though, the C<\%INC> hash will already have been dumped, and the message string constructed, all of which work could be bypassed by a debug variable at the statement level, like this: diff --git a/pod/perlport.pod b/pod/perlport.pod index c528874..464d144 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -1158,11 +1158,18 @@ VOS Open-Source Software on the web at L. + +On the mainframe Perl currently works under the "Unix system 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 @@ -1237,7 +1244,7 @@ Also see: =item * -L, L, F, L. +L, L, L, L. =item * diff --git a/pod/perlrebackslash.pod b/pod/perlrebackslash.pod index 55df618..c216f25 100644 --- a/pod/perlrebackslash.pod +++ b/pod/perlrebackslash.pod @@ -589,7 +589,8 @@ the ends of sententces. C<\b{sb}> doesn't do well with text containing embedded newlines, like the source text of the document you are reading. Such text needs to be preprocessed to get rid of the line separators before looking for sentence boundaries. Some people view this as a bug -in the Unicode standard. +in the Unicode standard, and this behavior is quite subject to change in +future Perl versions. =item C<\b{wb}> diff --git a/pod/perlrun.pod b/pod/perlrun.pod index acf2702..1d5f8fc 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -290,7 +290,7 @@ are as follows; listing the letters is equal to summing the numbers. in UTF-8 L 64 normally the "IOEioA" are unconditional, the L makes them conditional on the locale environment variables - (the LC_ALL, LC_TYPE, and LANG, in the order of + (the LC_ALL, LC_CTYPE, and LANG, in the order of decreasing precedence) -- if the variables indicate UTF-8, then the selected "IOEioA" are in effect a 256 Set ${^UTF8CACHE} to -1, to run the UTF-8 caching @@ -419,6 +419,8 @@ B<-D14> is equivalent to B<-Dtls>): 16777216 M trace smart match resolution 33554432 B dump suBroutine definitions, including special Blocks like BEGIN + 67108864 L trace Locale-related info; what gets output is very + subject to change All these flags require B<-DDEBUGGING> when you compile the Perl executable (but see C<:opd> in L or L diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod index 869d9a5..edeb37d 100644 --- a/pod/perlunicode.pod +++ b/pod/perlunicode.pod @@ -4,17 +4,38 @@ perlunicode - Unicode support in Perl =head1 DESCRIPTION +If you haven't already, before reading this document, you should become +familiar with both L and L. + +Unicode aims to B-fy the en-B-ings of all the world's +character sets into a single Standard. For quite a few of the various +coding standards that existed when Unicode was first created, converting +from each to Unicode essentially meant adding a constant to each code +point in the original standard, and converting back meant just +subtracting that same constant. For ASCII and ISO-8859-1, the constant +is 0. For ISO-8859-5, (Cyrillic) the constant is 864; for Hebrew +(ISO-8859-8), it's 1488; Thai (ISO-8859-11), 3424; and so forth. This +made it easy to do the conversions, and facilitated the adoption of +Unicode. + +And it worked; nowadays, those legacy standards are rarely used. Most +everyone uses Unicode. + +Unicode is a comprehensive standard. It specifies many things outside +the scope of Perl, such as how to display sequences of characters. For +a full discussion of all aspects of Unicode, see +L. + =head2 Important Caveats +Even though some of this section may not be understandable to you on +first reading, we think it's important enough to highlight some of the +gotchas before delving further, so here goes: + Unicode support is an extensive requirement. While Perl does not implement the Unicode standard or the accompanying technical reports from cover to cover, Perl does support many Unicode features. -People who want to learn to use Unicode in Perl, should probably read -the L and -L, before reading -this reference document. - Also, the use of Unicode may present security issues that aren't obvious. Read L. @@ -24,8 +45,9 @@ Read L. In order to preserve backward compatibility, Perl does not turn on full internal Unicode support unless the pragma -C is specified. (This is automatically -selected if you use C or higher.) Failure to do this can +L>|feature/The 'unicode_strings' feature> +is specified. (This is automatically +selected if you S> or higher.) Failure to do this can trigger unexpected surprises. See L below. This pragma doesn't affect I/O. Nor does it change the internal @@ -35,249 +57,343 @@ filenames. =item Input and Output Layers -Perl knows when a filehandle uses Perl's internal Unicode encodings -(UTF-8, or UTF-EBCDIC if in EBCDIC) if the filehandle is opened with -the C<:encoding(utf8)> layer. Other encodings can be converted to Perl's -encoding on input or from Perl's encoding on output by use of the -C<:encoding(...)> layer. See L. +Use the C<:encoding(...)> layer to read from and write to +filehandles using the specified encoding. (See L.) -To indicate that Perl source itself is in UTF-8, use C. +=item You should convert your non-ASCII, non-UTF-8 Perl scripts to be +UTF-8. -=item C still needed to enable UTF-8/UTF-EBCDIC in scripts +See L. -As a compatibility measure, the C pragma must be explicitly -included to enable recognition of UTF-8 in the Perl scripts themselves -(in string or regular expression literals, or in identifier names) on -ASCII-based machines or to recognize UTF-EBCDIC on EBCDIC-based -machines. B -is needed.> See L. +=item C still needed to enable L in scripts -=item C-marked scripts and UTF-16 scripts autodetected +If your Perl script is itself encoded in L, +the S> pragma must be explicitly included to enable +recognition of that (in string or regular expression literals, or in +identifier names). B> is needed.> (See L). -If a Perl script begins marked with the Unicode C (UTF-16LE, UTF16-BE, -or UTF-8), or if the script looks like non-C-marked UTF-16 of either -endianness, Perl will correctly read in the script as Unicode. -(Cless UTF-8 cannot be effectively recognized or differentiated from -ISO 8859-1 or other eight-bit encodings.) +=item C-marked scripts and L scripts autodetected -=item C needed to upgrade non-Latin-1 byte strings - -By default, there is a fundamental asymmetry in Perl's Unicode model: -implicit upgrading from byte strings to Unicode strings assumes that -they were encoded in I, but Unicode strings are -downgraded with UTF-8 encoding. This happens because the first 256 -codepoints in Unicode happens to agree with Latin-1. - -See L for more details. +However, if a Perl script begins with the Unicode C (UTF-16LE, +UTF16-BE, or UTF-8), or if the script looks like non-C-marked +UTF-16 of either endianness, Perl will correctly read in the script as +the appropriate Unicode encoding. (C-less UTF-8 cannot be +effectively recognized or differentiated from ISO 8859-1 or other +eight-bit encodings.) =back =head2 Byte and Character Semantics -Perl uses logically-wide characters to represent strings internally. - -Starting in Perl 5.14, Perl-level operations work with -characters rather than bytes within the scope of a -C> (or equivalently -C or higher). (This is not true if bytes have been -explicitly requested by C>, nor necessarily true -for interactions with the platform's operating system.) - -For earlier Perls, and when C is not in effect, Perl -provides a fairly safe environment that can handle both types of -semantics in programs. For operations where Perl can unambiguously -decide that the input data are characters, Perl switches to character -semantics. For operations where this determination cannot be made -without additional information from the user, Perl decides in favor of -compatibility and chooses to use byte semantics. - -When C (but not C) is in -effect, Perl uses the rules associated with the current locale. -(C overrides C in the same scope; -while C effectively also selects -C in its scope; see L.) -Otherwise, Perl uses the platform's native -byte semantics for characters whose code points are less than 256, and -Unicode rules for those greater than 255. That means that non-ASCII -characters are undefined except for their -ordinal numbers. This means that none have case (upper and lower), nor are any -a member of character classes, like C<[:alpha:]> or C<\w>. (But all do belong -to the C<\W> class or the Perl regular expression extension C<[:^alpha:]>.) - -This behavior preserves compatibility with earlier versions of Perl, -which allowed byte semantics in Perl operations only if -none of the program's inputs were marked as being a source of Unicode -character data. Such data may come from filehandles, from calls to -external programs, from information provided by the system (such as C<%ENV>), -or from literals and constants in the source text. - -The C pragma is primarily a compatibility device that enables -recognition of UTF-(8|EBCDIC) in literals encountered by the parser. -Note that this pragma is only required while Perl defaults to byte -semantics; when character semantics become the default, this pragma -may become a no-op. See L. - -If strings operating under byte semantics and strings with Unicode -character data are concatenated, the new string will have -character semantics. This can cause surprises: See L, below. -You can choose to be warned when this happens. See C>. - -Under character semantics, many operations that formerly operated on -bytes now operate on characters. A character in Perl is -logically just a number ranging from 0 to 2**31 or so. Larger -characters may encode into longer sequences of bytes internally, but -this internal detail is mostly hidden for Perl code. -See L for more. - -=head2 Effects of Character Semantics - -Character semantics have the following effects: +Before Unicode, most encodings used 8 bits (a single byte) to encode +each character. Thus a character was a byte, and a byte was a +character, and there could be only 256 or fewer possible characters. +"Byte Semantics" in the title of this section refers to +this behavior. There was no need to distinguish between "Byte" and +"Character". + +Then along comes Unicode which has room for over a million characters +(and Perl allows for even more). This means that a character may +require more than a single byte to represent it, and so the two terms +are no longer equivalent. What matter are the characters as whole +entities, and not usually the bytes that comprise them. That's what the +term "Character Semantics" in the title of this section refers to. + +Perl had to change internally to decouple "bytes" from "characters". +It is important that you too change your ideas, if you haven't already, +so that "byte" and "character" no longer mean the same thing in your +mind. + +The basic building block of Perl strings has always been a "character". +The changes basically come down to that the implementation no longer +thinks that a character is always just a single byte. + +There are various things to note: + +=over 4 + +=item * + +String handling functions, for the most part, continue to operate in +terms of characters. C, for example, returns the number of +characters in a string, just as before. But that number no longer is +necessarily the same as the number of bytes in the string (there may be +more bytes than characters). The other such functions include +C, C, C, C, C, C, +C, C, and C. + +The exceptions are: =over 4 =item * +the bit-oriented C + +E + +=item * + +the byte-oriented C/C C<"C"> format + +However, the C specifier does operate on whole characters, as does the +C specifier. + +=item * + +some operators that interact with the platform's operating system + +Operators dealing with filenames are examples. + +=item * + +when the functions are called from within the scope of the +S>> pragma + +Likely, you should use this only for debugging anyway. + +=back + +=item * + Strings--including hash keys--and regular expression patterns may -contain characters that have an ordinal value larger than 255. +contain characters that have ordinal values larger than 255. If you use a Unicode editor to edit your program, Unicode characters may occur directly within the literal strings in UTF-8 encoding, or UTF-16. (The former requires a C or C, the latter requires a C.) -Unicode characters can also be added to a string by using the C<\N{U+...}> -notation. The Unicode code for the desired character, in hexadecimal, -should be placed in the braces, after the C. For instance, a smiley face is -C<\N{U+263A}>. - -Alternatively, you can use the C<\x{...}> notation for characters C<0x100> and -above. For characters below C<0x100> you may get byte semantics instead of -character semantics; see L. On EBCDIC machines there is -the additional problem that the value for such characters gives the EBCDIC -character rather than the Unicode one, thus it is more portable to use -C<\N{U+...}> instead. +L gives other ways to place non-ASCII +characters in your strings. -Additionally, you can use the C<\N{...}> notation and put the official -Unicode character name within the braces, such as -C<\N{WHITE SMILING FACE}>. This automatically loads the L -module with the C<:full> and C<:short> options. If you prefer different -options for this module, you can instead, before the C<\N{...}>, -explicitly load it with your desired options; for example, +=item * - use charnames ':loose'; +The C and C functions work on whole characters. =item * -If an appropriate L is specified, identifiers within the -Perl script may contain Unicode alphanumeric characters, including -ideographs. Perl does not currently attempt to canonicalize variable -names. +Regular expressions match whole characters. For example, C<"."> matches +a whole character instead of only a single byte. =item * -Regular expressions match characters instead of bytes. C<"."> matches -a character instead of a byte. +The C operator translates whole characters. (Note that the +C functionality has been removed. For similar functionality to +that, see C and C). =item * -Bracketed character classes in regular expressions match characters instead of -bytes and match against the character properties specified in the -Unicode properties database. C<\w> can be used to match a Japanese -ideograph, for instance. +C reverses by character rather than by byte. =item * -Named Unicode properties, scripts, and block ranges may be used (like bracketed -character classes) by using the C<\p{}> "matches property" construct and -the C<\P{}> negation, "doesn't match property". -See L for more details. +The bit string operators, C<& | ^ ~> and (starting in v5.22) +C<&. |. ^. ~.> can operate on characters that don't fit into a byte. +However, the current behavior is likely to change. You should not use +these operators on strings that are encoded in UTF-8. If you're not +sure about the encoding of a string, downgrade it before using any of +these operators; you can use +L|utf8/Utility functions>. -You can define your own character properties and use them -in the regular expression with the C<\p{}> or C<\P{}> construct. -See L for more details. +=back -=item * +The bottom line is that Perl has always practiced "Character Semantics", +but with the advent of Unicode, that is now different than "Byte +Semantics". -The special pattern C<\X> matches a logical character, an "extended grapheme -cluster" in Standardese. In Unicode what appears to the user to be a single -character, for example an accented C, may in fact be composed of a sequence -of characters, in this case a C followed by an accent character. C<\X> -will match the entire sequence. +=head2 ASCII Rules versus Unicode Rules + +Before Unicode, when a character was a byte was a character, +Perl knew only about the 128 characters defined by ASCII, code points 0 +through 127 (except for under S>). That left the code +points 128 to 255 as unassigned, and available for whatever use a +program might want. The only semantics they have is their ordinal +numbers, and that they are members of none of the non-negative character +classes. None are considered to match C<\w> for example, but all match +C<\W>. + +Unicode, of course, assigns each of those code points a particular +meaning (along with ones above 255). To preserve backward +compatibility, Perl only uses the Unicode meanings when there is some +indication that Unicode is what is intended; otherwise the non-ASCII +code points remain treated as if they are unassigned. + +Here are the ways that Perl knows that a string should be treated as +Unicode: + +=over =item * -The C operator translates characters instead of bytes. Note -that the C functionality has been removed. For similar -functionality see pack('U0', ...) and pack('C0', ...). +Within the scope of S> + +If the whole program is Unicode (signified by using 8-bit Bnicode +Bransformation Bormat), then all strings within it must be +Unicode. =item * -Case translation operators use the Unicode case translation tables -when character input is provided. Note that C, or C<\U> in -interpolated strings, translates to uppercase, while C, -or C<\u> in interpolated strings, translates to titlecase in languages -that make the distinction (which is equivalent to uppercase in languages -without the distinction). +Within the scope of +L>|feature/The 'unicode_strings' feature> + +This pragma was created so you can explicitly tell Perl that operations +executed within its scope are to use Unicode rules. More operations are +affected with newer perls. See L. =item * -Most operators that deal with positions or lengths in a string will -automatically switch to using character positions, including -C, C, C, C, C, C, -C, C, and C. An operator that -specifically does not switch is C. Operators that really don't -care include operators that treat strings as a bucket of bits such as -C, and operators dealing with filenames. +Within the scope of S> or higher + +This implicitly turns on S>. =item * -The C/C letter C does I change, since it is often -used for byte-oriented formats. Again, think C in the C language. +Within the scope of +L>|perllocale/Unicode and UTF-8>, +or L>|perllocale> and the current +locale is a UTF-8 locale. -There is a new C specifier that converts between Unicode characters -and code points. There is also a C specifier that is the equivalent of -C/C and properly handles character values even if they are above 255. +The former is defined to imply Unicode handling; and the latter +indicates a Unicode locale, hence a Unicode interpretation of all +strings within it. =item * -The C and C functions work on characters, similar to -C and C, I C and -C. C and C are methods for -emulating byte-oriented C and C on Unicode strings. -While these methods reveal the internal encoding of Unicode strings, -that is not something one normally needs to care about at all. +When the string contains a Unicode-only code point + +Perl has never accepted code points above 255 without them being +Unicode, so their use implies Unicode for the whole string. =item * -The bit string operators, C<& | ^ ~>, can operate on character data. -However, for backward compatibility, such as when using bit string -operations when characters are all less than 256 in ordinal value, one -should not use C<~> (the bit complement) with characters of both -values less than 256 and values greater than 256. Most importantly, -DeMorgan's laws (C<~($x|$y) eq ~$x&~$y> and C<~($x&$y) eq ~$x|~$y>) -will not hold. The reason for this mathematical I is that -the complement cannot return B the 8-bit (byte-wide) bit -complement B the full character-wide bit complement. +When the string contains a Unicode named code point C<\N{...}> + +The C<\N{...}> construct explicitly refers to a Unicode code point, +even if it is one that is also in ASCII. Therefore the string +containing it must be Unicode. =item * -There is a CPAN module, C>, which allows you to define -your own mappings to be used in C, C, C, -C, and C (or their double-quoted string inlined -versions such as C<\U>). -(Prior to Perl 5.16, this functionality was partially provided -in the Perl core, but suffered from a number of insurmountable -drawbacks, so the CPAN module was written instead.) +When the string has come from an external source marked as +Unicode + +The L|perlrun/-C [numberElist]> command line option can +specify that certain inputs to the program are Unicode, and the values +of this can be read by your Perl code, see L. + +=item * When the string has been upgraded to UTF-8 + +The function L|utf8/Utility functions> +can be explicitly used to permanently (unless a subsequent +C is called) cause a string to be treated as +Unicode. + +=item * There are additional methods for regular expression patterns + +A pattern that is compiled with the C<< /u >> or C<< /a >> modifiers is +treated as Unicode (though there are some restrictions with C<< /a >>). +Under the C<< /d >> and C<< /l >> modifiers, there are several other +indications for Unicode; see L. =back +Note that all of the above are overridden within the scope of +C>; but you should be using this pragma only for +debugging. + +Note also that some interactions with the platform's operating system +never use Unicode rules. + +When Unicode rules are in effect: + =over 4 =item * -And finally, C reverses by character rather than by byte. +Case translation operators use the Unicode case translation tables. + +Note that C, or C<\U> in interpolated strings, translates to +uppercase, while C, or C<\u> in interpolated strings, +translates to titlecase in languages that make the distinction (which is +equivalent to uppercase in languages without the distinction). + +There is a CPAN module, C>, which allows you to +define your own mappings to be used in C, C, C, +C, and C (or their double-quoted string inlined versions +such as C<\U>). (Prior to Perl 5.16, this functionality was partially +provided in the Perl core, but suffered from a number of insurmountable +drawbacks, so the CPAN module was written instead.) + +=item * + +Character classes in regular expressions match based on the character +properties specified in the Unicode properties database. + +C<\w> can be used to match a Japanese ideograph, for instance; and +C<[[:digit:]]> a Bengali number. + +=item * + +Named Unicode properties, scripts, and block ranges may be used (like +bracketed character classes) by using the C<\p{}> "matches property" +construct and the C<\P{}> negation, "doesn't match property". + +See L for more details. + +You can define your own character properties and use them +in the regular expression with the C<\p{}> or C<\P{}> construct. +See L for more details. =back +=head2 Extended Grapheme Clusters (Logical characters) + +Consider a character, say C. It could appear with various marks around it, +such as an acute accent, or a circumflex, or various hooks, circles, arrows, +I, above, below, to one side or the other, I. There are many +possibilities among the world's languages. The number of combinations is +astronomical, and if there were a character for each combination, it would +soon exhaust Unicode's more than a million possible characters. So Unicode +took a different approach: there is a character for the base C, and a +character for each of the possible marks, and these can be variously combined +to get a final logical character. So a logical character--what appears to be a +single character--can be a sequence of more than one individual characters. +The Unicode standard calls these "extended grapheme clusters" (which +is an improved version of the no-longer much used "grapheme cluster"); +Perl furnishes the C<\X> regular expression construct to match such +sequences in their entirety. + +But Unicode's intent is to unify the existing character set standards and +practices, and several pre-existing standards have single characters that +mean the same thing as some of these combinations, like ISO-8859-1, +which has quite a few of them. For example, C<"LATIN CAPITAL LETTER E +WITH ACUTE"> was already in this standard when Unicode came along. +Unicode therefore added it to its repertoire as that single character. +But this character is considered by Unicode to be equivalent to the +sequence consisting of the character C<"LATIN CAPITAL LETTER E"> +followed by the character C<"COMBINING ACUTE ACCENT">. + +C<"LATIN CAPITAL LETTER E WITH ACUTE"> is called a "pre-composed" +character, and its equivalence with the "E" and the "COMBINING ACCENT" +sequence is called canonical equivalence. All pre-composed characters +are said to have a decomposition (into the equivalent sequence), and the +decomposition type is also called canonical. A string may be comprised +as much as possible of precomposed characters, or it may be comprised of +entirely decomposed characters. Unicode calls these respectively, +"Normalization Form Composed" (NFC) and "Normalization Form Decomposed". +The C> module contains functions that convert +between the two. A string may also have both composed characters and +decomposed characters; this module can be used to make it all one or the +other. + +You may be presented with strings in any of these equivalent forms. +There is currently nothing in Perl 5 that ignores the differences. So +you'll have to specially hanlde it. The usual advice is to convert your +inputs to C before processing further. + +For more detailed information, see L. + =head2 Unicode Character Properties (The only time that Perl considers a sequence of individual code @@ -307,7 +423,7 @@ can take on several different values, such as C, C, C, and others. To match these, one needs to specify both the property name (C), AND the value being matched against -(C, C, etc.). This is done, as in the examples above, by having the +(C, C, I). This is done, as in the examples above, by having the two components separated by an equal sign (or interchangeably, a colon), like C<\p{Bidi_Class: Left}>. @@ -368,8 +484,8 @@ all of which match C under C matching. This set also includes its subsets C and C both of which under C match C. (The difference between these sets is that some things, such as Roman -numerals, come in both upper and lower case so they are C, but aren't considered -letters, so they aren't Cs.) +numerals, come in both upper and lower case so they are C, but +aren't considered letters, so they aren't C's.) See L for special considerations when matching Unicode properties against non-Unicode code points. @@ -381,7 +497,7 @@ usual categorization of a character" (from L). The compound way of writing these is like C<\p{General_Category=Number}> -(short, C<\p{gc:n}>). But Perl furnishes shortcuts in which everything up +(short: C<\p{gc:n}>). But Perl furnishes shortcuts in which everything up through the equal or colon separator is omitted. So you can instead just write C<\pN>. @@ -486,7 +602,7 @@ The world's languages are written in many different scripts. This sentence written in Cyrillic, and Greek is written in, well, Greek; Japanese mainly in Hiragana or Katakana. There are many more. -The Unicode Script and Script_Extensions properties give what script a +The Unicode C