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
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>
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>
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=''
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'
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=''
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'
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'
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'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
-subversion='10'
+subversion='11'
sysman='/usr/share/man/man1'
tail=''
tar=''
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'
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
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=''
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'
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=''
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'
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'
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'
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
-subversion='10'
+subversion='11'
sysman='/usr/share/man/man1'
tail=''
tar=''
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'
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
=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
=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
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.
=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.)
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
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
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
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
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
"url" : "https://github.com/Perl/perl5"
}
},
- "version" : "5.031010",
+ "version" : "5.031011",
"x_serialization_backend" : "JSON::PP version 4.04"
}
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'
$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
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`
# 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
# 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
* 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 "" /**/
},
'Module::CoreList' => {
- 'DISTRIBUTION' => 'BINGOS/Module-CoreList-5.20200220.tar.gz',
+ 'DISTRIBUTION' => 'BINGOS/Module-CoreList-5.20200320.tar.gz',
'FILES' => q[dist/Module-CoreList],
},
},
'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/},
},
'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] ],
},
+ 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
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=''
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=''
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'
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'
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'
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'
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'
stdio_stream_array=''
strerror_r_proto='0'
submit=''
-subversion='10'
+subversion='11'
sysman='/usr/share/man/man1'
sysroot=''
tail=''
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'
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.
* 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
=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.“
XXX Generate this with:
- perl Porting/acknowledgements.pl v5.31.10..HEAD
+ perl Porting/acknowledgements.pl v5.31.11..HEAD
=head1 Reporting Bugs
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
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.)
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?
=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
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
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
=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',
=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
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
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.
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN {
if( $] < 5.008 ) {
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::Formatter::TAP; our @ISA = qw(Test2::Formatter::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;
}
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;
}
require Exporter;
our @ISA = qw(Exporter);
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
=head1 NAME
package Test::Builder::Tester;
use strict;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test::Builder;
use Symbol;
package Test::Builder::Tester::Color;
use strict;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
require Test::Builder::Tester;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::Event::Diag; our @ISA = qw(Test2::Event::Diag) }
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);
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
use strict;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test::Builder::Module;
our @ISA = qw(Test::Builder::Module);
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 );
package Test::Tester::Capture;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test::Builder;
package Test::Tester::CaptureRunner;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test::Tester::Capture;
package Test::Tester::Delegate;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Scalar::Util();
package Test::use::ok;
use 5.005;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
__END__
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
1;
$ENV{TEST2_ACTIVE} = 1;
}
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
my $INST;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test2::Util qw/pkg_to_file/;
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) {
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Carp qw/confess croak/;
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/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test2::Hub();
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Scalar::Util qw/blessed reftype/;
use Carp qw/croak/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Carp qw/croak/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test2::EventFacet::Info;
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;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test2::EventFacet::Info;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) }
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};
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Carp qw/croak/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Scalar::Util qw/reftype/;
use Carp qw/croak/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test2::Util::HashBase qw/-details/;
use Carp qw/croak/;
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 };
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
sub is_list { 1 }
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 };
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 };
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
sub facet_key { 'errors' }
sub is_list { 1 }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
sub is_list { 1 }
sub facet_key { 'hubs' }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
sub is_list { 1 }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Carp qw/confess/;
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/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Carp qw/confess/;
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 };
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
sub is_list { 1 }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
my %ADDED;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test2::Util qw/clone_io/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Carp qw/carp croak confess/;
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
=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
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test2::Hub::Interceptor::Terminator();
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
1;
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/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Test2::API::Instance;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Carp qw/confess/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
BEGIN { require Test2::IPC::Driver; our @ISA = qw(Test2::IPC::Driver) }
}
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 {
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{
=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
);
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
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.
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
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
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use POSIX();
use Config qw/%Config/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Carp qw/croak/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use Carp qw/croak confess/;
use Scalar::Util qw/blessed/;
use strict;
use warnings;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
#################################################################
# #
require Test2::EventFacet::Trace;
@ISA = ('Test2::EventFacet::Trace');
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
1;
package ok;
-our $VERSION = '1.302171';
+our $VERSION = '1.302175';
use strict;
use Test::More ();
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 {
{
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';
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"
);
':override' => 'internal',
);
-our $VERSION = '1.34';
+our $VERSION = '1.3401';
XSLoader::load( 'Time::Piece', $VERSION );
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;
#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};
package Time::Seconds;
use strict;
-our $VERSION = '1.34';
+our $VERSION = '1.3401';
use Exporter 5.57 'import';
--- /dev/null
+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);
-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
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
{
#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) {
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) {
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 );
}
}
+done_testing(154);
# 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();
{
# 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();
+5.20200428
+ - Updated for v5.31.11
+
5.20200320
- Updated for v5.31.10
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__) } }
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 ) {
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
removed => {
}
},
+ 5.031011 => {
+ delta_from => 5.03101,
+ changed => {
+ },
+ removed => {
+ }
+ },
);
%deprecated = _undelta(\%deprecated);
use warnings;
use Module::CoreList;
-our $VERSION = '5.20200320';
+our $VERSION = '5.20200428';
our %utilities;
sub utilities {
removed => {
}
},
+ 5.031011 => {
+ delta_from => 5.031010,
+ changed => {
+ },
+ removed => {
+ }
+ },
);
%utilities = Module::CoreList::_undelta(\%delta);
[ '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";
}
}
['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";
}
}
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);
}
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;
}
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 \
our($VERSION, @ISA, @EXPORT_OK);
-$VERSION = "1.46";
+$VERSION = "1.47";
use Carp;
use Exporter ();
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;
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',
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};
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};
use warnings;
use Carp;
-our $VERSION = '1.08';
+our $VERSION = '1.09';
require XSLoader;
{
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 {
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;
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++;
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++;
# 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
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
#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 */
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);
$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) {
package open;
use warnings;
-our $VERSION = '1.11';
+our $VERSION = '1.12';
require 5.008001; # for PerlIO::get_layers()
=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
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";
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 @_.
);
}
+{
+ # 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}
--- /dev/null
+#!perl
+
+package Bar;
+our $VERSION = "2.000";
+
+sub f {}
+
+package Foo;
+our @ISA = qw(Bar);
+our $VERSION = "1.000";
+
+package main;
+Foo->f();
+
# 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;
'-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;
'-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');
'-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/,
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!
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
++$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
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;
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'.
* 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
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
* 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;
#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
};
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);
* 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
&& 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);
(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));
/* things that can be elements of op_aux */
-typedef union {
+typedef union {
PADOFFSET pad_offset;
SV *sv;
IV iv;
/* 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 '%' */
#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
*/
#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
: (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. */
# 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)
* 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.
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=''
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=''
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'
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'
strerror_r_proto='0'
strings='/sys/include/ape/string.h'
submit=''
-subversion='10'
+subversion='11'
sysman='/sys/man/1pub'
tail=''
tar=''
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=''
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
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
--- /dev/null
+=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
# %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
=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
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
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>
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
(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
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>,
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>,
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
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
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
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
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
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
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>:
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:
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
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
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
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";
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
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]: $!";
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:
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>
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.
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
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>,
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
=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
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>
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
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>
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
=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.
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,
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.
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
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>,
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
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";
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
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
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
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
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.
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
=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
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);
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)
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 */
? 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;
}
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
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);
* 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. */
}
}
- 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'
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);
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)
&& 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;
/* 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;
}
&& 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');
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;
&& !(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. */
(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);
pRExC_state->code_blocks->count -= n;
n = 0;
}
- else {
+ else {
/* ... or failing that, try "" overload */
while (SvAMAGIC(msv)
&& (sv = AMG_CALLunary(msv, string_amg))
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");
) {
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;
}
}
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
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",
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 {
}
/*
-- 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;
# 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
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 */
#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
#
# This script is normally invoked from regen.pl.
-$VERSION = '1.46';
+$VERSION = '1.47';
BEGIN {
require './regen/regen_lib.pl';
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
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
{ 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) \
SvFLAGS(sv) &= ~(SVf_IOK|SVf_NOK);
}
}
- else {
+ else {
if (isGV_with_GP(sv))
return glob_2number(MUTABLE_GV(sv));
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;
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) {
: 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);
+++ /dev/null
-# for use by caller.t for GH #15109
-package Apack;
-use Bpack;
-1;
+++ /dev/null
-# for use by caller.t for GH #15109
-package Bpack;
-use Cpack;
-1;
+++ /dev/null
-# 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;
+++ /dev/null
-# 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;
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.
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;
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"
}
-
}
-
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.
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;
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;
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;
"", {}, "*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
} else if (PL_lex_inpat && SvIVX(PL_linestr) == '\'') {
type = "q";
typelen = 1;
- } else {
+ } else {
type = "qq";
typelen = 2;
}
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;
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;
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;
$::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,
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";
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;
$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);
$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} || "";
}
# File to output to
- $outfile = $opt{F} || "";
+ $outfile = $opt{F} || "$progname.rep";
# Body of report
$body = $opt{b} || "";
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
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
}
# 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,
module=$report_about_module
EFF
}
- if ($opt{A}) {
- print OUT <<EFF;
- ack=no
-EFF
- }
print OUT <<EFF;
---
EFF
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;
}
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);
}
# 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
}
} 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
}
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 {
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
$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.
}
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);
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;
}
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
}
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>
=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>
=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>
=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>
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)
p->shut_on_empty = TRUE;
b->eof = TRUE;
_ckvmssts_noperl(sys$dassgn(p->chan_in));
- } else {
+ } else {
_ckvmssts_noperl(iss);
}
# 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
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 ..
-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 \
# 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
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 ..
-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 \
# 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
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 ..
-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 \
perl5302delta.pod \
perl5310delta.pod \
perl53110delta.pod \
+ perl53111delta.pod \
perl5311delta.pod \
perl5312delta.pod \
perl5313delta.pod \
perl5302delta.man \
perl5310delta.man \
perl53110delta.man \
+ perl53111delta.man \
perl5311delta.man \
perl5312delta.man \
perl5313delta.man \
perl5302delta.html \
perl5310delta.html \
perl53110delta.html \
+ perl53111delta.html \
perl5311delta.html \
perl5312delta.html \
perl5313delta.html \
perl5302delta.tex \
perl5310delta.tex \
perl53110delta.tex \
+ perl53111delta.tex \
perl5311delta.tex \
perl5312delta.tex \
perl5313delta.tex \
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