Imported Upstream version 5.31.11 upstream/5.31.11
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 17 Dec 2020 03:02:25 +0000 (12:02 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 17 Dec 2020 03:02:25 +0000 (12:02 +0900)
164 files changed:
AUTHORS
Cross/config.sh-arm-linux
Cross/config.sh-arm-linux-n770
INSTALL
MANIFEST
META.json
META.yml
Makefile.SH
NetWare/Makefile
NetWare/config_H.wc
Porting/Maintainers.pl
Porting/checkAUTHORS.pl
Porting/config.sh
Porting/config_H
Porting/epigraphs.pod
Porting/perldelta_template.pod
Porting/release_schedule.pod
Porting/todo.pod
README.haiku
README.macosx
README.os2
README.os390
README.vms
cpan/Test-Simple/lib/Test/Builder.pm
cpan/Test-Simple/lib/Test/Builder/Formatter.pm
cpan/Test-Simple/lib/Test/Builder/Module.pm
cpan/Test-Simple/lib/Test/Builder/Tester.pm
cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm
cpan/Test-Simple/lib/Test/More.pm
cpan/Test-Simple/lib/Test/Simple.pm
cpan/Test-Simple/lib/Test/Tester.pm
cpan/Test-Simple/lib/Test/Tester/Capture.pm
cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm
cpan/Test-Simple/lib/Test/Tester/Delegate.pm
cpan/Test-Simple/lib/Test/use/ok.pm
cpan/Test-Simple/lib/Test2.pm
cpan/Test-Simple/lib/Test2/API.pm
cpan/Test-Simple/lib/Test2/API/Breakage.pm
cpan/Test-Simple/lib/Test2/API/Context.pm
cpan/Test-Simple/lib/Test2/API/Instance.pm
cpan/Test-Simple/lib/Test2/API/Stack.pm
cpan/Test-Simple/lib/Test2/Event.pm
cpan/Test-Simple/lib/Test2/Event/Bail.pm
cpan/Test-Simple/lib/Test2/Event/Diag.pm
cpan/Test-Simple/lib/Test2/Event/Encoding.pm
cpan/Test-Simple/lib/Test2/Event/Exception.pm
cpan/Test-Simple/lib/Test2/Event/Fail.pm
cpan/Test-Simple/lib/Test2/Event/Generic.pm
cpan/Test-Simple/lib/Test2/Event/Note.pm
cpan/Test-Simple/lib/Test2/Event/Ok.pm
cpan/Test-Simple/lib/Test2/Event/Pass.pm
cpan/Test-Simple/lib/Test2/Event/Plan.pm
cpan/Test-Simple/lib/Test2/Event/Skip.pm
cpan/Test-Simple/lib/Test2/Event/Subtest.pm
cpan/Test-Simple/lib/Test2/Event/TAP/Version.pm
cpan/Test-Simple/lib/Test2/Event/V2.pm
cpan/Test-Simple/lib/Test2/Event/Waiting.pm
cpan/Test-Simple/lib/Test2/EventFacet.pm
cpan/Test-Simple/lib/Test2/EventFacet/About.pm
cpan/Test-Simple/lib/Test2/EventFacet/Amnesty.pm
cpan/Test-Simple/lib/Test2/EventFacet/Assert.pm
cpan/Test-Simple/lib/Test2/EventFacet/Control.pm
cpan/Test-Simple/lib/Test2/EventFacet/Error.pm
cpan/Test-Simple/lib/Test2/EventFacet/Hub.pm
cpan/Test-Simple/lib/Test2/EventFacet/Info.pm
cpan/Test-Simple/lib/Test2/EventFacet/Info/Table.pm
cpan/Test-Simple/lib/Test2/EventFacet/Meta.pm
cpan/Test-Simple/lib/Test2/EventFacet/Parent.pm
cpan/Test-Simple/lib/Test2/EventFacet/Plan.pm
cpan/Test-Simple/lib/Test2/EventFacet/Render.pm
cpan/Test-Simple/lib/Test2/EventFacet/Trace.pm
cpan/Test-Simple/lib/Test2/Formatter.pm
cpan/Test-Simple/lib/Test2/Formatter/TAP.pm
cpan/Test-Simple/lib/Test2/Hub.pm
cpan/Test-Simple/lib/Test2/Hub/Interceptor.pm
cpan/Test-Simple/lib/Test2/Hub/Interceptor/Terminator.pm
cpan/Test-Simple/lib/Test2/Hub/Subtest.pm
cpan/Test-Simple/lib/Test2/IPC.pm
cpan/Test-Simple/lib/Test2/IPC/Driver.pm
cpan/Test-Simple/lib/Test2/IPC/Driver/Files.pm
cpan/Test-Simple/lib/Test2/Tools/Tiny.pm
cpan/Test-Simple/lib/Test2/Transition.pod
cpan/Test-Simple/lib/Test2/Util.pm
cpan/Test-Simple/lib/Test2/Util/ExternalMeta.pm
cpan/Test-Simple/lib/Test2/Util/Facets2Legacy.pm
cpan/Test-Simple/lib/Test2/Util/HashBase.pm
cpan/Test-Simple/lib/Test2/Util/Trace.pm
cpan/Test-Simple/lib/ok.pm
cpan/Test-Simple/t/Legacy/Tester/tbt_09do.t
cpan/Test-Simple/t/Test2/modules/API/Breakage.t
cpan/Time-Piece/Piece.pm
cpan/Time-Piece/Seconds.pm
cpan/Time-Piece/t/06large.t [new file with mode: 0644]
cpan/Time-Piece/t/09locales.t
dist/IO/t/cachepropagate-unix.t
dist/Module-CoreList/Changes
dist/Module-CoreList/lib/Module/CoreList.pm
dist/Module-CoreList/lib/Module/CoreList/Utils.pm
dist/Storable/t/huge.t
doio.c
doop.c
embed.fnc
ext/Opcode/Opcode.pm
ext/Opcode/Opcode.xs
ext/POSIX/t/mb.t
ext/XS-APItest/APItest.pm
ext/XS-APItest/APItest.xs
hints/catamount.sh
hints/dragonfly.sh
hv_macro.h
lib/B/Op_private.pm
lib/charnames.t
lib/open.pm
lib/perl5db.pl
lib/perl5db.t
lib/perl5db/t/gh-17660 [new file with mode: 0644]
lib/perlbug.t
lib/warnings.pm
makedef.pl
numeric.c
op.c
op.h
patchlevel.h
perl.h
plan9/config.plan9
plan9/config_sh.sample
pod/perl.pod
pod/perl53110delta.pod [new file with mode: 0644]
pod/perldata.pod
pod/perldelta.pod
pod/perldeprecation.pod
pod/perldiag.pod
pod/perlfunc.pod
pod/perlhist.pod
pod/perlopentut.pod
pod/perlport.pod
pod/perlretut.pod
pod/perlrun.pod
pod/perlvar.pod
pp.c
proto.h
regcomp.c
regcomp.h
regen/warnings.pl
sv.c
t/lib/GH_15109/Apack.pm [deleted file]
t/lib/GH_15109/Bpack.pm [deleted file]
t/lib/GH_15109/Cpack.pm [deleted file]
t/lib/GH_15109/Foo.pm [deleted file]
t/lib/croak/toke
t/op/caller.t
t/op/tr.t
t/re/pat.t
t/re/pat_advanced.t
toke.c
utils/perlbug.PL
vms/descrip_mms.template
vms/vms.c
win32/GNUmakefile
win32/Makefile
win32/makefile.mk
win32/pod.mak
win32/win32.c

diff --git a/AUTHORS b/AUTHORS
index 3e769eb..a9e4686 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -130,6 +130,7 @@ Artur Bergman                  <artur@contiller.se>
 Arvan                          <apritchard@zeus.com>
 Ash Berlin                     <ash@cpan.org>
 Ask Bjørn Hansen               <ask@develooper.com>
+Atsushi Sugawara               <peanutsjamjam@gmail.com>
 Audrey Tang                    <cpan@audreyt.org>
 Augustina Blair                <auggy@cpan.org>
 Axel Boldt
@@ -570,6 +571,7 @@ Jasmine Ahuja                  <jasmine.ahuja11@gmail.com>
 Jasmine Ngan                   <jasmine.ngan@outlook.com>
 Jason A. Smith                 <smithj4@rpi.edu>
 Jason E. Stewart               <jason@openinformatics.com>
+Jason McIntosh                 <jmac@jmac.org>
 Jason Shirk
 Jason Stewart                  <jasons@cs.unm.edu>
 Jason Varsoke                  <jjv@caesun10.msd.ray.com>
@@ -1114,6 +1116,7 @@ Salvador Ortiz Garcia          <sog@msg.com.mx>
 Sam Kimbrel                    <kimbrel@me.com>
 Sam Tregar                     <sam@tregar.com>
 Sam Vilain                     <sam@vilain.net>
+Samuel Smith                   <esaym@cpan.org>
 Samuel Thibault                <sthibault@debian.org>
 Samuli Kärkkäinen              <skarkkai@woods.iki.fi>
 Santtu Ojanperä                <santtuojanpera98@gmail.com>
index a9e92d7..4160474 100644 (file)
@@ -31,12 +31,12 @@ afsroot='/afs'
 alignbytes='4'
 aphostname='/bin/hostname'
 api_revision='5'
-api_subversion='10'
+api_subversion='11'
 api_version='31'
-api_versionstring='5.31.10'
+api_versionstring='5.31.11'
 ar='ar'
-archlib='/usr/lib/perl5/5.31.10/armv4l-linux'
-archlibexp='/usr/lib/perl5/5.31.10/armv4l-linux'
+archlib='/usr/lib/perl5/5.31.11/armv4l-linux'
+archlibexp='/usr/lib/perl5/5.31.11/armv4l-linux'
 archname64=''
 archname='armv4l-linux'
 archobjs=''
@@ -55,7 +55,7 @@ castflags='0'
 cat='cat'
 cc='cc'
 cccdlflags='-fpic'
-ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.31.10/armv4l-linux/CORE'
+ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.31.11/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'
@@ -823,7 +823,7 @@ inc_version_list=' '
 inc_version_list_init='0'
 incpath=''
 inews=''
-installarchlib='./install_me_here/usr/lib/perl5/5.31.10/armv4l-linux'
+installarchlib='./install_me_here/usr/lib/perl5/5.31.11/armv4l-linux'
 installbin='./install_me_here/usr/bin'
 installhtml1dir=''
 installhtml3dir=''
@@ -831,13 +831,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.31.10'
+installprivlib='./install_me_here/usr/lib/perl5/5.31.11'
 installscript='./install_me_here/usr/bin'
-installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.31.10/armv4l-linux'
+installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.31.11/armv4l-linux'
 installsitebin='./install_me_here/usr/bin'
 installsitehtml1dir=''
 installsitehtml3dir=''
-installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.31.10'
+installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.31.11'
 installsiteman1dir='./install_me_here/usr/share/man/man1'
 installsiteman3dir='./install_me_here/usr/share/man/man3'
 installsitescript='./install_me_here/usr/bin'
@@ -971,8 +971,8 @@ pmake=''
 pr=''
 prefix='/usr'
 prefixexp='/usr'
-privlib='/usr/lib/perl5/5.31.10'
-privlibexp='/usr/lib/perl5/5.31.10'
+privlib='/usr/lib/perl5/5.31.11'
+privlibexp='/usr/lib/perl5/5.31.11'
 procselfexe='"/proc/self/exe"'
 prototype='define'
 ptrsize='4'
@@ -1037,17 +1037,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.31.10/armv4l-linux'
-sitearchexp='/usr/lib/perl5/site_perl/5.31.10/armv4l-linux'
+sitearch='/usr/lib/perl5/site_perl/5.31.11/armv4l-linux'
+sitearchexp='/usr/lib/perl5/site_perl/5.31.11/armv4l-linux'
 sitebin='/usr/bin'
 sitebinexp='/usr/bin'
 sitehtml1dir=''
 sitehtml1direxp=''
 sitehtml3dir=''
 sitehtml3direxp=''
-sitelib='/usr/lib/perl5/site_perl/5.31.10'
+sitelib='/usr/lib/perl5/site_perl/5.31.11'
 sitelib_stem='/usr/lib/perl5/site_perl'
-sitelibexp='/usr/lib/perl5/site_perl/5.31.10'
+sitelibexp='/usr/lib/perl5/site_perl/5.31.11'
 siteman1dir='/usr/share/man/man1'
 siteman1direxp='/usr/share/man/man1'
 siteman3dir='/usr/share/man/man3'
@@ -1086,7 +1086,7 @@ stdio_stream_array=''
 strerror_r_proto='0'
 strings='/usr/include/string.h'
 submit=''
-subversion='10'
+subversion='11'
 sysman='/usr/share/man/man1'
 tail=''
 tar=''
@@ -1177,8 +1177,8 @@ vendorprefix=''
 vendorprefixexp=''
 vendorscript=''
 vendorscriptexp=''
-version='5.31.10'
-version_patchlevel_string='version 31 subversion 10'
+version='5.31.11'
+version_patchlevel_string='version 31 subversion 11'
 versiononly='undef'
 vi=''
 xlibpth='/usr/lib/386 /lib/386'
@@ -1192,9 +1192,9 @@ config_args=''
 config_argc=0
 PERL_REVISION=5
 PERL_VERSION=31
-PERL_SUBVERSION=10
+PERL_SUBVERSION=11
 PERL_API_REVISION=5
 PERL_API_VERSION=31
-PERL_API_SUBVERSION=10
+PERL_API_SUBVERSION=11
 PERL_PATCHLEVEL=
 PERL_CONFIG_SH=true
index bfe3866..edebf94 100644 (file)
@@ -31,12 +31,12 @@ afsroot='/afs'
 alignbytes='4'
 aphostname='/bin/hostname'
 api_revision='5'
-api_subversion='10'
+api_subversion='11'
 api_version='31'
-api_versionstring='5.31.10'
+api_versionstring='5.31.11'
 ar='ar'
-archlib='/usr/lib/perl5/5.31.10/armv4l-linux'
-archlibexp='/usr/lib/perl5/5.31.10/armv4l-linux'
+archlib='/usr/lib/perl5/5.31.11/armv4l-linux'
+archlibexp='/usr/lib/perl5/5.31.11/armv4l-linux'
 archname64=''
 archname='armv4l-linux'
 archobjs=''
@@ -54,7 +54,7 @@ castflags='0'
 cat='cat'
 cc='arm-none-linux-gnueabi-gcc'
 cccdlflags='-fpic'
-ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.31.10/armv4l-linux/CORE'
+ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.31.11/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'
@@ -821,7 +821,7 @@ inc_version_list=' '
 inc_version_list_init='0'
 incpath=''
 inews=''
-installarchlib='./install_me_here/usr/lib/perl5/5.31.10/armv4l-linux'
+installarchlib='./install_me_here/usr/lib/perl5/5.31.11/armv4l-linux'
 installbin='./install_me_here/usr/bin'
 installhtml1dir=''
 installhtml3dir=''
@@ -829,13 +829,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.31.10'
+installprivlib='./install_me_here/usr/lib/perl5/5.31.11'
 installscript='./install_me_here/usr/bin'
-installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.31.10/armv4l-linux'
+installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.31.11/armv4l-linux'
 installsitebin='./install_me_here/usr/bin'
 installsitehtml1dir=''
 installsitehtml3dir=''
-installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.31.10'
+installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.31.11'
 installsiteman1dir='./install_me_here/usr/share/man/man1'
 installsiteman3dir='./install_me_here/usr/share/man/man3'
 installsitescript='./install_me_here/usr/bin'
@@ -969,8 +969,8 @@ pmake=''
 pr=''
 prefix='/usr'
 prefixexp='/usr'
-privlib='/usr/lib/perl5/5.31.10'
-privlibexp='/usr/lib/perl5/5.31.10'
+privlib='/usr/lib/perl5/5.31.11'
+privlibexp='/usr/lib/perl5/5.31.11'
 procselfexe='"/proc/self/exe"'
 prototype='define'
 ptrsize='4'
@@ -1035,17 +1035,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.31.10/armv4l-linux'
-sitearchexp='/usr/lib/perl5/site_perl/5.31.10/armv4l-linux'
+sitearch='/usr/lib/perl5/site_perl/5.31.11/armv4l-linux'
+sitearchexp='/usr/lib/perl5/site_perl/5.31.11/armv4l-linux'
 sitebin='/usr/bin'
 sitebinexp='/usr/bin'
 sitehtml1dir=''
 sitehtml1direxp=''
 sitehtml3dir=''
 sitehtml3direxp=''
-sitelib='/usr/lib/perl5/site_perl/5.31.10'
+sitelib='/usr/lib/perl5/site_perl/5.31.11'
 sitelib_stem='/usr/lib/perl5/site_perl'
-sitelibexp='/usr/lib/perl5/site_perl/5.31.10'
+sitelibexp='/usr/lib/perl5/site_perl/5.31.11'
 siteman1dir='/usr/share/man/man1'
 siteman1direxp='/usr/share/man/man1'
 siteman3dir='/usr/share/man/man3'
@@ -1084,7 +1084,7 @@ stdio_stream_array=''
 strerror_r_proto='0'
 strings='/usr/include/string.h'
 submit=''
-subversion='10'
+subversion='11'
 sysman='/usr/share/man/man1'
 tail=''
 tar=''
@@ -1175,8 +1175,8 @@ vendorprefix=''
 vendorprefixexp=''
 vendorscript=''
 vendorscriptexp=''
-version='5.31.10'
-version_patchlevel_string='version 31 subversion 10'
+version='5.31.11'
+version_patchlevel_string='version 31 subversion 11'
 versiononly='undef'
 vi=''
 xlibpth='/usr/lib/386 /lib/386'
@@ -1190,9 +1190,9 @@ config_args=''
 config_argc=0
 PERL_REVISION=5
 PERL_VERSION=31
-PERL_SUBVERSION=10
+PERL_SUBVERSION=11
 PERL_API_REVISION=5
 PERL_API_VERSION=31
-PERL_API_SUBVERSION=10
+PERL_API_SUBVERSION=11
 PERL_PATCHLEVEL=
 PERL_CONFIG_SH=true
diff --git a/INSTALL b/INSTALL
index a6f2666..e57400d 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -615,7 +615,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.31.10.
+By default, Configure will use the following directories for 5.31.11.
 $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
@@ -2437,7 +2437,7 @@ L<https://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
 
 =head1 Coexistence with earlier versions of perl 5
 
-Perl 5.31.10 is not binary compatible with earlier versions of Perl.
+Perl 5.31.11 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 stable version of Perl
@@ -2512,9 +2512,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.31.10
+       sh Configure -Dprefix=/opt/perl5.31.11
 
-and adding /opt/perl5.31.10/bin to the shell PATH variable.  Such users
+and adding /opt/perl5.31.11/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.
 
@@ -2529,11 +2529,11 @@ yet.
 
 =head2 Upgrading from 5.31.8 or earlier
 
-B<Perl 5.31.10 may not be binary compatible with Perl 5.31.8 or
+B<Perl 5.31.11 may not be binary compatible with Perl 5.31.8 or
 earlier Perl releases.>  Perl modules having binary parts
 (meaning that a C compiler is used) will have to be recompiled to be
-used with 5.31.10.  If you find you do need to rebuild an extension with
-5.31.10, you may safely do so without disturbing the older
+used with 5.31.11.  If you find you do need to rebuild an extension with
+5.31.11, you may safely do so without disturbing the older
 installations.  (See L<"Coexistence with earlier versions of perl 5">
 above.)
 
@@ -2566,15 +2566,15 @@ Firstly, the bare minimum to run this script
      print("$f\n");
   }
 
-in Linux with perl-5.31.10 is as follows (under $Config{prefix}):
+in Linux with perl-5.31.11 is as follows (under $Config{prefix}):
 
   ./bin/perl
-  ./lib/perl5/5.31.10/strict.pm
-  ./lib/perl5/5.31.10/warnings.pm
-  ./lib/perl5/5.31.10/i686-linux/File/Glob.pm
-  ./lib/perl5/5.31.10/feature.pm
-  ./lib/perl5/5.31.10/XSLoader.pm
-  ./lib/perl5/5.31.10/i686-linux/auto/File/Glob/Glob.so
+  ./lib/perl5/5.31.11/strict.pm
+  ./lib/perl5/5.31.11/warnings.pm
+  ./lib/perl5/5.31.11/i686-linux/File/Glob.pm
+  ./lib/perl5/5.31.11/feature.pm
+  ./lib/perl5/5.31.11/XSLoader.pm
+  ./lib/perl5/5.31.11/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
index 841bdf2..95d6e44 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -2598,6 +2598,7 @@ cpan/Time-Piece/t/02core_dst.t
 cpan/Time-Piece/t/03compare.t  Test for Time::Piece
 cpan/Time-Piece/t/04mjd.t      Test for Time::Piece
 cpan/Time-Piece/t/05overload.t Test for Time::Piece
+cpan/Time-Piece/t/06large.t
 cpan/Time-Piece/t/06subclass.t Test for Time::Piece
 cpan/Time-Piece/t/07arith.t    Test for Time::Piece
 cpan/Time-Piece/t/08truncate.t
@@ -4802,6 +4803,7 @@ lib/perl5db/t/EnableModule.pm     Tests for the Perl debugger
 lib/perl5db/t/eval-line-bug    Tests for the Perl debugger
 lib/perl5db/t/fact             Tests for the Perl debugger
 lib/perl5db/t/filename-line-breakpoint         Tests for the Perl debugger
+lib/perl5db/t/gh-17660         Tests for the Perl debugger
 lib/perl5db/t/load-modules     Tests for the Perl debugger
 lib/perl5db/t/lsub-n           Test script used by perl5db.t
 lib/perl5db/t/lvalue-bug       Tests for the Perl debugger
@@ -5187,6 +5189,7 @@ pod/perl5300delta.pod             Perl changes in version 5.30.0
 pod/perl5301delta.pod          Perl changes in version 5.30.1
 pod/perl5302delta.pod          Perl changes in version 5.30.2
 pod/perl5310delta.pod          Perl changes in version 5.31.0
+pod/perl53110delta.pod         Perl changes in version 5.31.10
 pod/perl5311delta.pod          Perl changes in version 5.31.1
 pod/perl5312delta.pod          Perl changes in version 5.31.2
 pod/perl5313delta.pod          Perl changes in version 5.31.3
@@ -5645,10 +5648,6 @@ t/lib/feature/nonesuch           Tests for enabling/disabling nonexistent feature
 t/lib/feature/removed          Tests for enabling/disabling removed feature
 t/lib/feature/say              Tests for enabling/disabling say feature
 t/lib/feature/switch           Tests for enabling/disabling switch feature
-t/lib/GH_15109/Apack.pm                test Module for caller.t
-t/lib/GH_15109/Bpack.pm                test Module for caller.t
-t/lib/GH_15109/Cpack.pm                test Module for caller.t
-t/lib/GH_15109/Foo.pm          test Module for caller.t
 t/lib/h2ph.h                   Test header file for h2ph
 t/lib/h2ph.pht                 Generated output from h2ph.h by h2ph, for comparison
 t/lib/locale/latin1            Part of locale.t in Latin 1
index cac3b83..f4079de 100644 (file)
--- a/META.json
+++ b/META.json
          "url" : "https://github.com/Perl/perl5"
       }
    },
-   "version" : "5.031010",
+   "version" : "5.031011",
    "x_serialization_backend" : "JSON::PP version 4.04"
 }
index 2e47e7f..74dd4fd 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -117,5 +117,5 @@ resources:
   homepage: https://www.perl.org/
   license: https://dev.perl.org/licenses/
   repository: https://github.com/Perl/perl5
-version: '5.031010'
+version: '5.031011'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
index d64268d..d92ce61 100755 (executable)
@@ -589,7 +589,7 @@ esac
 
 $spitshell >>$Makefile <<'!NO!SUBS!'
 
-perltoc_pod_prereqs = extra.pods pod/perl53110delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
+perltoc_pod_prereqs = extra.pods pod/perl53111delta.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
 
@@ -1153,9 +1153,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/perl53110delta.pod: pod/perldelta.pod
-       $(RMS) pod/perl53110delta.pod
-       $(LNS) perldelta.pod pod/perl53110delta.pod
+pod/perl53111delta.pod: pod/perldelta.pod
+       $(RMS) pod/perl53111delta.pod
+       $(LNS) perldelta.pod pod/perl53111delta.pod
 
 extra.pods: $(MINIPERL_EXE)
        -@test ! -f extra.pods || rm -f `cat extra.pods`
index acc73df..e867536 100644 (file)
@@ -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.31.10 for NetWare"
+MODULE_DESC     = "Perl 5.31.11 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.31.10
+INST_VER       = \5.31.11
 
 #
 # Comment this out if you DON'T want your perl installation to have
index 140a13d..3e245d7 100644 (file)
  *     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.31.10\\lib\\NetWare-x86-multi-thread"             /**/
+#define ARCHLIB "c:\\perl\\5.31.11\\lib\\NetWare-x86-multi-thread"             /**/
 /*#define ARCHLIB_EXP ""       /**/
 
 /* ARCHNAME:
  *     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.31.10\\bin\\NetWare-x86-multi-thread" /**/
-#define BIN_EXP "c:\\perl\\5.31.10\\bin\\NetWare-x86-multi-thread"     /**/
+#define BIN "c:\\perl\\5.31.11\\bin\\NetWare-x86-multi-thread" /**/
+#define BIN_EXP "c:\\perl\\5.31.11\\bin\\NetWare-x86-multi-thread"     /**/
 
 /* BYTEORDER:
  *     This symbol holds the hexadecimal constant defined in byteorder,
  *     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.31.10\\lib\\NetWare-x86-multi-thread"              /**/
+#define SITEARCH "c:\\perl\\site\\5.31.11\\lib\\NetWare-x86-multi-thread"              /**/
 /*#define SITEARCH_EXP ""      /**/
 
 /* SITELIB:
  *     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.31.10\\lib"         /**/
+#define SITELIB "c:\\perl\\site\\5.31.11\\lib"         /**/
 /*#define SITELIB_EXP ""       /**/
 #define SITELIB_STEM ""                /**/
 
index 7cb2650..45bbf01 100755 (executable)
@@ -800,7 +800,7 @@ use File::Glob qw(:case);
     },
 
     'Module::CoreList' => {
-        'DISTRIBUTION' => 'BINGOS/Module-CoreList-5.20200220.tar.gz',
+        'DISTRIBUTION' => 'BINGOS/Module-CoreList-5.20200320.tar.gz',
         'FILES'        => q[dist/Module-CoreList],
     },
 
@@ -1057,7 +1057,7 @@ use File::Glob qw(:case);
     },
 
     'Test::Simple' => {
-        'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302171.tar.gz',
+        'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302175.tar.gz',
         'FILES'        => q[cpan/Test-Simple],
         'EXCLUDED'     => [
             qr{^examples/},
@@ -1189,7 +1189,7 @@ use File::Glob qw(:case);
     },
 
     'Time::Piece' => {
-        'DISTRIBUTION' => 'ESAYM/Time-Piece-1.34.tar.gz',
+        'DISTRIBUTION' => 'ESAYM/Time-Piece-1.3401.tar.gz',
         'FILES'        => q[cpan/Time-Piece],
         'EXCLUDED'     => [ qw[reverse_deps.txt] ],
     },
index 51e4914..afc38ce 100755 (executable)
@@ -1126,6 +1126,7 @@ rick\100consumercontact.com             rick\100bort.ca
 +                                       rick.delaney\100home.com
 rjbs\100cpan.org                        rjbs-perl-p5p\100lists.manxome.org
 +                                       perl.p5p\100rjbs.manxome.org
++                                       rjbs\100semiotic.systems
 rjk\100linguist.dartmouth.edu           rjk\100linguist.thayer.dartmouth.edu
 +                                       rjk-perl-p5p\100tamias.net
 +                                       rjk\100tamias.net
index caac704..0cf4f84 100644 (file)
@@ -44,12 +44,12 @@ afsroot='/afs'
 alignbytes='8'
 aphostname=''
 api_revision='5'
-api_subversion='10'
+api_subversion='11'
 api_version='31'
-api_versionstring='5.31.10'
+api_versionstring='5.31.11'
 ar='ar'
-archlib='/opt/perl/lib/5.31.10/x86_64-linux'
-archlibexp='/opt/perl/lib/5.31.10/x86_64-linux'
+archlib='/opt/perl/lib/5.31.11/x86_64-linux'
+archlibexp='/opt/perl/lib/5.31.11/x86_64-linux'
 archname64=''
 archname='x86_64-linux'
 archobjs=''
@@ -847,7 +847,7 @@ incpath=''
 incpth='/usr/lib/gcc/x86_64-linux-gnu/4.9/include /usr/local/include /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/include'
 inews=''
 initialinstalllocation='/opt/perl/bin'
-installarchlib='/opt/perl/lib/5.31.10/x86_64-linux'
+installarchlib='/opt/perl/lib/5.31.11/x86_64-linux'
 installbin='/opt/perl/bin'
 installhtml1dir=''
 installhtml3dir=''
@@ -855,13 +855,13 @@ installman1dir='/opt/perl/man/man1'
 installman3dir='/opt/perl/man/man3'
 installprefix='/opt/perl'
 installprefixexp='/opt/perl'
-installprivlib='/opt/perl/lib/5.31.10'
+installprivlib='/opt/perl/lib/5.31.11'
 installscript='/opt/perl/bin'
-installsitearch='/opt/perl/lib/site_perl/5.31.10/x86_64-linux'
+installsitearch='/opt/perl/lib/site_perl/5.31.11/x86_64-linux'
 installsitebin='/opt/perl/bin'
 installsitehtml1dir=''
 installsitehtml3dir=''
-installsitelib='/opt/perl/lib/site_perl/5.31.10'
+installsitelib='/opt/perl/lib/site_perl/5.31.11'
 installsiteman1dir='/opt/perl/man/man1'
 installsiteman3dir='/opt/perl/man/man3'
 installsitescript='/opt/perl/bin'
@@ -986,7 +986,7 @@ perl_patchlevel=''
 perl_static_inline='static __inline__'
 perladmin='yourname@yourhost.yourplace.com'
 perllibs='-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc'
-perlpath='/opt/perl/bin/perl5.31.10'
+perlpath='/opt/perl/bin/perl5.31.11'
 pg='pg'
 phostname=''
 pidtype='pid_t'
@@ -995,8 +995,8 @@ pmake=''
 pr=''
 prefix='/opt/perl'
 prefixexp='/opt/perl'
-privlib='/opt/perl/lib/5.31.10'
-privlibexp='/opt/perl/lib/5.31.10'
+privlib='/opt/perl/lib/5.31.11'
+privlibexp='/opt/perl/lib/5.31.11'
 procselfexe='"/proc/self/exe"'
 ptrsize='8'
 quadkind='2'
@@ -1061,17 +1061,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='/opt/perl/lib/site_perl/5.31.10/x86_64-linux'
-sitearchexp='/opt/perl/lib/site_perl/5.31.10/x86_64-linux'
+sitearch='/opt/perl/lib/site_perl/5.31.11/x86_64-linux'
+sitearchexp='/opt/perl/lib/site_perl/5.31.11/x86_64-linux'
 sitebin='/opt/perl/bin'
 sitebinexp='/opt/perl/bin'
 sitehtml1dir=''
 sitehtml1direxp=''
 sitehtml3dir=''
 sitehtml3direxp=''
-sitelib='/opt/perl/lib/site_perl/5.31.10'
+sitelib='/opt/perl/lib/site_perl/5.31.11'
 sitelib_stem='/opt/perl/lib/site_perl'
-sitelibexp='/opt/perl/lib/site_perl/5.31.10'
+sitelibexp='/opt/perl/lib/site_perl/5.31.11'
 siteman1dir='/opt/perl/man/man1'
 siteman1direxp='/opt/perl/man/man1'
 siteman3dir='/opt/perl/man/man3'
@@ -1097,7 +1097,7 @@ src='.'
 ssizetype='ssize_t'
 st_ino_sign='1'
 st_ino_size='8'
-startperl='#!/opt/perl/bin/perl5.31.10'
+startperl='#!/opt/perl/bin/perl5.31.11'
 startsh='#!/bin/sh'
 static_ext=' '
 stdchar='char'
@@ -1109,7 +1109,7 @@ stdio_ptr='((fp)->_IO_read_ptr)'
 stdio_stream_array=''
 strerror_r_proto='0'
 submit=''
-subversion='10'
+subversion='11'
 sysman='/usr/share/man/man1'
 sysroot=''
 tail=''
@@ -1207,8 +1207,8 @@ vendorprefix=''
 vendorprefixexp=''
 vendorscript=''
 vendorscriptexp=''
-version='5.31.10'
-version_patchlevel_string='version 31 subversion 10'
+version='5.31.11'
+version_patchlevel_string='version 31 subversion 11'
 versiononly='define'
 vi=''
 xlibpth='/usr/lib/386 /lib/386'
@@ -1218,10 +1218,10 @@ zcat=''
 zip='zip'
 PERL_REVISION=5
 PERL_VERSION=31
-PERL_SUBVERSION=10
+PERL_SUBVERSION=11
 PERL_API_REVISION=5
 PERL_API_VERSION=31
-PERL_API_SUBVERSION=10
+PERL_API_SUBVERSION=11
 PERL_PATCHLEVEL=''
 PERL_CONFIG_SH=true
 : Variables propagated from previous config.sh file.
index 7334240..e76a1b4 100644 (file)
  *     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 "/opt/perl/lib/5.31.10/x86_64-linux"           /**/
-#define ARCHLIB_EXP "/opt/perl/lib/5.31.10/x86_64-linux"               /**/
+#define ARCHLIB "/opt/perl/lib/5.31.11/x86_64-linux"           /**/
+#define ARCHLIB_EXP "/opt/perl/lib/5.31.11/x86_64-linux"               /**/
 
 /* BIN:
  *     This symbol holds the path of the bin directory where the package will
  *     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 "/opt/perl/lib/5.31.10"                /**/
-#define PRIVLIB_EXP "/opt/perl/lib/5.31.10"            /**/
+#define PRIVLIB "/opt/perl/lib/5.31.11"                /**/
+#define PRIVLIB_EXP "/opt/perl/lib/5.31.11"            /**/
 
 /* SITEARCH:
  *     This symbol contains the name of the private library for this package.
  *     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 "/opt/perl/lib/site_perl/5.31.10/x86_64-linux"                /**/
-#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.31.10/x86_64-linux"            /**/
+#define SITEARCH "/opt/perl/lib/site_perl/5.31.11/x86_64-linux"                /**/
+#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.31.11/x86_64-linux"            /**/
 
 /* SITELIB:
  *     This symbol contains the name of the private library for this package.
  *     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 "/opt/perl/lib/site_perl/5.31.10"              /**/
-#define SITELIB_EXP "/opt/perl/lib/site_perl/5.31.10"          /**/
+#define SITELIB "/opt/perl/lib/site_perl/5.31.11"              /**/
+#define SITELIB_EXP "/opt/perl/lib/site_perl/5.31.11"          /**/
 #define SITELIB_STEM "/opt/perl/lib/site_perl"         /**/
 
 /* PERL_VENDORARCH:
  *     script to make sure (one hopes) that it runs with perl and not
  *     some shell.
  */
-#define STARTPERL "#!/opt/perl/bin/perl5.31.10"                /**/
+#define STARTPERL "#!/opt/perl/bin/perl5.31.11"                /**/
 
 /* HAS_STDIO_STREAM_ARRAY:
  *     This symbol, if defined, tells that there is an array
index 85c3408..7dd3c39 100644 (file)
@@ -17,9 +17,28 @@ Consult your favorite dictionary for details.
 
 =head1 EPIGRAPHS
 
+=head2 v5.31.10 - Christina Rossetti, "Remember"
+
+L<Announced on 2020-03-20 by Sawyer X|https://www.nntp.perl.org/group/perl.perl5.porters/2020/03/msg257274.html>
+
+    Remember me when I am gone away,
+        Gone far away into the silent land;
+        When you can no more hold me by the hand,
+    Nor I half turn to go yet turning stay.
+    Remember me when no more day by day
+        You tell me of our future that you plann'd:
+        Only remember me; you understand
+    It will be late to counsel then or pray.
+    Yet if you should forget me for a while
+        And afterwards remember, do not grieve:
+        For if the darkness and corruption leave
+        A vestige of the thoughts that once I had,
+    Better by far you should forget and smile
+        Than that you should remember and be sad.
+
 =head2 v5.31.9 - Sten Nadolny, book The Discovery of Slowness
 
-L<Announced on 2020-01-20 by Renee Bäcker|https://www.nntp.perl.org/group/perl.perl5.porters/2020/02/msg257144.html>
+L<Announced on 2020-02-20 by Renee Bäcker|https://www.nntp.perl.org/group/perl.perl5.porters/2020/02/msg257144.html>
 
   â€žWhen people talk too fast the content becomes as superfluous as the speed.“
 
index bc39118..992716a 100644 (file)
@@ -403,7 +403,7 @@ died, add a short obituary here.
 
 XXX Generate this with:
 
-  perl Porting/acknowledgements.pl v5.31.10..HEAD
+  perl Porting/acknowledgements.pl v5.31.11..HEAD
 
 =head1 Reporting Bugs
 
index d1e195d..4a3640c 100644 (file)
@@ -18,8 +18,9 @@ Code freezes (which happen in the 5.31.X series)
   2020-01-20  5.31.8 âœ“        Contentious changes freeze
   2020-02-20  5.31.9 âœ“        User-visible changes to correctly
                               functioning programs freeze
-  2020-03-20  5.31.10         Full code freeze
-  2020-04-20  5.32.0          Stable release!
+  2020-03-20  5.31.10 âœ“       Full code freeze
+  2020-04-20  5.31.11         Full code freeze (clearing BBCs)
+  2020-05-20  5.32.0          Stable release!
 
 =head2 Perl 5.30
 
@@ -66,7 +67,8 @@ you should reset the version numbers to the next blead series.
   2019-12-20  5.31.7 âœ“       Atoomic
   2020-01-20  5.31.8 âœ“       Matthew Horsfall
   2020-02-20  5.31.9 âœ“       Renee Bäcker
-  2020-03-20  5.31.10        Sawyer X
+  2020-03-20  5.31.10 âœ“      Sawyer X
+  2020-04-20  5.31.11        Sawyer X
 
 (RC0 for 5.32.0 will be released once we think that all the blockers have been
 addressed.  This typically means some time in April or May.)
index df78df9..66d1421 100644 (file)
@@ -486,7 +486,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.32.0.
+options would be nice for perl 5.31.11.
 
 =head2 Profile Perl - am I hot or not?
 
@@ -1189,7 +1189,7 @@ L<http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2013-01/msg00339.html>
 =head1 Big projects
 
 Tasks that will get your name mentioned in the description of the "Highlights
-of 5.32.0"
+of 5.31.11"
 
 =head2 make ithreads more robust
 
index 759fd2f..5c416dd 100644 (file)
@@ -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.31.10/BePC-haiku/CORE/libperl.so .
+  cd /boot/common/lib; ln -s perl5/5.31.11/BePC-haiku/CORE/libperl.so .
 
-Replace C<5.31.10> with your respective version of Perl.
+Replace C<5.31.11> with your respective version of Perl.
 
 =head1 KNOWN PROBLEMS
 
index 04d0a01..1a2a1ad 100644 (file)
@@ -10,9 +10,9 @@ perlmacosx - Perl under Mac OS X
 
 This document briefly describes Perl under Mac OS X.
 
-  curl -O https://www.cpan.org/src/perl-5.31.10.tar.gz
-  tar -xzf perl-5.31.10.tar.gz
-  cd perl-5.31.10
+  curl -O https://www.cpan.org/src/perl-5.31.11.tar.gz
+  tar -xzf perl-5.31.11.tar.gz
+  cd perl-5.31.11
   ./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.31.10 as of this writing) builds without changes
+The latest Perl release (5.31.11 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',
index 4f886b7..c5ecc38 100644 (file)
@@ -619,7 +619,7 @@ C<set PERLLIB_PREFIX> in F<Config.sys>, see L</"C<PERLLIB_PREFIX>">.
 
 =item Additional Perl modules
 
-  unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.31.10/
+  unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.31.11/
 
 Same remark as above applies.  Additionally, if this directory is not
 one of directories on @INC (and @INC is influenced by C<PERLLIB_PREFIX>), you
index 3822f00..5a2d811 100644 (file)
@@ -452,7 +452,7 @@ Updated 12 March    2001 to mention //'SYS1.TCPPARMS(TCPDATA)'.
 
 Updated 28 November 2001 for broken URLs.
 
-Updated 03 October  2019 for perl-5.31.10+
+Updated 03 October  2019 for perl-5.31.11+
 
 =cut
 
index 77db680..9e62a64 100644 (file)
@@ -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^.31^.10.tar
+    vmstar -xvf perl-5^.31^.11.tar
 
 Then set default to the top-level source directory like so:
 
-    set default [.perl-5^.31^.10]
+    set default [.perl-5^.31^.11]
 
 and proceed with configuration as described in the next section.
 
index 31d48d4..1a49b7a 100644 (file)
@@ -4,7 +4,7 @@ use 5.006;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN {
     if( $] < 5.008 ) {
index 0d1e3a3..ab405ca 100644 (file)
@@ -2,7 +2,7 @@ package Test::Builder::Formatter;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::Formatter::TAP; our @ISA = qw(Test2::Formatter::TAP) }
 
@@ -33,7 +33,8 @@ sub debug_tap {
     my ($self, $f, $num) = @_;
     return if $self->{+NO_DIAG};
     my @out = $self->SUPER::debug_tap($f, $num);
-    $self->redirect(\@out) if @out && $f->{about}->{package} eq 'Test::Builder::TodoDiag';
+    $self->redirect(\@out) if @out && ref $f->{about} && defined $f->{about}->{package}
+        && $f->{about}->{package} eq 'Test::Builder::TodoDiag';
     return @out;
 }
 
@@ -41,7 +42,8 @@ sub info_tap {
     my ($self, $f) = @_;
     return if $self->{+NO_DIAG};
     my @out = $self->SUPER::info_tap($f);
-    $self->redirect(\@out) if @out && $f->{about}->{package} eq 'Test::Builder::TodoDiag';
+    $self->redirect(\@out) if @out && ref $f->{about} && defined $f->{about}->{package}
+        && $f->{about}->{package} eq 'Test::Builder::TodoDiag';
     return @out;
 }
 
index e36318a..6e550eb 100644 (file)
@@ -7,7 +7,7 @@ use Test::Builder;
 require Exporter;
 our @ISA = qw(Exporter);
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 =head1 NAME
index 485e4d4..da98e3d 100644 (file)
@@ -1,7 +1,7 @@
 package Test::Builder::Tester;
 
 use strict;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Test::Builder;
 use Symbol;
index 7fbba0b..116e605 100644 (file)
@@ -1,7 +1,7 @@
 package Test::Builder::Tester::Color;
 
 use strict;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 require Test::Builder::Tester;
 
index b373c6c..b69ca25 100644 (file)
@@ -2,7 +2,7 @@ package Test::Builder::TodoDiag;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::Event::Diag; our @ISA = qw(Test2::Event::Diag) }
 
index 72f6152..b2f8228 100644 (file)
@@ -17,7 +17,7 @@ sub _carp {
     return warn @_, " at $file line $line\n";
 }
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Test::Builder::Module;
 our @ISA    = qw(Test::Builder::Module);
@@ -1848,7 +1848,7 @@ might get a "Wide character in print" warning.  Using
 C<< binmode STDOUT, ":utf8" >> will not fix it.
 L<Test::Builder> (which powers
 Test::More) duplicates STDOUT and STDERR.  So any changes to them,
-including changing their output disciplines, will not be seem by
+including changing their output disciplines, will not be seen by
 Test::More.
 
 One work around is to apply encodings to STDOUT and STDERR as early
index 0327715..6ff8183 100644 (file)
@@ -4,7 +4,7 @@ use 5.006;
 
 use strict;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Test::Builder::Module;
 our @ISA    = qw(Test::Builder::Module);
index 0365074..1cc7bd1 100644 (file)
@@ -18,7 +18,7 @@ require Exporter;
 
 use vars qw( @ISA @EXPORT );
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 @EXPORT = qw( run_tests check_tests check_test cmp_results show_space );
 @ISA = qw( Exporter );
index b3c6d3f..c5c4542 100644 (file)
@@ -2,7 +2,7 @@ use strict;
 
 package Test::Tester::Capture;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 use Test::Builder;
index 974ec39..a86ef06 100644 (file)
@@ -3,7 +3,7 @@ use strict;
 
 package Test::Tester::CaptureRunner;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 use Test::Tester::Capture;
index 4b0d9b8..2036f2e 100644 (file)
@@ -3,7 +3,7 @@ use warnings;
 
 package Test::Tester::Delegate;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Scalar::Util();
 
index e5c7aaf..4113ef5 100644 (file)
@@ -1,7 +1,7 @@
 package Test::use::ok;
 use 5.005;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 __END__
index cc6883a..d915631 100644 (file)
@@ -2,7 +2,7 @@ package Test2;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 1;
index 166092c..6c51741 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
     $ENV{TEST2_ACTIVE} = 1;
 }
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 my $INST;
index 19f1010..2dd2852 100644 (file)
@@ -2,7 +2,7 @@ package Test2::API::Breakage;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 use Test2::Util qw/pkg_to_file/;
@@ -73,7 +73,9 @@ sub report {
         next unless $INC{$file} || ($require && eval { require $file; 1 });
         my $want = $suggest{$mod};
         next if eval { $mod->VERSION($want); 1 };
-        push @warn => " * Module '$mod' is outdated, we recommend updating above $want.";
+        my $error = $@;
+        chomp $error;
+        push @warn => " * Module '$mod' is outdated, we recommed updating above $want. error was: '$error'; INC is $INC{$file}";
     }
 
     for my $mod (keys %required) {
index f63bb32..177d9c4 100644 (file)
@@ -2,7 +2,7 @@ package Test2::API::Context;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 use Carp qw/confess croak/;
index 0f26b5d..fbbb675 100644 (file)
@@ -2,7 +2,7 @@ package Test2::API::Instance;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 our @CARP_NOT = qw/Test2::API Test2::API::Instance Test2::IPC::Driver Test2::Formatter/;
 use Carp qw/confess carp/;
index 1585a21..d6b6e85 100644 (file)
@@ -2,7 +2,7 @@ package Test2::API::Stack;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 use Test2::Hub();
index 58eafba..e1c567a 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Scalar::Util qw/blessed reftype/;
 use Carp qw/croak/;
index ad527a2..076ac97 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Bail;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index 720e233..9fa732f 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Diag;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index a54ce5a..3fb7364 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Encoding;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Carp qw/croak/;
 
index e95ced1..df83ac8 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Exception;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index 3e0e3ce..f09a035 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Fail;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Test2::EventFacet::Info;
 
index 1a81b31..ef08124 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 use Carp qw/croak/;
 use Scalar::Util qw/reftype/;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
 use Test2::Util::HashBase;
index 6b1f6e4..4a310f3 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Note;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index 143b8bb..088c8b6 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Ok;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index 7f8f698..bfc3a73 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Pass;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Test2::EventFacet::Info;
 
index 014a0aa..ad8f927 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Plan;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index 77b2ec7..a992324 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Skip;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) }
index c768c56..aed0c00 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Subtest;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) }
 use Test2::Util::HashBase qw{subevents buffered subtest_id subtest_uuid};
index b1875c5..b3cb1d8 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::TAP::Version;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Carp qw/croak/;
 
index ff40d9f..326a818 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::V2;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Scalar::Util qw/reftype/;
 use Carp qw/croak/;
index 45e706f..dbd1448 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Waiting;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index 9c6fb44..13c217f 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Test2::Util::HashBase qw/-details/;
 use Carp qw/croak/;
index b6afb51..f12ebf8 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::About;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 use Test2::Util::HashBase qw{ -package -no_display -uuid -eid };
index cc5b3c6..45ed927 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Amnesty;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 sub is_list { 1 }
 
index e5b4170..02f89af 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Assert;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 use Test2::Util::HashBase qw{ -pass -no_debug -number };
index 286526f..8a04a4a 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Control;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 use Test2::Util::HashBase qw{ -global -terminate -halt -has_callback -encoding -phase };
index 434e59c..87baf11 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Error;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 sub facet_key { 'errors' }
 sub is_list { 1 }
index 61bac67..3701425 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Hub;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 sub is_list { 1 }
 sub facet_key { 'hubs' }
index e471e10..badd2d0 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Info;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 sub is_list { 1 }
 
index dd4e47f..0c127b5 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Info::Table;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Carp qw/confess/;
 
index 823da05..2b75764 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Meta;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 use vars qw/$AUTOLOAD/;
index e7b9e53..ac26737 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Parent;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Carp qw/confess/;
 
index 25822fb..355588b 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Plan;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 use Test2::Util::HashBase qw{ -count -skip -none };
index e38fa34..13fe4cb 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Render;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 sub is_list { 1 }
 
index d4c79d9..455b0ee 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Trace;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 
index e9930a6..17c28bf 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Formatter;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 my %ADDED;
index f5436fe..120c82d 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Formatter::TAP;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Test2::Util qw/clone_io/;
 
index c08f276..e041f6d 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Hub;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 use Carp qw/carp croak confess/;
@@ -813,7 +813,7 @@ Get the IPC object used by the hub.
 
 This can be used to disable auto-ending behavior for a hub. The auto-ending
 behavior is triggered by an end block and is used to cull IPC events, and
-output the final plan if the plan was 'no_plan'.
+output the final plan if the plan was 'NO PLAN'.
 
 =item $bool = $hub->active
 
@@ -861,7 +861,7 @@ pass/fail status.
 =item $plan = $hub->plan
 
 Get or set the plan. The plan must be an integer larger than 0, the string
-'no_plan', or the string 'skip_all'.
+'NO PLAN', or the string 'SKIP'.
 
 =item $bool = $hub->check_plan
 
index 7df2b74..317dfa8 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Hub::Interceptor;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 use Test2::Hub::Interceptor::Terminator();
index ad52eef..906e7b0 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Hub::Interceptor::Terminator;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 1;
index be9174d..acc6369 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Hub::Subtest;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::Hub; our @ISA = qw(Test2::Hub) }
 use Test2::Util::HashBase qw/nested exit_code manual_skip_all/;
index 266fb98..e9d29cc 100644 (file)
@@ -2,7 +2,7 @@ package Test2::IPC;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 use Test2::API::Instance;
index f3016f4..db6642a 100644 (file)
@@ -2,7 +2,7 @@ package Test2::IPC::Driver;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 use Carp qw/confess/;
index 47d0a1b..09fdd5c 100644 (file)
@@ -2,7 +2,7 @@ package Test2::IPC::Driver::Files;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Test2::IPC::Driver; our @ISA = qw(Test2::IPC::Driver) }
 
@@ -117,12 +117,36 @@ sub drop_hub {
     }
 
     opendir(my $dh, $tdir) or $self->abort_trace("Could not open temp dir!");
+
+    my %bad;
     for my $file (readdir($dh)) {
         next if $file =~ m{\.complete$};
         next unless $file =~ m{^$hid};
-        $self->abort_trace("Not all files from hub '$hid' have been collected!");
+
+        eval { $bad{$file} = $self->read_event_file(File::Spec->catfile($tdir, $file)); 1 } or $bad{$file} = $@ || "Unknown error reading file";
     }
     closedir($dh);
+
+    return unless keys %bad;
+
+    my $data;
+    my $ok = eval {
+        require JSON::PP;
+        local *UNIVERSAL::TO_JSON = sub { +{ %{$_[0]} } };
+        my $json = JSON::PP->new->ascii->pretty->canonical->allow_unknown->allow_blessed->convert_blessed;
+        $data = $json->encode(\%bad);
+        1;
+    };
+    $ok ||= eval {
+        require Data::Dumper;
+        local $Data::Dumper::Sortkeys = 1;
+        $data = Data::Dumper::Dumper(\%bad);
+        1;
+    };
+
+    $data = "Could not dump data... sorry." unless defined $data;
+
+    $self->abort_trace("Not all files from hub '$hid' have been collected!\nHere is the leftover data:\n========================\n$data\n===================\n");
 }
 
 sub send {
index fba95e2..5139e46 100644 (file)
@@ -16,7 +16,7 @@ use Test2::API qw/context run_subtest test2_stack/;
 use Test2::Hub::Interceptor();
 use Test2::Hub::Interceptor::Terminator();
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 BEGIN { require Exporter; our @ISA = qw(Exporter) }
 our @EXPORT = qw{
index de6442c..07811f0 100644 (file)
@@ -76,7 +76,7 @@ as needed.
 =head3 The Problem
 
 An early change, in fact the change that made Test2 an idea, was a change to
-the indentation of the subtest note. IT was decided it would be more readable
+the indentation of the subtest note. It was decided it would be more readable
 to outdent the subtest note instead of having it inline with the subtest:
 
     # subtest foo
@@ -104,7 +104,7 @@ This breaks tests that do string comparison of TAP output.
     );
 
 Check if C<$INC{'Test2/API.pm'}> is set, if it is then no indentation should be
-expected. If it is not set than the old Test::Builder is in use, indentation
+expected. If it is not set, then the old Test::Builder is in use, indentation
 should be expected.
 
 =head1 DISTRIBUTIONS THAT BREAK OR NEED TO BE UPGRADED
@@ -129,13 +129,6 @@ failure. This can be easily updated, but nobody has done so yet.
 
 Known broken in versions: 1.0.9 and older
 
-=item Test::Kit
-
-This actually works fine, but will not install because L<Test::Aggregate> is in
-the dependency chain.
-
-See the L<Test::Aggregate> info below for additional information.
-
 =item Device::Chip
 
 Tests break due to subtest indentation.
@@ -201,6 +194,13 @@ the bugfix.
 
 Fixed in version: 0.04
 
+=item Test::Kit
+
+Old versions work fine, but would not install because L<Test::Aggregate> was in
+the dependency chain. An upgrade should not be needed.
+
+Fixed in version: 2.15
+
 =item autouse
 
 A test broke because it depended on Scalar::Util not being loaded. Test2 loads
@@ -274,8 +274,8 @@ Fixed in version: 0.007
 
 This distribution directly accesses the hash keys in the L<Test::Builder>
 singleton. It also approaches the problem from the wrong angle, please consider
-using L<Test2::Harness> or L<App::ForkProve> which both solve the same problem
-at the harness level.
+using L<Test2::Aggregate> for similar functionality and L<Test2::Harness>
+which allows module preloading at the harness level.
 
 Still broken as of version: 0.373
 
index 8296f47..0ba4995 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Util;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use POSIX();
 use Config qw/%Config/;
index b72dfd2..90345d0 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Util::ExternalMeta;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 
 use Carp qw/croak/;
index 79fb79a..4bcee18 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Util::Facets2Legacy;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use Carp qw/croak confess/;
 use Scalar::Util qw/blessed/;
index 9a1f3b1..a6a04f9 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Util::HashBase;
 use strict;
 use warnings;
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 #################################################################
 #                                                               #
index 546b9b4..33b3648 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Util::Trace;
 require Test2::EventFacet::Trace;
 @ISA = ('Test2::EventFacet::Trace');
 
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 1;
 
index f7b24ac..f3b394d 100644 (file)
@@ -1,5 +1,5 @@
 package ok;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
 
 use strict;
 use Test::More ();
index 87e1a54..6b25525 100644 (file)
@@ -9,7 +9,7 @@ use File::Basename qw(dirname);
 use File::Spec qw();
 
 my $file = File::Spec->join(dirname(__FILE__), 'tbt_09do_script.pl');
-$file = File::Spec->catfile(File::Spec->curdir(), $file)
+$file = File::Spec->rel2abs(File::Spec->catfile(File::Spec->curdir(), $file))
     unless File::Spec->file_name_is_absolute($file);
 my $done = do $file;
 ok(defined($done), 'do succeeded') or do {
index f5af6c5..26d01b8 100644 (file)
@@ -33,12 +33,12 @@ for my $meth (qw/upgrade_suggested upgrade_required known_broken/) {
     {
         local %INC = (
             %INC,
-            'T2Test/UG1.pm' => 1,
-            'T2Test/UG2.pm' => 1,
-            'T2Test/UR1.pm' => 1,
-            'T2Test/UR2.pm' => 1,
-            'T2Test/KB1.pm' => 1,
-            'T2Test/KB2.pm' => 1,
+            'T2Test/UG1.pm' => 'T2Test/UG1.pm',
+            'T2Test/UG2.pm' => 'T2Test/UG2.pm',
+            'T2Test/UR1.pm' => 'T2Test/UR1.pm',
+            'T2Test/UR2.pm' => 'T2Test/UR2.pm',
+            'T2Test/KB1.pm' => 'T2Test/KB1.pm',
+            'T2Test/KB2.pm' => 'T2Test/KB2.pm',
         );
         local $T2Test::UG1::VERSION = '0.9';
         local $T2Test::UG2::VERSION = '0.9';
@@ -49,14 +49,16 @@ for my $meth (qw/upgrade_suggested upgrade_required known_broken/) {
 
         my @report = $CLASS->report;
 
+        $_ =~ s{\S+/Breakage\.pm}{Breakage.pm}g for @report;
+
         is_deeply(
             [sort @report],
             [
                 sort
-                " * Module 'T2Test::UG1' is outdated, we recommend updating above 1.0.",
                 " * Module 'T2Test::UR1' is outdated and known to be broken, please update to 1.0 or higher.",
                 " * Module 'T2Test::KB1' is known to be broken in version 1.0 and below, newer versions have not been tested. You have: 0.9",
                 " * Module 'T2Test::KB2' is known to be broken in version 0.5 and below, newer versions have not been tested. You have: 0.9",
+                " * Module 'T2Test::UG1' is outdated, we recommed updating above 1.0. error was: 'T2Test::UG1 version 1.0 required--this is only version 0.9 at Breakage.pm line 75.'; INC is T2Test/UG1.pm",
             ],
             "Got expected report items"
         );
index 7a61370..f5d87cd 100644 (file)
@@ -19,7 +19,7 @@ our %EXPORT_TAGS = (
     ':override' => 'internal',
     );
 
-our $VERSION = '1.34';
+our $VERSION = '1.3401';
 
 XSLoader::load( 'Time::Piece', $VERSION );
 
@@ -126,7 +126,7 @@ sub _mktime {
     if ($class->_is_time_struct($time)) {
         my @new_time = @$time;
         my @tm_parts = (@new_time[c_sec .. c_mon], $new_time[c_year]+1900);
-        #TODO: what happens here for data below 1970?
+
         $new_time[c_epoch] = $islocal ? timelocal(@tm_parts) : timegm(@tm_parts);
 
         return wantarray ? @new_time : bless [@new_time[0..9], $islocal], $class;
@@ -806,8 +806,14 @@ sub use_locale {
     #get locale month/day names from posix strftime (from Piece.xs)
     my $locales = _get_localization();
 
-    $locales->{PM} ||= '';
-    $locales->{AM} ||= '';
+    #If AM and PM are the same, set both to ''
+    if (   !$locales->{PM}
+        || !$locales->{AM}
+        || ( $locales->{PM} eq $locales->{AM} ) )
+    {
+        $locales->{PM} = '';
+        $locales->{AM} = '';
+    }
 
     $locales->{pm} = lc $locales->{PM};
     $locales->{am} = lc $locales->{AM};
index fda1d2f..6aa864d 100644 (file)
@@ -1,7 +1,7 @@
 package Time::Seconds;
 use strict;
 
-our $VERSION = '1.34';
+our $VERSION = '1.3401';
 
 use Exporter 5.57 'import';
 
diff --git a/cpan/Time-Piece/t/06large.t b/cpan/Time-Piece/t/06large.t
new file mode 100644 (file)
index 0000000..aa0c192
--- /dev/null
@@ -0,0 +1,42 @@
+use Test::More;
+use Time::Piece;
+use Time::Seconds;
+
+# Large tests - test dates outside of the epoch range,
+# somewhat silly, but lets see what happens
+
+
+plan skip_all => "Large time tests not required for installation"
+  unless ( $ENV{AUTOMATED_TESTING} );
+
+TODO: {
+    local $TODO = "Big dates will probably fail on some platforms";
+    my $t = gmtime;
+
+    my $base_year = $t->year;
+    my $one_year  = ONE_YEAR;
+
+    for ( 1 .. 50 ) {
+        $t = $t + $one_year;
+        cmp_ok(
+            $t->year, '==',
+            $base_year + $_,
+            "Year is: " . ( $base_year + $_ )
+        );
+    }
+
+    $t         = gmtime;
+    $base_year = $t->year;
+
+    for ( 1 .. 200 ) {
+        $t = $t - $one_year;
+        cmp_ok(
+            $t->year, '==',
+            $base_year - $_,
+            "Year is: " . ( $base_year - $_ )
+        );
+    }
+
+}
+
+done_testing(250);
index e7c183f..b1d0316 100644 (file)
@@ -1,6 +1,11 @@
-use Test::More tests => 172;
+use Test::More;
 use Time::Piece;
 
+# Skip if doing a regular install
+# These are mostly for reverse parsing tests, not required for installation
+plan skip_all => "Reverse parsing not required for installation"
+  unless ( $ENV{AUTOMATED_TESTING} );
+
 my $t = gmtime(1373371631);    # 2013-07-09T12:07:11
 
 #locale should be undef
@@ -24,6 +29,10 @@ $t->day_list(@frdays);
 cmp_ok( $t->day,     'eq', &Time::Piece::_locale()->{wday}[ $t->_wday ] );
 cmp_ok( $t->fullday, 'eq', &Time::Piece::_locale()->{weekday}[ $t->_wday ] );
 
+
+#load local locale
+Time::Piece->use_locale();
+
 #test reverse parsing
 sub check_parsed
 {
@@ -53,18 +62,16 @@ my @dates = (
 #TODO
 #    '%u %U %Y %T',                    #%U,W,V currently skipped inside strptime
 #    '%w %W %y %T',
-    '%A, %e %B %Y at %I:%M:%S %p',    #%I and %p can be locale dependant
-    '%x %X',                          #hard coded to American localization
+#    '%A, %e %B %Y at %I:%M:%S %p',    #%I and %p can be locale dependant
+    '%x %X',    #hard coded to American localization
 );
 
 for my $time (
-    time(),                           # Now, whenever that might be
-    1451606400,                       # 2016-01-01 00:00
-    1451649600,                       # 2016-01-01 12:00
+    time(),        # Now, whenever that might be
+    1451606400,    # 2016-01-01 00:00
+    1451649600,    # 2016-01-01 12:00
   )
 {
-    Time::Piece->use_locale();
-    local $ENV{LC_TIME} = 'en_US';    # Otherwise DD/MM vs MM/DD causes grief
     my $t = gmtime($time);
     for my $strp_format (@dates) {
 
@@ -86,8 +93,6 @@ for my $time (
     1451649600,    # 2016-01-01 12:00
   )
 {
-    Time::Piece->use_locale();
-    local $ENV{LC_TIME} = 'en_US';    # Otherwise DD/MM vs MM/DD causes grief
     my $t = localtime($time);
     for my $strp_format (@dates) {
 
@@ -95,7 +100,7 @@ for my $time (
         my $parsed;
       SKIP: {
             eval { $parsed = $t->strptime( $t_str, $strp_format ); };
-            skip "gmtime strptime parse failed", 3 if $@;
+            skip "localtime strptime parse failed", 3 if $@;
             check_parsed( $t, $parsed, $t_str, $strp_format );
         }
 
@@ -103,3 +108,4 @@ for my $time (
 
 }
 
+done_testing(154);
index 8427e9f..7a1ff85 100644 (file)
@@ -50,7 +50,7 @@ my $p = $listener->protocol();
     # This is a TODO instead of a skip so if these ever implement SO_PROTOCOL
     # we'll be notified about the passing TODO so the test can be updated.
     local $TODO = "$^O doesn't support SO_PROTOCOL on AF_UNIX"
-        if $^O =~ /^(netbsd|darwin|cygwin)$/;
+        if $^O =~ /^(netbsd|darwin|cygwin|hpux|solaris|dragonfly)$/;
     ok(defined($p), 'protocol defined');
 }
 my $d = $listener->sockdomain();
@@ -105,7 +105,7 @@ SKIP: {
     {
         # see comment above
         local $TODO = "$^O doesn't support SO_PROTOCOL on AF_UNIX"
-            if $^O =~ /^(netbsd|darwin|cygwin)$/;
+            if $^O =~ /^(netbsd|darwin|cygwin|hpux|solaris|dragonfly)$/;
         ok(defined($p), 'protocol defined');
     }
     $d = $listener->sockdomain();
index 6e7fea2..61c5dd0 100644 (file)
@@ -1,3 +1,6 @@
+5.20200428
+  - Updated for v5.31.11
+
 5.20200320
   - Updated for v5.31.10
 
index f2c40e6..e1a3603 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 our ( %released, %version, %families, %upstream, %bug_tracker, %deprecated, %delta );
 
 use version;
-our $VERSION = '5.20200320';
+our $VERSION = '5.20200428';
 
 sub PKG_PATTERN () { q#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z# }
 sub _looks_like_invocant ($) { local $@; !!eval { $_[0]->isa(__PACKAGE__) } }
@@ -362,6 +362,7 @@ sub changes_between {
     5.031009 => '2020-02-20',
     5.030002 => '2020-03-14',
     5.031010 => '2020-03-20',
+    5.031011 => '2020-04-28',
   );
 
 for my $version ( sort { $a <=> $b } keys %released ) {
@@ -17365,6 +17366,100 @@ for my $version ( sort { $a <=> $b } keys %released ) {
         removed => {
         }
     },
+    5.031011 => {
+        delta_from => 5.031010,
+        changed => {
+            'B::Deparse'            => '1.53',
+            'B::Op_private'         => '5.031011',
+            'Config'                => '5.031011',
+            'DynaLoader'            => '1.47',
+            'Encode'                => '3.04',
+            'IPC::Open2'            => '1.05',
+            'IPC::Open3'            => '1.21',
+            'Module::CoreList'      => '5.20200428',
+            'Module::CoreList::Utils'=> '5.20200428',
+            'Opcode'                => '1.47',
+            'POSIX'                 => '1.93',
+            'PerlIO'                => '1.11',
+            'Storable'              => '3.20',
+            'Test2'                 => '1.302175',
+            'Test2::API'            => '1.302175',
+            'Test2::API::Breakage'  => '1.302175',
+            'Test2::API::Context'   => '1.302175',
+            'Test2::API::Instance'  => '1.302175',
+            'Test2::API::Stack'     => '1.302175',
+            'Test2::Event'          => '1.302175',
+            'Test2::Event::Bail'    => '1.302175',
+            'Test2::Event::Diag'    => '1.302175',
+            'Test2::Event::Encoding'=> '1.302175',
+            'Test2::Event::Exception'=> '1.302175',
+            'Test2::Event::Fail'    => '1.302175',
+            'Test2::Event::Generic' => '1.302175',
+            'Test2::Event::Note'    => '1.302175',
+            'Test2::Event::Ok'      => '1.302175',
+            'Test2::Event::Pass'    => '1.302175',
+            'Test2::Event::Plan'    => '1.302175',
+            'Test2::Event::Skip'    => '1.302175',
+            'Test2::Event::Subtest' => '1.302175',
+            'Test2::Event::TAP::Version'=> '1.302175',
+            'Test2::Event::V2'      => '1.302175',
+            'Test2::Event::Waiting' => '1.302175',
+            'Test2::EventFacet'     => '1.302175',
+            'Test2::EventFacet::About'=> '1.302175',
+            'Test2::EventFacet::Amnesty'=> '1.302175',
+            'Test2::EventFacet::Assert'=> '1.302175',
+            'Test2::EventFacet::Control'=> '1.302175',
+            'Test2::EventFacet::Error'=> '1.302175',
+            'Test2::EventFacet::Hub'=> '1.302175',
+            'Test2::EventFacet::Info'=> '1.302175',
+            'Test2::EventFacet::Info::Table'=> '1.302175',
+            'Test2::EventFacet::Meta'=> '1.302175',
+            'Test2::EventFacet::Parent'=> '1.302175',
+            'Test2::EventFacet::Plan'=> '1.302175',
+            'Test2::EventFacet::Render'=> '1.302175',
+            'Test2::EventFacet::Trace'=> '1.302175',
+            'Test2::Formatter'      => '1.302175',
+            'Test2::Formatter::TAP' => '1.302175',
+            'Test2::Hub'            => '1.302175',
+            'Test2::Hub::Interceptor'=> '1.302175',
+            'Test2::Hub::Interceptor::Terminator'=> '1.302175',
+            'Test2::Hub::Subtest'   => '1.302175',
+            'Test2::IPC'            => '1.302175',
+            'Test2::IPC::Driver'    => '1.302175',
+            'Test2::IPC::Driver::Files'=> '1.302175',
+            'Test2::Tools::Tiny'    => '1.302175',
+            'Test2::Util'           => '1.302175',
+            'Test2::Util::ExternalMeta'=> '1.302175',
+            'Test2::Util::Facets2Legacy'=> '1.302175',
+            'Test2::Util::HashBase' => '1.302175',
+            'Test2::Util::Trace'    => '1.302175',
+            'Test::Builder'         => '1.302175',
+            'Test::Builder::Formatter'=> '1.302175',
+            'Test::Builder::Module' => '1.302175',
+            'Test::Builder::Tester' => '1.302175',
+            'Test::Builder::Tester::Color'=> '1.302175',
+            'Test::Builder::TodoDiag'=> '1.302175',
+            'Test::More'            => '1.302175',
+            'Test::Simple'          => '1.302175',
+            'Test::Tester'          => '1.302175',
+            'Test::Tester::Capture' => '1.302175',
+            'Test::Tester::CaptureRunner'=> '1.302175',
+            'Test::Tester::Delegate'=> '1.302175',
+            'Test::use::ok'         => '1.302175',
+            'Time::Piece'           => '1.3401',
+            'Time::Seconds'         => '1.3401',
+            'Unicode::UCD'          => '0.75',
+            'XS::APItest'           => '1.09',
+            '_charnames'            => '1.47',
+            'charnames'             => '1.47',
+            'ok'                    => '1.302175',
+            'open'                  => '1.12',
+            're'                    => '0.39',
+            'warnings'              => '1.47',
+        },
+        removed => {
+        }
+    },
 );
 
 sub is_core
@@ -18458,6 +18553,13 @@ sub is_core
         removed => {
         }
     },
+    5.031011 => {
+        delta_from => 5.03101,
+        changed => {
+        },
+        removed => {
+        }
+    },
 );
 
 %deprecated = _undelta(\%deprecated);
index e5ee151..26c7ac8 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 use Module::CoreList;
 
-our $VERSION = '5.20200320';
+our $VERSION = '5.20200428';
 our %utilities;
 
 sub utilities {
@@ -1594,6 +1594,13 @@ my %delta = (
         removed => {
         }
     },
+    5.031011 => {
+        delta_from => 5.031010,
+        changed => {
+        },
+        removed => {
+        }
+    },
 );
 
 %utilities = Module::CoreList::_undelta(\%delta);
index d28e238..09b173e 100644 (file)
@@ -63,7 +63,7 @@ if ($Config{ptrsize} > 4 and !$has_too_many) {
           [ 'huge array',
             sub { my @x; $x[$huge] = undef; \@x } ];
     } else {
-        diag "skip huge array, need PERL_TEST_MEMORY >= 8";
+        diag "skip huge array, need PERL_TEST_MEMORY >= 55";
     }
 }
 
@@ -78,7 +78,7 @@ if (!$has_too_many) {
           ['huge hash',
            sub { my %x = (0 .. $huge); \%x } ];
     } else {
-        diag "skip huge hash, need PERL_TEST_MEMORY >= 16";
+        diag "skip huge hash, need PERL_TEST_MEMORY >= 96";
     }
 }
 
diff --git a/doio.c b/doio.c
index 9bbf2a4..23aedfb 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -774,7 +774,7 @@ Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len,
                        Perl_croak(aTHX_ "More than one argument to '>%c' open",IoTYPE_STD);
                    }
                }
-               else  {
+               else {
                    if (num_svs) {
                         fp = PerlIO_openn(aTHX_ type,mode,-1,0,0,NULL,num_svs,svp);
                     }
diff --git a/doop.c b/doop.c
index c7656bc..267b640 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -467,8 +467,9 @@ S_do_trans_invmap(pTHX_ SV * const sv, AV * const invmap)
     else {
         /* Here, we can't edit in place.  We have no idea how much, if any,
          * this particular input string will grow.  However, the compilation
-         * calculated the maximum expansion possible.  Use that to allocale
-         * based on the worst case scenario. */
+         * calculated the maximum expansion possible.  Use that to allocate
+         * based on the worst case scenario.  (First +1 is to round up; 2nd is
+         * for \0) */
        Newx(d, (STRLEN) (len * max_expansion + 1 + 1), U8);
        d0 = d;
     }
index 98a5e38..7db75f5 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1899,7 +1899,7 @@ ES        |void   |change_engine_size|NN RExC_state_t *pRExC_state|const Ptrdiff_t size
 ES     |regnode_offset|reganode|NN RExC_state_t *pRExC_state|U8 op \
                                |U32 arg
 ES     |regnode_offset|regpnode|NN RExC_state_t *pRExC_state|U8 op \
-                               |NN void * arg
+                               |NN SV * arg
 ES     |regnode_offset|reg2Lanode|NN RExC_state_t *pRExC_state            \
                                |const U8 op                               \
                                |const U32 arg1                            \
index 3c0cc2e..fd9d892 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 
 our($VERSION, @ISA, @EXPORT_OK);
 
-$VERSION = "1.46";
+$VERSION = "1.47";
 
 use Carp;
 use Exporter ();
index 1401b25..121b14f 100644 (file)
@@ -360,7 +360,7 @@ CODE:
        bitmap[len] = ~bitmap[len];
     /* take care of extra bits beyond PL_maxo in last byte     */
     if (PL_maxo & 07)
-       bitmap[opset_len-1] &= ~(0xFF << (PL_maxo & 0x07));
+       bitmap[opset_len-1] &= ~(char)(0xFF << (PL_maxo & 0x07));
     }
     ST(0) = opset;
 
index fd3ee5c..84d477f 100644 (file)
@@ -35,10 +35,13 @@ SKIP: {
       unless locales_enabled('LC_CTYPE');
 
     skip("no utf8 locale available", 4) unless $utf8_locale;
-
+    # Here we need to influence LC_CTYPE, but it's not enough to just
+    # set this because LC_ALL could override it. It's also not enough
+    # to delete LC_ALL because it could be used to override other
+    # variables such as LANG in the underlying test environment.
+    # Continue to set LC_CTYPE just in case...
     local $ENV{LC_CTYPE} = $utf8_locale;
-    local $ENV{LC_ALL};
-    delete $ENV{LC_ALL};
+    local $ENV{LC_ALL} = $utf8_locale;
 
     fresh_perl_like(
         'use POSIX; print &POSIX::MB_CUR_MAX',
@@ -84,8 +87,7 @@ SKIP: {
     skip("no utf8 locale available", 3) unless $utf8_locale;
 
     local $ENV{LC_CTYPE} = $utf8_locale;
-    local $ENV{LC_ALL};
-    delete $ENV{LC_ALL};
+    local $ENV{LC_ALL} = $utf8_locale;
     local $ENV{PERL_UNICODE};
     delete $ENV{PERL_UNICODE};
 
@@ -128,8 +130,7 @@ SKIP: {
     skip("no utf8 locale available", 1) unless $utf8_locale;
 
     local $ENV{LC_CTYPE} = $utf8_locale;
-    local $ENV{LC_ALL};
-    delete $ENV{LC_ALL};
+    local $ENV{LC_ALL} = $utf8_locale;
     local $ENV{PERL_UNICODE};
     delete $ENV{PERL_UNICODE};
 
index 3ea3a1b..8d0a7fd 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 use Carp;
 
-our $VERSION = '1.08';
+our $VERSION = '1.09';
 
 require XSLoader;
 
index 3cf8eef..1aab7a7 100644 (file)
@@ -6982,9 +6982,29 @@ siphash24(SV *state_sv, SV *str_sv)
     {
         STRLEN state_len;
         STRLEN str_len;
-        U8 *state_pv= (U8*)SvPV(state_sv,state_len);
         U8 *str_pv= (U8*)SvPV(str_sv,str_len);
+        /* (U8*)SvPV(state_sv, state_len) return differs between little-endian *
+         * and big-endian. It's the same values, but in a different order.     *
+         * On big-endian architecture, we transpose the values into the same   *
+         * order as for little-endian, so that we can test against the same    *
+         * test vectors.                                                       *
+         * We could alternatively alter the code that produced state_sv to     *
+         * output identical arrangements for big-endian and little-endian.     */
+#if BYTEORDER == 0x1234 || BYTEORDER == 0x12345678
+        U8 *state_pv= (U8*)SvPV(state_sv,state_len);
+        if (state_len!=32) croak("siphash state should be exactly 32 bytes");
+#else
+        U8 *temp_pv = (U8*)SvPV(state_sv, state_len);
+        U8 state_pv[32];
+        int i;
         if (state_len!=32) croak("siphash state should be exactly 32 bytes");
+        for( i = 0; i < 32; i++ ) { 
+            if     (i <  8) state_pv[ 7 - i] = temp_pv[i];
+            else if(i < 16) state_pv[23 - i] = temp_pv[i];
+            else if(i < 24) state_pv[39 - i] = temp_pv[i];
+            else            state_pv[55 - i] = temp_pv[i];
+        }
+#endif
         if (ix) {
             RETVAL= S_perl_hash_siphash_1_3_with_state_64(state_pv,str_pv,str_len);
         } else {
@@ -7142,10 +7162,28 @@ test_siphash24()
         int i,j;
         int failed = 0;
         U32 hash32;
-
+        /* S_perl_siphash_seed_state(seed_pv, state_pv) sets state_pv          *
+         * differently between little-endian and big-endian. It's the same     *
+         * values, but in a different order.                                   *
+         * On big-endian architecture, we transpose the values into the same   *
+         * order as for little-endian, so that we can test against the same    *
+         * test vectors.                                                       *
+         * We could alternatively alter the code that produces state_pv to     *
+         * output identical arrangements for big-endian and little-endian.     */
+#if BYTEORDER == 0x1234 || BYTEORDER == 0x12345678
         for( i = 0; i < 16; ++i ) seed_pv[i] = i;
         S_perl_siphash_seed_state(seed_pv, state_pv);
-
+#else
+        U8 temp_pv[32];
+        for( i = 0; i < 16; ++i ) seed_pv[i] = i;
+        S_perl_siphash_seed_state(seed_pv, temp_pv);
+        for( i = 0; i < 32; ++i ) {
+            if     (i <  8) state_pv[ 7 - i] = temp_pv[i];
+            else if(i < 16) state_pv[23 - i] = temp_pv[i];
+            else if(i < 24) state_pv[39 - i] = temp_pv[i];
+            else            state_pv[55 - i] = temp_pv[i];
+        }
+#endif
         for( i = 0; i < MAXLEN; ++i )
         {
             in[i] = i;
@@ -7153,18 +7191,37 @@ test_siphash24()
             out.hash= S_perl_hash_siphash_2_4_with_state_64( state_pv, in, i );
 
             hash32= S_perl_hash_siphash_2_4_with_state( state_pv, in, i);
-
+            /* The test vectors need to reversed here for big-endian architecture   *
+             * Alternatively we could rewrite S_perl_hash_siphash_2_4_with_state_64 *
+             * to produce reversed vectors when run on big-endian architecture      */
+#if BYTEORDER == 0x4321 || BYTEORDER == 0x87654321 /* reverse order of vectors[i] */
+            temp_pv   [0] = vectors[i][0]; /* temp_pv is temporary holder of vectors[i][0] */
+            vectors[i][0] = vectors[i][7];
+            vectors[i][7] = temp_pv[0];
+
+            temp_pv   [0] = vectors[i][1]; /* temp_pv is temporary holder of vectors[i][1] */
+            vectors[i][1] = vectors[i][6];
+            vectors[i][6] = temp_pv[0];
+
+            temp_pv   [0] = vectors[i][2]; /* temp_pv is temporary holder of vectors[i][2] */
+            vectors[i][2] = vectors[i][5];
+            vectors[i][5] = temp_pv[0];
+
+            temp_pv   [0] = vectors[i][3]; /* temp_pv is temporary holder of vectors[i][3] */
+            vectors[i][3] = vectors[i][4];
+            vectors[i][4] = temp_pv[0];
+#endif
             if ( memcmp( out.bytes, vectors[i], 8 ) )
             {
                 failed++;
                 printf( "Error in 64 bit result on test vector of length %d for siphash24\n    have: {", i );
                 for (j=0;j<7;j++)
                     printf( "0x%02x, ", out.bytes[j]);
-                printf( "%02x },\n", out.bytes[7]);
+                printf( "0x%02x },\n", out.bytes[7]);
                 printf( "    want: {" );
                 for (j=0;j<7;j++)
-                    printf( "0x%02x, ", out.bytes[j]);
-                printf( "%02x },\n", out.bytes[7]);
+                    printf( "0x%02x, ", vectors[i][j]);
+                printf( "0x%02x },\n", vectors[i][7]);
             }
             if (hash32 != vectors_32[i]) {
                 failed++;
@@ -7326,29 +7383,66 @@ test_siphash13()
         int i,j;
         int failed = 0;
         U32 hash32;
-
+        /* S_perl_siphash_seed_state(seed_pv, state_pv) sets state_pv          *
+         * differently between little-endian and big-endian. It's the same     *
+         * values, but in a different order.                                   *
+         * On big-endian architecture, we transpose the values into the same   *
+         * order as for little-endian, so that we can test against the same    *
+         * test vectors.                                                       *
+         * We could alternatively alter the code that produces state_pv to     *
+         * output identical arrangements for big-endian and little-endian.     */
+#if BYTEORDER == 0x1234 || BYTEORDER == 0x12345678
         for( i = 0; i < 16; ++i ) seed_pv[i] = i;
         S_perl_siphash_seed_state(seed_pv, state_pv);
-
-        for( i = 0; i < MAXLEN; ++i )
+#else
+        U8 temp_pv[32];
+        for( i = 0; i < 16; ++i ) seed_pv[i] = i;
+        S_perl_siphash_seed_state(seed_pv, temp_pv);
+        for( i = 0; i < 32; ++i ) {
+            if     (i <  8) state_pv[ 7 - i] = temp_pv[i];
+            else if(i < 16) state_pv[23 - i] = temp_pv[i];
+            else if(i < 24) state_pv[39 - i] = temp_pv[i];
+            else            state_pv[55 - i] = temp_pv[i];
+        }
+#endif
+        for( i = 0; i < MAXLEN;  ++i )
         {
             in[i] = i;
 
             out.hash= S_perl_hash_siphash_1_3_with_state_64( state_pv, in, i );
 
             hash32= S_perl_hash_siphash_1_3_with_state( state_pv, in, i);
-
+            /* The test vectors need to reversed here for big-endian architecture   *
+             * Alternatively we could rewrite S_perl_hash_siphash_1_3_with_state_64 *
+             * to produce reversed vectors when run on big-endian architecture      */
+#if BYTEORDER == 0x4321 || BYTEORDER == 0x87654321
+            temp_pv   [0] = vectors[i][0]; /* temp_pv is temporary holder of vectors[i][0] */
+            vectors[i][0] = vectors[i][7];
+            vectors[i][7] = temp_pv[0];
+
+            temp_pv   [0] = vectors[i][1]; /* temp_pv is temporary holder of vectors[i][1] */
+            vectors[i][1] = vectors[i][6];
+            vectors[i][6] = temp_pv[0];
+
+            temp_pv   [0] = vectors[i][2]; /* temp_pv is temporary holder of vectors[i][2] */
+            vectors[i][2] = vectors[i][5];
+            vectors[i][5] = temp_pv[0];
+
+            temp_pv   [0] = vectors[i][3]; /* temp_pv is temporary holder of vectors[i][3] */
+            vectors[i][3] = vectors[i][4];
+            vectors[i][4] = temp_pv[0];
+#endif
             if ( memcmp( out.bytes, vectors[i], 8 ) )
             {
                 failed++;
                 printf( "Error in 64 bit result on test vector of length %d for siphash13\n    have: {", i );
                 for (j=0;j<7;j++)
                     printf( "0x%02x, ", out.bytes[j]);
-                printf( "%02x },\n", out.bytes[7]);
+                printf( "0x%02x },\n", out.bytes[7]);
                 printf( "    want: {" );
                 for (j=0;j<7;j++)
-                    printf( "0x%02x, ", out.bytes[j]);
-                printf( "%02x },\n", out.bytes[7]);
+                    printf( "0x%02x, ", vectors[i][j]);
+                printf( "0x%02x },\n", vectors[i][7]);
             }
             if (hash32 != vectors_32[i]) {
                 failed++;
index 219d422..d2ec4ca 100644 (file)
 # 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.31.10
+# mkdir -p /opt/perl-catamount/lib/perl5/5.31.11
 # 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.31.10
+# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.31.11
 # 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
index 7d0cbd7..38928d1 100644 (file)
@@ -79,3 +79,11 @@ case "$usemallocwrap" in
 esac
 
 test "$optimize" || optimize='-O2'
+
+# Configure can't find dlopen() when using g++
+# linux, freebsd and solaris hints have the same workaround
+case "$cc" in
+*g++*)
+  d_dlopen='define'
+  ;;
+esac
index 9383017..fa8c312 100644 (file)
@@ -31,7 +31,6 @@
 
 #ifndef U8TO16_LE
   #define _shifted_octet(type,ptr,idx,shift) (((type)(((U8*)(ptr))[(idx)]))<<(shift))
-  #if (BYTEORDER == 0x1234 || BYTEORDER == 0x12345678)
     #ifdef USE_UNALIGNED_PTR_DEREF
         #define U8TO16_LE(ptr)   (*((const U16*)(ptr)))
         #define U8TO32_LE(ptr)   (*((const U32*)(ptr)))
                                   _shifted_octet(U64,(ptr),6,48)|\
                                   _shifted_octet(U64,(ptr),7,56))
     #endif
-  #elif (BYTEORDER == 0x4321 || BYTEORDER == 0x87654321)
-        #define U8TO16_LE(ptr)   (_shifted_octet(U16,(ptr),1, 0)|\
-                                  _shifted_octet(U16,(ptr),0, 8))
-
-        #define U8TO32_LE(ptr)   (_shifted_octet(U32,(ptr),3, 0)|\
-                                  _shifted_octet(U32,(ptr),2, 8)|\
-                                  _shifted_octet(U32,(ptr),1,16)|\
-                                  _shifted_octet(U32,(ptr),0,24))
-
-        #define U8TO64_LE(ptr)   (_shifted_octet(U64,(ptr),7, 0)|\
-                                  _shifted_octet(U64,(ptr),6, 8)|\
-                                  _shifted_octet(U64,(ptr),5,16)|\
-                                  _shifted_octet(U64,(ptr),4,24)|\
-                                  _shifted_octet(U64,(ptr),3,32)|\
-                                  _shifted_octet(U64,(ptr),2,40)|\
-                                  _shifted_octet(U64,(ptr),1,48)|\
-                                  _shifted_octet(U64,(ptr),0,56))
-  #endif
 #endif
 
 /* Find best way to ROTL32/ROTL64 */
index 8cea633..e014b34 100644 (file)
@@ -118,7 +118,7 @@ package B::Op_private;
 our %bits;
 
 
-our $VERSION = "5.031010";
+our $VERSION = "5.031011";
 
 $bits{$_}{3} = 'OPpENTERSUB_AMPER' for qw(entersub rv2cv);
 $bits{$_}{6} = 'OPpENTERSUB_DB' for qw(entersub rv2cv);
index eb98c45..0300474 100644 (file)
@@ -157,6 +157,10 @@ sub test_vianame ($$$) {
 
     $wildcard_count++;
 
+    # XXX temporary to see if the failure we are occasionally seeing is
+    # confined to this code point.  GH #17671
+    next if $i == 0;
+
     # Because wildcard name matching is so real-time intensive, do it less
     # frequently than the others
     if ($wildcard_count >= 10) {
index ca3cf7b..3e21381 100644 (file)
@@ -1,7 +1,7 @@
 package open;
 use warnings;
 
-our $VERSION = '1.11';
+our $VERSION = '1.12';
 
 require 5.008001; # for PerlIO::get_layers()
 
@@ -147,103 +147,101 @@ open - perl pragma to set default PerlIO layers for input and output
 
 =head1 SYNOPSIS
 
-    use open IN  => ":crlf", OUT => ":bytes";
-    use open OUT => ':utf8';
-    use open IO  => ":encoding(iso-8859-7)";
+    use open IN  => ':crlf', OUT => ':raw';
+    open my $in, '<', 'foo.txt' or die "open failed: $!";
+    my $line = <$in>; # CRLF translated
+    close $in;
+    open my $out, '>', 'bar.txt' or die "open failed: $!";
+    print $out $line; # no translation of bytes
+    close $out;
+
+    use open OUT => ':encoding(UTF-8)';
+    use open IN  => ':encoding(iso-8859-7)';
 
     use open IO  => ':locale';
 
+    # IO implicit only for :utf8, :encoding, :locale
     use open ':encoding(UTF-8)';
-    use open ':locale';
     use open ':encoding(iso-8859-7)';
+    use open ':locale';
 
-    use open ':std';
+    # with :std, also affect global standard handles
+    use open ':std', ':encoding(UTF-8)';
+    use open ':std', OUT => ':encoding(cp1252)';
+    use open ':std', IO => ':raw :encoding(UTF-16LE)';
 
 =head1 DESCRIPTION
 
 Full-fledged support for I/O layers is now implemented provided
-Perl is configured to use PerlIO as its IO system (which is now the
-default).
+Perl is configured to use PerlIO as its IO system (which has been the
+default since 5.8, and the only supported configuration since 5.16).
 
 The C<open> pragma serves as one of the interfaces to declare default
-"layers" (also known as "disciplines") for all I/O. Any two-argument
-open(), readpipe() (aka qx//) and similar operators found within the
-lexical scope of this pragma will use the declared defaults.
-Even three-argument opens may be affected by this pragma
-when they don't specify IO layers in MODE.
+"layers" (previously known as "disciplines") for all I/O. Any open(),
+readpipe() (aka qx//) and similar operators found within the
+lexical scope of this pragma will use the declared defaults via the
+L<C<${^OPEN}>|perlvar/${^OPEN}> variable.
+
+Layers are specified with a leading colon by convention. You can
+specify a stack of multiple layers as a space-separated string.
+See L<PerlIO> for more information on the available layers.
 
 With the C<IN> subpragma you can declare the default layers
 of input streams, and with the C<OUT> subpragma you can declare
-the default layers of output streams.  With the C<IO>  subpragma
-you can control both input and output streams simultaneously.
+the default layers of output streams.  With the C<IO> subpragma
+(may be omitted for C<:utf8>, C<:locale>, or C<:encoding>) you
+can control both input and output streams simultaneously.
 
-If you have a legacy encoding, you can use the C<:encoding(...)> tag.
+When open() is given an explicit list of layers (with the three-arg
+syntax), they override the list declared using this pragma.  open() can
+also be given a single colon (:) for a layer name, to override this pragma
+and use the default as detailed in
+L<PerlIO/Defaults and how to override them>.
+
+To translate from and to an arbitrary text encoding, use the C<:encoding>
+layer.  The matching of encoding names in C<:encoding> is loose: case does
+not matter, and many encodings have several aliases.  See
+L<Encode::Supported> for details and the list of supported locales.
 
 If you want to set your encoding layers based on your
-locale environment variables, you can use the C<:locale> tag.
+locale environment variables, you can use the C<:locale> pseudo-layer.
 For example:
 
     $ENV{LANG} = 'ru_RU.KOI8-R';
     # the :locale will probe the locale environment variables like LANG
     use open OUT => ':locale';
-    open(O, ">koi8");
-    print O chr(0x430); # Unicode CYRILLIC SMALL LETTER A = KOI8-R 0xc1
-    close O;
-    open(I, "<koi8");
-    printf "%#x\n", ord(<I>), "\n"; # this should print 0xc1
-    close I;
-
-These are equivalent
-
-    use open ':encoding(UTF-8)';
-    use open IO => ':encoding(UTF-8)';
-
-as are these
-
-    use open ':locale';
-    use open IO => ':locale';
-
-and these
-
-    use open ':encoding(iso-8859-7)';
-    use open IO => ':encoding(iso-8859-7)';
-
-The matching of encoding names is loose: case does not matter, and
-many encodings have several aliases.  See L<Encode::Supported> for
-details and the list of supported locales.
-
-When open() is given an explicit list of layers (with the three-arg
-syntax), they override the list declared using this pragma.  open() can
-also be given a single colon (:) for a layer name, to override this pragma
-and use the default (C<:raw> on Unix, C<:crlf> on Windows).
-
-The C<:std> subpragma on its own has no effect, but if combined with
-the C<:utf8> or C<:encoding> subpragmas, it converts the standard
-filehandles (STDIN, STDOUT, STDERR) to comply with encoding selected
-for input/output handles.  For example, if both input and out are
-chosen to be C<:encoding(UTF-8)>, a C<:std> will mean that STDIN, STDOUT,
-and STDERR are also in C<:encoding(UTF-8)>.  On the other hand, if only
-output is chosen to be in C<< :encoding(koi8r) >>, a C<:std> will cause
-only the STDOUT and STDERR to be in C<koi8r>.  The C<:locale> subpragma
-implicitly turns on C<:std>.
-
-The logic of C<:locale> is described in full in L<encoding>,
+    open(my $out, '>', 'koi8') or die "open failed: $!";
+    print $out chr(0x430); # CYRILLIC SMALL LETTER A = KOI8-R 0xc1
+    close $out;
+    open(my $in, '<', 'koi8') or die "open failed: $!";
+    printf "%#x\n", ord(<$in>); # this should print 0xc1
+    close $in;
+
+The logic of C<:locale> is described in full in
+L<encoding/The C<:locale> sub-pragma>,
 but in short it is first trying nl_langinfo(CODESET) and then
 guessing from the LC_ALL and LANG locale environment variables.
-
-Directory handles may also support PerlIO layers in the future.
-
-=head1 NONPERLIO FUNCTIONALITY
-
-If Perl is not built to use PerlIO as its IO system then only the two
-pseudo-layers C<:bytes> and C<:crlf> are available.
-
-The C<:bytes> layer corresponds to "binary mode" and the C<:crlf>
-layer corresponds to "text mode" on platforms that distinguish
-between the two modes when opening files (which is many DOS-like
-platforms, including Windows).  These two layers are no-ops on
-platforms where binmode() is a no-op, but perform their functions
-everywhere if PerlIO is enabled.
+C<:locale> also implicitly turns on C<:std>.
+
+C<:std> is not a layer but an additional subpragma.  When specified in the
+import list, it activates an additional functionality of pushing the
+layers selected for input/output handles to the standard filehandles
+(STDIN, STDOUT, STDERR).  If the new layers and existing layer stack both
+end with an C<:encoding> layer, the existing C<:encoding> layer will also
+be removed.
+
+For example, if both input and out are chosen to be C<:encoding(UTF-8)>, a
+C<:std> will mean that STDIN, STDOUT, and STDERR will also have
+C<:encoding(UTF-8)> set.  On the other hand, if only output is chosen to
+be in C<:encoding(koi8r)>, a C<:std> will cause only the STDOUT and STDERR
+to be in C<koi8r>.
+
+The effect of C<:std> is not lexical as it modifies the layer stack of the
+global handles.  If you wish to apply only this global effect and not the
+effect on handles that are opened in that scope, you can isolate the call
+to this pragma in its own lexical scope.
+
+    { use open ':std', IO => ':encoding(UTF-8)' }
 
 =head1 IMPLEMENTATION DETAILS
 
index e8a29da..2106cf4 100644 (file)
@@ -529,7 +529,7 @@ BEGIN {
 use vars qw($VERSION $header);
 
 # bump to X.XX in blead, only use X.XX_XX in maint
-$VERSION = '1.55';
+$VERSION = '1.56';
 
 $header = "perl5db.pl version $VERSION";
 
@@ -5480,6 +5480,9 @@ Display the (nested) parentage of the module or object given.
 sub cmd_i {
     my $cmd  = shift;
     my $line = shift;
+
+    require mro;
+
     foreach my $isa ( split( /\s+/, $line ) ) {
         $evalarg = $isa;
         # The &-call is here to ascertain the mutability of @_.
index 450f4d0..421229a 100644 (file)
@@ -2899,6 +2899,31 @@ SKIP:
     );
 }
 
+{
+    # gh #17660
+    my $wrapper = DebugWrap->new(
+        {
+            cmds =>
+            [
+                'b 13',
+                'c',
+                'i Foo',
+                'q',
+            ],
+            prog => '../lib/perl5db/t/gh-17660',
+        }
+    );
+
+    $wrapper->output_unlike(
+        qr/Undefined subroutine &mro::get_linear_isa/ms,
+        q/mro needs to be loaded/,
+       );
+    $wrapper->output_like(
+        qr/Foo 1.000, Bar 2.000/,
+        q/check for reasonable result/,
+       );
+}
+
 SKIP:
 {
     $Config{usethreads}
diff --git a/lib/perl5db/t/gh-17660 b/lib/perl5db/t/gh-17660
new file mode 100644 (file)
index 0000000..a818f79
--- /dev/null
@@ -0,0 +1,14 @@
+#!perl
+
+package Bar;
+our $VERSION = "2.000";
+
+sub f {}
+
+package Foo;
+our @ISA = qw(Bar);
+our $VERSION = "1.000";
+
+package main;
+Foo->f();
+
index bb6180b..08c34d9 100644 (file)
@@ -69,7 +69,7 @@ like($result, qr/Please use perlbug interactively./,
 # test -okay (mostly noninteractive)
 $result = runperl( progfile => $extracted_program,
                    args     => ['-okay', '-F', $testreport] );
-like($result, qr/Message saved/, 'build report saved');
+like($result, qr/Report saved/, 'build report saved');
 like(_slurp($testreport), qr/Perl reported to build OK on this system/,
      'build report looks sane');
 unlink $testreport;
@@ -82,7 +82,7 @@ $result = runperl( progfile => $extracted_program,
                                 '-nokay',
                                 '-e', 'file',
                                 '-F', $testreport] );
-like($result, qr/Message saved/, 'build failure report saved');
+like($result, qr/Report saved/, 'build failure report saved');
 like(_slurp($testreport), qr/This is a build failure report for perl/,
      'build failure report looks sane');
 unlink $testreport;
@@ -104,7 +104,7 @@ $result = runperl( progfile => $extracted_program,
                                 '-b', 'testreportbody',
                                 '-e', 'file',
                                 '-F', $testreport] );
-like($result, qr/Message saved/, 'fake bug report saved');
+like($result, qr/Report saved/, 'fake bug report saved');
 my $contents = _slurp($testreport);
 like($contents, qr/Subject: testingperlbug/,
      'Subject included in fake bug report');
@@ -136,7 +136,7 @@ $result = runperl( progfile => $extracted_program,
                                 '-p', $attachment,
                                 '-e', 'file',
                                 '-F', $testreport] );
-like($result, qr/Message saved/, 'fake bug report saved');
+like($result, qr/Report saved/, 'fake bug report saved');
 my $contents = _slurp($testreport);
 unlink $testreport, $body, $attachment;
 like($contents, qr/Subject: testing perlbug/,
index d434dcd..a70c25f 100644 (file)
@@ -5,7 +5,7 @@
 
 package warnings;
 
-our $VERSION = "1.46";
+our $VERSION = "1.47";
 
 # Verify that we're called correctly so that warnings will work.
 # Can't use Carp, since Carp uses us!
@@ -689,6 +689,10 @@ disable compile-time warnings you need to rewrite the code like this:
         my $b; chop $b;
      }
 
+And note that unlike the first example, this will permanently set C<$^W>
+since it cannot both run during compile-time and be localized to a
+run-time block.
+
 The other big problem with C<$^W> is the way you can inadvertently
 change the warning setting in unexpected places in your code.  For example,
 when the code below is run (without the B<-w> flag), the second call
index f0805e9..404f27b 100644 (file)
@@ -742,6 +742,18 @@ unless ($define{'USE_QUADMATH'}) {
   ++$skip{Perl_quadmath_format_single};
 }
 
+unless ($Config{d_mbrlen}) {
+    ++$skip{PL_mbrlen_ps};
+}
+
+unless ($Config{d_mbrtowc}) {
+    ++$skip{PL_mbrtowc_ps};
+}
+
+unless ($Config{d_wcrtomb}) {
+    ++$skip{PL_wcrtomb_ps};
+}
+
 ###############################################################################
 
 # At this point all skip lists should be completed, as we are about to test
index 51a0edf..e774e13 100644 (file)
--- a/numeric.c
+++ b/numeric.c
@@ -424,7 +424,7 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start,
     s = s0; /* s0 potentially advanced from 'start' */
 
     /* Unroll the loop so that the first 8 digits are branchless except for the
-     * switch.  A ninth one overflows a 32 bit word. */
+     * switch.  A ninth hex one overflows a 32 bit word. */
     switch (len) {
       case 0:
           return 0;
@@ -1281,7 +1281,8 @@ If you constrain the portion of C<pv> that is looked at by this function (by
 passing a non-NULL C<endptr>), and if the intial bytes of that portion form a
 valid value, it will return TRUE, setting C<*endptr> to the byte following the
 final digit of the value.  But if there is no constraint at what's looked at,
-all of C<pv> must be valid in order for TRUE to be returned.
+all of C<pv> must be valid in order for TRUE to be returned.  C<*endptr> is
+unchanged from its value on input if FALSE is returned;
 
 The only characters this accepts are the decimal digits '0'..'9'.
 
diff --git a/op.c b/op.c
index 75a38d3..322d6d6 100644 (file)
--- a/op.c
+++ b/op.c
@@ -6972,16 +6972,17 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
      * allocated, then copied.  If the replacement for every character in every
      * possible string takes up no more bytes than the the character it
      * replaces, then it can be edited in place.  Otherwise the replacement
-     * could "grow", depending on the strings being processed.  Some inputs
-     * won't grow, and might even shrink under /d, but some inputs could grow,
-     * so we have to assume any given one might grow.  On very long inputs, the
-     * temporary could eat up a lot of memory, so we want to avoid it if
-     * possible.  For non-UTF-8 inputs, everything is single-byte, so can be
-     * edited in place, unless there is something in the pattern that could
-     * force it into UTF-8.  The inversion map makes it feasible to determine
-     * this.  Previous versions of this code pretty much punted on determining
-     * if UTF-8 could be edited in place.  Now, this code is rigorous in making
-     * that determination.
+     * could overwrite a byte we are about to read, depending on the strings
+     * being processed.  The comments and variable names here refer to this as
+     * "growing".  Some inputs won't grow, and might even shrink under /d, but
+     * some inputs could grow, so we have to assume any given one might grow.
+     * On very long inputs, the temporary could eat up a lot of memory, so we
+     * want to avoid it if possible.  For non-UTF-8 inputs, everything is
+     * single-byte, so can be edited in place, unless there is something in the
+     * pattern that could force it into UTF-8.  The inversion map makes it
+     * feasible to determine this.  Previous versions of this code pretty much
+     * punted on determining if UTF-8 could be edited in place.  Now, this code
+     * is rigorous in making that determination.
      *
      * Another characteristic we need to know is whether the lhs and rhs are
      * identical.  If so, and no other flags are present, the only effect of
@@ -7018,9 +7019,9 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
     const bool squash     = cBOOL(o->op_private & OPpTRANS_SQUASH);
     const bool del        = cBOOL(o->op_private & OPpTRANS_DELETE);
 
-    /* Set to true if there is some character < 256 in the lhs that maps to >
-     * 255.  If so, a non-UTF-8 match string can be forced into requiring to be
-     * in UTF-8 by a tr/// operation. */
+    /* Set to true if there is some character < 256 in the lhs that maps to
+     * above 255.  If so, a non-UTF-8 match string can be forced into being in
+     * UTF-8 by a tr/// operation. */
     bool can_force_utf8 = FALSE;
 
     /* What is the maximum expansion factor in UTF-8 transliterations.  If a
@@ -7028,7 +7029,7 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
      * expansion factor is 1.5.  This number is used at runtime to calculate
      * how much space to allocate for non-inplace transliterations.  Without
      * this number, the worst case is 14, which is extremely unlikely to happen
-     * in real life, and would require significant memory overhead. */
+     * in real life, and could require significant memory overhead. */
     NV max_expansion = 1.;
 
     UV t_range_count, r_range_count, min_range_count;
@@ -7070,16 +7071,16 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
 #ifndef EBCDIC
     UV PL_partition_by_byte_length[] = {
         0,
-        0x80,
-        (32 * (1UL << (    UTF_ACCUMULATION_SHIFT))),
-        (16 * (1UL << (2 * UTF_ACCUMULATION_SHIFT))),
-        ( 8 * (1UL << (3 * UTF_ACCUMULATION_SHIFT))),
-        ( 4 * (1UL << (4 * UTF_ACCUMULATION_SHIFT))),
-        ( 2 * (1UL << (5 * UTF_ACCUMULATION_SHIFT)))
+        0x80,   /* Below this is 1 byte representations */
+        (32 * (1UL << (    UTF_ACCUMULATION_SHIFT))),   /* 2 bytes below this */
+        (16 * (1UL << (2 * UTF_ACCUMULATION_SHIFT))),   /* 3 bytes below this */
+        ( 8 * (1UL << (3 * UTF_ACCUMULATION_SHIFT))),   /* 4 bytes below this */
+        ( 4 * (1UL << (4 * UTF_ACCUMULATION_SHIFT))),   /* 5 bytes below this */
+        ( 2 * (1UL << (5 * UTF_ACCUMULATION_SHIFT)))    /* 6 bytes below this */
 
 #  ifdef UV_IS_QUAD
                                                     ,
-        ( ((UV) 1U << (6 * UTF_ACCUMULATION_SHIFT)))
+        ( ((UV) 1U << (6 * UTF_ACCUMULATION_SHIFT)))    /* 7 bytes below this */
 #  endif
 
     };
@@ -7475,7 +7476,12 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
             t_cp_end = MIN(IV_MAX, t_cp + span - 1);
 
             if (r_cp == TR_SPECIAL_HANDLING) {
-                r_cp_end = TR_SPECIAL_HANDLING;
+
+                /* If unmatched lhs code points map to the final map, use that
+                 * value.  This being set to TR_SPECIAL_HANDLING indicates that
+                 * we don't have a final map: unmatched lhs code points are
+                 * simply deleted */
+                r_cp_end = (del) ? TR_SPECIAL_HANDLING : final_map;
             }
             else {
                 r_cp_end = MIN(IV_MAX, r_cp + span - 1);
@@ -7505,6 +7511,13 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
                  * we use the above sample data.  The t_cp chunk must be any
                  * contiguous subset of M, N, O, P, and/or Q.
                  *
+                 * In the first pass, calculate if there is any possible input
+                 * string that has a character whose transliteration will be
+                 * longer than it.  If none, the transliteration may be done
+                 * in-place, as it can't write over a so-far unread byte.
+                 * Otherwise, a copy must first be made.  This could be
+                 * expensive for long inputs.
+                 *
                  * In the first pass, the t_invlist has been partitioned so
                  * that all elements in any single range have the same number
                  * of bytes in their UTF-8 representations.  And the r space is
@@ -7528,15 +7541,25 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
                     && r_cp_end != TR_SPECIAL_HANDLING
                     && UVCHR_SKIP(t_cp_end) < UVCHR_SKIP(r_cp_end))
                 {
-                    /* Consider tr/\xCB/\X{E000}/.  The maximum expansion
-                     * factor is 1 byte going to 3 if the lhs is not UTF-8, but
-                     * 2 bytes going to 3 if it is in UTF-8.  We could pass two
-                     * different values so doop could choose based on the
-                     * UTF-8ness of the target.  But khw thinks (perhaps
-                     * wrongly) that is overkill.  It is used only to make sure
-                     * we malloc enough space.  If no target string can force
-                     * the result to be UTF-8, then we don't have to worry
-                     * about this */
+                    /* Here, we will need to make a copy of the input string
+                     * before doing the transliteration.  The worst possible
+                     * case is an expansion ratio of 14:1. This is rare, and
+                     * we'd rather allocate only the necessary amount of extra
+                     * memory for that copy.  We can calculate the worst case
+                     * for this particular transliteration is by keeping track
+                     * of the expansion factor for each range.
+                     *
+                     * Consider tr/\xCB/\X{E000}/.  The maximum expansion
+                     * factor is 1 byte going to 3 if the target string is not
+                     * UTF-8, but 2 bytes going to 3 if it is in UTF-8.  We
+                     * could pass two different values so doop could choose
+                     * based on the UTF-8ness of the target.  But khw thinks
+                     * (perhaps wrongly) that is overkill.  It is used only to
+                     * make sure we malloc enough space.
+                     *
+                     * If no target string can force the result to be UTF-8,
+                     * then we don't have to worry about the case of the target
+                     * string not being UTF-8 */
                     NV t_size = (can_force_utf8 && t_cp < 256)
                                 ? 1
                                 : UVCHR_SKIP(t_cp_end);
@@ -11699,31 +11722,10 @@ S_process_special_blocks(pTHX_ I32 floor, const char *const fullname,
             (void)CvGV(cv);
            if (floor) LEAVE_SCOPE(floor);
            ENTER;
-
-            SAVEVPTR(PL_curcop);
-            if (PL_curcop == &PL_compiling) {
-                /* Avoid pushing the "global" &PL_compiling onto the
-                 * context stack. For example, a stack trace inside
-                 * nested use's would show all calls coming from whoever
-                 * most recently updated PL_compiling.cop_file and
-                 * cop_line.  So instead, temporarily set PL_curcop to a
-                 * private copy of &PL_compiling. PL_curcop will soon be
-                 * set to point back to &PL_compiling anyway but only
-                 * after the temp value has been pushed onto the context
-                 * stack as blk_oldcop.
-                 * This is slightly hacky, but necessary. Note also
-                 * that in the brief window before PL_curcop is set back
-                 * to PL_compiling, IN_PERL_COMPILETIME/IN_PERL_RUNTIME
-                 * will give the wrong answer.
-                 */
-                PL_curcop = (COP*)newSTATEOP(PL_compiling.op_flags, NULL, NULL);
-                CopLINE_set(PL_curcop, CopLINE(&PL_compiling));
-                SAVEFREEOP(PL_curcop);
-            }
-
             PUSHSTACKi(PERLSI_REQUIRE);
            SAVECOPFILE(&PL_compiling);
            SAVECOPLINE(&PL_compiling);
+           SAVEVPTR(PL_curcop);
 
            DEBUG_x( dump_sub(gv) );
            Perl_av_create_and_push(aTHX_ &PL_beginav, MUTABLE_SV(cv));
diff --git a/op.h b/op.h
index 4c086a5..e634eea 100644 (file)
--- a/op.h
+++ b/op.h
@@ -181,7 +181,7 @@ Deprecated.  Use C<GIMME_V> instead.
 
 
 /* things that can be elements of op_aux */
-typedef union  {
+typedef union {
     PADOFFSET pad_offset;
     SV        *sv;
     IV        iv;
@@ -1130,7 +1130,7 @@ C<sib> is non-null. For a higher-level interface, see C<L</op_sibling_splice>>.
 
 /* stuff for OP_ARGCHECK */
 
-struct  op_argcheck_aux {
+struct op_argcheck_aux {
     UV   params;     /* number of positional parameters */
     UV   opt_params; /* number of optional positional parameters */
     char slurpy;     /* presence of slurpy: may be '\0', '@' or '%' */
index 9112b5e..ca8d972 100644 (file)
@@ -15,7 +15,7 @@
 
 #define PERL_REVISION  5               /* age */
 #define PERL_VERSION   31              /* epoch */
-#define PERL_SUBVERSION        10              /* generation */
+#define PERL_SUBVERSION        11              /* generation */
 
 /* The following numbers describe the earliest compatible version of
    Perl ("compatibility" here being defined as sufficient binary/API
@@ -36,7 +36,7 @@
 */
 #define PERL_API_REVISION      5
 #define PERL_API_VERSION       31
-#define PERL_API_SUBVERSION    10
+#define PERL_API_SUBVERSION    11
 /*
    XXX Note:  The selection of non-default Configure options, such
    as -Duselonglong may invalidate these settings.  Currently, Configure
diff --git a/perl.h b/perl.h
index 79ef068..cc6363e 100644 (file)
--- a/perl.h
+++ b/perl.h
           : (REGEXP *)NULL)
 #endif
 
+/* some compilers impersonate gcc */
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
+#  define PERL_IS_GCC 1
+#endif
+
 /* In case Configure was not used (we are using a "canned config"
  * such as Win32, or a cross-compilation setup, for example) try going
  * by the gcc major and minor versions.  One useful URL is
 #  if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 /* 3.4 -> */
 #    define HASATTRIBUTE_WARN_UNUSED_RESULT
 #  endif
-#  if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3 /* 3.1 -> */
+/* always_inline is buggy in gcc <= 4.6 and causes compilation errors */
+#  if __GNUC__ == 4 && __GNUC_MINOR__ >= 7 || __GNUC__ > 4 /* 4.7 -> */
 #    define HASATTRIBUTE_ALWAYS_INLINE
 #  endif
 #endif
 #  define __attribute__warn_unused_result__ __attribute__((warn_unused_result))
 #endif
 #ifdef HASATTRIBUTE_ALWAYS_INLINE
-#  define __attribute__always_inline__      __attribute__((always_inline))
+/* always_inline is buggy in gcc <= 4.6 and causes compilation errors */
+#  if !defined(PERL_IS_GCC) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7 || __GNUC__ > 4)
+#    define __attribute__always_inline__      __attribute__((always_inline))
+#  endif
 #endif
 
 /* If we haven't defined the attributes yet, define them to blank. */
@@ -6826,7 +6835,7 @@ cannot have changed since the precalculation.
 #  define SET_NUMERIC_STANDARD()
 #  define SET_NUMERIC_UNDERLYING()
 #  define IS_NUMERIC_RADIX(a, b)               (0)
-#  define DECLARATION_FOR_LC_NUMERIC_MANIPULATION
+#  define DECLARATION_FOR_LC_NUMERIC_MANIPULATION  dNOOP
 #  define STORE_LC_NUMERIC_SET_STANDARD()
 #  define STORE_LC_NUMERIC_FORCE_TO_UNDERLYING()
 #  define STORE_LC_NUMERIC_SET_TO_NEEDED_IN(in_lc_numeric)
index e665ea1..f96e256 100644 (file)
  *     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.31.10"                /**/
-#define PRIVLIB_EXP "/sys/lib/perl/5.31.10"            /**/
+#define PRIVLIB "/sys/lib/perl/5.31.11"                /**/
+#define PRIVLIB_EXP "/sys/lib/perl/5.31.11"            /**/
 
 /* PTRSIZE:
  *     This symbol contains the size of a pointer, so that the C preprocessor
  *     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.31.10/site_perl"              /**/
-#define SITELIB_EXP "/sys/lib/perl/5.31.10/site_perl"          /**/
-#define SITELIB_STEM "/sys/lib/perl/5.31.10/site_perl"         /**/
+#define SITELIB "/sys/lib/perl/5.31.11/site_perl"              /**/
+#define SITELIB_EXP "/sys/lib/perl/5.31.11/site_perl"          /**/
+#define SITELIB_STEM "/sys/lib/perl/5.31.11/site_perl"         /**/
 
 /* Size_t_size:
  *     This symbol holds the size of a Size_t in bytes.
index ecf2c05..979a1bd 100644 (file)
@@ -31,12 +31,12 @@ afsroot='/afs'
 alignbytes='4'
 aphostname='/bin/uname -n'
 api_revision='5'
-api_subversion='10'
+api_subversion='11'
 api_version='31'
-api_versionstring='5.31.10'
+api_versionstring='5.31.11'
 ar='ar'
-archlib='/sys/lib/perl5/5.31.10/386'
-archlibexp='/sys/lib/perl5/5.31.10/386'
+archlib='/sys/lib/perl5/5.31.11/386'
+archlibexp='/sys/lib/perl5/5.31.11/386'
 archname64=''
 archname='386'
 archobjs=''
@@ -817,17 +817,17 @@ inc_version_list=' '
 inc_version_list_init='0'
 incpath=''
 inews=''
-installarchlib='/sys/lib/perl/5.31.10/386'
+installarchlib='/sys/lib/perl/5.31.11/386'
 installbin='/usr/bin'
 installman1dir='/sys/man/1pub'
 installman3dir='/sys/man/2pub'
 installprefix='/usr'
 installprefixexp='/usr'
-installprivlib='/sys/lib/perl/5.31.10'
+installprivlib='/sys/lib/perl/5.31.11'
 installscript='/usr/bin'
-installsitearch='/sys/lib/perl/5.31.10/site_perl/386'
+installsitearch='/sys/lib/perl/5.31.11/site_perl/386'
 installsitebin='/usr/bin'
-installsitelib='/sys/lib/perl/5.31.10/site_perl'
+installsitelib='/sys/lib/perl/5.31.11/site_perl'
 installstyle='lib/perl5'
 installusrbinperl='undef'
 installvendorarch=''
@@ -952,8 +952,8 @@ pmake=''
 pr=''
 prefix='/usr'
 prefixexp='/usr'
-privlib='/sys/lib/perl/5.31.10'
-privlibexp='/sys/lib/perl/5.31.10'
+privlib='/sys/lib/perl/5.31.11'
+privlibexp='/sys/lib/perl/5.31.11'
 procselfexe=''
 prototype='define'
 ptrsize='4'
@@ -1018,13 +1018,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.31.10/site_perl/386'
+sitearch='/sys/lib/perl/5.31.11/site_perl/386'
 sitearchexp='/sys/lib/perl/site_perl/386'
 sitebin='/usr/bin'
 sitebinexp='/usr/bin'
-sitelib='/sys/lib/perl/5.31.10/site_perl'
-sitelib_stem='/sys/lib/perl/5.31.10/site_perl'
-sitelibexp='/sys/lib/perl/5.31.10/site_perl'
+sitelib='/sys/lib/perl/5.31.11/site_perl'
+sitelib_stem='/sys/lib/perl/5.31.11/site_perl'
+sitelibexp='/sys/lib/perl/5.31.11/site_perl'
 siteprefix='/usr'
 siteprefixexp='/usr'
 sizesize='4'
@@ -1057,7 +1057,7 @@ stdio_stream_array=''
 strerror_r_proto='0'
 strings='/sys/include/ape/string.h'
 submit=''
-subversion='10'
+subversion='11'
 sysman='/sys/man/1pub'
 tail=''
 tar=''
@@ -1138,8 +1138,8 @@ vendorlib_stem=''
 vendorlibexp=''
 vendorprefix=''
 vendorprefixexp=''
-version='5.31.10'
-version_patchlevel_string='version 31 subversion 10'
+version='5.31.11'
+version_patchlevel_string='version 31 subversion 11'
 versiononly='undef'
 vi=''
 xlibpth=''
@@ -1153,9 +1153,9 @@ config_args=''
 config_argc=0
 PERL_REVISION=5
 PERL_VERSION=31
-PERL_SUBVERSION=10
+PERL_SUBVERSION=11
 PERL_API_REVISION=5
 PERL_API_VERSION=31
-PERL_API_SUBVERSION=10
+PERL_API_SUBVERSION=11
 PERL_PATCHLEVEL=
 PERL_CONFIG_SH=true
index bc32bbb..d4dd390 100644 (file)
@@ -181,6 +181,7 @@ aux h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp
 
     perlhist           Perl history records
     perldelta          Perl changes since previous version
+    perl53110delta     Perl changes in version 5.31.10
     perl5319delta      Perl changes in version 5.31.9
     perl5318delta      Perl changes in version 5.31.8
     perl5317delta      Perl changes in version 5.31.7
diff --git a/pod/perl53110delta.pod b/pod/perl53110delta.pod
new file mode 100644 (file)
index 0000000..72c25fe
--- /dev/null
@@ -0,0 +1,127 @@
+=encoding utf8
+
+=head1 NAME
+
+perl53110delta - what is new for perl v5.31.10
+
+=head1 DESCRIPTION
+
+This document describes differences between the 5.31.9 release and the 5.31.10
+release.
+
+If you are upgrading from an earlier release such as 5.31.8, first read
+L<perl5319delta>, which describes differences between 5.31.8 and 5.31.9.
+
+=head1 Core Enhancements
+
+=head2 Unicode 13.0 is supported
+
+See L<https://www.unicode.org/versions/Unicode13.0.0/> for details.
+
+=head2 It is now possible to write C<qr/\p{Name=...}/>, or
+C<qr!\p{na=/(SMILING|GRINNING) FACE/}!>
+
+The Unicode Name property is now accessible in regular expression
+patterns, as an alternative to C<\N{...}>.
+A comparison of the two methods is given in
+L<perlunicode/Comparison of \N{...} and \p{name=...}>.
+
+The second example above shows that wildcard subpatterns are also usable
+in this property.  See L<perlunicode/Wildcards in Property Values>.
+
+=head2 Chained comparisons capability
+
+Some comparison operators, as their associativity, I<chain> with some
+operators of the same precedence (but never with operators of different
+precedence).
+
+    if ( $x < $y <= $z ) {...}
+
+behaves exactly like:
+
+    if ( $x < $y && $y <= $z ) {...}
+
+(assuming that C<"$y"> is as simple a scalar as it looks.)
+
+You can read more about this in L<perlop> under
+L<perlop/Operator Precedence and Associativity>.
+
+=head1 Obituary
+
+Jeff Goff (JGOFF or DrForr), an integral part of the Perl and Raku
+communities and a dear friend to all of us, has passed away on March
+13th, 2020. DrForr was a prominent member of the communities, attending
+and speaking at countless events, contributing to numerous projects,
+and assisting and helping in any way he could.
+
+His passing leaves a hole in our hearts and in our communities and he
+will be sorely missed.
+
+=head1 Acknowledgements
+
+Perl 5.31.10 represents approximately 4 weeks of development since Perl
+5.31.9 and contains approximately 17,000 lines of changes across 180 files
+from 29 authors.
+
+Excluding auto-generated files, documentation and release tools, there were
+approximately 9,000 lines of changes to 85 .pm, .t, .c and .h files.
+
+Perl continues to flourish into its fourth decade thanks to a vibrant
+community of users and developers. The following people are known to have
+contributed the improvements that became Perl 5.31.10:
+
+Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari MannsÃ¥ker, Dan
+Book, Daniel Dragan, Dave Rolsky, David Cantrell, David Mitchell, Hauke D,
+H.Merijn Brand, Hugo van der Sanden, James E Keenan, John Lightsey, Karen
+Etheridge, Karl Williamson, Nicolas R., Pali, Paul Evans, Peter Oliver,
+Renee Baecker, Richard Leach, Sawyer X, Shlomi Fish, Stefan Seifert, Steve
+Hay, Tomasz Konojacki, Tony Cook, Yves Orton, Zefram.
+
+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<AUTHORS> file in the Perl source distribution.
+
+=head1 Reporting Bugs
+
+If you find what you think is a bug, you might check the perl bug database
+at L<https://github.com/Perl/perl5/issues>.  There may also be information at
+L<http://www.perl.org/>, the Perl Home Page.
+
+If you believe you have an unreported bug, please open an issue at
+L<https://github.com/Perl/perl5/issues>.  Be sure to trim your bug down to a
+tiny but sufficient test case.
+
+If the bug you are reporting has security implications which make it
+inappropriate to send to a public issue tracker, then see
+L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
+for details of how to report the issue.
+
+=head1 Give Thanks
+
+If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
+you can do so by running the C<perlthanks> program:
+
+    perlthanks
+
+This will send an email to the Perl 5 Porters list with your show of thanks.
+
+=head1 SEE ALSO
+
+The F<Changes> file for an explanation of how to view exhaustive details on
+what changed.
+
+The F<INSTALL> file for how to build Perl.
+
+The F<README> file for general stuff.
+
+The F<Artistic> and F<Copying> files for copyright information.
+
+=cut
index 2ab5568..b50f817 100644 (file)
@@ -1081,8 +1081,8 @@ returning a list of key/value pairs rather than just values:
     # %removed is now (foo => 3, bar => 8)
     # %h is now (blonk => 2, squink => 5)
 
-However, the result of such a slice cannot be localized or used
-in assignment.  These are otherwise very much consistent with hash slices
+However, the result of such a slice cannot be localized or assigned to.
+These are otherwise very much consistent with hash slices
 using the @ symbol.
 
 =head3 Index/Value Array Slices
index 8ed927e..a29f7e0 100644 (file)
 
 =head1 NAME
 
-perldelta - what is new for perl v5.31.10
+perldelta - what is new for perl v5.31.11
 
 =head1 DESCRIPTION
 
-This document describes differences between the 5.31.9 release and the 5.31.10
+This document describes differences between the 5.30.0 release and the 5.31.11
 release.
 
-If you are upgrading from an earlier release such as 5.31.8, first read
-L<perl5319delta>, which describes differences between 5.31.8 and 5.31.9.
+If you are upgrading from an earlier release such as 5.28.0, first read
+L<perl5300delta>, which describes differences between 5.28.0 and 5.30.0.
 
-=head1 Core Enhancements
+=head1 Modules and Pragmata
 
-=head2 Unicode 13.0 is supported
+=head2 Updated Modules and Pragmata
 
-See L<https://www.unicode.org/versions/Unicode13.0.0/> for details.
+=over 4
 
-=head2 It is now possible to write C<qr/\p{Name=...}/>, or
-C<qr!\p{na=/(SMILING|GRINNING) FACE/}!>
+=item *
 
-The Unicode Name property is now accessible in regular expression
-patterns, as an alternative to C<\N{...}>.
-A comparison of the two methods is given in
-L<perlunicode/Comparison of \N{...} and \p{name=...}>.
+L<B::Deparse> has been upgraded from version 1.52 to 1.53.
 
-The second example above shows that wildcard subpatterns are also usable
-in this property.  See L<perlunicode/Wildcards in Property Values>.
+=item *
 
-=head2 Chained comparisons capability
+L<charnames> has been upgraded from version 1.46 to 1.47.
 
-Some comparison operators, as their associativity, I<chain> with some
-operators of the same precedence (but never with operators of different
-precedence).
+=item *
 
-    if ( $x < $y <= $z ) {...}
+L<DynaLoader> has been upgraded from version 1.46 to 1.47.
 
-behaves exactly like:
+=item *
 
-    if ( $x < $y && $y <= $z ) {...}
+L<Encode> has been upgraded from version 3.03 to 3.04.
 
-(assuming that C<"$y"> is as simple a scalar as it looks.)
+=item *
 
-You can read more about this in L<perlop> under
-L<perlop/Operator Precedence and Associativity>.
+L<IPC::Open3> has been upgraded from version 1.20 to 1.21.
 
-=head1 Obituary
+=item *
 
-Jeff Goff (JGOFF or DrForr), an integral part of the Perl and Raku
-communities and a dear friend to all of us, has passed away on March
-13th, 2020. DrForr was a prominent member of the communities, attending
-and speaking at countless events, contributing to numerous projects,
-and assisting and helping in any way he could.
+L<Module::CoreList> has been upgraded from version 5.20200220 to 5.20200428.
 
-His passing leaves a hole in our hearts and in our communities and he
-will be sorely missed.
+=item *
+
+L<Opcode> has been upgraded from version 1.45 to 1.47.
+
+=item *
+
+L<open> has been upgraded from version 1.11 to 1.12.
+
+=item *
+
+L<PerlIO> has been upgraded from version 1.10 to 1.11.
+
+=item *
+
+L<POSIX> has been upgraded from version 1.92 to 1.93.
+
+=item *
+
+L<re> has been upgraded from version 0.38 to 0.39.
+
+=item *
+
+L<Storable> has been upgraded from version 3.19 to 3.20.
+
+=item *
+
+L<Test::Simple> has been upgraded from version 1.302171 to 1.302175.
+
+=item *
+
+L<Time::Piece> has been upgraded from version 1.33 to 1.3401.
+
+=item *
+
+L<Unicode::UCD> has been upgraded from version 0.74 to 0.75.
+
+=item *
+
+L<warnings> has been upgraded from version 1.46 to 1.47.
+
+=item *
+
+L<XS::APItest> has been upgraded from version 1.07 to 1.09.
+
+=back
 
 =head1 Acknowledgements
 
-Perl 5.31.10 represents approximately 4 weeks of development since Perl
-5.31.9 and contains approximately 17,000 lines of changes across 180 files
-from 29 authors.
+Perl 5.31.11 represents approximately 6 weeks of development since Perl
+5.31.10 and contains approximately 3,200 lines of changes across 170 files
+from 18 authors.
 
 Excluding auto-generated files, documentation and release tools, there were
-approximately 9,000 lines of changes to 85 .pm, .t, .c and .h files.
+approximately 1,200 lines of changes to 110 .pm, .t, .c and .h files.
 
 Perl continues to flourish into its fourth decade thanks to a vibrant
 community of users and developers. The following people are known to have
-contributed the improvements that became Perl 5.31.10:
-
-Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari MannsÃ¥ker, Dan
-Book, Daniel Dragan, Dave Rolsky, David Cantrell, David Mitchell, Hauke D,
-H.Merijn Brand, Hugo van der Sanden, James E Keenan, John Lightsey, Karen
-Etheridge, Karl Williamson, Nicolas R., Pali, Paul Evans, Peter Oliver,
-Renee Baecker, Richard Leach, Sawyer X, Shlomi Fish, Stefan Seifert, Steve
-Hay, Tomasz Konojacki, Tony Cook, Yves Orton, Zefram.
+contributed the improvements that became Perl 5.31.11:
+
+Atsushi Sugawara, Chad Granum, Dagfinn Ilmari MannsÃ¥ker, Dan Book, David
+Mitchell, Dominic Hargreaves, Hugo van der Sanden, James E Keenan, Jason
+McIntosh, Karl Williamson, Leon Timmermans, Ricardo Signes, Samuel Smith,
+Sawyer X, Sisyphus, Tomasz Konojacki, Tony Cook, Zefram.
 
 The list above is almost certainly incomplete as it is automatically
 generated from version control history. In particular, it does not include
index 781b151..895c3f1 100644 (file)
@@ -14,6 +14,10 @@ features are available.
 The deprecated features will be grouped by the version of Perl in
 which they will be removed.
 
+=head2 Perl 5.34
+
+There are no deprecations or fatalizations scheduled for Perl 5.34.
+
 =head2 Perl 5.32
 
 =head3 Constants from lexical variables potentially modified elsewhere
@@ -48,7 +52,7 @@ changes to the variable that it closes over, add an explicit C<return>:
     my $var;
     $sub = sub () { return $var };
 
-This usage has been deprecated, and will no longer be allowed in Perl 5.32.
+This usage was deprecated and as of Perl 5.32 is no longer allowed.
 
 =head3 Use of strings with code points over 0xFF as arguments to C<vec>
 
@@ -81,8 +85,7 @@ been documented to be called with no arguments.  Historically it has not
 enforced this, and has actually accepted and ignored any arguments.  As a
 result, some users have got the mistaken impression that an argument does
 something useful.  To avoid these bugs, the function is being made strict.
-Passing arguments was deprecated in Perl 5.28, and will become fatal in
-Perl 5.32.
+Passing arguments was deprecated in Perl 5.28 and became fatal in Perl 5.32.
 
 =head3 Unescaped left braces in regular expressions
 
index 28e2d55..6ae08a9 100644 (file)
@@ -3098,6 +3098,12 @@ problem was discovered.  See L<perlre>.
 (F) The range specified in the tr/// or y/// operator had a minimum
 character greater than the maximum character.  See L<perlop>.
 
+=item Invalid reference to group in regex; marked by S<<-- HERE> in m/%s/
+
+(F) The capture group you specified can't possibly exist because the
+number you used is not within the legal range of possible values for
+this machine.
+
 =item Invalid separator character %s in attribute list
 
 (F) Something other than a colon or whitespace was seen between the
index 77521df..e95c54f 100644 (file)
@@ -242,7 +242,7 @@ L<C<chroot>|/chroot FILENAME>,
 L<C<fcntl>|/fcntl FILEHANDLE,FUNCTION,SCALAR>, L<C<glob>|/glob EXPR>,
 L<C<ioctl>|/ioctl FILEHANDLE,FUNCTION,SCALAR>,
 L<C<link>|/link OLDFILE,NEWFILE>, L<C<lstat>|/lstat FILEHANDLE>,
-L<C<mkdir>|/mkdir FILENAME,MODE>, L<C<open>|/open FILEHANDLE,EXPR>,
+L<C<mkdir>|/mkdir FILENAME,MODE>, L<C<open>|/open FILEHANDLE,MODE,EXPR>,
 L<C<opendir>|/opendir DIRHANDLE,EXPR>, L<C<readlink>|/readlink EXPR>,
 L<C<rename>|/rename OLDNAME,NEWNAME>, L<C<rmdir>|/rmdir FILENAME>,
 L<C<select>|/select FILEHANDLE>, L<C<stat>|/stat FILEHANDLE>,
@@ -471,7 +471,7 @@ L<C<kill>|/kill SIGNAL, LIST>, L<C<link>|/link OLDFILE,NEWFILE>,
 L<C<lstat>|/lstat FILEHANDLE>, L<C<msgctl>|/msgctl ID,CMD,ARG>,
 L<C<msgget>|/msgget KEY,FLAGS>,
 L<C<msgrcv>|/msgrcv ID,VAR,SIZE,TYPE,FLAGS>,
-L<C<msgsnd>|/msgsnd ID,MSG,FLAGS>, L<C<open>|/open FILEHANDLE,EXPR>,
+L<C<msgsnd>|/msgsnd ID,MSG,FLAGS>, L<C<open>|/open FILEHANDLE,MODE,EXPR>,
 L<C<pipe>|/pipe READHANDLE,WRITEHANDLE>, L<C<readlink>|/readlink EXPR>,
 L<C<rename>|/rename OLDNAME,NEWNAME>,
 L<C<select>|/select RBITS,WBITS,EBITS,TIMEOUT>,
@@ -839,7 +839,7 @@ while C<:encoding(UTF-8)> checks the data for actually being valid
 UTF-8.  More details can be found in L<PerlIO::encoding>.
 
 In general, L<C<binmode>|/binmode FILEHANDLE, LAYER> should be called
-after L<C<open>|/open FILEHANDLE,EXPR> but before any I/O is done on the
+after L<C<open>|/open FILEHANDLE,MODE,EXPR> but before any I/O is done on the
 filehandle.  Calling L<C<binmode>|/binmode FILEHANDLE, LAYER> normally
 flushes any pending buffered output data (and perhaps pending input
 data) on the handle.  An exception to this is the C<:encoding> layer
@@ -1253,12 +1253,12 @@ layer.  Closes the currently selected filehandle if the argument is
 omitted.
 
 You don't have to close FILEHANDLE if you are immediately going to do
-another L<C<open>|/open FILEHANDLE,EXPR> on it, because
-L<C<open>|/open FILEHANDLE,EXPR> closes it for you.  (See
-L<C<open>|/open FILEHANDLE,EXPR>.) However, an explicit
+another L<C<open>|/open FILEHANDLE,MODE,EXPR> on it, because
+L<C<open>|/open FILEHANDLE,MODE,EXPR> closes it for you.  (See
+L<C<open>|/open FILEHANDLE,MODE,EXPR>.) However, an explicit
 L<C<close>|/close FILEHANDLE> on an input file resets the line counter
 (L<C<$.>|perlvar/$.>), while the implicit close done by
-L<C<open>|/open FILEHANDLE,EXPR> does not.
+L<C<open>|/open FILEHANDLE,MODE,EXPR> does not.
 
 If the filehandle came from a piped open, L<C<close>|/close FILEHANDLE>
 returns false if one of the other syscalls involved fails or if its
@@ -1481,7 +1481,7 @@ L<C<tie>|/tie VARIABLE,CLASSNAME,LIST> function.]
 
 This binds a L<dbm(3)>, L<ndbm(3)>, L<sdbm(3)>, L<gdbm(3)>, or Berkeley
 DB file to a hash.  HASH is the name of the hash.  (Unlike normal
-L<C<open>|/open FILEHANDLE,EXPR>, the first argument is I<not> a
+L<C<open>|/open FILEHANDLE,MODE,EXPR>, the first argument is I<not> a
 filehandle, even though it looks like one).  DBNAME is the name of the
 database (without the F<.dir> or F<.pag> extension if any).  If the
 database does not exist, it is created with protection specified by MASK
@@ -2719,7 +2719,7 @@ Returns the file descriptor for a filehandle or directory handle,
 or undefined if the
 filehandle is not open.  If there is no real file descriptor at the OS
 level, as can happen with filehandles connected to memory objects via
-L<C<open>|/open FILEHANDLE,EXPR> with a reference for the third
+L<C<open>|/open FILEHANDLE,MODE,EXPR> with a reference for the third
 argument, -1 is returned.
 
 This is mainly useful for constructing bitmaps for
@@ -4444,46 +4444,84 @@ Leading white space is ignored without warning, as too are any trailing
 non-digits, such as a decimal point (L<C<oct>|/oct EXPR> only handles
 non-negative integers, not negative integers or floating point).
 
-=item open FILEHANDLE,EXPR
-X<open> X<pipe> X<file, open> X<fopen>
-
 =item open FILEHANDLE,MODE,EXPR
+X<open> X<pipe> X<file, open> X<fopen>
 
 =item open FILEHANDLE,MODE,EXPR,LIST
 
 =item open FILEHANDLE,MODE,REFERENCE
 
+=item open FILEHANDLE,EXPR
+
 =item open FILEHANDLE
 
 =for Pod::Functions open a file, pipe, or descriptor
 
-Opens the file whose filename is given by EXPR, and associates it with
-FILEHANDLE.
+Associates an internal FILEHANDLE with the external file specified by
+EXPR. That filehandle will subsequently allow you to perform
+I/O operations on that file, such as reading from it or writing to it.
+
+Instead of a filename, you may specify an external command
+(plus an optional argument list) or a scalar reference, in order to open
+filehandles on commands or in-memory scalars, respectively.
+
+A thorough reference to C<open> follows. For a gentler introduction to
+the basics of C<open>, see also the L<perlopentut> manual page.
+
+=over
+
+=item Working with files
+
+Most often, C<open> gets invoked with three arguments: the required
+FILEHANDLE (usually an empty scalar variable), followed by MODE (usually
+a literal describing the I/O mode the filehandle will use), and then the
+filename  that the new filehandle will refer to.
+
+=over
+
+=item Simple examples
 
-Simple examples to open a file for reading:
+Reading from a file:
 
     open(my $fh, "<", "input.txt")
-       or die "Can't open < input.txt: $!";
+        or die "Can't open < input.txt: $!";
 
-and for writing:
+    # Process every line in input.txt
+    while (my $line = <$fh>) {
+        #
+        # ... do something interesting with $line here ...
+        #
+    }
+
+or writing to one:
 
     open(my $fh, ">", "output.txt")
-       or die "Can't open > output.txt: $!";
-
-(The following is a comprehensive reference to
-L<C<open>|/open FILEHANDLE,EXPR>: for a gentler introduction you may
-consider L<perlopentut>.)
-
-If FILEHANDLE is an undefined scalar variable (or array or hash element), a
-new filehandle is autovivified, meaning that the variable is assigned a
-reference to a newly allocated anonymous filehandle.  Otherwise if
-FILEHANDLE is an expression, its value is the real filehandle.  (This is
-considered a symbolic reference, so C<use strict "refs"> should I<not> be
-in effect.)
-
-If three (or more) arguments are specified, the open mode (including
-optional encoding) in the second argument are distinct from the filename in
-the third.  If MODE is C<< < >> or nothing, the file is opened for input.
+        or die "Can't open > output.txt: $!";
+
+    print $fh "This line gets printed into output.txt.\n";
+
+For a summary of common filehandle operations such as these, see
+L<perlintro/Files and I/O>.
+
+=item About filehandles
+
+The first argument to C<open>, labeled FILEHANDLE in this reference, is
+usually a scalar variable. (Exceptions exist, described in "Other
+considerations", below.) If the call to C<open> succeeds, then the
+expression provided as FILEHANDLE will get assigned an open
+I<filehandle>. That filehandle provides an internal reference to the
+specified external file, conveniently stored in a Perl variable, and
+ready for I/O operations such as reading and writing.
+
+=item About modes
+
+When calling C<open> with three or more arguments, the second argument
+-- labeled MODE here -- defines the I<open mode>. MODE is usually a
+literal string comprising special characters that define the intended
+I/O role of the filehandle being created: whether it's read-only, or
+read-and-write, and so on.
+
+If MODE is C<< < >>, the file is opened for input (read-only).
 If MODE is C<< > >>, the file is opened for output, with existing files
 first being truncated ("clobbered") and nonexisting files newly created.
 If MODE is C<<< >> >>>, the file is opened for appending, again being
@@ -4502,53 +4540,49 @@ L<C<umask>|/umask EXPR> value.
 These various prefixes correspond to the L<fopen(3)> modes of C<r>,
 C<r+>, C<w>, C<w+>, C<a>, and C<a+>.
 
-In the one- and two-argument forms of the call, the mode and filename
-should be concatenated (in that order), preferably separated by white
-space.  You can--but shouldn't--omit the mode in these forms when that mode
-is C<< < >>.  It is safe to use the two-argument form of
-L<C<open>|/open FILEHANDLE,EXPR> if the filename argument is a known literal.
+More examples of different modes in action:
 
-For three or more arguments if MODE is C<|->, the filename is
-interpreted as a command to which output is to be piped, and if MODE
-is C<-|>, the filename is interpreted as a command that pipes
-output to us.  In the two-argument (and one-argument) form, one should
-replace dash (C<->) with the command.
-See L<perlipc/"Using open() for IPC"> for more examples of this.
-(You are not allowed to L<C<open>|/open FILEHANDLE,EXPR> to a command
-that pipes both in I<and> out, but see L<IPC::Open2>, L<IPC::Open3>, and
-L<perlipc/"Bidirectional Communication with Another Process"> for
-alternatives.)
+ # Open a file for concatenation
+ open(my $log, ">>", "/usr/spool/news/twitlog")
+     or warn "Couldn't open log file; discarding input";
 
-In the form of pipe opens taking three or more arguments, if LIST is specified
-(extra arguments after the command name) then LIST becomes arguments
-to the command invoked if the platform supports it.  The meaning of
-L<C<open>|/open FILEHANDLE,EXPR> with more than three arguments for
-non-pipe modes is not yet defined, but experimental "layers" may give
-extra LIST arguments meaning.
+ # Open a file for reading and writing
+ open(my $dbase, "+<", "dbase.mine")
+     or die "Can't open 'dbase.mine' for update: $!";
 
-In the two-argument (and one-argument) form, opening C<< <- >>
-or C<-> opens STDIN and opening C<< >- >> opens STDOUT.
+=item Checking the return value
+
+Open returns nonzero on success, the undefined value otherwise.  If the
+C<open> involved a pipe, the return value happens to be the pid of the
+subprocess.
 
-You may (and usually should) use the three-argument form of open to specify
-I/O layers (sometimes referred to as "disciplines") to apply to the handle
-that affect how the input and output are processed (see L<open> and
+When opening a file, it's seldom a good idea to continue if the request
+failed, so C<open> is frequently used with L<C<die>|/die LIST>. Even if
+you want your code to do something other than C<die> on a failed open,
+you should still always check the return value from opening a file.
+
+=back
+
+=item Specifying I/O layers in MODE
+
+You can use the three-argument form of open to specify
+I/O layers (sometimes referred to as "disciplines") to apply to the new
+filehandle. These affect how the input and output are processed (see
+L<open> and
 L<PerlIO> for more details).  For example:
 
-  open(my $fh, "<:encoding(UTF-8)", $filename)
-    || die "Can't open UTF-8 encoded $filename: $!";
+    open(my $fh, "<:encoding(UTF-8)", $filename)
+        || die "Can't open UTF-8 encoded $filename: $!";
 
-opens the UTF8-encoded file containing Unicode characters;
+This opens the UTF8-encoded file containing Unicode characters;
 see L<perluniintro>.  Note that if layers are specified in the
-three-argument form, then default layers stored in ${^OPEN} (see L<perlvar>;
-usually set by the L<open> pragma or the switch C<-CioD>) are ignored.
+three-argument form, then default layers stored in
+L<C<${^OPEN}>|perlvar/${^OPEN}>
+(usually set by the L<open> pragma or the switch C<-CioD>) are ignored.
 Those layers will also be ignored if you specify a colon with no name
 following it.  In that case the default layer for the operating system
 (:raw on Unix, :crlf on Windows) is used.
 
-Open returns nonzero on success, the undefined value otherwise.  If
-the L<C<open>|/open FILEHANDLE,EXPR> involved a pipe, the return value
-happens to be the pid of the subprocess.
-
 On some systems (in general, DOS- and Windows-based systems)
 L<C<binmode>|/binmode FILEHANDLE, LAYER> is necessary when you're not
 working with a text file.  For the sake of portability it is a good idea
@@ -4556,41 +4590,7 @@ always to use it when appropriate, and never to use it when it isn't
 appropriate.  Also, people can set their I/O to be by default
 UTF8-encoded Unicode, not bytes.
 
-When opening a file, it's seldom a good idea to continue
-if the request failed, so L<C<open>|/open FILEHANDLE,EXPR> is frequently
-used with L<C<die>|/die LIST>.  Even if L<C<die>|/die LIST> won't do
-what you want (say, in a CGI script,
-where you want to format a suitable error message (but there are
-modules that can help with that problem)) always check
-the return value from opening a file.
-
-The filehandle will be closed when its reference count reaches zero.
-If it is a lexically scoped variable declared with L<C<my>|/my VARLIST>,
-that usually
-means the end of the enclosing scope.  However, this automatic close
-does not check for errors, so it is better to explicitly close
-filehandles, especially those used for writing:
-
-    close($handle)
-       || warn "close failed: $!";
-
-An older style is to use a bareword as the filehandle, as
-
-    open(FH, "<", "input.txt")
-       or die "Can't open < input.txt: $!";
-
-Then you can use C<FH> as the filehandle, in C<< close FH >> and C<<
-<FH> >> and so on.  Note that it's a global variable, so this form is
-not recommended in new code.
-
-As a shortcut a one-argument call takes the filename from the global
-scalar variable of the same name as the filehandle:
-
-    $ARTICLE = 100;
-    open(ARTICLE) or die "Can't find article $ARTICLE: $!\n";
-
-Here C<$ARTICLE> must be a global (package) scalar variable - not one
-declared with L<C<my>|/my VARLIST> or L<C<state>|/state VARLIST>.
+=item Using C<undef> for temporary files
 
 As a special case the three-argument form with a read/write mode and the third
 argument being L<C<undef>|/undef EXPR>:
@@ -4602,11 +4602,16 @@ opens a filehandle to a newly created empty anonymous temporary file.
 sensible mode to use.)  You will need to
 L<C<seek>|/seek FILEHANDLE,POSITION,WHENCE> to do the reading.
 
-Perl is built using PerlIO by default.  Unless you've
-changed this (such as building Perl with C<Configure -Uuseperlio>), you can
-open filehandles directly to Perl scalars via:
 
-    open(my $fh, ">", \$variable) || ..
+=item Opening a filehandle into an in-memory scalar
+
+You can open filehandles directly to Perl scalars instead of a file or
+other resource external to the program. To do so, provide a reference to
+that scalar as the third argument to C<open>, like so:
+
+ open(my $memory, ">", \$var)
+     or die "Can't open memory file: $!";
+ print $memory "foo!\n";    # output will appear in $var
 
 To (re)open C<STDOUT> or C<STDERR> as an in-memory file, close it first:
 
@@ -4621,18 +4626,28 @@ any code points over 0xFF.
 Opening in-memory files I<can> fail for a variety of reasons.  As with
 any other C<open>, check the return value for success.
 
-See L<perliol> for detailed info on PerlIO.
+I<Technical note>: This feature works only when Perl is built with
+PerlIO -- the default, except with older (pre-5.16) Perl installations
+that were configured to not include it (e.g. via C<Configure
+-Uuseperlio>). You can see whether your Perl was built with PerlIO by
+running C<perl -V:useperlio>.  If it says C<'define'>, you have PerlIO;
+otherwise you don't.
 
-General examples:
+See L<perliol> for detailed info on PerlIO.
 
- open(my $log, ">>", "/usr/spool/news/twitlog");
- # if the open fails, output is discarded
+=item Opening a filehandle into a command
 
- open(my $dbase, "+<", "dbase.mine")      # open for update
-     or die "Can't open 'dbase.mine' for update: $!";
+If MODE is C<|->, then the filename is
+interpreted as a command to which output is to be piped, and if MODE
+is C<-|>, the filename is interpreted as a command that pipes
+output to us.  In the two-argument (and one-argument) form, one should
+replace dash (C<->) with the command.
+See L<perlipc/"Using open() for IPC"> for more examples of this.
+(You are not allowed to L<C<open>|/open FILEHANDLE,MODE,EXPR> to a command
+that pipes both in I<and> out, but see L<IPC::Open2>, L<IPC::Open3>, and
+L<perlipc/"Bidirectional Communication with Another Process"> for
+alternatives.)
 
- open(my $dbase, "+<dbase.mine")          # ditto
-     or die "Can't open 'dbase.mine' for update: $!";
 
  open(my $article_fh, "-|", "caesar <$article")  # decrypt
                                                  # article
@@ -4644,10 +4659,80 @@ General examples:
  open(my $out_fh, "|-", "sort >Tmp$$")    # $$ is our process id
      or die "Can't start sort: $!";
 
- # in-memory files
- open(my $memory, ">", \$var)
-     or die "Can't open memory file: $!";
- print $memory "foo!\n";              # output will appear in $var
+
+In the form of pipe opens taking three or more arguments, if LIST is specified
+(extra arguments after the command name) then LIST becomes arguments
+to the command invoked if the platform supports it.  The meaning of
+L<C<open>|/open FILEHANDLE,MODE,EXPR> with more than three arguments for
+non-pipe modes is not yet defined, but experimental "layers" may give
+extra LIST arguments meaning.
+
+If you open a pipe on the command C<-> (that is, specify either C<|-> or C<-|>
+with the one- or two-argument forms of
+L<C<open>|/open FILEHANDLE,MODE,EXPR>), an implicit L<C<fork>|/fork> is done,
+so L<C<open>|/open FILEHANDLE,MODE,EXPR> returns twice: in the parent process
+it returns the pid
+of the child process, and in the child process it returns (a defined) C<0>.
+Use C<defined($pid)> or C<//> to determine whether the open was successful.
+
+For example, use either
+
+   my $child_pid = open(my $from_kid, "-|")
+        // die "Can't fork: $!";
+
+or
+
+   my $child_pid = open(my $to_kid,   "|-")
+        // die "Can't fork: $!";
+
+followed by
+
+    if ($child_pid) {
+       # am the parent:
+       # either write $to_kid or else read $from_kid
+       ...
+       waitpid $child_pid, 0;
+    } else {
+       # am the child; use STDIN/STDOUT normally
+       ...
+       exit;
+    }
+
+The filehandle behaves normally for the parent, but I/O to that
+filehandle is piped from/to the STDOUT/STDIN of the child process.
+In the child process, the filehandle isn't opened--I/O happens from/to
+the new STDOUT/STDIN.  Typically this is used like the normal
+piped open when you want to exercise more control over just how the
+pipe command gets executed, such as when running setuid and
+you don't want to have to scan shell commands for metacharacters.
+
+The following blocks are more or less equivalent:
+
+    open(my $fh, "|tr '[a-z]' '[A-Z]'");
+    open(my $fh, "|-", "tr '[a-z]' '[A-Z]'");
+    open(my $fh, "|-") || exec 'tr', '[a-z]', '[A-Z]';
+    open(my $fh, "|-", "tr", '[a-z]', '[A-Z]');
+
+    open(my $fh, "cat -n '$file'|");
+    open(my $fh, "-|", "cat -n '$file'");
+    open(my $fh, "-|") || exec "cat", "-n", $file;
+    open(my $fh, "-|", "cat", "-n", $file);
+
+The last two examples in each block show the pipe as "list form", which
+is not yet supported on all platforms. (If your platform has a real
+L<C<fork>|/fork>, such as Linux and macOS, you can use the list form; it
+also works on Windows with Perl 5.22 or later.) You would want to use
+the list form of the pipe so you can pass literal arguments to the
+command without risk of the shell interpreting any shell metacharacters
+in them. However, this also bars you from opening pipes to commands that
+intentionally contain shell metacharacters, such as:
+
+    open(my $fh, "|cat -n | expand -4 | lpr")
+       || die "Can't open pipeline to lpr: $!";
+
+See L<perlipc/"Safe Pipe Opens"> for more examples of this.
+
+=item Duping filehandles
 
 You may also, in the Bourne shell tradition, specify an EXPR beginning
 with C<< >& >>, in which case the rest of the string is interpreted
@@ -4664,11 +4749,15 @@ Here is a script that saves, redirects, and restores C<STDOUT> and
 C<STDERR> using various methods:
 
     #!/usr/bin/perl
-    open(my $oldout, ">&STDOUT")     or die "Can't dup STDOUT: $!";
-    open(OLDERR,     ">&", \*STDERR) or die "Can't dup STDERR: $!";
+    open(my $oldout, ">&STDOUT")
+        or die "Can't dup STDOUT: $!";
+    open(OLDERR,     ">&", \*STDERR)
+        or die "Can't dup STDERR: $!";
 
-    open(STDOUT, '>', "foo.out") or die "Can't redirect STDOUT: $!";
-    open(STDERR, ">&STDOUT")     or die "Can't dup STDOUT: $!";
+    open(STDOUT, '>', "foo.out")
+        or die "Can't redirect STDOUT: $!";
+    open(STDERR, ">&STDOUT")
+        or die "Can't dup STDOUT: $!";
 
     select STDERR; $| = 1;  # make unbuffered
     select STDOUT; $| = 1;  # make unbuffered
@@ -4676,8 +4765,10 @@ C<STDERR> using various methods:
     print STDOUT "stdout 1\n";  # this works for
     print STDERR "stderr 1\n";  # subprocesses too
 
-    open(STDOUT, ">&", $oldout) or die "Can't dup \$oldout: $!";
-    open(STDERR, ">&OLDERR")    or die "Can't dup OLDERR: $!";
+    open(STDOUT, ">&", $oldout)
+        or die "Can't dup \$oldout: $!";
+    open(STDERR, ">&OLDERR")
+        or die "Can't dup OLDERR: $!";
 
     print STDOUT "stdout 2\n";
     print STDERR "stderr 2\n";
@@ -4713,72 +4804,74 @@ L<fdopen(3)> to implement the C<=> functionality.  On many Unix systems,
 L<fdopen(3)> fails when file descriptors exceed a certain value, typically 255.
 For Perls 5.8.0 and later, PerlIO is (most often) the default.
 
-You can see whether your Perl was built with PerlIO by running
-C<perl -V:useperlio>.  If it says C<'define'>, you have PerlIO;
-otherwise you don't.
+=item Legacy usage
 
-If you open a pipe on the command C<-> (that is, specify either C<|-> or C<-|>
-with the one- or two-argument forms of
-L<C<open>|/open FILEHANDLE,EXPR>), an implicit L<C<fork>|/fork> is done,
-so L<C<open>|/open FILEHANDLE,EXPR> returns twice: in the parent process
-it returns the pid
-of the child process, and in the child process it returns (a defined) C<0>.
-Use C<defined($pid)> or C<//> to determine whether the open was successful.
+This section describes ways to call C<open> outside of best practices;
+you may encounter these uses in older code. Perl does not consider their
+use deprecated, exactly, but neither is it recommended in new code, for
+the sake of clarity and readability.
 
-For example, use either
+=over
 
-   my $child_pid = open(my $from_kid, "-|") // die "Can't fork: $!";
+=item Specifying mode and filename as a single argument
 
-or
+In the one- and two-argument forms of the call, the mode and filename
+should be concatenated (in that order), preferably separated by white
+space.  You can--but shouldn't--omit the mode in these forms when that mode
+is C<< < >>.  It is safe to use the two-argument form of
+L<C<open>|/open FILEHANDLE,MODE,EXPR> if the filename argument is a known literal.
 
-   my $child_pid = open(my $to_kid,   "|-") // die "Can't fork: $!";
+ open(my $dbase, "+<dbase.mine")          # ditto
+     or die "Can't open 'dbase.mine' for update: $!";
 
-followed by
+In the two-argument (and one-argument) form, opening C<< <- >>
+or C<-> opens STDIN and opening C<< >- >> opens STDOUT.
 
-    if ($child_pid) {
-       # am the parent:
-       # either write $to_kid or else read $from_kid
-       ...
-       waitpid $child_pid, 0;
-    } else {
-       # am the child; use STDIN/STDOUT normally
-       ...
-       exit;
-    }
+New code should favor the three-argument form of C<open> over this older
+form. Declaring the mode and the filename as two distinct arguments
+avoids any confusion between the two.
 
-The filehandle behaves normally for the parent, but I/O to that
-filehandle is piped from/to the STDOUT/STDIN of the child process.
-In the child process, the filehandle isn't opened--I/O happens from/to
-the new STDOUT/STDIN.  Typically this is used like the normal
-piped open when you want to exercise more control over just how the
-pipe command gets executed, such as when running setuid and
-you don't want to have to scan shell commands for metacharacters.
+=item Calling C<open> with one argument via global variables
 
-The following blocks are more or less equivalent:
+As a shortcut, a one-argument call takes the filename from the global
+scalar variable of the same name as the filehandle:
 
-    open(my $fh, "|tr '[a-z]' '[A-Z]'");
-    open(my $fh, "|-", "tr '[a-z]' '[A-Z]'");
-    open(my $fh, "|-") || exec 'tr', '[a-z]', '[A-Z]';
-    open(my $fh, "|-", "tr", '[a-z]', '[A-Z]');
+    $ARTICLE = 100;
+    open(ARTICLE)
+        or die "Can't find article $ARTICLE: $!\n";
 
-    open(my $fh, "cat -n '$file'|");
-    open(my $fh, "-|", "cat -n '$file'");
-    open(my $fh, "-|") || exec "cat", "-n", $file;
-    open(my $fh, "-|", "cat", "-n", $file);
+Here C<$ARTICLE> must be a global (package) scalar variable - not one
+declared with L<C<my>|/my VARLIST> or L<C<state>|/state VARLIST>.
 
-The last two examples in each block show the pipe as "list form", which is
-not yet supported on all platforms.  A good rule of thumb is that if
-your platform has a real L<C<fork>|/fork> (in other words, if your platform is
-Unix, including Linux and MacOS X), you can use the list form.  You would
-want to use the list form of the pipe so you can pass literal arguments
-to the command without risk of the shell interpreting any shell metacharacters
-in them.  However, this also bars you from opening pipes to commands
-that intentionally contain shell metacharacters, such as:
+=item Assigning a filehandle to a bareword
 
-    open(my $fh, "|cat -n | expand -4 | lpr")
-       || die "Can't open pipeline to lpr: $!";
+An older style is to use a bareword as the filehandle, as
 
-See L<perlipc/"Safe Pipe Opens"> for more examples of this.
+    open(FH, "<", "input.txt")
+       or die "Can't open < input.txt: $!";
+
+Then you can use C<FH> as the filehandle, in C<< close FH >> and C<<
+<FH> >> and so on.  Note that it's a global variable, so this form is
+not recommended when dealing with filehandles other than Perl's built-in ones (e.g. STDOUT and STDIN).
+
+=back
+
+=item Other considerations
+
+=over
+
+=item Automatic filehandle closure
+
+The filehandle will be closed when its reference count reaches zero. If
+it is a lexically scoped variable declared with L<C<my>|/my VARLIST>,
+that usually means the end of the enclosing scope.  However, this
+automatic close does not check for errors, so it is better to explicitly
+close filehandles, especially those used for writing:
+
+    close($handle)
+       || warn "close failed: $!";
+
+=item Automatic pipe flushing
 
 Perl will attempt to flush all files opened for
 output before any operation that may do a fork, but this may not be
@@ -4795,30 +4888,42 @@ Closing any piped filehandle causes the parent process to wait for the
 child to finish, then returns the status value in L<C<$?>|perlvar/$?> and
 L<C<${^CHILD_ERROR_NATIVE}>|perlvar/${^CHILD_ERROR_NATIVE}>.
 
+=item Direct versus by-reference assignment of filehandles
+
+If FILEHANDLE -- the first argument in a call to C<open> -- is an
+undefined scalar variable (or array or hash element), a new filehandle
+is autovivified, meaning that the variable is assigned a reference to a
+newly allocated anonymous filehandle.  Otherwise if FILEHANDLE is an
+expression, its value is the real filehandle.  (This is considered a
+symbolic reference, so C<use strict "refs"> should I<not> be in effect.)
+
+=item Whitespace and special characters in the filename argument
+
 The filename passed to the one- and two-argument forms of
-L<C<open>|/open FILEHANDLE,EXPR> will
+L<C<open>|/open FILEHANDLE,MODE,EXPR> will
 have leading and trailing whitespace deleted and normal
 redirection characters honored.  This property, known as "magic open",
 can often be used to good effect.  A user could specify a filename of
 F<"rsh cat file |">, or you could change certain filenames as needed:
 
     $filename =~ s/(.*\.gz)\s*$/gzip -dc < $1|/;
-    open(my $fh, $filename) or die "Can't open $filename: $!";
+    open(my $fh, $filename)
+        or die "Can't open $filename: $!";
 
 Use the three-argument form to open a file with arbitrary weird characters in it,
 
     open(my $fh, "<", $file)
-       || die "Can't open $file: $!";
+       || die "Can't open $file: $!";
 
 otherwise it's necessary to protect any leading and trailing whitespace:
 
     $file =~ s#^(\s)#./$1#;
     open(my $fh, "< $file\0")
-       || die "Can't open $file: $!";
+       || die "Can't open $file: $!";
 
 (this may not work on some bizarre filesystems).  One should
 conscientiously choose between the I<magic> and I<three-argument> form
-of L<C<open>|/open FILEHANDLE,EXPR>:
+of L<C<open>|/open FILEHANDLE,MODE,EXPR>:
 
     open(my $in, $ARGV[0]) || die "Can't open $ARGV[0]: $!";
 
@@ -4826,16 +4931,18 @@ will allow the user to specify an argument of the form C<"rsh cat file |">,
 but will not work on a filename that happens to have a trailing space, while
 
     open(my $in, "<", $ARGV[0])
-       || die "Can't open $ARGV[0]: $!";
+       || die "Can't open $ARGV[0]: $!";
 
 will have exactly the opposite restrictions. (However, some shells
 support the syntax C<< perl your_program.pl <( rsh cat file ) >>, which
 produces a filename that can be opened normally.)
 
+=item Invoking C-style C<open>
+
 If you want a "real" C L<open(2)>, then you should use the
 L<C<sysopen>|/sysopen FILEHANDLE,FILENAME,MODE> function, which involves
 no such magic (but uses different filemodes than Perl
-L<C<open>|/open FILEHANDLE,EXPR>, which corresponds to C L<fopen(3)>).
+L<C<open>|/open FILEHANDLE,MODE,EXPR>, which corresponds to C L<fopen(3)>).
 This is another way to protect your filenames from interpretation.  For
 example:
 
@@ -4850,7 +4957,14 @@ example:
 See L<C<seek>|/seek FILEHANDLE,POSITION,WHENCE> for some details about
 mixing reading and writing.
 
-Portability issues: L<perlport/open>.
+=item Portability issues
+
+See L<perlport/open>.
+
+=back
+
+=back
+
 
 =item opendir DIRHANDLE,EXPR
 X<opendir>
@@ -6137,14 +6251,15 @@ results in the string being padded to the required size with C<"\0">
 bytes before the result of the read is appended.
 
 The call is implemented in terms of either Perl's or your system's native
-L<fread(3)> library function.  To get a true L<read(2)> system call, see
+L<fread(3)> library function, via the L<PerlIO> layers applied to the
+handle.  To get a true L<read(2)> system call, see
 L<sysread|/sysread FILEHANDLE,SCALAR,LENGTH,OFFSET>.
 
 Note the I<characters>: depending on the status of the filehandle,
 either (8-bit) bytes or characters are read.  By default, all
 filehandles operate on bytes, but for example if the filehandle has
 been opened with the C<:utf8> I/O layer (see
-L<C<open>|/open FILEHANDLE,EXPR>, and the L<open>
+L<C<open>|/open FILEHANDLE,MODE,EXPR>, and the L<open>
 pragma), the I/O will operate on UTF8-encoded Unicode
 characters, not bytes.  Similarly for the C<:encoding> layer:
 in that case pretty much any characters can be read.
@@ -8636,6 +8751,15 @@ parameters FILENAME, MODE, and PERMS.
 
 Returns true on success and L<C<undef>|/undef EXPR> otherwise.
 
+L<PerlIO> layers will be applied to the handle the same way they would in an
+L<C<open>|/open FILEHANDLE,MODE,EXPR> call that does not specify layers. That is,
+the current value of L<C<${^OPEN}>|perlvar/${^OPEN}> as set by the L<open>
+pragma in a lexical scope, or the C<-C> commandline option or C<PERL_UNICODE>
+environment variable in the main program scope, falling back to the platform
+defaults as described in L<PerlIO/Defaults and how to override them>. If you
+want to remove any layers that may transform the byte stream, use
+L<C<binmode>|/binmode FILEHANDLE, LAYER> after opening it.
+
 The possible values and flag bits of the MODE parameter are
 system-dependent; they are available via the standard module
 L<C<Fcntl>|Fcntl>.  See the documentation of your operating system's
@@ -8655,7 +8779,7 @@ OS/390 and on the Macintosh; you probably don't want to
 use them in new code.
 
 If the file named by FILENAME does not exist and the
-L<C<open>|/open FILEHANDLE,EXPR> call creates
+L<C<open>|/open FILEHANDLE,MODE,EXPR> call creates
 it (typically because MODE includes the C<O_CREAT> flag), then the value of
 PERMS specifies the permissions of the newly created file.  If you omit
 the PERMS argument to L<C<sysopen>|/sysopen FILEHANDLE,FILENAME,MODE>,
@@ -8685,6 +8809,13 @@ L<C<sysopen>|/sysopen FILEHANDLE,FILENAME,MODE>, because
 that takes away the user's option to have a more permissive umask.
 Better to omit it.  See L<C<umask>|/umask EXPR> for more on this.
 
+This function has no direct relation to the usage of
+L<C<sysread>|/sysread FILEHANDLE,SCALAR,LENGTH,OFFSET>,
+L<C<syswrite>|/syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET>,
+or L<C<sysseek>|/sysseek FILEHANDLE,POSITION,WHENCE>.  A handle opened with
+this function can be used with buffered IO just as one opened with
+L<C<open>|/open FILEHANDLE,MODE,EXPR> can be used with unbuffered IO.
+
 Note that under Perls older than 5.8.0,
 L<C<sysopen>|/sysopen FILEHANDLE,FILENAME,MODE> depends on the
 L<fdopen(3)> C library function.  On many Unix systems, L<fdopen(3)> is known
@@ -8705,13 +8836,14 @@ X<sysread>
 =for Pod::Functions fixed-length unbuffered input from a filehandle
 
 Attempts to read LENGTH bytes of data into variable SCALAR from the
-specified FILEHANDLE, using L<read(2)>.  It bypasses
-buffered IO, so mixing this with other kinds of reads,
+specified FILEHANDLE, using L<read(2)>.  It bypasses any L<PerlIO> layers
+including buffered IO (but is affected by the presence of the C<:utf8>
+layer as described later), so mixing this with other kinds of reads,
 L<C<print>|/print FILEHANDLE LIST>, L<C<write>|/write FILEHANDLE>,
 L<C<seek>|/seek FILEHANDLE,POSITION,WHENCE>,
 L<C<tell>|/tell FILEHANDLE>, or L<C<eof>|/eof FILEHANDLE> can cause
 confusion because the
-perlio or stdio layers usually buffer data.  Returns the number of
+C<:perlio> or C<:crlf> layers usually buffer data.  Returns the number of
 bytes actually read, C<0> at end of file, or undef if there was an
 error (in the latter case L<C<$!>|perlvar/$!> is also set).  SCALAR will
 be grown or
@@ -8734,7 +8866,7 @@ Note that if the filehandle has been marked as C<:utf8>, C<sysread> will
 throw an exception.  The C<:encoding(...)> layer implicitly
 introduces the C<:utf8> layer.  See
 L<C<binmode>|/binmode FILEHANDLE, LAYER>,
-L<C<open>|/open FILEHANDLE,EXPR>, and the L<open> pragma.
+L<C<open>|/open FILEHANDLE,MODE,EXPR>, and the L<open> pragma.
 
 =item sysseek FILEHANDLE,POSITION,WHENCE
 X<sysseek> X<lseek>
@@ -8875,12 +9007,14 @@ X<syswrite>
 
 Attempts to write LENGTH bytes of data from variable SCALAR to the
 specified FILEHANDLE, using L<write(2)>.  If LENGTH is
-not specified, writes whole SCALAR.  It bypasses buffered IO, so
+not specified, writes whole SCALAR.  It bypasses any L<PerlIO> layers
+including buffered IO (but is affected by the presence of the C<:utf8>
+layer as described later), so
 mixing this with reads (other than C<sysread)>),
 L<C<print>|/print FILEHANDLE LIST>, L<C<write>|/write FILEHANDLE>,
 L<C<seek>|/seek FILEHANDLE,POSITION,WHENCE>,
 L<C<tell>|/tell FILEHANDLE>, or L<C<eof>|/eof FILEHANDLE> may cause
-confusion because the perlio and stdio layers usually buffer data.
+confusion because the C<:perlio> and C<:crlf> layers usually buffer data.
 Returns the number of bytes actually written, or L<C<undef>|/undef EXPR>
 if there was an error (in this case the errno variable
 L<C<$!>|perlvar/$!> is also set).  If the LENGTH is greater than the
@@ -8897,7 +9031,7 @@ The C<:encoding(...)> layer implicitly introduces the C<:utf8> layer.
 Alternately, if the handle is not marked with an encoding but you
 attempt to write characters with code points over 255, raises an exception.
 See L<C<binmode>|/binmode FILEHANDLE, LAYER>,
-L<C<open>|/open FILEHANDLE,EXPR>, and the L<open> pragma.
+L<C<open>|/open FILEHANDLE,MODE,EXPR>, and the L<open> pragma.
 
 =item tell FILEHANDLE
 X<tell>
index 1a2135b..8623e75 100644 (file)
@@ -685,6 +685,7 @@ the strings?).
  Matthew H 5.31.8       2020-Jan-20
  Renee     5.31.9       2020-Feb-20
  Sawyer X  5.31.10      2020-Mar-20
+ Sawyer X  5.31.11      2020-Apr-28
 
 =head2 SELECTED RELEASE SIZES
 
index b83e14a..d92f25e 100644 (file)
@@ -259,19 +259,136 @@ Here's an example of how to copy a binary file:
 
 =head1 Opening Pipes
 
-To be announced.
+Perl also lets you open a filehandle into an external program or shell
+command rather than into a file. You can do this in order to pass data
+from your Perl program to an external command for further processing, or
+to receive data from another program for your own Perl program to
+process.
+
+Filehandles into commands are also known as I<pipes>, since they work on
+similar inter-process communication principles as Unix pipelines. Such a
+filehandle has an active program instead of a static file on its
+external end, but in every other sense it works just like a more typical
+file-based filehandle, with all the techniques discussed earlier in this
+article just as applicable.
+
+As such, you open a pipe using the same C<open> call that you use for
+opening files, setting the second (C<MODE>) argument to special
+characters that indicate either an input or an output pipe. Use C<"-|"> for a
+filehandle that will let your Perl program read data from an external
+program, and C<"|-"> for a filehandle that will send data to that
+program instead.
+
+=head2 Opening a pipe for reading
+
+Let's say you'd like your Perl program to process data stored in a nearby
+directory called C<unsorted>, which contains a number of textfiles.
+You'd also like your program to sort all the contents from these files
+into a single, alphabetically sorted list of unique lines before it
+starts processing them.
+
+You could do this through opening an ordinary filehandle into each of
+those files, gradually building up an in-memory array of all the file
+contents you load this way, and finally sorting and filtering that array
+when you've run out of files to load. I<Or>, you could offload all that
+merging and sorting into your operating system's own C<sort> command by
+opening a pipe directly into its output, and get to work that much
+faster.
+
+Here's how that might look:
+
+    open(my $sort_fh, '-|', 'sort -u unsorted/*.txt')
+        or die "Couldn't open a pipe into sort: $!";
+
+    # And right away, we can start reading sorted lines:
+    while (my $line = <$sort_fh>) {
+        #
+        # ... Do something interesting with each $line here ...
+        #
+    }
+
+The second argument to C<open>, C<"-|">, makes it a read-pipe into a
+separate program, rather than an ordinary filehandle into a file.
+
+Note that the third argument to C<open> is a string containing the
+program name (C<sort>) plus all its arguments: in this case, C<-u> to
+specify unqiue sort, and then a fileglob specifying the files to sort.
+The resulting filehandle C<$sort_fh> works just like a read-only (C<<
+"<" >>) filehandle, and your program can subsequently read data
+from it as if it were opened onto an ordinary, single file.
+
+=head2 Opening a pipe for writing
 
-=head1 Low-level File Opens via sysopen
+Continuing the previous example, let's say that your program has
+completed its processing, and the results sit in an array called
+C<@processed>. You want to print these lines to a file called
+C<numbered.txt> with a neatly formatted column of line-numbers.
+
+Certainly you could write your own code to do this â€” or, once again,
+you could kick that work over to another program. In this case, C<cat>,
+running with its own C<-n> option to activate line numbering, should do
+the trick:
+
+    open(my $cat_fh, '|-', 'cat -n > numbered.txt')
+        or die "Couldn't open a pipe into cat: $!";
+
+    for my $line (@processed) {
+        print $cat_fh $line;
+    }
 
-To be announced.  Or deleted.
+Here, we use a second C<open> argument of C<"|-">, signifying that the
+filehandle assigned to C<$cat_fh> should be a write-pipe. We can then
+use it just as we would a write-only ordinary filehandle, including the
+basic function of C<print>-ing data to it.
+
+Note that the third argument, specifying the command that we wish to
+pipe to, sets up C<cat> to redirect its output via that C<< ">" >>
+symbol into the file C<numbered.txt>. This can start to look a little
+tricky, because that same symbol would have meant something
+entirely different had it showed it in the second argument to C<open>!
+But here in the third argument, it's simply part of the shell command that
+Perl will open the pipe into, and Perl itself doesn't invest any special
+meaning to it.
+
+=head2 Expressing the command as a list
+
+For opening pipes, Perl offers the option to call C<open> with a list
+comprising the desired command and all its own arguments as separate
+elements, rather than combining them into a single string as in the
+examples above. For instance, we could have phrased the C<open> call in
+the first example like this:
+
+    open(my $sort_fh, '-|', 'sort', '-u', glob('unsorted/*.txt'))
+        or die "Couldn't open a pipe into sort: $!";
+
+When you call C<open> this way, Perl invokes the given command directly,
+bypassing the shell. As such, the shell won't try to interpret any
+special characters within the command's argument list, which might
+overwise have unwanted effects. This can make for safer, less
+error-prone C<open> calls, useful in cases such as passing in variables
+as arguments, or even just referring to filenames with spaces in them.
+
+However, when you I<do> want to pass a meaningful metacharacter to the
+shell, such with the C<"*"> inside that final C<unsorted/*.txt> argument
+here, you can't use this alternate syntax. In this case, we have worked
+around it via Perl's handy C<glob> built-in function, which evaluates
+its argument into a list of filenames â€” and we can safely pass that
+resulting list right into C<open>, as shown above.
+
+Note also that representing piped-command arguments in list form like
+this doesn't work on every platform. It will work on any Unix-based OS
+that provides a real C<fork> function (e.g. macOS or Linux), as well as
+on Windows when running Perl 5.22 or later.
 
 =head1 SEE ALSO
 
-To be announced.
+The full documentation for L<C<open>|perlfunc/open FILEHANDLE,MODE,EXPR>
+provides a thorough reference to this function, beyond the best-practice
+basics covered here.
 
 =head1 AUTHOR and COPYRIGHT
 
-Copyright 2013 Tom Christiansen.
+Copyright 2013 Tom Christiansen; now maintained by Perl5 Porters
 
 This documentation is free; you can redistribute it and/or modify it under
 the same terms as Perl itself.
index 4b6224e..1715eaf 100644 (file)
@@ -364,15 +364,15 @@ filenames.
 
 Don't assume C<< > >> won't be the first character of a filename.
 Always use the three-arg version of
-L<C<open>|perlfunc/open FILEHANDLE,EXPR>:
+L<C<open>|perlfunc/open FILEHANDLE,MODE,EXPR>:
 
     open my $fh, '<', $existing_file) or die $!;
 
-Two-arg L<C<open>|perlfunc/open FILEHANDLE,EXPR> is magic and can
+Two-arg L<C<open>|perlfunc/open FILEHANDLE,MODE,EXPR> is magic and can
 translate characters like C<< > >>, C<< < >>, and C<|> in filenames,
 which is usually the wrong thing to do.
 L<C<sysopen>|perlfunc/sysopen FILEHANDLE,FILENAME,MODE> and three-arg
-L<C<open>|perlfunc/open FILEHANDLE,EXPR> don't have this problem.
+L<C<open>|perlfunc/open FILEHANDLE,MODE,EXPR> don't have this problem.
 
 Don't use C<:> as a part of a filename since many systems use that for
 their own semantics (Mac OS Classic for separating pathname components,
@@ -413,7 +413,7 @@ L<C<close>|perlfunc/close FILEHANDLE> files when you are done with them.
 Don't L<C<unlink>|perlfunc/unlink LIST> or
 L<C<rename>|perlfunc/rename OLDNAME,NEWNAME> an open file.  Don't
 L<C<tie>|perlfunc/tie VARIABLE,CLASSNAME,LIST> or
-L<C<open>|perlfunc/open FILEHANDLE,EXPR> a file already tied or opened;
+L<C<open>|perlfunc/open FILEHANDLE,MODE,EXPR> a file already tied or opened;
 L<C<untie>|perlfunc/untie VARIABLE> or
 L<C<close>|perlfunc/close FILEHANDLE> it first.
 
@@ -561,7 +561,7 @@ portable.  That means, no L<C<system>|perlfunc/system LIST>,
 L<C<exec>|perlfunc/exec LIST>, L<C<fork>|perlfunc/fork>,
 L<C<pipe>|perlfunc/pipe READHANDLE,WRITEHANDLE>,
 L<C<``> or C<qxE<sol>E<sol>>|perlop/C<qxE<sol>I<STRING>E<sol>>>,
-L<C<open>|perlfunc/open FILEHANDLE,EXPR> with a C<|>, nor any of the other
+L<C<open>|perlfunc/open FILEHANDLE,MODE,EXPR> with a C<|>, nor any of the other
 things that makes being a Perl hacker worth being.
 
 Commands that launch external processes are generally supported on
@@ -917,7 +917,7 @@ The DOS FAT filesystem can accommodate only "8.3" style filenames.  Under
 the "case-insensitive, but case-preserving" HPFS (OS/2) and NTFS (NT)
 filesystems you may have to be careful about case returned with functions
 like L<C<readdir>|perlfunc/readdir DIRHANDLE> or used with functions like
-L<C<open>|perlfunc/open FILEHANDLE,EXPR> or
+L<C<open>|perlfunc/open FILEHANDLE,MODE,EXPR> or
 L<C<opendir>|perlfunc/opendir DIRHANDLE,EXPR>.
 
 DOS also treats several filenames as special, such as F<AUX>, F<PRN>,
@@ -1378,7 +1378,7 @@ expand system variables in filenames if enclosed in angle brackets, so
 C<< <System$Dir>.Modules >> would look for the file
 S<C<$ENV{'System$Dir'} . 'Modules'>>.  The obvious implication of this is
 that B<fully qualified filenames can start with C<< <> >>> and the
-three-argument form of L<C<open>|perlfunc/open FILEHANDLE,EXPR> should
+three-argument form of L<C<open>|perlfunc/open FILEHANDLE,MODE,EXPR> should
 always be used.
 
 Because C<.> was in use as a directory separator and filenames could not
index 72e23d0..c3ca31e 100644 (file)
@@ -939,7 +939,7 @@ prints
 Even if there are no groupings in a regexp, it is still possible to
 find out what exactly matched in a string.  If you use them, Perl
 will set C<$`> to the part of the string before the match, will set C<$&>
-to the part of the string that matched, and will set C<'$'> to the part
+to the part of the string that matched, and will set C<$'> to the part
 of the string after the match.  An example:
 
     $x = "the cat caught the mouse";
@@ -951,7 +951,7 @@ first character position in the string and stopped; it never saw the
 second "the".
 
 If your code is to run on Perl versions earlier than
-5.20, it is worthwhile to note that using C<$`> and C<'$'>
+5.20, it is worthwhile to note that using C<$`> and C<$'>
 slows down regexp matching quite a bit, while C<$&> slows it down to a
 lesser extent, because if they are used in one regexp in a program,
 they are generated for I<all> regexps in the program.  So if raw
@@ -968,7 +968,7 @@ variables may be used.  These are only set if the C</p> modifier is
 present.  Consequently they do not penalize the rest of the program.  In
 Perl 5.20, C<${^PREMATCH}>, C<${^MATCH}> and C<${^POSTMATCH}> are available
 whether the C</p> has been used or not (the modifier is ignored), and
-C<$`>, C<'$'> and C<$&> do not cause any speed difference.
+C<$`>, C<$'> and C<$&> do not cause any speed difference.
 
 =head2 Non-capturing groupings
 
index cbb16ab..89a7aa8 100644 (file)
@@ -313,7 +313,8 @@ The C<io> options mean that any subsequent open() (or similar I/O
 operations) in main program scope will have the C<:utf8> PerlIO layer
 implicitly applied to them, in other words, UTF-8 is expected from any
 input stream, and UTF-8 is produced to any output stream.  This is just
-the default, with explicit layers in open() and with binmode() one can
+the default set via L<C<${^OPEN}>|perlvar/${^OPEN}>,
+with explicit layers in open() and with binmode() one can
 manipulate streams as usual.  This has no effect on code run in modules.
 
 B<-C> on its own (not followed by any number or option list), or the
index 2b7a683..0d2da09 100644 (file)
@@ -1892,10 +1892,6 @@ It has the same scoping as the C<$^H> and C<%^H> variables.  The exact
 values are considered internal to the L<warnings> pragma and may change
 between versions of Perl.
 
-Each time a statement completes being compiled, the current value of
-C<${^WARNING_BITS}> is stored with that statement, and can later be
-retrieved via C<(caller($level))[9]>.
-
 This variable was added in Perl v5.6.0.
 
 =item $OS_ERROR
@@ -2188,10 +2184,6 @@ This variable contains compile-time hints for the Perl interpreter.  At the
 end of compilation of a BLOCK the value of this variable is restored to the
 value when the interpreter started to compile the BLOCK.
 
-Each time a statement completes being compiled, the current value of
-C<$^H> is stored with that statement, and can later be retrieved via
-C<(caller($level))[8]>.
-
 When perl begins to parse any block construct that provides a lexical scope
 (e.g., eval body, required file, subroutine body, loop body, or conditional
 block), the existing value of C<$^H> is saved, but its value is left unchanged.
@@ -2240,10 +2232,6 @@ L<perlpragma>.   All the entries are stringified when accessed at
 runtime, so only simple values can be accommodated.  This means no
 pointers to objects, for example.
 
-Each time a statement completes being compiled, the current value of
-C<%^H> is stored with that statement, and can later be retrieved via
-C<(caller($level))[10]>.
-
 When putting items into C<%^H>, in order to avoid conflicting with other
 users of the hash there is a convention regarding which keys to use.
 A module should use only keys that begin with the module's name (the
@@ -2255,10 +2243,30 @@ This variable was added in Perl v5.6.0.
 =item ${^OPEN}
 X<${^OPEN}>
 
-An internal variable used by PerlIO.  A string in two parts, separated
+An internal variable used by L<PerlIO>.  A string in two parts, separated
 by a C<\0> byte, the first part describes the input layers, the second
 part describes the output layers.
 
+This is the mechanism that applies the lexical effects of the L<open>
+pragma, and the main program scope effects of the C<io> or C<D> options
+for the L<-C command-line switch|perlrun/-C [I<numberE<sol>list>]> and
+L<PERL_UNICODE environment variable|perlrun/PERL_UNICODE>.
+
+The functions C<accept()>, C<open()>, C<pipe()>, C<readpipe()> (as well
+as the related C<qx> and C<`STRING`> operators), C<socket()>,
+C<socketpair()>, and C<sysopen()> are affected by the lexical value of
+this variable.  The implicit L</ARGV> handle opened by C<readline()> (or
+the related C<< <> >> and C<<< <<>> >>> operators) on passed filenames is
+also affected (but not if it opens C<STDIN>).  If this variable is not
+set, these functions will set the default layers as described in
+L<PerlIO/Defaults and how to override them>.
+
+C<open()> ignores this variable (and the default layers) when called with
+3 arguments and explicit layers are specified.  Indirect calls to these
+functions via modules like L<IO::Handle> are not affected as they occur
+in a different lexical scope.  Directory handles such as opened by
+C<opendir()> are not currently affected.
+
 This variable was added in Perl v5.8.0.
 
 =item $PERLDB
diff --git a/pp.c b/pp.c
index 0da2e3e..999275f 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -6432,11 +6432,11 @@ PP(unimplemented_op)
        Secondly, as the three ops we "panic" on are padmy, mapstart and custom,
        if we get here for a custom op then that means that the custom op didn't
        have an implementation. Given that OP_NAME() looks up the custom op
-       by its pp_addr, likely it will return NULL, unless someone (unhelpfully)
-       registers &PL_unimplemented_op as the address of their custom op.
+       by its op_ppaddr, likely it will return NULL, unless someone (unhelpfully)
+       registers &Perl_unimplemented_op as the address of their custom op.
        NULL doesn't generate a useful error message. "custom" does. */
     const char *const name = op_type >= OP_max
-       ? "[out of range]" : PL_op_name[PL_op->op_type];
+       ? "[out of range]" : PL_op_name[op_type];
     if(OP_IS_SOCKET(op_type))
        DIE(aTHX_ PL_no_sock_func, name);
     DIE(aTHX_ "panic: unimplemented op %s (#%d) called", name, op_type);
diff --git a/proto.h b/proto.h
index 17a6f6e..6d6cccf 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -5871,7 +5871,7 @@ STATIC regnode_offset     S_regnode_guts(pTHX_ RExC_state_t *pRExC_state, const U8 o
 STATIC regnode_offset  S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth);
 #define PERL_ARGS_ASSERT_REGPIECE      \
        assert(pRExC_state); assert(flagp)
-STATIC regnode_offset  S_regpnode(pTHX_ RExC_state_t *pRExC_state, U8 op, void * arg);
+STATIC regnode_offset  S_regpnode(pTHX_ RExC_state_t *pRExC_state, U8 op, SV * arg);
 #define PERL_ARGS_ASSERT_REGPNODE      \
        assert(pRExC_state); assert(arg)
 STATIC bool    S_regtail(pTHX_ RExC_state_t * pRExC_state, const regnode_offset p, const regnode_offset val, const U32 depth)
index bc89365..6582a19 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -163,6 +163,7 @@ typedef struct scan_frame {
     regnode *next_regnode;      /* next node to process when last is reached */
     U32 prev_recursed_depth;
     I32 stopparen;              /* what stopparen do we use */
+    bool in_gosub;              /* this or an outer frame is for GOSUB */
 
     struct scan_frame *this_prev_frame; /* this previous frame */
     struct scan_frame *prev_frame;      /* previous frame */
@@ -1497,15 +1498,15 @@ S_scan_commit(pTHX_ const RExC_state_t *pRExC_state, scan_data_t *data,
                        ? OPTIMIZE_INFTY
                        : (l
                           ? data->last_start_max
+                          /* temporary underflow guard for 5.32 */
+                          : data->pos_delta < 0 ? OPTIMIZE_INFTY
                           : (data->pos_delta > OPTIMIZE_INFTY - data->pos_min
                                         ? OPTIMIZE_INFTY
                                         : data->pos_min + data->pos_delta));
         }
 
-        if (data->flags & SF_BEFORE_EOL)
-            data->substrs[i].flags |= (data->flags & SF_BEFORE_EOL);
-        else
-            data->substrs[i].flags &= ~SF_BEFORE_EOL;
+        data->substrs[i].flags &= ~SF_BEFORE_EOL;
+        data->substrs[i].flags |= data->flags & SF_BEFORE_EOL;
         data->substrs[i].minlenp = minlenp;
         data->substrs[i].lookbehind = 0;
     }
@@ -4442,7 +4443,7 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan,
                 s++;
             }
         }
-       else {
+       else if (OP(scan) != EXACTFAA_NO_TRIE) {
 
             /* Non-UTF-8 pattern, not EXACTFAA node.  Look for the multi-char
              * folds that are all Latin1.  As explained in the comments
@@ -4608,6 +4609,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                                    node length to get a real minimum (because
                                    the folded version may be shorter) */
        bool unfolded_multi_char = FALSE;
+        bool mutate_ok = (frame && frame->in_gosub) ? 0 : 1;
        /* Peephole optimizer: */
         DEBUG_STUDYDATA("Peep", data, depth, is_inf);
         DEBUG_PEEP("Peep", scan, depth, flags);
@@ -4618,10 +4620,14 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
          * parsing code, as each (?:..) is handled by a different invocation of
          * reg() -- Yves
          */
-        if (PL_regkind[OP(scan)] == EXACT && OP(scan) != LEXACT
-                                          && OP(scan) != LEXACT_REQ8)
+        if (PL_regkind[OP(scan)] == EXACT
+            && OP(scan) != LEXACT
+            && OP(scan) != LEXACT_REQ8
+            && mutate_ok
+        ) {
             join_exact(pRExC_state, scan, &min_subtract, &unfolded_multi_char,
                     0, NULL, depth + 1);
+        }
 
         /* Follow the next-chain of the current node and optimize
            away all the NOTHINGs from it.  */
@@ -4806,9 +4812,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                    }
                }
 
-                if (PERL_ENABLE_TRIE_OPTIMISATION &&
-                        OP( startbranch ) == BRANCH )
-                {
+                if (PERL_ENABLE_TRIE_OPTIMISATION
+                    && OP(startbranch) == BRANCH
+                    && mutate_ok
+                ) {
                /* demq.
 
                    Assuming this was/is a branch we are dealing with: 'scan'
@@ -5261,6 +5268,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                 newframe->stopparen = stopparen;
                 newframe->prev_recursed_depth = recursed_depth;
                 newframe->this_prev_frame= frame;
+                newframe->in_gosub = (
+                    (frame && frame->in_gosub) || OP(scan) == GOSUB
+                );
 
                 DEBUG_STUDYDATA("frame-new", data, depth, is_inf);
                 DEBUG_PEEP("fnew", scan, depth, flags);
@@ -5298,8 +5308,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                   offset, later match for variable offset.  */
                if (data->last_end == -1) { /* Update the start info. */
                    data->last_start_min = data->pos_min;
-                   data->last_start_max = is_inf
-                        ? OPTIMIZE_INFTY : data->pos_min + data->pos_delta;
+                    data->last_start_max =
+                        is_inf ? OPTIMIZE_INFTY
+                        : (data->pos_delta > OPTIMIZE_INFTY - data->pos_min)
+                            ? OPTIMIZE_INFTY : data->pos_min + data->pos_delta;
                }
                sv_catpvn(data->last_found, STRING(scan), bytelen);
                if (UTF)
@@ -5345,8 +5357,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                 &&   isALPHA_A(*s)
                 &&  (         OP(scan) == EXACTFAA
                      || (     OP(scan) == EXACTFU
-                         && ! HAS_NONLATIN1_SIMPLE_FOLD_CLOSURE(*s))))
-            {
+                         && ! HAS_NONLATIN1_SIMPLE_FOLD_CLOSURE(*s)))
+                &&   mutate_ok
+            ) {
                 U8 mask = ~ ('A' ^ 'a'); /* These differ in just one bit */
 
                 OP(scan) = ANYOFM;
@@ -5439,7 +5452,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
 
                 /* This temporary node can now be turned into EXACTFU, and
                  * must, as regexec.c doesn't handle it */
-                if (OP(next) == EXACTFU_S_EDGE) {
+                if (OP(next) == EXACTFU_S_EDGE && mutate_ok) {
                     OP(next) = EXACTFU;
                 }
 
@@ -5447,8 +5460,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                     &&   isALPHA_A(* STRING(next))
                     && (         OP(next) == EXACTFAA
                         || (     OP(next) == EXACTFU
-                            && ! HAS_NONLATIN1_SIMPLE_FOLD_CLOSURE(* STRING(next)))))
-                {
+                            && ! HAS_NONLATIN1_SIMPLE_FOLD_CLOSURE(* STRING(next))))
+                    &&   mutate_ok
+                ) {
                     /* These differ in just one bit */
                     U8 mask = ~ ('A' ^ 'a');
 
@@ -5595,7 +5609,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                if (  OP(oscan) == CURLYX && data
                      && data->flags & SF_IN_PAR
                      && !(data->flags & SF_HAS_EVAL)
-                     && !deltanext && minnext == 1 ) {
+                     && !deltanext && minnext == 1
+                      && mutate_ok
+                ) {
                    /* Try to optimize to CURLYN.  */
                    regnode *nxt = NEXTOPER(oscan) + EXTRA_STEP_2ARGS;
                    regnode * const nxt1 = nxt;
@@ -5645,10 +5661,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                      && !(data->flags & SF_HAS_EVAL)
                      && !deltanext     /* atom is fixed width */
                      && minnext != 0   /* CURLYM can't handle zero width */
-
                          /* Nor characters whose fold at run-time may be
                           * multi-character */
                       && ! (RExC_seen & REG_UNFOLDED_MULTI_SEEN)
+                      && mutate_ok
                ) {
                    /* XXXX How to optimize if data == 0? */
                    /* Optimize to a simpler form.  */
@@ -5966,7 +5982,10 @@ Perl_re_printf( aTHX_  "LHS=%" UVuf " RHS=%" UVuf "\n",
                                                           (regnode_charclass *) scan);
                    break;
 
-                case NANYOFM:
+                case NANYOFM: /* NANYOFM already contains the inversion of the
+                                 input ANYOF data, so, unlike things like
+                                 NPOSIXA, don't change 'invert' to TRUE */
+                    /* FALLTHROUGH */
                 case ANYOFM:
                   {
                     SV* cp_list = get_ANYOFM_contents(scan);
@@ -6926,7 +6945,7 @@ S_concat_pat(pTHX_ RExC_state_t * const pRExC_state,
                 pRExC_state->code_blocks->count -= n;
             n = 0;
         }
-        else  {
+        else {
             /* ... or failing that, try "" overload */
             while (SvAMAGIC(msv)
                     && (sv = AMG_CALLunary(msv, string_amg))
@@ -11472,6 +11491,10 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
            bool is_logical = 0;
            const char * const seqstart = RExC_parse;
             const char * endptr;
+            const char non_existent_group_msg[]
+                                            = "Reference to nonexistent group";
+            const char impossible_group[] = "Invalid reference to group";
+
             if (has_intervening_patws) {
                 RExC_parse++;
                 vFAIL("In '(?...)', the '(' and '?' must be adjacent");
@@ -11698,10 +11721,17 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
                     ) {
                         num = (I32)unum;
                         RExC_parse = (char*)endptr;
-                    } else
-                        num = I32_MAX;
+                    }
+                    else {  /* Overflow, or something like that.  Position
+                               beyond all digits for the message */
+                        while (RExC_parse < RExC_end && isDIGIT(*RExC_parse))  {
+                            RExC_parse++;
+                        }
+                        vFAIL(impossible_group);
+                    }
                     if (is_neg) {
-                        /* Some limit for num? */
+                        /* -num is always representable on 1 and 2's complement
+                         * machines */
                         num = -num;
                     }
                 }
@@ -11709,45 +11739,43 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
                    vFAIL("Expecting close bracket");
 
               gen_recurse_regop:
-                if ( paren == '-' ) {
+                if (paren == '-' || paren == '+') {
+
+                    /* Don't overflow */
+                    if (UNLIKELY(I32_MAX - RExC_npar < num)) {
+                        RExC_parse++;
+                        vFAIL(impossible_group);
+                    }
+
                     /*
                     Diagram of capture buffer numbering.
                     Top line is the normal capture buffer numbers
                     Bottom line is the negative indexing as from
                     the X (the (?-2))
 
-                    +   1 2    3 4 5 X          6 7
+                        1 2    3 4 5 X   Y      6 7
+                       /(a(x)y)(a(b(c(?+2)d)e)f)(g(h))/
                        /(a(x)y)(a(b(c(?-2)d)e)f)(g(h))/
-                    -   5 4    3 2 1 X          x x
+                    -   5 4    3 2 1 X   Y      x x
 
+                    Resolve to absolute group.  Recall that RExC_npar is +1 of
+                    the actual parenthesis group number.  For lookahead, we
+                    have to compensate for that.  Using the above example, when
+                    we get to Y in the parse, num is 2 and RExC_npar is 6.  We
+                    want 7 for +2, and 4 for -2.
                     */
-                    num = RExC_npar + num;
-                    if (num < 1)  {
+                    if ( paren == '+' ) {
+                        num--;
+                    }
 
-                        /* It might be a forward reference; we can't fail until
-                         * we know, by completing the parse to get all the
-                         * groups, and then reparsing */
-                        if (ALL_PARENS_COUNTED)  {
-                            RExC_parse++;
-                            vFAIL("Reference to nonexistent group");
-                        }
-                        else {
-                            REQUIRE_PARENS_PASS;
-                        }
+                    num += RExC_npar;
+
+                    if (paren == '-' && num < 1) {
+                        RExC_parse++;
+                        vFAIL(non_existent_group_msg);
                     }
-                } else if ( paren == '+' ) {
-                    num = RExC_npar + num - 1;
                 }
-                /* We keep track how many GOSUB items we have produced.
-                   To start off the ARG2L() of the GOSUB holds its "id",
-                   which is used later in conjunction with RExC_recurse
-                   to calculate the offset we need to jump for the GOSUB,
-                   which it will store in the final representation.
-                   We have to defer the actual calculation until much later
-                   as the regop may move.
-                 */
 
-                ret = reg2Lanode(pRExC_state, GOSUB, num, RExC_recurse_count);
                 if (num >= RExC_npar) {
 
                     /* It might be a forward reference; we can't fail until we
@@ -11756,13 +11784,23 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
                     if (ALL_PARENS_COUNTED)  {
                         if (num >= RExC_total_parens) {
                             RExC_parse++;
-                            vFAIL("Reference to nonexistent group");
+                            vFAIL(non_existent_group_msg);
                         }
                     }
                     else {
                         REQUIRE_PARENS_PASS;
                     }
                 }
+
+                /* We keep track how many GOSUB items we have produced.
+                   To start off the ARG2L() of the GOSUB holds its "id",
+                   which is used later in conjunction with RExC_recurse
+                   to calculate the offset we need to jump for the GOSUB,
+                   which it will store in the final representation.
+                   We have to defer the actual calculation until much later
+                   as the regop may move.
+                 */
+                ret = reg2Lanode(pRExC_state, GOSUB, num, RExC_recurse_count);
                 RExC_recurse_count++;
                 DEBUG_OPTIMISE_MORE_r(Perl_re_printf( aTHX_
                     "%*s%*s Recurse #%" UVuf " to %" IVdf "\n",
@@ -16827,7 +16865,7 @@ redo_curchar:
     if (RExC_sets_depth) {  /* If within a recursive call, return in a special
                                regnode */
         RExC_parse++;
-        node = regpnode(pRExC_state, REGEX_SET, (void *) final);
+        node = regpnode(pRExC_state, REGEX_SET, final);
     }
     else {
 
@@ -20435,10 +20473,10 @@ S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg)
 }
 
 /*
-- regpnode - emit a temporary node with a void* argument
+- regpnode - emit a temporary node with a SV* argument
 */
 STATIC regnode_offset /* Location. */
-S_regpnode(pTHX_ RExC_state_t *pRExC_state, U8 op, void * arg)
+S_regpnode(pTHX_ RExC_state_t *pRExC_state, U8 op, SV * arg)
 {
     const regnode_offset ret = regnode_guts(pRExC_state, op, regarglen[op], "regpnode");
     regnode_offset ptr = ret;
@@ -23476,7 +23514,7 @@ S_handle_user_defined_property(pTHX_
 #    define CUR_CONTEXT      aTHX
 #    define ORIGINAL_CONTEXT save_aTHX
 #  else
-#    define DECLARATION_FOR_GLOBAL_CONTEXT
+#    define DECLARATION_FOR_GLOBAL_CONTEXT    dNOOP
 #    define SWITCH_TO_GLOBAL_CONTEXT          NOOP
 #    define RESTORE_CONTEXT                   NOOP
 #    define CUR_CONTEXT                       NULL
index 2eb4a4f..312c905 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -151,14 +151,13 @@ struct regnode_1 {
     U32 arg1;
 };
 
-/* Node whose argument is 'void *', a pointer to void.  This needs to be used
- * very carefully in situations where pointers won't become invalid because of,
- * say re-mallocs */
+/* Node whose argument is 'SV *'.  This needs to be used very carefully in
+ * situations where pointers won't become invalid because of, say re-mallocs */
 struct regnode_p {
     U8 flags;
     U8  type;
     U16 next_off;
-    void * arg1;
+    SV * arg1;
 };
 
 /* Similar to a regnode_1 but with an extra signed argument */
@@ -1163,10 +1162,10 @@ re.pm, especially to the documentation.
     
 #else /* if not DEBUGGING */
 
-#define DECLARE_AND_GET_RE_DEBUG_FLAGS
-#define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2)
+#define DECLARE_AND_GET_RE_DEBUG_FLAGS  dNOOP
+#define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2)  dNOOP
 #define RE_SV_ESCAPE(rpv,isuni,dsv,sv,m)
-#define RE_PV_QUOTED_DECL(rpv,isuni,dsv,pv,l,m)
+#define RE_PV_QUOTED_DECL(rpv,isuni,dsv,pv,l,m)  dNOOP
 #define RE_SV_DUMPLEN(ItEm)
 #define RE_SV_TAIL(ItEm)
 #define isDEBUG_WILDCARD 0
index 6000c75..9fbf607 100644 (file)
@@ -16,7 +16,7 @@
 #
 # This script is normally invoked from regen.pl.
 
-$VERSION = '1.46';
+$VERSION = '1.47';
 
 BEGIN {
     require './regen/regen_lib.pl';
@@ -1012,6 +1012,10 @@ disable compile-time warnings you need to rewrite the code like this:
         my $b; chop $b;
      }
 
+And note that unlike the first example, this will permanently set C<$^W>
+since it cannot both run during compile-time and be localized to a
+run-time block.
+
 The other big problem with C<$^W> is the way you can inadvertently
 change the warning setting in unexpected places in your code.  For example,
 when the code below is run (without the B<-w> flag), the second call
diff --git a/sv.c b/sv.c
index 1c0cc74..7e82b84 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -883,6 +883,23 @@ struct body_details {
     U32 arena_size;                 /* Size of arena to allocate */
 };
 
+#define ALIGNED_TYPE_NAME(name) name##_aligned
+#define ALIGNED_TYPE(name)             \
+    typedef union {    \
+        name align_me;                         \
+        NV nv;                         \
+        IV iv;                         \
+    } ALIGNED_TYPE_NAME(name);
+
+ALIGNED_TYPE(regexp);
+ALIGNED_TYPE(XPVGV);
+ALIGNED_TYPE(XPVLV);
+ALIGNED_TYPE(XPVAV);
+ALIGNED_TYPE(XPVHV);
+ALIGNED_TYPE(XPVCV);
+ALIGNED_TYPE(XPVFM);
+ALIGNED_TYPE(XPVIO);
+
 #define HADNV FALSE
 #define NONV TRUE
 
@@ -971,48 +988,48 @@ static const struct body_details bodies_by_type[] = {
     { sizeof(XPVMG), copy_length(XPVMG, xnv_u), 0, SVt_PVMG, FALSE, HADNV,
       HASARENA, FIT_ARENA(0, sizeof(XPVMG)) },
 
-    { sizeof(regexp),
+    { sizeof(ALIGNED_TYPE_NAME(regexp)),
       sizeof(regexp),
       0,
       SVt_REGEXP, TRUE, NONV, HASARENA,
-      FIT_ARENA(0, sizeof(regexp))
+      FIT_ARENA(0, sizeof(ALIGNED_TYPE_NAME(regexp)))
     },
 
-    { sizeof(XPVGV), sizeof(XPVGV), 0, SVt_PVGV, TRUE, HADNV,
-      HASARENA, FIT_ARENA(0, sizeof(XPVGV)) },
+    { sizeof(ALIGNED_TYPE_NAME(XPVGV)), sizeof(XPVGV), 0, SVt_PVGV, TRUE, HADNV,
+      HASARENA, FIT_ARENA(0, sizeof(ALIGNED_TYPE_NAME(XPVGV))) },
     
-    { sizeof(XPVLV), sizeof(XPVLV), 0, SVt_PVLV, TRUE, HADNV,
-      HASARENA, FIT_ARENA(0, sizeof(XPVLV)) },
+    { sizeof(ALIGNED_TYPE_NAME(XPVLV)), sizeof(XPVLV), 0, SVt_PVLV, TRUE, HADNV,
+      HASARENA, FIT_ARENA(0, sizeof(ALIGNED_TYPE_NAME(XPVLV))) },
 
-    { sizeof(XPVAV),
+    { sizeof(ALIGNED_TYPE_NAME(XPVAV)),
       copy_length(XPVAV, xav_alloc),
       0,
       SVt_PVAV, TRUE, NONV, HASARENA,
-      FIT_ARENA(0, sizeof(XPVAV)) },
+      FIT_ARENA(0, sizeof(ALIGNED_TYPE_NAME(XPVAV))) },
 
-    { sizeof(XPVHV),
+    { sizeof(ALIGNED_TYPE_NAME(XPVHV)),
       copy_length(XPVHV, xhv_max),
       0,
       SVt_PVHV, TRUE, NONV, HASARENA,
-      FIT_ARENA(0, sizeof(XPVHV)) },
+      FIT_ARENA(0, sizeof(ALIGNED_TYPE_NAME(XPVHV))) },
 
-    { sizeof(XPVCV),
+    { sizeof(ALIGNED_TYPE_NAME(XPVCV)),
       sizeof(XPVCV),
       0,
       SVt_PVCV, TRUE, NONV, HASARENA,
-      FIT_ARENA(0, sizeof(XPVCV)) },
+      FIT_ARENA(0, sizeof(ALIGNED_TYPE_NAME(XPVCV))) },
 
-    { sizeof(XPVFM),
+    { sizeof(ALIGNED_TYPE_NAME(XPVFM)),
       sizeof(XPVFM),
       0,
       SVt_PVFM, TRUE, NONV, NOARENA,
-      FIT_ARENA(20, sizeof(XPVFM)) },
+      FIT_ARENA(20, sizeof(ALIGNED_TYPE_NAME(XPVFM))) },
 
-    { sizeof(XPVIO),
+    { sizeof(ALIGNED_TYPE_NAME(XPVIO)),
       sizeof(XPVIO),
       0,
       SVt_PVIO, TRUE, NONV, HASARENA,
-      FIT_ARENA(24, sizeof(XPVIO)) },
+      FIT_ARENA(24, sizeof(ALIGNED_TYPE_NAME(XPVIO))) },
 };
 
 #define new_body_allocated(sv_type)            \
@@ -2394,7 +2411,7 @@ S_sv_2iuv_common(pTHX_ SV *const sv)
            SvFLAGS(sv) &= ~(SVf_IOK|SVf_NOK);
        }
     }
-    else  {
+    else {
        if (isGV_with_GP(sv))
            return glob_2number(MUTABLE_GV(sv));
 
@@ -2789,7 +2806,7 @@ Perl_sv_2nv_flags(pTHX_ SV *const sv, const I32 flags)
            SvFLAGS(sv) &= ~(SVf_IOK|SVf_NOK);
 #endif /* NV_PRESERVES_UV */
     }
-    else  {
+    else {
        if (isGV_with_GP(sv)) {
            glob_2number(MUTABLE_GV(sv));
            return 0.0;
@@ -16565,7 +16582,7 @@ S_find_uninit_var(pTHX_ const OP *const obase, const SV *const uninit_sv,
                    negate ? - SvIV(cSVOPx_sv(kid)) : SvIV(cSVOPx_sv(kid)),
                    FUV_SUBSCRIPT_ARRAY);
        }
-       else  {
+       else {
            /* index is an expression;
             * attempt to find a match within the aggregate */
            if (obase->op_type == OP_HELEM) {
@@ -16777,7 +16794,7 @@ S_find_uninit_var(pTHX_ const OP *const obase, const SV *const uninit_sv,
                : varname(agg_gv, '@', agg_targ,
                                 NULL, index_const_iv, FUV_SUBSCRIPT_ARRAY);
        }
-       else  {
+       else {
            /* index is an var */
            if (is_hv) {
                SV * const keysv = find_hash_subscript((const HV*)sv, uninit_sv);
diff --git a/t/lib/GH_15109/Apack.pm b/t/lib/GH_15109/Apack.pm
deleted file mode 100644 (file)
index fa52ec8..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# for use by caller.t for GH #15109
-package Apack;
-use Bpack;
-1;
diff --git a/t/lib/GH_15109/Bpack.pm b/t/lib/GH_15109/Bpack.pm
deleted file mode 100644 (file)
index f9421c8..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# for use by caller.t for GH #15109
-package Bpack;
-use Cpack;
-1;
diff --git a/t/lib/GH_15109/Cpack.pm b/t/lib/GH_15109/Cpack.pm
deleted file mode 100644 (file)
index 94c409b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# for use by caller.t for GH #15109
-package Cpack;
-
-
-my $i = 0;
-
-while (my ($package, $file, $line) = caller($i++)) {
-    push @Cpack::callers, "$file:$line";
-}
-
-1;
diff --git a/t/lib/GH_15109/Foo.pm b/t/lib/GH_15109/Foo.pm
deleted file mode 100644 (file)
index 1af2547..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# for use by caller.t for GH #15109
-
-package Foo;
-
-sub import {
-    use warnings; # restore default warnings
-    () = caller(1); # this used to cause valgrind errors
-}
-1;
index b97748b..0d20acb 100644 (file)
@@ -564,3 +564,12 @@ else {
 EXPECT
 OPTIONS regex
 Use of code point 0x80000000(00000000)? is not allowed; the permissible max is 0x7FFFFFFF(FFFFFFFF)? at - line \d+.
+########
+# NAME gh-17645: conflict marker detection should not read out of bounds
+m/$0[
+==0/
+EXPECT
+syntax error at - line 2, near "[
+=="
+  (Might be a runaway multi-line // string starting on line 1)
+Execution of - aborted due to compilation errors.
index 865b005..564d140 100644 (file)
@@ -5,7 +5,7 @@ BEGIN {
     chdir 't' if -d 't';
     require './test.pl';
     set_up_inc('../lib');
-    plan( tests => 111 ); # some tests are run in a BEGIN block
+    plan( tests => 97 ); # some tests are run in a BEGIN block
 }
 
 my @c;
@@ -335,45 +335,16 @@ $::testing_caller = 1;
 
 do './op/caller.pl' or die $@;
 
-# GH #15109
-# See that callers within a nested series of 'use's gets the right
-# filenames.
-{
-    local @INC = 'lib/GH_15109/';
-    # Apack use's Bpack which use's Cpack which populates @Cpack::caller
-    # with the file:N of all the callers
-    eval 'use Apack; 1';
-    is($@, "", "GH #15109 - eval");
-    is (scalar(@Cpack::callers), 10, "GH #15109 - callers count");
-    like($Cpack::callers[$_], qr{GH_15109/Bpack.pm:3}, "GH #15109 level $_") for 0..2;
-    like($Cpack::callers[$_], qr{GH_15109/Apack.pm:3}, "GH #15109 level $_") for 3..5;
-    like($Cpack::callers[$_], qr{\(eval \d+\):1}, "GH #15109 level $_") for 6..8;
-    like($Cpack::callers[$_], qr{caller\.t}, "GH #15109 level $_") for 9;
-
-    # GH #15109 followup - the original fix wasn't saving cop_warnings
-    # correctly and this code used to crash or fail valgrind
-
-    my $w = 0;
-    local $SIG{__WARN__} = sub { $w++ };
-    eval q{
-        use warnings;
-        no warnings 'numeric'; # ensure custom cop_warnings
-        use Foo;      # this used to mess up warnings flags
-        BEGIN { my $x = "foo" + 1; } # potential "numeric" warning
-    };
-    is ($@, "", "GH #15109 - eval okay");
-    is ($w, 0, "GH #15109 - warnings restored");
-}
-
 {
     package RT129239;
     BEGIN {
         my ($pkg, $file, $line) = caller;
         ::is $file, 'virtually/op/caller.t', "BEGIN block sees correct caller filename";
         ::is $line, 12345,                   "BEGIN block sees correct caller line";
-        ::is $pkg, 'RT129239',               "BEGIN block sees correct caller package";
+        TODO: {
+            local $::TODO = "BEGIN blocks have wrong caller package [perl #129239]";
+            ::is $pkg, 'RT129239',               "BEGIN block sees correct caller package";
+        }
 #line 12345 "virtually/op/caller.t"
     }
-
 }
-
index c5a33c7..cabcac6 100644 (file)
--- a/t/op/tr.t
+++ b/t/op/tr.t
@@ -13,7 +13,7 @@ BEGIN {
 
 use utf8;
 
-plan tests => 314;
+plan tests => 315;
 
 # Test this first before we extend the stack with other operations.
 # This caused an asan failure due to a bad write past the end of the stack.
@@ -1187,4 +1187,10 @@ for ("", nullrocow) {
     is($d, "\x{105}", '104 -> 105');
 }
 
+{
+    my $c = "cb";
+    eval '$c =~ tr{aabc}{d\x{d0000}}';
+    is($c, "\x{d0000}\x{d0000}", "Shouldn't generate valgrind errors");
+}
+
 1;
index 4c7ca6f..6ece306 100644 (file)
@@ -24,7 +24,7 @@ BEGIN {
 
 skip_all_without_unicode_tables();
 
-plan tests => 1017;  # Update this when adding/deleting tests.
+plan tests => 1020;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -2252,6 +2252,25 @@ SKIP:
         ok($result, "regexp correctly matched");
     }
 
+    # gh16947: test regexp corruption (GOSUB)
+    {
+        fresh_perl_is(q{
+            'xy' =~ /x(?0)|x(?|y|y)/ && print 'ok'
+        }, 'ok', {}, 'gh16947: test regexp corruption (GOSUB)');
+    }
+    # gh16947: test fix doesn't break SUSPEND
+    {
+        fresh_perl_is(q{ 'sx' =~ m{ss++}i; print 'ok' },
+                'ok', {}, "gh16947: test fix doesn't break SUSPEND");
+    }
+
+    # gh17730: should not crash
+    {
+        fresh_perl_is(q{
+            "q00" =~ m{(((*ACCEPT)0)*00)?0(?1)}; print "ok"
+        }, 'ok', {}, 'gh17730: should not crash');
+    }
+
 } # End of sub run_tests
 
 1;
index b913796..41f344a 100644 (file)
@@ -2527,6 +2527,32 @@ EOF
                       "", {}, "*COMMIT caused positioning beyond EOS");
     }
 
+    {   # [GH #17486]    Previously assertion failure
+        fresh_perl_is('0=~/(?iaa)ss\337(?0)|/',
+                      "", {}, "EXACTFUP node isn't changed into something else");
+    }
+
+    {   # [GH #17593]
+        fresh_perl_is('qr/((?+2147483647))/',
+                      "Invalid reference to group in regex; marked by <--"
+                    . " HERE in m/((?+2147483647) <-- HERE )/ at - line 1.",
+                      {}, "integer overflow, undefined behavior in ASAN");
+        fresh_perl_is('qr/((?-2147483647))/',
+                      "Reference to nonexistent group in regex; marked by <--"
+                    . " HERE in m/((?-2147483647) <-- HERE )/ at - line 1.",
+                      {}, "Large negative relative capture group");
+        fresh_perl_is('qr/((?+18446744073709551615))/',
+                      "Invalid reference to group in regex; marked by <--"
+                    . " HERE in m/((?+18446744073709551615 <-- HERE ))/ at -"
+                    . " line 1.",
+                      {}, "Too large relative group number");
+        fresh_perl_is('qr/((?-18446744073709551615))/',
+                      "Invalid reference to group in regex; marked by <--"
+                    . " HERE in m/((?-18446744073709551615 <-- HERE ))/ at -"
+                    . " line 1.",
+                      {}, "Too large negative relative group number");
+    }
+
 
     # !!! NOTE that tests that aren't at all likely to crash perl should go
     # a ways above, above these last ones.  There's a comment there that, like
diff --git a/toke.c b/toke.c
index a5df7ae..f03c827 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -4259,7 +4259,7 @@ S_scan_const(pTHX_ char *start)
            } else if (PL_lex_inpat && SvIVX(PL_linestr) == '\'') {
                type = "q";
                typelen = 1;
-           } else  {
+           } else {
                type = "qq";
                typelen = 2;
            }
@@ -8835,7 +8835,7 @@ yyl_try(pTHX_ char *s, STRLEN len)
 
     case '=':
         if (s[1] == '=' && (s == PL_linestart || s[-1] == '\n')
-            && memBEGINs(s + 2, (STRLEN) (PL_bufend - s + 2), "====="))
+            && memBEGINs(s + 2, (STRLEN) (PL_bufend - (s + 2)), "====="))
         {
             s = vcs_conflict_marker(s + 7);
             goto retry;
@@ -8929,7 +8929,7 @@ yyl_try(pTHX_ char *s, STRLEN len)
 
     case '<':
         if (s[1] == '<' && (s == PL_linestart || s[-1] == '\n')
-            && memBEGINs(s+2, (STRLEN) (PL_bufend - (s+2)), "<<<<<"))
+            && memBEGINs(s + 2, (STRLEN) (PL_bufend - (s + 2)), "<<<<<"))
         {
             s = vcs_conflict_marker(s + 7);
             goto retry;
@@ -8938,7 +8938,7 @@ yyl_try(pTHX_ char *s, STRLEN len)
 
     case '>':
         if (s[1] == '>' && (s == PL_linestart || s[-1] == '\n')
-            && memBEGINs(s + 2, (STRLEN) (PL_bufend - s + 2), ">>>>>"))
+            && memBEGINs(s + 2, (STRLEN) (PL_bufend - (s + 2)), ">>>>>"))
         {
             s = vcs_conflict_marker(s + 7);
             goto retry;
index 8a46b20..f78b63c 100644 (file)
@@ -86,14 +86,14 @@ BEGIN {
     $::HaveWrap = ($@ eq "");
 };
 
-our $VERSION = "1.41";
+our $VERSION = "1.42";
 
 #TODO:
 #       make sure failure (transmission-wise) of Mail::Send is accounted for.
 #       (This may work now. Unsure of the original author's issue -JESSE 2008-06-08)
 #       - Test -b option
 
-my( $file, $usefile, $cc, $address, $bugaddress, $testaddress, $thanksaddress,
+my( $file, $usefile, $cc, $address, $thanksaddress,
     $filename, $messageid, $domain, $subject, $from, $verbose, $ed, $outfile,
     $fh, $me, $body, $andcc, %REP, $ok, $thanks, $progname,
     $Is_MSWin32, $Is_Linux, $Is_VMS, $Is_OpenBSD,
@@ -122,9 +122,7 @@ EOF
 Query();
 Edit() unless $usefile || ($ok and not $opt{n});
 NowWhat();
-if ($outfile) {
-    save_message_to_disk($outfile);
-} else {
+if ($address) {
     Send();
     if ($thanks) {
        print "\nThank you for taking the time to send a thank-you message!\n\n";
@@ -138,12 +136,13 @@ EOF
 
        paraprint <<EOF
 Please note that mailing lists are moderated, your message may take a while to
-show up. If you do not receive an automated response acknowledging your message
-within a few hours (check your SPAM folder and outgoing mail) please consider
-sending an email directly from your mail client to perlbug\@perl.org.
+show up. Please consider submitting your report directly to the issue tracker
+at https://github.com/Perl/perl5/issues
 EOF
     }
 
+} else {
+    save_message_to_disk($outfile);
 }
 
 exit;
@@ -201,17 +200,11 @@ sub Init {
     $Is_Linux = lc($^O) eq 'linux';
     $Is_OpenBSD = lc($^O) eq 'openbsd';
 
-    # perlbug address
-    $bugaddress = 'perlbug@perl.org';
-
-    # Test address
-    $testaddress = 'perlbug-test@perl.org';
-
     # Thanks address
     $thanksaddress = 'perl-thanks@perl.org';
 
     # Defaults if getopts fails.
-    $address = (basename ($0) =~ /^perlthanks/i) ? $thanksaddress : $bugaddress;
+    $outfile = (basename($0) =~ /^perlthanks/i) ? "perlthanks.rep" : "perlbug.rep";
     $cc = $::Config{'perladmin'} || $::Config{'cf_email'} || $::Config{'cf_by'} || '';
 
     HELP_MESSAGE() unless getopts("Adhva:s:b:f:F:r:e:SCc:to:n:T:p:", \%opt);
@@ -232,8 +225,7 @@ sub Init {
     
     $progname = $thanks ? 'perlthanks' : 'perlbug';
     # Target address
-    $address = $opt{a} || ($opt{t} ? $testaddress
-                           : $thanks ? $thanksaddress : $bugaddress);
+    $address = $opt{a} || ($thanks ? $thanksaddress : "");
 
     # Users address, used in message and in From and Reply-To headers
     $from = $opt{r} || "";
@@ -266,7 +258,7 @@ sub Init {
     }
 
     # File to output to
-    $outfile = $opt{F} || "";
+    $outfile = $opt{F} || "$progname.rep";
 
     # Body of report
     $body = $opt{b} || "";
@@ -361,18 +353,19 @@ sub Query {
 This program provides an easy way to send a thank-you message back to the
 authors and maintainers of perl.
 
-If you wish to submit a bug report, please run it without the -T flag
+If you wish to generate a bug report, please run it without the -T flag
 (or run the program perlbug rather than perlthanks)
 EOF
        } else {
            paraprint <<"EOF";
-This program provides an easy way to create a message reporting a
-bug in the core perl distribution (along with tests or patches)
-to the volunteers who maintain perl at $address.  To send a thank-you
+This program provides an easy way to generate a bug report for the core
+perl distribution (along with tests or patches).  To send a thank-you
 note to $thanksaddress instead of a bug report, please run 'perlthanks'.
 
-Please do not use $0 to send test messages, test whether perl
-works, or to report bugs in perl modules from CPAN.
+The GitHub issue tracker at https://github.com/Perl/perl5/issues is the
+best place to submit your report so it can be tracked and resolved.
+
+Please do not use $0 to report bugs in perl modules from CPAN.
 
 Suggestions for how to find help using Perl can be found at
 https://perldoc.perl.org/perlcommunity.html
@@ -388,7 +381,7 @@ EOF
 
     unless ($subject) {
            print 
-"First of all, please provide a subject for the message.\n";
+"First of all, please provide a subject for the report.\n";
        if ( not $thanks)  {
            paraprint <<EOF;
 This should be a concise description of your bug or problem
@@ -466,7 +459,7 @@ EOF
     }
 
     # Prompt for administrator address, unless an override was given
-    if( !$opt{C} and !$opt{c} ) {
+    if( $address and !$opt{C} and !$opt{c} ) {
        my $description =  <<EOF;
 $0 can send a copy of this report to your local perl
 administrator.  If the address below is wrong, please correct it,
@@ -696,11 +689,6 @@ EFF
     module=$report_about_module
 EFF
     }
-    if ($opt{A}) {
-       print OUT <<EFF;
-    ack=no
-EFF
-    }
     print OUT <<EFF;
 ---
 EFF
@@ -789,8 +777,7 @@ EOF
                 next;
             } else {
                 paraprint <<EOF;
-You may want to save your report to a file, so you can edit and
-mail it later.
+You can edit your report after saving it to a file.
 EOF
                 return;
             }
@@ -820,7 +807,7 @@ EOF
 
 sub Cancel {
     1 while unlink($filename);  # remove all versions under VMS
-    print "\nQuitting without sending your message.\n";
+    print "\nQuitting without generating a report.\n";
     exit(0);
 }
 
@@ -828,23 +815,24 @@ sub NowWhat {
     # Report is done, prompt for further action
     if( !$opt{S} ) {
        while(1) {
+           my $send_to = $address || 'the Perl developers';
            my $menu = <<EOF;
 
 
-You have finished composing your message. At this point, you have 
+You have finished composing your report. At this point, you have 
 a few options. You can:
 
-    * [Se]nd the message to $address$andcc, 
-    * [D]isplay the message on the screen,
-    * [R]e-edit the message
-    * Display or change the message's [su]bject
-    * Save the message to a [f]ile to mail at another time
-    * [Q]uit without sending a message
+    * Save the report to a [f]ile
+    * [Se]nd the report to $send_to$andcc
+    * [D]isplay the report on the screen
+    * [R]e-edit the report
+    * Display or change the report's [su]bject
+    * [Q]uit without generating the report
 
 EOF
       retry:
         print $menu;
-           my $action =  _prompt('', "Action (Send/Display/Edit/Subject/Save to File)",
+           my $action =  _prompt('', "Action (Save/Send/Display/Edit/Subject/Quit)",
                $opt{t} ? 'q' : '');
         print "\n";
            if ($action =~ /^(f|sa)/i) { # <F>ile/<Sa>ve
@@ -866,12 +854,20 @@ EOF
                }
            } elsif ($action =~ /^se/i) { # <S>end
                # Send the message
-               my $reply =  _prompt( "Are you certain you want to send this message?", 'Please type "yes" if you are','no');
+               if (not $thanks) {
+                   print <<EOF
+To ensure your issue can be best tracked and resolved,
+you should submit it to the GitHub issue tracker at
+https://github.com/Perl/perl5/issues
+EOF
+               }
+               my $reply =  _prompt( "Are you certain you want to send this report to $send_to$andcc?", 'Please type "yes" if you are','no');
                if ($reply =~ /^yes$/) {
+                   $address ||= 'perl5-porters@perl.org';
                    last;
                } else {
                    paraprint <<EOF;
-You didn't type "yes", so your message has not yet been sent.
+You didn't type "yes", so your report has not been sent.
 EOF
                }
            } elsif ($action =~ /^[er]/i) { # <E>dit, <R>e-edit
@@ -902,14 +898,9 @@ sub TrivialSubject {
 }
 
 sub SaveMessage {
-    my $file_save = $outfile || "$progname.rep";
-    my $file = _prompt( '', "Name of file to save message in", $file_save );
+    my $file = _prompt( '', "Name of file to save report in", $outfile );
     save_message_to_disk($file) || return undef;
-    print "\n";
-    paraprint <<EOF;
-A copy of your message has been saved in '$file' for you to
-send to '$address' with your normal mail client.
-EOF
+    return 1;
 }
 
 sub Send {
@@ -945,7 +936,7 @@ EOF
 sub Help {
     print <<EOF;
 
-This program is designed to help you generate and send bug reports
+This program is designed to help you generate bug reports
 (and thank-you notes) about perl5 and the modules which ship with it.
 
 In most cases, you can just run "$0" interactively from a command
@@ -956,33 +947,33 @@ Advanced usage:
 $0  [-v] [-a address] [-s subject] [-b body | -f inpufile ] [ -F outputfile ]
     [-r returnaddress] [-e editor] [-c adminaddress | -C] [-S] [-t] [-h]
     [-p patchfile ]
-$0  [-v] [-r returnaddress] [-A] [-ok | -okay | -nok | -nokay]
+$0  [-v] [-r returnaddress] [-ok | -okay | -nok | -nokay]
 
 
 Options:
 
   -v    Include Verbose configuration data in the report
   -f    File containing the body of the report. Use this to
-        quickly send a prepared message.
+        quickly send a prepared report.
   -p    File containing a patch or other text attachment. Separate
         multiple files with commas.
-  -F    File to output the resulting mail message to, instead of mailing.
-  -S    Send without asking for confirmation.
-  -a    Address to send the report to. Defaults to '$address'.
+  -F    File to output the resulting report to. Defaults to
+        '$outfile'.
+  -S    Save or send the report without asking for confirmation.
+  -a    Send the report to this address, instead of saving to a file.
   -c    Address to send copy of report to. Defaults to '$cc'.
   -C    Don't send copy to administrator.
-  -s    Subject to include with the message. You will be prompted
+  -s    Subject to include with the report. You will be prompted
         if you don't supply one on the command line.
   -b    Body of the report. If not included on the command line, or
-        in a file with -f, you will get a chance to edit the message.
+        in a file with -f, you will get a chance to edit the report.
   -r    Your return address. The program will ask you to confirm
         this if you don't give it here.
   -e    Editor to use.
-  -t    Test mode. The target address defaults to '$testaddress'.
+  -t    Test mode.
   -T    Thank-you mode. The target address defaults to '$thanksaddress'.
   -d    Data mode.  This prints out your configuration data, without mailing
         anything. You can use this with -v to get more complete data.
-  -A    Don't send a bug received acknowledgement to the return address.
   -ok   Report successful build on this system to perl porters
         (use alone or with -v). Only use -ok if *everything* was ok:
         if there were *any* problems at all, use -nok.
@@ -1049,7 +1040,7 @@ sub _build_header {
 }
 
 sub _message_headers {
-    my %headers = ( To => $address, Subject => $subject );
+    my %headers = ( To => $address || 'perl5-porters@perl.org', Subject => $subject );
     $headers{'Cc'}         = $cc        if ($cc);
     $headers{'Message-Id'} = $messageid if ($messageid);
     $headers{'Reply-To'}   = $from      if ($from);
@@ -1134,7 +1125,7 @@ sub save_message_to_disk {
 
         print OUTFILE build_complete_message();
         close(OUTFILE) or do { warn  "Error closing $file: $!"; return undef };
-           print "\nMessage saved.\n";
+           print "\nReport saved to '$file'. Please submit it to https://github.com/Perl/perl5/issues\n";
         return 1;
 }
 
@@ -1209,9 +1200,9 @@ EOT
         paraprint(<<"EOF"), die "\n";
 $message_start
 Because of this, there's no easy way to automatically send your
-message.
+report.
 
-A copy of your message has been saved in '$filename' for you to
+A copy of your report has been saved in '$filename' for you to
 send to '$address' with your normal mail client.
 EOF
     }
@@ -1271,10 +1262,10 @@ B<perlbug> S<[ B<-v> ]> S<[ B<-a> I<address> ]> S<[ B<-s> I<subject> ]>
 S<[ B<-b> I<body> | B<-f> I<inputfile> ]> S<[ B<-F> I<outputfile> ]>
 S<[ B<-r> I<returnaddress> ]>
 S<[ B<-e> I<editor> ]> S<[ B<-c> I<adminaddress> | B<-C> ]>
-S<[ B<-S> ]> S<[ B<-t> ]>  S<[ B<-d> ]>  S<[ B<-A> ]>  S<[ B<-h> ]> S<[ B<-T> ]>
+S<[ B<-S> ]> S<[ B<-t> ]>  S<[ B<-d> ]>  S<[ B<-h> ]> S<[ B<-T> ]>
 
 B<perlbug> S<[ B<-v> ]> S<[ B<-r> I<returnaddress> ]>
- S<[ B<-A> ]> S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]>
+ S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]>
 
 B<perlthanks>
 
@@ -1451,34 +1442,28 @@ if a new version of Perl is released and your bug is still present.
 
 =item B<-a>
 
-Address to send the report to.  Defaults to B<perlbug@perl.org>.
-
-=item B<-A>
-
-Don't send a bug received acknowledgement to the reply address.
-Generally it is only a sensible to use this option if you are a
-perl maintainer actively watching perl porters for your message to
-arrive.
+Address to send the report to instead of saving to a file.
 
 =item B<-b>
 
 Body of the report.  If not included on the command line, or
-in a file with B<-f>, you will get a chance to edit the message.
+in a file with B<-f>, you will get a chance to edit the report.
 
 =item B<-C>
 
-Don't send copy to administrator.
+Don't send copy to administrator when sending report by mail.
 
 =item B<-c>
 
-Address to send copy of report to.  Defaults to the address of the
+Address to send copy of report to when sending report by mail.
+Defaults to the address of the
 local perl administrator (recorded when perl was built).
 
 =item B<-d>
 
 Data mode (the default if you redirect or pipe output).  This prints out
-your configuration data, without mailing anything.  You can use this
-with B<-v> to get more complete data.
+your configuration data, without saving or mailing anything.  You can use
+this with B<-v> to get more complete data.
 
 =item B<-e>
 
@@ -1487,13 +1472,11 @@ Editor to use.
 =item B<-f>
 
 File containing the body of the report.  Use this to quickly send a
-prepared message.
+prepared report.
 
 =item B<-F>
 
-File to output the results to instead of sending as an email. Useful
-particularly when running perlbug on a machine with no direct internet
-connection.
+File to output the results to.  Defaults to B<perlbug.rep>.
 
 =item B<-h>
 
@@ -1539,17 +1522,16 @@ if you don't use this option.
 
 =item B<-S>
 
-Send without asking for confirmation.
+Save or send the report without asking for confirmation.
 
 =item B<-s>
 
-Subject to include with the message.  You will be prompted if you don't
+Subject to include with the report.  You will be prompted if you don't
 supply one on the command line.
 
 =item B<-t>
 
-Test mode.  The target address defaults to B<perlbug-test@perl.org>.
-Also makes it possible to command perlbug from a pipe or file, for
+Test mode.  Makes it possible to command perlbug from a pipe or file, for
 testing purposes.
 
 =item B<-T>
index 9d36857..e2f84dc 100644 (file)
@@ -313,7 +313,7 @@ utils : $(utils1) $(utils2) $(utils3) $(utils4) $(utils5)
 extra.pods : miniperl
        @ @extra_pods.com
 
-PERLDELTA_CURRENT = [.pod]perl53110delta.pod
+PERLDELTA_CURRENT = [.pod]perl53111delta.pod
 
 $(PERLDELTA_CURRENT) : [.pod]perldelta.pod
        Copy/NoConfirm/Log $(MMS$SOURCE) $(PERLDELTA_CURRENT)
index 805c916..b31aa97 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -3311,7 +3311,7 @@ pipe_tochild1_ast(pPipe p)
             p->shut_on_empty = TRUE;
             b->eof     = TRUE;
             _ckvmssts_noperl(sys$dassgn(p->chan_in));
-        } else  {
+        } else {
             _ckvmssts_noperl(iss);
         }
 
index 88b6f5f..ccddfae 100644 (file)
@@ -64,7 +64,7 @@ INST_TOP := $(INST_DRV)\perl
 # versioned installation can be obtained by setting INST_TOP above to a
 # path that includes an arbitrary version string.
 #
-#INST_VER      := \5.31.10
+#INST_VER      := \5.31.11
 
 #
 # Comment this out if you DON'T want your perl installation to have
@@ -1745,7 +1745,7 @@ utils: $(HAVEMINIPERL) ..\utils\Makefile
        copy ..\README.tw       ..\pod\perltw.pod
        copy ..\README.vos      ..\pod\perlvos.pod
        copy ..\README.win32    ..\pod\perlwin32.pod
-       copy ..\pod\perldelta.pod ..\pod\perl53110delta.pod
+       copy ..\pod\perldelta.pod ..\pod\perl53111delta.pod
        $(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
        $(MINIPERL) -I..\lib ..\autodoc.pl ..
        $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
@@ -1843,7 +1843,7 @@ distclean: realclean
        -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
        -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
        -cd $(PODDIR) && del /f *.html *.bat roffitall \
-           perl53110delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+           perl53111delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
            perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \
            perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
            perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
index f599159..e49fad8 100644 (file)
@@ -38,7 +38,7 @@ INST_TOP      = $(INST_DRV)\perl
 # versioned installation can be obtained by setting INST_TOP above to a
 # path that includes an arbitrary version string.
 #
-#INST_VER      = \5.31.10
+#INST_VER      = \5.31.11
 
 #
 # Comment this out if you DON'T want your perl installation to have
@@ -1265,7 +1265,7 @@ utils: $(PERLEXE) ..\utils\Makefile
        copy ..\README.tw       ..\pod\perltw.pod
        copy ..\README.vos      ..\pod\perlvos.pod
        copy ..\README.win32    ..\pod\perlwin32.pod
-       copy ..\pod\perldelta.pod ..\pod\perl53110delta.pod
+       copy ..\pod\perldelta.pod ..\pod\perl53111delta.pod
        cd ..\win32
        $(PERLEXE) $(PL2BAT) $(UTILS)
        $(MINIPERL) -I..\lib ..\autodoc.pl ..
@@ -1364,7 +1364,7 @@ distclean: realclean
        -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
        -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
        -cd $(PODDIR) && del /f *.html *.bat roffitall \
-           perl53110delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+           perl53111delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
            perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \
            perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
            perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
index 8423c48..f839e2d 100644 (file)
@@ -45,7 +45,7 @@ INST_TOP      *= $(INST_DRV)\perl
 # versioned installation can be obtained by setting INST_TOP above to a
 # path that includes an arbitrary version string.
 #
-#INST_VER      *= \5.31.10
+#INST_VER      *= \5.31.11
 
 #
 # Comment this out if you DON'T want your perl installation to have
@@ -1664,7 +1664,7 @@ utils: $(HAVEMINIPERL) ..\utils\Makefile
        copy ..\README.tw       ..\pod\perltw.pod
        copy ..\README.vos      ..\pod\perlvos.pod
        copy ..\README.win32    ..\pod\perlwin32.pod
-       copy ..\pod\perldelta.pod ..\pod\perl53110delta.pod
+       copy ..\pod\perldelta.pod ..\pod\perl53111delta.pod
        $(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
        $(MINIPERL) -I..\lib ..\autodoc.pl ..
        $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
@@ -1762,7 +1762,7 @@ distclean: realclean
        -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
        -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
        -cd $(PODDIR) && del /f *.html *.bat roffitall \
-           perl53110delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+           perl53111delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
            perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \
            perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
            perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
index d790b5f..c115d5d 100644 (file)
@@ -62,6 +62,7 @@ POD = perl.pod        \
        perl5302delta.pod       \
        perl5310delta.pod       \
        perl53110delta.pod      \
+       perl53111delta.pod      \
        perl5311delta.pod       \
        perl5312delta.pod       \
        perl5313delta.pod       \
@@ -228,6 +229,7 @@ MAN = perl.man      \
        perl5302delta.man       \
        perl5310delta.man       \
        perl53110delta.man      \
+       perl53111delta.man      \
        perl5311delta.man       \
        perl5312delta.man       \
        perl5313delta.man       \
@@ -394,6 +396,7 @@ HTML = perl.html    \
        perl5302delta.html      \
        perl5310delta.html      \
        perl53110delta.html     \
+       perl53111delta.html     \
        perl5311delta.html      \
        perl5312delta.html      \
        perl5313delta.html      \
@@ -560,6 +563,7 @@ TEX = perl.tex      \
        perl5302delta.tex       \
        perl5310delta.tex       \
        perl53110delta.tex      \
+       perl53111delta.tex      \
        perl5311delta.tex       \
        perl5312delta.tex       \
        perl5313delta.tex       \
index 7f5482b..2a4ff39 100644 (file)
@@ -3913,7 +3913,7 @@ RETRY:
        w32_child_pids[w32_num_children] = (DWORD)ret;
        ++w32_num_children;
     }
-    else  {
+    else {
        DWORD status;
        win32_msgwait(aTHX_ 1, &ProcessInformation.hProcess, INFINITE, NULL);
        /* FIXME: if msgwait returned due to message perhaps forward the