diff --git a/.gitignore b/.gitignore index deb3c8d1043..80b2a8b7fc7 100644 --- a/.gitignore +++ b/.gitignore @@ -137,3 +137,8 @@ MANIFEST.new *.swp *~ .#* + +# test.valgrind final outputs, excluding intermediate files (pls report) +*.cachegrind +*.perf-stat +*.valgrind diff --git a/AUTHORS b/AUTHORS index 26ca16b2c95..910b8f2a3ab 100644 --- a/AUTHORS +++ b/AUTHORS @@ -315,6 +315,7 @@ Dominique Dumont Dominique Quatravaux Doug Campbell Doug MacEachern +Douglas Christopher Wilson Douglas E. Wegscheid Douglas Lankshear Douglas Wilson @@ -1016,6 +1017,7 @@ Steve Pearlmutter Steve Peters Steve Purkis Steve Vinoski +Stevan Little Steven Hirsch Steven Knight Steven Morlock diff --git a/Configure b/Configure index 74450a95e6b..42a0a19ee8e 100755 --- a/Configure +++ b/Configure @@ -28,7 +28,7 @@ # See Porting/pumpkin.pod for more information on metaconfig. # -# Generated on Sun Jul 31 12:11:29 CEST 2011 [metaconfig 3.5 PL0] +# Generated on Thu Sep 22 17:10:35 CEST 2011 [metaconfig 3.5 PL0] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <try.c < +#include +int func(bool x) +{ + return x ? 1 : 0; +} +int main(int argc, char **argv) +{ + return func(0); +} +EOCP +set try +if eval $compile; then + echo " found." >&4 + val="$define" +else + echo " NOT found." >&4 + val="$undef" +fi +$rm_try +set i_stdbool +eval $setvar + : see if stddef is available set stddef.h i_stddef eval $inhdr @@ -23051,6 +23081,7 @@ i_sgtty='$i_sgtty' i_shadow='$i_shadow' i_socks='$i_socks' i_stdarg='$i_stdarg' +i_stdbool='$i_stdbool' i_stddef='$i_stddef' i_stdlib='$i_stdlib' i_string='$i_string' diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index acbc403ee47..928efa709c0 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -32,12 +32,12 @@ alignbytes='4' ansi2knr='' aphostname='/bin/hostname' api_revision='5' -api_subversion='2' +api_subversion='3' api_version='15' -api_versionstring='5.15.2' +api_versionstring='5.15.3' ar='ar' -archlib='/usr/lib/perl5/5.15.2/armv4l-linux' -archlibexp='/usr/lib/perl5/5.15.2/armv4l-linux' +archlib='/usr/lib/perl5/5.15.3/armv4l-linux' +archlibexp='/usr/lib/perl5/5.15.3/armv4l-linux' archname64='' archname='armv4l-linux' archobjs='' @@ -55,7 +55,7 @@ castflags='0' cat='cat' cc='cc' cccdlflags='-fpic' -ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.15.2/armv4l-linux/CORE' +ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.15.3/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' @@ -89,6 +89,20 @@ csh='csh' ctermid_r_proto='0' ctime_r_proto='0' d_Gconvert='gcvt((x),(n),(b))' +d_PRIEUldbl='define' +d_PRIFUldbl='define' +d_PRIGUldbl='define' +d_PRIXU64='define' +d_PRId64='define' +d_PRIeldbl='define' +d_PRIfldbl='define' +d_PRIgldbl='define' +d_PRIi64='define' +d_PRIo64='define' +d_PRIu64='define' +d_PRIx64='define' +d_SCNfldbl='define' +d__fwalk='undef' d_access='define' d_accessx='undef' d_aintl='undef' @@ -108,9 +122,9 @@ d_attribute_unused='undef' d_attribute_warn_unused_result='undef' d_bcmp='define' d_bcopy='define' +d_bsd='undef' d_bsdgetpgrp='undef' d_bsdsetpgrp='undef' -d_bsd='undef' d_builtin_choose_expr='define' d_builtin_expect='define' d_bzero='define' @@ -131,8 +145,8 @@ d_cplusplus='undef' d_crypt='define' d_crypt_r='undef' d_csh='define' -d_ctermid_r='undef' d_ctermid='undef' +d_ctermid_r='undef' d_ctime64='undef' d_ctime_r='undef' d_cuserid='define' @@ -147,8 +161,8 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' -d_drand48proto='define' d_drand48_r='undef' +d_drand48proto='define' d_dup2='define' d_eaccess='undef' d_endgrent='define' @@ -169,11 +183,11 @@ d_faststdio='define' d_fchdir='define' d_fchmod='define' d_fchown='define' -d_fcntl_can_lock='define' d_fcntl='define' +d_fcntl_can_lock='define' d_fd_macros='define' -d_fds_bits='undef' d_fd_set='define' +d_fds_bits='undef' d_fgetpos='define' d_finite='define' d_finitel='define' @@ -181,11 +195,11 @@ d_flexfnam='define' d_flock='define' d_flockproto='define' d_fork='define' +d_fp_class='undef' d_fpathconf='define' +d_fpclass='undef' d_fpclassify='undef' d_fpclassl='undef' -d_fp_class='undef' -d_fpclass='undef' d_fpos64_t='undef' d_frexpl='define' d_fs_data_s='undef' @@ -197,11 +211,10 @@ d_fsync='define' d_ftello='define' d_ftime='undef' d_futimes='undef' -d__fwalk='undef' d_gdbm_ndbm_h_uses_prototypes='undef' d_gdbmndbm_h_uses_prototypes='undef' -d_getcwd='define' d_getaddrinfo='undef' +d_getcwd='define' d_getespwnam='undef' d_getfsstat='undef' d_getgrent='define' @@ -220,8 +233,8 @@ d_gethostprotos='define' d_getitimer='define' d_getlogin='define' d_getlogin_r='undef' -d_getmntent='define' d_getmnt='undef' +d_getmntent='define' d_getnameinfo='undef' d_getnbyaddr='define' d_getnbyname='define' @@ -282,8 +295,8 @@ d_ldbl_dig='define' d_libm_lib_version='define' d_link='define' d_localtime64='undef' -d_localtime_r_needs_tzset='undef' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='define' d_longdbl='define' @@ -313,27 +326,14 @@ d_modfl='define' d_modfl_pow32_bug='undef' d_modflproto='undef' d_mprotect='define' -d_msgctl='define' -d_msg_ctrunc='define' d_msg='define' +d_msg_ctrunc='define' d_msg_dontroute='define' -d_msgget='define' d_msg_oob='define' d_msg_peek='define' d_msg_proxy='define' -d_PRId64='define' -d_PRIeldbl='define' -d_PRIEUldbl='define' -d_PRIfldbl='define' -d_PRIFUldbl='define' -d_PRIgldbl='define' -d_PRIGUldbl='define' -d_PRIi64='define' -d_PRIo64='define' -d_PRIu64='define' -d_PRIx64='define' -d_PRIXU64='define' -d_SCNfldbl='define' +d_msgctl='define' +d_msgget='define' d_msghdr_s='define' d_msgrcv='define' d_msgsnd='define' @@ -676,6 +676,7 @@ i_sgtty='undef' i_shadow='define' i_socks='undef' i_stdarg='define' +i_stdbool='undef' i_stddef='define' i_stdlib='define' i_string='define' @@ -724,7 +725,7 @@ inc_version_list=' ' inc_version_list_init='0' incpath='' inews='' -installarchlib='./install_me_here/usr/lib/perl5/5.15.2/armv4l-linux' +installarchlib='./install_me_here/usr/lib/perl5/5.15.3/armv4l-linux' installbin='./install_me_here/usr/bin' installhtml1dir='' installhtml3dir='' @@ -732,13 +733,13 @@ installman1dir='./install_me_here/usr/share/man/man1' installman3dir='./install_me_here/usr/share/man/man3' installprefix='./install_me_here/usr' installprefixexp='./install_me_here/usr' -installprivlib='./install_me_here/usr/lib/perl5/5.15.2' +installprivlib='./install_me_here/usr/lib/perl5/5.15.3' installscript='./install_me_here/usr/bin' -installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.15.2/armv4l-linux' +installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.15.3/armv4l-linux' installsitebin='./install_me_here/usr/bin' installsitehtml1dir='' installsitehtml3dir='' -installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.15.2' +installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.15.3' installsiteman1dir='./install_me_here/usr/share/man/man1' installsiteman3dir='./install_me_here/usr/share/man/man3' installsitescript='./install_me_here/usr/bin' @@ -832,8 +833,8 @@ nroff='nroff' nvEUformat='"E"' nvFUformat='"F"' nvGUformat='"G"' -nv_preserves_uv_bits='32' nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' +nv_preserves_uv_bits='32' nveformat='"e"' nvfformat='"f"' nvgformat='"g"' @@ -867,8 +868,8 @@ pmake='' pr='' prefix='/usr' prefixexp='/usr' -privlib='/usr/lib/perl5/5.15.2' -privlibexp='/usr/lib/perl5/5.15.2' +privlib='/usr/lib/perl5/5.15.3' +privlibexp='/usr/lib/perl5/5.15.3' procselfexe='"/proc/self/exe"' prototype='define' ptrsize='4' @@ -891,18 +892,18 @@ sGMTIME_max='2147483647' sGMTIME_min='0' sLOCALTIME_max='2147483647' sLOCALTIME_min='0' +sPRIEUldbl='"E"' +sPRIFUldbl='"F"' +sPRIGUldbl='"G"' +sPRIXU64='"LX"' sPRId64='"Ld"' sPRIeldbl='"e"' -sPRIEUldbl='"E"' sPRIfldbl='"f"' -sPRIFUldbl='"F"' sPRIgldbl='"g"' -sPRIGUldbl='"G"' sPRIi64='"Li"' sPRIo64='"Lo"' sPRIu64='"Lu"' sPRIx64='"Lx"' -sPRIXU64='"LX"' sSCNfldbl='"f"' sched_yield='sched_yield()' scriptdir='/usr/bin' @@ -933,17 +934,17 @@ sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0' sig_size='68' signal_t='void' -sitearch='/usr/lib/perl5/site_perl/5.15.2/armv4l-linux' -sitearchexp='/usr/lib/perl5/site_perl/5.15.2/armv4l-linux' +sitearch='/usr/lib/perl5/site_perl/5.15.3/armv4l-linux' +sitearchexp='/usr/lib/perl5/site_perl/5.15.3/armv4l-linux' sitebin='/usr/bin' sitebinexp='/usr/bin' sitehtml1dir='' sitehtml1direxp='' sitehtml3dir='' sitehtml3direxp='' -sitelib='/usr/lib/perl5/site_perl/5.15.2' +sitelib='/usr/lib/perl5/site_perl/5.15.3' sitelib_stem='/usr/lib/perl5/site_perl' -sitelibexp='/usr/lib/perl5/site_perl/5.15.2' +sitelibexp='/usr/lib/perl5/site_perl/5.15.3' siteman1dir='/usr/share/man/man1' siteman1direxp='/usr/share/man/man1' siteman3dir='/usr/share/man/man3' @@ -967,6 +968,8 @@ srand48_r_proto='0' srandom_r_proto='0' src='.' ssizetype='ssize_t' +st_ino_sign='1' +st_ino_size='4' startperl='#!/usr/bin/perl' startsh='#!/bin/sh' static_ext=' ' @@ -977,12 +980,10 @@ stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)' stdio_filbuf='' stdio_ptr='((fp)->_IO_read_ptr)' stdio_stream_array='' -st_ino_sign='1' -st_ino_size='4' strerror_r_proto='0' strings='/usr/include/string.h' submit='' -subversion='2' +subversion='3' sysman='/usr/share/man/man1' tail='' tar='' @@ -1070,8 +1071,8 @@ vendorprefix='' vendorprefixexp='' vendorscript='' vendorscriptexp='' -version='5.15.2' -version_patchlevel_string='version 15 subversion 2' +version='5.15.3' +version_patchlevel_string='version 15 subversion 3' versiononly='undef' vi='' voidflags='15' @@ -1086,9 +1087,9 @@ config_args='' config_argc=0 PERL_REVISION=5 PERL_VERSION=15 -PERL_SUBVERSION=2 +PERL_SUBVERSION=3 PERL_API_REVISION=5 PERL_API_VERSION=15 -PERL_API_SUBVERSION=2 +PERL_API_SUBVERSION=3 PERL_PATCHLEVEL= PERL_CONFIG_SH=true diff --git a/Cross/config.sh-arm-linux-n770 b/Cross/config.sh-arm-linux-n770 index 74070d60cd6..243318ee6f5 100644 --- a/Cross/config.sh-arm-linux-n770 +++ b/Cross/config.sh-arm-linux-n770 @@ -32,12 +32,12 @@ alignbytes='4' ansi2knr='' aphostname='/bin/hostname' api_revision='5' -api_subversion='2' +api_subversion='3' api_version='15' -api_versionstring='5.15.2' +api_versionstring='5.15.3' ar='ar' -archlib='/usr/lib/perl5/5.15.2/armv4l-linux' -archlibexp='/usr/lib/perl5/5.15.2/armv4l-linux' +archlib='/usr/lib/perl5/5.15.3/armv4l-linux' +archlibexp='/usr/lib/perl5/5.15.3/armv4l-linux' archname64='' archname='armv4l-linux' archobjs='' @@ -55,7 +55,7 @@ castflags='0' cat='cat' cc='arm-none-linux-gnueabi-gcc' cccdlflags='-fpic' -ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.15.2/armv4l-linux/CORE' +ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.15.3/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' @@ -703,7 +703,7 @@ inc_version_list=' ' inc_version_list_init='0' incpath='' inews='' -installarchlib='./install_me_here/usr/lib/perl5/5.15.2/armv4l-linux' +installarchlib='./install_me_here/usr/lib/perl5/5.15.3/armv4l-linux' installbin='./install_me_here/usr/bin' installhtml1dir='' installhtml3dir='' @@ -711,13 +711,13 @@ installman1dir='./install_me_here/usr/share/man/man1' installman3dir='./install_me_here/usr/share/man/man3' installprefix='./install_me_here/usr' installprefixexp='./install_me_here/usr' -installprivlib='./install_me_here/usr/lib/perl5/5.15.2' +installprivlib='./install_me_here/usr/lib/perl5/5.15.3' installscript='./install_me_here/usr/bin' -installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.15.2/armv4l-linux' +installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.15.3/armv4l-linux' installsitebin='./install_me_here/usr/bin' installsitehtml1dir='' installsitehtml3dir='' -installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.15.2' +installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.15.3' installsiteman1dir='./install_me_here/usr/share/man/man1' installsiteman3dir='./install_me_here/usr/share/man/man3' installsitescript='./install_me_here/usr/bin' @@ -845,8 +845,8 @@ pmake='' pr='' prefix='/usr' prefixexp='/usr' -privlib='/usr/lib/perl5/5.15.2' -privlibexp='/usr/lib/perl5/5.15.2' +privlib='/usr/lib/perl5/5.15.3' +privlibexp='/usr/lib/perl5/5.15.3' procselfexe='"/proc/self/exe"' prototype='define' ptrsize='4' @@ -907,17 +907,17 @@ sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0' sig_size='68' signal_t='void' -sitearch='/usr/lib/perl5/site_perl/5.15.2/armv4l-linux' -sitearchexp='/usr/lib/perl5/site_perl/5.15.2/armv4l-linux' +sitearch='/usr/lib/perl5/site_perl/5.15.3/armv4l-linux' +sitearchexp='/usr/lib/perl5/site_perl/5.15.3/armv4l-linux' sitebin='/usr/bin' sitebinexp='/usr/bin' sitehtml1dir='' sitehtml1direxp='' sitehtml3dir='' sitehtml3direxp='' -sitelib='/usr/lib/perl5/site_perl/5.15.2' +sitelib='/usr/lib/perl5/site_perl/5.15.3' sitelib_stem='/usr/lib/perl5/site_perl' -sitelibexp='/usr/lib/perl5/site_perl/5.15.2' +sitelibexp='/usr/lib/perl5/site_perl/5.15.3' siteman1dir='/usr/share/man/man1' siteman1direxp='/usr/share/man/man1' siteman3dir='/usr/share/man/man3' @@ -954,7 +954,7 @@ stdio_stream_array='' strerror_r_proto='0' strings='/usr/include/string.h' submit='' -subversion='2' +subversion='3' sysman='/usr/share/man/man1' tail='' tar='' @@ -1040,8 +1040,8 @@ vendorprefix='' vendorprefixexp='' vendorscript='' vendorscriptexp='' -version='5.15.2' -version_patchlevel_string='version 15 subversion 2' +version='5.15.3' +version_patchlevel_string='version 15 subversion 3' versiononly='undef' vi='' voidflags='15' @@ -1056,9 +1056,9 @@ config_args='' config_argc=0 PERL_REVISION=5 PERL_VERSION=15 -PERL_SUBVERSION=2 +PERL_SUBVERSION=3 PERL_API_REVISION=5 PERL_API_VERSION=15 -PERL_API_SUBVERSION=2 +PERL_API_SUBVERSION=3 PERL_PATCHLEVEL= PERL_CONFIG_SH=true diff --git a/INSTALL b/INSTALL index c1bb175abc4..6955a180e03 100644 --- a/INSTALL +++ b/INSTALL @@ -530,7 +530,7 @@ The directories set up by Configure fall into three broad categories. =item Directories for the perl distribution -By default, Configure will use the following directories for 5.15.2. +By default, Configure will use the following directories for 5.15.3. $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 @@ -841,7 +841,7 @@ must contain a space separated list of directories under the site_perl directory, and has to include architecture-dependent directories separately, eg. - sh Configure -Dinc_version_list="5.15.2/x86_64-linux 5.14.0" ... + sh Configure -Dinc_version_list="5.15.3/x86_64-linux 5.14.0" ... When using the newer perl, you can add these paths again in the PERL5LIB environment variable or with perl's -I runtime option. @@ -2373,9 +2373,9 @@ won't interfere with another version. (The defaults guarantee this for libraries after 5.6.0, but not for executables. TODO?) One convenient way to do this is by using a separate prefix for each version, such as - sh Configure -Dprefix=/opt/perl5.15.2 + sh Configure -Dprefix=/opt/perl5.15.3 -and adding /opt/perl5.15.2/bin to the shell PATH variable. Such users +and adding /opt/perl5.15.3/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. @@ -2388,13 +2388,13 @@ seriously consider using a separate directory, since development subversions may not have all the compatibility wrinkles ironed out yet. -=head2 Upgrading from 5.15.0 or earlier +=head2 Upgrading from 5.15.2 or earlier -B Perl modules having binary parts (meaning that a C compiler is used) will have to be recompiled to be -used with 5.15.2. If you find you do need to rebuild an extension with -5.15.2, you may safely do so without disturbing the older +used with 5.15.3. If you find you do need to rebuild an extension with +5.15.3, you may safely do so without disturbing the older installations. (See L<"Coexistence with earlier versions of perl 5"> above.) diff --git a/MANIFEST b/MANIFEST index 9c7e0276955..aa7e9fdae96 100644 --- a/MANIFEST +++ b/MANIFEST @@ -362,6 +362,7 @@ cpan/CPAN-Meta/t/data/META-2.json cpan/CPAN-Meta/t/data/resources.yml cpan/CPAN-Meta/t/data/restricted-2.json cpan/CPAN-Meta/t/data/restrictive-1_4.yml +cpan/CPAN-Meta/t/data/unicode.yml cpan/CPAN-Meta/t/load-bad.t cpan/CPAN-Meta/t/meta-obj.t cpan/CPAN-Meta/t/no-index.t @@ -562,6 +563,7 @@ cpan/Devel-PPPort/parts/base/5008005 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/base/5008006 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/base/5008007 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/base/5008008 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5008009 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/base/5009000 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/base/5009001 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/base/5009002 Devel::PPPort baseline todo file @@ -569,7 +571,30 @@ cpan/Devel-PPPort/parts/base/5009003 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/base/5009004 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/base/5009005 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/base/5010000 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5010001 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/base/5011000 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5011001 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5011002 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5011003 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5011004 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5011005 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5012000 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5012001 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5012002 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5012003 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013000 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013001 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013002 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013003 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013004 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013005 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013006 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013007 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013008 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013009 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013010 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5013011 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/base/5014000 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/embed.fnc Devel::PPPort Perl API listing cpan/Devel-PPPort/parts/inc/call Devel::PPPort include cpan/Devel-PPPort/parts/inc/cop Devel::PPPort include @@ -636,6 +661,7 @@ cpan/Devel-PPPort/parts/todo/5008005 Devel::PPPort todo file cpan/Devel-PPPort/parts/todo/5008006 Devel::PPPort todo file cpan/Devel-PPPort/parts/todo/5008007 Devel::PPPort todo file cpan/Devel-PPPort/parts/todo/5008008 Devel::PPPort todo file +cpan/Devel-PPPort/parts/todo/5008009 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/todo/5009000 Devel::PPPort todo file cpan/Devel-PPPort/parts/todo/5009001 Devel::PPPort todo file cpan/Devel-PPPort/parts/todo/5009002 Devel::PPPort todo file @@ -643,7 +669,30 @@ cpan/Devel-PPPort/parts/todo/5009003 Devel::PPPort todo file cpan/Devel-PPPort/parts/todo/5009004 Devel::PPPort todo file cpan/Devel-PPPort/parts/todo/5009005 Devel::PPPort todo file cpan/Devel-PPPort/parts/todo/5010000 Devel::PPPort todo file +cpan/Devel-PPPort/parts/todo/5010001 Devel::PPPort baseline todo file cpan/Devel-PPPort/parts/todo/5011000 Devel::PPPort todo file +cpan/Devel-PPPort/parts/todo/5011001 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5011002 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5011003 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5011004 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5011005 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5012000 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5012001 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5012002 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5012003 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013000 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013001 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013002 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013003 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013004 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013005 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013006 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013007 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013008 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013009 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013010 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5013011 Devel::PPPort baseline todo file +cpan/Devel-PPPort/parts/todo/5014000 Devel::PPPort baseline todo file cpan/Devel-PPPort/ppport_h.PL Devel::PPPort ppport.h writer cpan/Devel-PPPort/PPPort_pm.PL Devel::PPPort PPPort.pm writer cpan/Devel-PPPort/PPPort.xs Devel::PPPort dummy PPPort.xs @@ -1818,6 +1867,7 @@ cpan/perlfaq/lib/perlfaq8.pod System Interaction cpan/perlfaq/lib/perlfaq9.pod Networking cpan/perlfaq/lib/perlfaq.pm Perl frequently asked questions cpan/perlfaq/lib/perlfaq.pod Perl frequently asked questions +cpan/perlfaq/lib/perlglossary.pod Perl Glossary cpan/PerlIO-via-QuotedPrint/lib/PerlIO/via/QuotedPrint.pm PerlIO::via::QuotedPrint cpan/PerlIO-via-QuotedPrint/t/QuotedPrint.t PerlIO::via::QuotedPrint cpan/Perl-OSType/lib/Perl/OSType.pm Perl::OSType @@ -2922,6 +2972,7 @@ dist/Carp/lib/Carp/Heavy.pm Error message retired workhorse dist/Carp/lib/Carp.pm Error message extension dist/Carp/Makefile.PL makefile writer for Carp dist/Carp/t/Carp.t See if Carp works +dist/Carp/t/heavy.t See if Carp::Heavy works dist/Carp/t/vivify_gv.t See if Carp leaves utf8:: stuff alone dist/constant/lib/constant.pm For "use constant" dist/constant/t/constant.t See if compile-time constants work @@ -3060,11 +3111,13 @@ dist/ExtUtils-ParseXS/t/XSUsage.xs ExtUtils::ParseXS tests dist/File-CheckTree/lib/File/CheckTree.pm Perl module supporting wholesale file mode validation dist/File-CheckTree/t/CheckTree.t See if File::CheckTree works dist/Filter-Simple/lib/Filter/Simple.pm Simple frontend to Filter::Util::Call +dist/Filter-Simple/t/code_no_comments.t See if Filter::Simple works dist/Filter-Simple/t/data.t See if Filter::Simple works dist/Filter-Simple/t/export.t See if Filter::Simple works dist/Filter-Simple/t/filter_only.t See if Filter::Simple works dist/Filter-Simple/t/filter.t See if Filter::Simple works dist/Filter-Simple/t/import.t See if Filter::Simple works +dist/Filter-Simple/t/lib/Filter/Simple/CodeNoComments.pm Helper file for Filter::Simple tests dist/Filter-Simple/t/lib/Filter/Simple/ExportTest.pm Helper file for Filter::Simple tests dist/Filter-Simple/t/lib/Filter/Simple/FilterOnlyTest.pm Helper file for Filter::Simple tests dist/Filter-Simple/t/lib/Filter/Simple/FilterTest.pm Helper file for Filter::Simple tests @@ -3120,6 +3173,7 @@ dist/IO/t/io_taint.t See if the untaint method from IO works dist/IO/t/io_tell.t See if seek()/tell()-related methods from IO work dist/IO/t/io_udp.t See if UDP socket-related methods from IO work dist/IO/t/io_unix.t See if UNIX socket-related methods from IO work +dist/IO/t/io_utf8argv.t See if <> respects open pragma dist/IO/t/io_utf8.t See if perlio opens work dist/IO/t/io_xs.t See if XSUB methods from IO work dist/lib/lib_pm.PL For "use lib", produces lib/lib.pm @@ -3643,6 +3697,7 @@ ext/POSIX/t/is.t See if POSIX isxxx() work ext/POSIX/t/math.t Basic math tests for POSIX ext/POSIX/t/posix.t See if POSIX works ext/POSIX/t/sigaction.t See if POSIX::sigaction works +ext/POSIX/t/sigset.t See if POSIX::SigSet works ext/POSIX/t/sysconf.t See if POSIX works ext/POSIX/t/taint.t See if POSIX works with taint ext/POSIX/t/termios.t See if POSIX works @@ -3752,6 +3807,7 @@ ext/XS-APItest/t/customop.t XS::APItest: tests for custom ops ext/XS-APItest/t/eval-filter.t Simple source filter/eval test ext/XS-APItest/t/exception.t XS::APItest extension ext/XS-APItest/t/fetch_pad_names.t Tests for UTF8 names in pad +ext/XS-APItest/t/gotosub.t XS::APItest: tests goto &xsub and hints ext/XS-APItest/t/grok.t XS::APItest: tests for grok* functions ext/XS-APItest/t/hash.t XS::APItest: tests for hash related APIs ext/XS-APItest/t/keyword_multiline.t test keyword plugin parsing across lines @@ -4381,40 +4437,20 @@ pod/perl5004delta.pod Perl changes in version 5.004 pod/perl5005delta.pod Perl changes in version 5.005 pod/perl5100delta.pod Perl changes in version 5.10.0 pod/perl5101delta.pod Perl changes in version 5.10.1 -pod/perl5110delta.pod Perl changes in version 5.11.0 -pod/perl5111delta.pod Perl changes in version 5.11.1 -pod/perl5112delta.pod Perl changes in version 5.11.2 -pod/perl5113delta.pod Perl changes in version 5.11.3 -pod/perl5114delta.pod Perl changes in version 5.11.4 -pod/perl5115delta.pod Perl changes in version 5.11.5 pod/perl5120delta.pod Perl changes in version 5.12.0 pod/perl5121delta.pod Perl changes in version 5.12.1 pod/perl5122delta.pod Perl changes in version 5.12.2 pod/perl5123delta.pod Perl changes in version 5.12.3 pod/perl5124delta.pod Perl changes in version 5.12.4 -pod/perl5130delta.pod Perl changes in version 5.13.0 -pod/perl51310delta.pod Perl changes in version 5.13.10 -pod/perl51311delta.pod Perl changes in version 5.13.11 -pod/perl5131delta.pod Perl changes in version 5.13.1 -pod/perl5132delta.pod Perl changes in version 5.13.2 -pod/perl5133delta.pod Perl changes in version 5.13.3 -pod/perl5134delta.pod Perl changes in version 5.13.4 -pod/perl5135delta.pod Perl changes in version 5.13.5 -pod/perl5136delta.pod Perl changes in version 5.13.6 -pod/perl5137delta.pod Perl changes in version 5.13.7 -pod/perl5138delta.pod Perl changes in version 5.13.8 -pod/perl5139delta.pod Perl changes in version 5.13.9 pod/perl5140delta.pod Perl changes in version 5.14.0 pod/perl5141delta.pod Perl changes in version 5.14.1 +pod/perl5142delta.pod Perl changes in version 5.14.2 pod/perl5150delta.pod Perl changes in version 5.15.0 pod/perl5151delta.pod Perl changes in version 5.15.1 pod/perl5152delta.pod Perl changes in version 5.15.2 +pod/perl5153delta.pod Perl changes in version 5.15.3 pod/perl561delta.pod Perl changes in version 5.6.1 pod/perl56delta.pod Perl changes in version 5.6 -pod/perl570delta.pod Perl changes in version 5.7.0 -pod/perl571delta.pod Perl changes in version 5.7.1 -pod/perl572delta.pod Perl changes in version 5.7.2 -pod/perl573delta.pod Perl changes in version 5.7.3 pod/perl581delta.pod Perl changes in version 5.8.1 pod/perl582delta.pod Perl changes in version 5.8.2 pod/perl583delta.pod Perl changes in version 5.8.3 @@ -4425,17 +4461,11 @@ pod/perl587delta.pod Perl changes in version 5.8.7 pod/perl588delta.pod Perl changes in version 5.8.8 pod/perl589delta.pod Perl changes in version 5.8.9 pod/perl58delta.pod Perl changes in version 5.8.0 -pod/perl590delta.pod Perl changes in version 5.9.0 -pod/perl591delta.pod Perl changes in version 5.9.1 -pod/perl592delta.pod Perl changes in version 5.9.2 -pod/perl593delta.pod Perl changes in version 5.9.3 -pod/perl594delta.pod Perl changes in version 5.9.4 -pod/perl595delta.pod Perl changes in version 5.9.5 pod/perlapio.pod Perl internal IO abstraction interface pod/perlartistic.pod Perl Artistic License pod/perlbook.pod Perl book information -pod/perlboot.pod Perl OO tutorial for beginners -pod/perlbot.pod Perl OO tricks and examples +pod/perlboot.pod +pod/perlbot.pod pod/perlcall.pod Perl calling conventions from C pod/perlcheat.pod Perl cheat sheet pod/perlclib.pod Internal replacements for standard C library functions @@ -4457,7 +4487,6 @@ pod/perlfork.pod Perl fork() information pod/perlform.pod Perl formats pod/perlfunc.pod Perl built-in functions pod/perlgit.pod Using git with the Perl repository -pod/perlglossary.pod Perl Glossary pod/perlgpl.pod GNU General Public License pod/perlguts.pod Perl internal functions for those doing extensions pod/perlhack.pod Perl hackers guide @@ -4479,6 +4508,7 @@ pod/perlmroapi.pod Perl method resolution plugin interface pod/perlnewmod.pod Perl modules: preparing a new module for distribution pod/perlnumber.pod Perl number semantics pod/perlobj.pod Perl objects +pod/perlootut.pod Perl OO tutorial for beginners pod/perlopentut.pod Perl open() tutorial pod/perlop.pod Perl operators and precedence pod/perlpacktut.pod Perl pack() and unpack() tutorial @@ -4509,8 +4539,8 @@ pod/perlsyn.pod Perl syntax pod/perlthrtut.pod Perl threads tutorial pod/perltie.pod Perl objects hidden behind simple variables pod/perltodo.pod Perl things to do -pod/perltooc.pod Perl OO tutorial, part 2 -pod/perltoot.pod Perl OO tutorial, part 1 +pod/perltooc.pod +pod/perltoot.pod pod/perltrap.pod Perl traps for the unwary pod/perlunicode.pod Perl Unicode support pod/perlunifaq.pod Perl Unicode FAQ @@ -4791,6 +4821,7 @@ t/io/print.t See if print commands work t/io/pvbm.t See if PVBMs break IO commands t/io/read.t See if read works t/io/say.t See if say works +t/io/shm.t See if SysV shared memory works t/io/tell.t See if file seeking works t/io/through.t See if pipe passes data intact t/io/utf8.t See if file seeking works @@ -4911,8 +4942,7 @@ t/op/anonsub.t See if anonymous subroutines work t/op/append.t See if . works t/op/args.t See if operations on @_ work t/op/arith.t See if arithmetic works -t/op/array_base.aux Auxiliary file for the $[ test -t/op/array_base.t Tests for the $[, which is deprecated +t/op/array_base.t Tests for the remnant of $[ t/op/array.t See if array operations work t/op/assignwarn.t See if OP= operators warn correctly for undef targets t/op/attrhand.t See if attribute handlers work @@ -5094,6 +5124,7 @@ t/porting/authors.t Check that all authors have been acknowledged t/porting/bincompat.t Check that {non_,}bincompat_options are ordered t/porting/buildtoc.t Check that various pod lists are consistent t/porting/checkcase.t Check whether we are case-insensitive-fs-friendly +t/porting/checkcfgvar.t Check that all config.sh-like files are good t/porting/cmp_version.t Test whether all changed module files have their VERSION bumped t/porting/diag.t Test completeness of perldiag.pod t/porting/dual-life.t Check that dual-life bins are in utils/ @@ -5283,12 +5314,10 @@ win32/ce-helpers/compile.bat WinCE port win32/ce-helpers/comp.pl WinCE port win32/ce-helpers/makedist.pl WinCE port win32/ce-helpers/registry.bat WinCE port -win32/config.bc Win32 base line config.sh (Borland C++ build) win32/config.ce WinCE port win32/config.gc Win32 base line config.sh (MinGW build) win32/config.gc64 Win64 base line config.sh (MinGW build) win32/config.gc64nox Win64 base line config.sh (MinGW build) -win32/config_H.bc Win32 config header (Borland C++ build) win32/config_H.ce WinCE port win32/config_H.gc Win32 config header (MinGW build) win32/config_H.gc64 Win64 config header (MinGW build) @@ -5303,7 +5332,6 @@ win32/create_perllibst_h.pl creates perllibst.h file for inclusion from perllib. win32/distclean.bat Remove _ALL_ files not listed here in MANIFEST win32/fcrypt.c crypt() implementation win32/FindExt.pm Scan for extensions -win32/genmk95.pl Perl code to generate command.com-usable makefile.95 win32/include/arpa/inet.h Win32 port win32/include/dirent.h Win32 port win32/include/netdb.h Win32 port @@ -5323,7 +5351,6 @@ win32/perlmaince.c WinCE port win32/perl.rc WinCE port win32/pod.mak Win32 port win32/runperl.c Win32 port -win32/sync_ext.pl Win32 port win32/vdir.h Perl "host" virtual directory manager for CE win32/vmem.h Perl "host" memory manager for CE win32/win32.c Win32 port diff --git a/META.yml b/META.yml index 3585f16f83c..221520b01d5 100644 --- a/META.yml +++ b/META.yml @@ -1,5 +1,5 @@ name: perl -version: 5.015002 +version: 5.015003 abstract: The Perl 5 language interpreter author: perl5-porters@perl.org license: perl @@ -94,6 +94,7 @@ no_index: - dist/IO/t/io_udp.t - dist/IO/t/io_unix.t - dist/IO/t/io_utf8.t + - dist/IO/t/io_utf8argv.t - dist/IO/t/io_xs.t - dist/lib/lib_pm.PL - dist/lib/Makefile.PL diff --git a/Makefile.SH b/Makefile.SH index f8c0b85a57a..65c309e5c43 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -333,7 +333,8 @@ $make_set_make # If you're going to use valgrind and it can't be invoked as plain valgrind # then you'll need to change this, or override it on the make command line. -VALGRIND=valgrind +VALGRIND ?= valgrind +VG_TEST ?= ./perl -e 1 2>/dev/null DTRACE = $dtrace DTRACE_H = $dtrace_h @@ -466,7 +467,7 @@ mini_obj = $(minindt_obj) $(MINIDTRACE_O) ndt_obj = $(obj0) $(obj1) $(obj2) $(obj3) $(ARCHOBJS) obj = $(ndt_obj) $(DTRACE_O) -perltoc_pod_prereqs = extra.pods pod/perl5153delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod +perltoc_pod_prereqs = extra.pods pod/perl5154delta.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 @@ -891,7 +892,7 @@ perl.valgrind.config: config.sh @grep "^usemymalloc=" config.sh @grep "^usemymalloc='n'" config.sh >/dev/null || exit 1 @echo "And of course you have to have valgrind..." - $(VALGRIND) ./perl -e 1 2>/dev/null || exit 1 + $(VALGRIND) $(VG_TEST) || exit 1 # Third Degree Perl (Tru64 only) @@ -1037,8 +1038,8 @@ pod/perlintern.pod: $(MINIPERL_EXE) autodoc.pl embed.fnc pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST $(MINIPERL) $(Icwd) pod/perlmodlib.PL -q -pod/perl5153delta.pod: pod/perldelta.pod - $(LNS) perldelta.pod pod/perl5153delta.pod +pod/perl5154delta.pod: pod/perldelta.pod + $(LNS) perldelta.pod pod/perl5154delta.pod extra.pods: $(MINIPERL_EXE) -@test ! -f extra.pods || rm -f `cat extra.pods` diff --git a/NetWare/CLIBsdio.h b/NetWare/CLIBsdio.h index 76aba02d601..b2db369c4ae 100644 --- a/NetWare/CLIBsdio.h +++ b/NetWare/CLIBsdio.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/CLIBstr.h b/NetWare/CLIBstr.h index e025c0428ca..4b26fc987b3 100644 --- a/NetWare/CLIBstr.h +++ b/NetWare/CLIBstr.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/CLIBstuf.c b/NetWare/CLIBstuf.c index 0e649dce976..26a4a4b5022 100644 --- a/NetWare/CLIBstuf.c +++ b/NetWare/CLIBstuf.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/CLIBstuf.h b/NetWare/CLIBstuf.h index 90f3557989c..78671fd1826 100644 --- a/NetWare/CLIBstuf.h +++ b/NetWare/CLIBstuf.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/Main.c b/NetWare/Main.c index d23ce6843bd..5116cbcfe1b 100644 --- a/NetWare/Main.c +++ b/NetWare/Main.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/Makefile b/NetWare/Makefile index 90747871adb..0eb11497f73 100644 --- a/NetWare/Makefile +++ b/NetWare/Makefile @@ -86,7 +86,7 @@ NLM_VERSION = 3,20,0 # Here comes the CW tools - TO BE FILLED TO BUILD WITH CW - -MODULE_DESC = "Perl 5.15.2 for NetWare" +MODULE_DESC = "Perl 5.15.3 for NetWare" CCTYPE = CodeWarrior C_COMPILER = mwccnlm -c CPP_COMPILER = mwccnlm @@ -462,7 +462,7 @@ INST_NW_TOP2 = $(INST_NW_DRV)\perl # versioned installation can be obtained by setting INST_TOP above to a # path that includes an arbitrary version string. # -INST_VER = \5.15.2 +INST_VER = \5.15.3 # # Comment this out if you DON'T want your perl installation to have @@ -864,8 +864,7 @@ all : .cleanoldfiles .\nwconfig.h $(CONFIGPM) $(NLM_NAME) $(EXTENSION_NLM) $(EXT $(MINIPERL) -I..\lib config_sh.PL $(NW_CFG_VARS) config.nw5 > ..\config.sh # this target is for when changes to the main config.sh happen -# edit config.{b,v,g,w}c and make this target once for each supported -# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`) +# edit config.wc and make this target regen_config_h: perl config_sh.PL $(NW_CFG_VARS) $(NW_CFGSH_TMPL) > ..\config.sh cd .. diff --git a/NetWare/NWTInfo.c b/NetWare/NWTInfo.c index 4180fa796f6..b057d56b2ad 100644 --- a/NetWare/NWTInfo.c +++ b/NetWare/NWTInfo.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/NWUtil.c b/NetWare/NWUtil.c index 8db93c60cfc..15e90cb4811 100644 --- a/NetWare/NWUtil.c +++ b/NetWare/NWUtil.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/Nwmain.c b/NetWare/Nwmain.c index a64534ecca1..0b9728a8ac8 100644 --- a/NetWare/Nwmain.c +++ b/NetWare/Nwmain.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/Nwpipe.c b/NetWare/Nwpipe.c index 9caf2daa4a9..ce9c19800d6 100644 --- a/NetWare/Nwpipe.c +++ b/NetWare/Nwpipe.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/config.wc b/NetWare/config.wc index e0cd3005d94..419aa83ea47 100644 --- a/NetWare/config.wc +++ b/NetWare/config.wc @@ -1,7 +1,6 @@ ## Configured by: ~cf_email~ ## Target system: NetWare Author='Guruprasad' -PERL_CONFIG_SH='true' Date='$Date' Header='' Id='$Id' @@ -130,11 +129,11 @@ d_cmsghdr_s='undef' d_const='define' d_copysignl='undef' d_cplusplus='undef' -d_crypt_r='undef' d_crypt='undef' +d_crypt_r='undef' d_csh='undef' -d_ctermid_r='undef' d_ctermid='undef' +d_ctermid_r='undef' d_ctime64='undef' d_ctime_r='undef' d_cuserid='undef' @@ -149,20 +148,20 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' -d_drand48proto='undef' d_drand48_r='undef' +d_drand48proto='undef' d_dup2='define' d_eaccess='undef' -d_endgrent_r='undef' d_endgrent='undef' +d_endgrent_r='undef' d_endhent='undef' d_endhostent_r='undef' d_endnent='undef' d_endnetent_r='undef' d_endpent='undef' d_endprotoent_r='undef' -d_endpwent_r='undef' d_endpwent='undef' +d_endpwent_r='undef' d_endsent='undef' d_endservent_r='undef' d_endspent='undef' @@ -172,23 +171,23 @@ d_faststdio='undef' d_fchdir='undef' d_fchmod='undef' d_fchown='undef' -d_fcntl_can_lock='undef' d_fcntl='undef' +d_fcntl_can_lock='undef' d_fd_macros='define' -d_fds_bits='define' d_fd_set='define' +d_fds_bits='define' d_fgetpos='define' -d_finitel='undef' d_finite='undef' +d_finitel='undef' d_flexfnam='define' d_flock='define' d_flockproto='undef' d_fork='undef' +d_fp_class='undef' d_fpathconf='undef' +d_fpclass='undef' d_fpclassify='undef' d_fpclassl='undef' -d_fp_class='undef' -d_fpclass='undef' d_fpos64_t='undef' d_frexpl='undef' d_fs_data_s='undef' @@ -206,8 +205,8 @@ d_getaddrinfo='undef' d_getcwd='define' d_getespwnam='undef' d_getfsstat='undef' -d_getgrent_r='undef' d_getgrent='undef' +d_getgrent_r='undef' d_getgrgid_r='undef' d_getgrnam_r='undef' d_getgrps='undef' @@ -222,8 +221,8 @@ d_gethostprotos='define' d_getitimer='undef' d_getlogin='define' d_getlogin_r='undef' -d_getmntent='undef' d_getmnt='undef' +d_getmntent='undef' d_getnameinfo='undef' d_getnbyaddr='undef' d_getnbyname='undef' @@ -246,8 +245,8 @@ d_getprotobynumber_r='undef' d_getprotoent_r='undef' d_getprotoprotos='define' d_getprpwnam='undef' -d_getpwent_r='undef' d_getpwent='undef' +d_getpwent_r='undef' d_getpwnam_r='undef' d_getpwuid_r='undef' d_getsbyname='define' @@ -258,8 +257,8 @@ d_getservbyport_r='undef' d_getservent_r='undef' d_getservprotos='define' d_getspent='undef' -d_getspnam_r='undef' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='undef' d_gmtime64='undef' d_gmtime_r='undef' @@ -277,16 +276,16 @@ d_int64_t='undef' d_isascii='define' d_isfinite='undef' d_isinf='undef' -d_isnanl='undef' d_isnan='undef' +d_isnanl='undef' d_killpg='undef' d_lchown='undef' d_ldbl_dig='define' d_libm_lib_version='undef' d_link='define' d_localtime64='undef' -d_localtime_r_needs_tzset='undef' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='undef' d_longdbl='define' @@ -307,26 +306,26 @@ d_memset='define' d_mkdir='define' d_mkdtemp='undef' d_mkfifo='undef' -d_mkstemps='undef' d_mkstemp='undef' +d_mkstemps='undef' d_mktime64='undef' d_mktime='define' d_mmap='undef' +d_modfl='undef' d_modfl_pow32_bug='undef' d_modflproto='undef' -d_modfl='undef' d_mprotect='undef' -d_msgctl='undef' +d_msg='undef' d_msg_ctrunc='undef' d_msg_dontroute='undef' -d_msgget='undef' -d_msghdr_s='undef' d_msg_oob='undef' d_msg_peek='undef' d_msg_proxy='undef' +d_msgctl='undef' +d_msgget='undef' +d_msghdr_s='undef' d_msgrcv='undef' d_msgsnd='undef' -d_msg='undef' d_msync='undef' d_munmap='undef' d_mymalloc='undef' @@ -452,9 +451,9 @@ d_srandom_r='undef' d_sresgproto='undef' d_sresuproto='undef' d_statblks='undef' -d_static_inline='undef' d_statfs_f_flags='undef' d_statfs_s='undef' +d_static_inline='undef' d_statvfs='undef' d_stdio_cnt_lval='undef' d_stdio_ptr_lval='undef' @@ -659,6 +658,7 @@ i_sgtty='undef' i_shadow='undef' i_socks='undef' i_stdarg='define' +i_stdbool='define' i_stddef='define' i_stdlib='define' i_string='define' @@ -808,8 +808,8 @@ nroff='' nvEUformat='"E"' nvFUformat='"F"' nvGUformat='"G"' -nv_preserves_uv_bits='32' nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' +nv_preserves_uv_bits='32' nveformat='"e"' nvfformat='"f"' nvgformat='"g"' @@ -830,9 +830,9 @@ patchlevel='~PATCHLEVEL~' path_sep=';' perl5='' perl='perl' +perl_static_inline='static' perladmin='' perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.nlm' -perl_static_inline='static' pg='' phostname='hostname' pidtype='int' @@ -932,6 +932,8 @@ srand48_r_proto='0' srandom_r_proto='0' src='' ssizetype='int' +st_ino_sign='1' +st_ino_size='4' startperl='#!perl' startsh='#!/bin/sh' static_ext='DynaLoader' @@ -942,8 +944,6 @@ stdio_cnt='((fp)->_cnt)' stdio_filbuf='' stdio_ptr='((fp)->_ptr)' stdio_stream_array='' -st_ino_sign='1' -st_ino_size='4' strerror_r_proto='0' strings='/usr/include/string.h' submit='' @@ -1038,6 +1038,7 @@ PERL_API_SUBVERSION='~PERL_API_SUBVERSION~' PERL_API_VERSION='~PERL_API_VERSION~' PATCHLEVEL='~PERL_VERSION~' SUBVERSION='~PERL_SUBVERSION~' +PERL_CONFIG_SH='true' base_import='' nlm_version='' mpktool='' diff --git a/NetWare/config_H.wc b/NetWare/config_H.wc index c2591b94e41..8edb4ab47dd 100644 --- a/NetWare/config_H.wc +++ b/NetWare/config_H.wc @@ -1048,7 +1048,7 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "c:\\perl\\5.15.2\\lib\\NetWare-x86-multi-thread" /**/ +#define ARCHLIB "c:\\perl\\5.15.3\\lib\\NetWare-x86-multi-thread" /**/ /*#define ARCHLIB_EXP "" /**/ /* ARCHNAME: @@ -1079,8 +1079,8 @@ * This symbol is the filename expanded version of the BIN symbol, for * programs that do not want to deal with that at run-time. */ -#define BIN "c:\\perl\\5.15.2\\bin\\NetWare-x86-multi-thread" /**/ -#define BIN_EXP "c:\\perl\\5.15.2\\bin\\NetWare-x86-multi-thread" /**/ +#define BIN "c:\\perl\\5.15.3\\bin\\NetWare-x86-multi-thread" /**/ +#define BIN_EXP "c:\\perl\\5.15.3\\bin\\NetWare-x86-multi-thread" /**/ /* BYTEORDER: * This symbol holds the hexadecimal constant defined in byteorder, @@ -3063,7 +3063,7 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "c:\\perl\\site\\5.15.2\\lib\\NetWare-x86-multi-thread" /**/ +#define SITEARCH "c:\\perl\\site\\5.15.3\\lib\\NetWare-x86-multi-thread" /**/ /*#define SITEARCH_EXP "" /**/ /* SITELIB: @@ -3086,7 +3086,7 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "c:\\perl\\site\\5.15.2\\lib" /**/ +#define SITELIB "c:\\perl\\site\\5.15.3\\lib" /**/ /*#define SITELIB_EXP "" /**/ #define SITELIB_STEM "" /**/ diff --git a/NetWare/deb.h b/NetWare/deb.h index ece19c2d432..e79a8f41a76 100644 --- a/NetWare/deb.h +++ b/NetWare/deb.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/intdef.h b/NetWare/intdef.h index ca8474691c4..4c566c4e45b 100644 --- a/NetWare/intdef.h +++ b/NetWare/intdef.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/interface.c b/NetWare/interface.c index 2cdadca2fa6..29a8dc0d243 100644 --- a/NetWare/interface.c +++ b/NetWare/interface.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/interface.cpp b/NetWare/interface.cpp index 47fef6709c0..aef71f9ffad 100644 --- a/NetWare/interface.cpp +++ b/NetWare/interface.cpp @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/interface.h b/NetWare/interface.h index b6dd4a076e4..98979937e34 100644 --- a/NetWare/interface.h +++ b/NetWare/interface.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/iperlhost.h b/NetWare/iperlhost.h index 3204c2cca99..cc1754afb3d 100644 --- a/NetWare/iperlhost.h +++ b/NetWare/iperlhost.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/netware.h b/NetWare/netware.h index 18089d58d58..c106476e28d 100644 --- a/NetWare/netware.h +++ b/NetWare/netware.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nw5.c b/NetWare/nw5.c index 7f9eebee787..531b308efad 100644 --- a/NetWare/nw5.c +++ b/NetWare/nw5.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nw5iop.h b/NetWare/nw5iop.h index 27cd0a11ebd..0026b321811 100644 --- a/NetWare/nw5iop.h +++ b/NetWare/nw5iop.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -191,14 +191,6 @@ END_EXTERN_C #undef uname #undef wait -#ifdef __BORLANDC__ -#undef ungetc -#undef getc -#undef putc -#undef getchar -#undef putchar -#undef fileno -#endif #define environ (*nw_environ()) diff --git a/NetWare/nw5sck.c b/NetWare/nw5sck.c index 46069a3ab28..35dee92bf12 100644 --- a/NetWare/nw5sck.c +++ b/NetWare/nw5sck.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nw5sck.h b/NetWare/nw5sck.h index 5c0e333da4e..afe2f9369c2 100644 --- a/NetWare/nw5sck.h +++ b/NetWare/nw5sck.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nw5thread.c b/NetWare/nw5thread.c index 9ff2c326055..abedb5c2da1 100644 --- a/NetWare/nw5thread.c +++ b/NetWare/nw5thread.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nw5thread.h b/NetWare/nw5thread.h index ad70db01fa3..b1a2534b683 100644 --- a/NetWare/nw5thread.h +++ b/NetWare/nw5thread.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -154,7 +154,7 @@ typedef unsigned long perl_mutex; #endif //#if 0 //Following has to be defined CHKSGP -#if defined(PERLDLL) && defined(USE_DECLSPEC_THREAD) && (!defined(__BORLANDC__) || defined(_DLL)) +#if defined(PERLDLL) && defined(USE_DECLSPEC_THREAD) extern __declspec(thread) void *PL_current_context; #define PERL_SET_CONTEXT(t) (PL_current_context = t) #define PERL_GET_CONTEXT PL_current_context diff --git a/NetWare/nwhashcls.cpp b/NetWare/nwhashcls.cpp index 1c582a59ad9..2bf24856e51 100644 --- a/NetWare/nwhashcls.cpp +++ b/NetWare/nwhashcls.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwhashcls.h b/NetWare/nwhashcls.h index 88956afb865..55ff2002203 100644 --- a/NetWare/nwhashcls.h +++ b/NetWare/nwhashcls.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwperlhost.h b/NetWare/nwperlhost.h index 9839184985d..c69e554489b 100644 --- a/NetWare/nwperlhost.h +++ b/NetWare/nwperlhost.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwperlsys.c b/NetWare/nwperlsys.c index 9eca5225f7f..32c15cb4380 100644 --- a/NetWare/nwperlsys.c +++ b/NetWare/nwperlsys.c @@ -1,5 +1,5 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwperlsys.h b/NetWare/nwperlsys.h index ff41d695621..3d82dd1c8dd 100644 --- a/NetWare/nwperlsys.h +++ b/NetWare/nwperlsys.h @@ -1,5 +1,5 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwpipe.h b/NetWare/nwpipe.h index 4e9354a4155..462a73dcf42 100644 --- a/NetWare/nwpipe.h +++ b/NetWare/nwpipe.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwplglob.c b/NetWare/nwplglob.c index 51a3e5e3e89..6810fd5e697 100644 --- a/NetWare/nwplglob.c +++ b/NetWare/nwplglob.c @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwplglob.h b/NetWare/nwplglob.h index 1c9d9e4b583..cf60e731696 100644 --- a/NetWare/nwplglob.h +++ b/NetWare/nwplglob.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwstdio.h b/NetWare/nwstdio.h index 4aabb0a8150..50ab6f3d43c 100644 --- a/NetWare/nwstdio.h +++ b/NetWare/nwstdio.h @@ -1,5 +1,5 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwtinfo.h b/NetWare/nwtinfo.h index 25d78a720fb..a08d060422c 100644 --- a/NetWare/nwtinfo.h +++ b/NetWare/nwtinfo.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwutil.h b/NetWare/nwutil.h index 6c8f14489f1..ff05d1830f3 100644 --- a/NetWare/nwutil.h +++ b/NetWare/nwutil.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/nwvmem.h b/NetWare/nwvmem.h index da41afd4e99..e82eaeef8b5 100644 --- a/NetWare/nwvmem.h +++ b/NetWare/nwvmem.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/perllib.cpp b/NetWare/perllib.cpp index a9eb8248608..32f8ed2aae7 100644 --- a/NetWare/perllib.cpp +++ b/NetWare/perllib.cpp @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/NetWare/win32ish.h b/NetWare/win32ish.h index a8fcbcde258..f6603d50f44 100644 --- a/NetWare/win32ish.h +++ b/NetWare/win32ish.h @@ -1,6 +1,6 @@ /* - * Copyright 2001 Novell, Inc. All Rights Reserved. + * Copyright © 2001 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/Porting/Glossary b/Porting/Glossary index 9134dfa1b6b..ceed6a5e58d 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -3164,6 +3164,11 @@ i_stdarg (i_varhdr.U): indicates to the C program that exists and should be included. +i_stdbool (i_stdbool.U): + This variable conditionally defines the I_STDBOOL symbol, which + indicates to the C program that exists and should + be included. + i_stddef (i_stddef.U): This variable conditionally defines the I_STDDEF symbol, which indicates to the C program that exists and should diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 45adbc480c0..d1775e936c6 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -7,8 +7,10 @@ package Maintainers; +use utf8; use File::Glob qw(:case); + %Maintainers = ( 'abergman' => 'Arthur Bergman ', @@ -18,7 +20,7 @@ package Maintainers; 'andya' => 'Andy Armstrong ', 'arandal' => 'Allison Randal ', 'audreyt' => 'Audrey Tang ', - 'avar' => 'var Arnfjr Bjarmason ', + 'avar' => 'Ævar Arnfjörð Bjarmason ', 'bingos' => 'Chris Williams ', 'chorny' => 'Alexandr Ciornii ', 'corion' => 'Max Maischein ', @@ -74,8 +76,8 @@ package Maintainers; 'rra' => 'Russ Allbery ', 'rurban' => 'Reini Urban ', 'sadahiro' => 'SADAHIRO Tomoyuki ', - 'salva' => 'Salvador Fandio Garca ', - 'saper' => 'Sbastien Aperghis-Tramoni ', + 'salva' => 'Salvador Fandiño García ', + 'saper' => 'Sébastien Aperghis-Tramoni ', 'sartak' => 'Shawn M Moore ', 'sbeck' => 'Sullivan Beck ', 'sburke' => 'Sean Burke ', @@ -207,7 +209,7 @@ package Maintainers; 'Archive::Tar' => { 'MAINTAINER' => 'kane', - 'DISTRIBUTION' => 'BINGOS/Archive-Tar-1.76.tar.gz', + 'DISTRIBUTION' => 'BINGOS/Archive-Tar-1.78.tar.gz', 'FILES' => q[cpan/Archive-Tar], 'EXCLUDED' => [ qw(Makefile.PL) ], 'UPSTREAM' => 'cpan', @@ -343,7 +345,7 @@ package Maintainers; 'Carp' => { 'MAINTAINER' => 'zefram', - 'DISTRIBUTION' => 'ZEFRAM/Carp-1.22.tar.gz', + 'DISTRIBUTION' => 'ZEFRAM/Carp-1.23.tar.gz', 'FILES' => q[dist/Carp], 'UPSTREAM' => 'blead', }, @@ -460,7 +462,7 @@ package Maintainers; 'CPANPLUS' => { 'MAINTAINER' => 'kane', - 'DISTRIBUTION' => 'BINGOS/CPANPLUS-0.9110.tar.gz', + 'DISTRIBUTION' => 'BINGOS/CPANPLUS-0.9111.tar.gz', 'FILES' => q[cpan/CPANPLUS], 'EXCLUDED' => [ qr{^inc/}, qr{^t/dummy-.*\.hidden$}, @@ -494,7 +496,7 @@ package Maintainers; 'CPAN::Meta' => { 'MAINTAINER' => 'dagolden', - 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-2.112150.tar.gz', + 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-2.112621.tar.gz', 'FILES' => q[cpan/CPAN-Meta], 'EXCLUDED' => [ qr/^xt/, @@ -506,7 +508,7 @@ package Maintainers; 'CPAN::Meta::YAML' => { 'MAINTAINER' => 'dagolden', - 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-YAML-0.003.tar.gz', + 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-YAML-0.004.tar.gz', 'FILES' => q[cpan/CPAN-Meta-YAML], 'EXCLUDED' => [ 't/04_scalar.t', # requires YAML.pm @@ -561,7 +563,7 @@ package Maintainers; 'Devel::PPPort' => { 'MAINTAINER' => 'mhx', - 'DISTRIBUTION' => 'MHX/Devel-PPPort-3.19.tar.gz', + 'DISTRIBUTION' => 'MHX/Devel-PPPort-3.20.tar.gz', 'FILES' => q[cpan/Devel-PPPort], 'EXCLUDED' => [ qw{PPPort.pm} ], # we use PPPort_pm.PL instead 'UPSTREAM' => 'cpan', @@ -668,7 +670,7 @@ package Maintainers; 'Exporter' => { 'MAINTAINER' => 'ferreira', - 'DISTRIBUTION' => 'FERREIRA/Exporter-5.63.tar.gz', + 'DISTRIBUTION' => 'TODDR/Exporter-5.65.tar.gz', 'FILES' => q[lib/Exporter.pm lib/Exporter.t lib/Exporter/Heavy.pm @@ -754,7 +756,7 @@ package Maintainers; 'ExtUtils::ParseXS' => { 'MAINTAINER' => 'smueller', - 'DISTRIBUTION' => 'SMUELLER/ExtUtils-ParseXS-3.04_03.tar.gz', + 'DISTRIBUTION' => 'SMUELLER/ExtUtils-ParseXS-3.04_04.tar.gz', 'FILES' => q[dist/ExtUtils-ParseXS], 'UPSTREAM' => 'blead', }, @@ -762,9 +764,10 @@ package Maintainers; 'perlfaq' => { 'MAINTAINER' => 'perlfaq', - 'DISTRIBUTION' => 'LLAP/perlfaq-5.01500302.tar.gz', + 'DISTRIBUTION' => 'LLAP/perlfaq-5.0150035.tar.gz', 'FILES' => q[cpan/perlfaq], - 'EXCLUDED' => [ qw(t/release-pod-syntax.t) ], + 'EXCLUDED' => [ qw(t/release-pod-syntax.t t/release-eol.t + t/release-no-tabs.t) ], 'UPSTREAM' => 'cpan', }, @@ -1153,7 +1156,7 @@ package Maintainers; 'Math::BigInt' => { 'MAINTAINER' => 'rafl', - 'DISTRIBUTION' => 'PJACKLAM/Math-BigInt-1.993.tar.gz', + 'DISTRIBUTION' => 'PJACKLAM/Math-BigInt-1.997.tar.gz', 'FILES' => q[dist/Math-BigInt], 'EXCLUDED' => [ qr{^inc/}, qr{^examples/}, @@ -1167,7 +1170,7 @@ package Maintainers; 'Math::BigInt::FastCalc' => { 'MAINTAINER' => 'rafl', - 'DISTRIBUTION' => 'FLORA/Math-BigInt-FastCalc-0.29.tar.gz', + 'DISTRIBUTION' => 'PJACKLAM/Math-BigInt-FastCalc-0.30.tar.gz', 'FILES' => q[dist/Math-BigInt-FastCalc], 'EXCLUDED' => [ qr{^inc/}, qw{ @@ -1256,7 +1259,7 @@ package Maintainers; 'Module::CoreList' => { 'MAINTAINER' => 'bingos', - 'DISTRIBUTION' => 'BINGOS/Module-CoreList-2.55.tar.gz', + 'DISTRIBUTION' => 'BINGOS/Module-CoreList-2.56.tar.gz', 'FILES' => q[dist/Module-CoreList], 'UPSTREAM' => 'blead', }, @@ -1272,7 +1275,7 @@ package Maintainers; 'Module::Load::Conditional' => { 'MAINTAINER' => 'kane', - 'DISTRIBUTION' => 'BINGOS/Module-Load-Conditional-0.44.tar.gz', + 'DISTRIBUTION' => 'BINGOS/Module-Load-Conditional-0.46.tar.gz', 'FILES' => q[cpan/Module-Load-Conditional], 'UPSTREAM' => 'cpan', }, @@ -1288,7 +1291,7 @@ package Maintainers; 'Module::Metadata' => { 'MAINTAINER' => 'dagolden', - 'DISTRIBUTION' => 'DAGOLDEN/Module-Metadata-1.000005.tar.gz', + 'DISTRIBUTION' => 'DAGOLDEN/Module-Metadata-1.000007.tar.gz', 'FILES' => q[cpan/Module-Metadata], 'EXCLUDED' => [ qr{^maint}, qr{^xt} ], 'UPSTREAM' => 'cpan', @@ -1806,7 +1809,7 @@ package Maintainers; 'DISTRIBUTION' => 'ADAMK/Text-Balanced-2.02.tar.gz', 'FILES' => q[cpan/Text-Balanced], 'EXCLUDED' => [ qw( t/97_meta.t t/98_pod.t t/99_pmv.t ) ], - 'UPSTREAM' => undef, + 'UPSTREAM' => 'cpan', }, 'Text::ParseWords' => @@ -1892,7 +1895,7 @@ package Maintainers; 'threads::shared' => { 'MAINTAINER' => 'jdhedden', - 'DISTRIBUTION' => 'JDHEDDEN/threads-shared-1.39.tar.gz', + 'DISTRIBUTION' => 'JDHEDDEN/threads-shared-1.40.tar.gz', 'FILES' => q[dist/threads-shared], 'EXCLUDED' => [ qw(examples/class.pl shared.h diff --git a/Porting/checkAUTHORS.pl b/Porting/checkAUTHORS.pl index d59e41aa3f2..a5b770ccf0e 100755 --- a/Porting/checkAUTHORS.pl +++ b/Porting/checkAUTHORS.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl -w use strict; my ($committer, $patch, $author, $date); +use utf8; use Getopt::Long; use Text::Wrap; $Text::Wrap::columns = 80; @@ -222,7 +223,7 @@ sub read_authors_files { $name =~ s/\s*\z//; $raw{$email} = $name; $count{$email}++; - } elsif (/^([-A-Za-z0-9 .\'--]+)[\t\n]/) { + } elsif (/^([-A-Za-z0-9 .\'À-ÖØöø-ÿ]+)[\t\n]/) { # Name only $untraced{$1}++; diff --git a/Porting/checkcfgvar.pl b/Porting/checkcfgvar.pl index f0800851d95..e6a819fbeb1 100755 --- a/Porting/checkcfgvar.pl +++ b/Porting/checkcfgvar.pl @@ -16,18 +16,30 @@ sub usage { my $err = shift and select STDERR; - print "usage: $0 [--list]\n"; + print "usage: $0 [--list] [--regen] [--default=value]\n"; exit $err; } # usage use Getopt::Long; my $opt_l = 0; +my $opt_r = 0; +my $default; +my $tap = 0; +my $test; GetOptions ( "help|?" => sub { usage (0); }, "l|list!" => \$opt_l, + "regen" => \$opt_r, + "default=s" => \$default, + "tap" => \$tap, ) or usage (1); +require 'regen/regen_lib.pl' if $opt_r; + my $MASTER_CFG = "config_h.SH"; +# Inclusive bounds on the main part of the file, $section == 1 below: +my $first = qr/^Author=/; +my $last = qr/^zip=/; my @CFG = ( # we check from MANIFEST whether they are expected to be present. @@ -40,7 +52,6 @@ sub usage "uconfig.sh", "uconfig64.sh", "plan9/config_sh.sample", - "win32/config.bc", "win32/config.gc", "win32/config.gc64", "win32/config.gc64nox", @@ -76,49 +87,98 @@ sub usage close $fh; } +printf "1..%d\n", 2 * @CFG if $tap; + for my $cfg (sort @CFG) { unless (exists $MANIFEST{$cfg}) { print STDERR "[skipping not-expected '$cfg']\n"; next; } my %cfg; + my $section = 0; + my @lines; open my $fh, '<', $cfg; - while (<$fh>) { - next if /^\#/ || /^\s*$/ || /^\:/; - if ($cfg eq 'configure.com') { + + if ($cfg eq 'configure.com') { + ++$cfg{startperl}; # Cheat. + + while (<$fh>) { + next if /^\#/ || /^\s*$/ || /^\:/; s/(\s*!.*|\s*)$//; # remove trailing comments or whitespace - next if ! /^\$\s+WC "(\w+)='(.*)'"$/; - } - # foo='bar' - # foo=bar - if (/^(\w+)='(.*)'$/) { - $cfg{$1}++; + ++$cfg{$1} if /^\$\s+WC "(\w+)='(?:.*)'"$/; } - elsif (/^(\w+)=(.*)$/) { - $cfg{$1}++; - } - elsif (/^\$\s+WC "(\w+)='(.*)'"$/) { - $cfg{$1}++; - } else { - warn "$cfg:$.:$_"; + } else { + while (<$fh>) { + if ($_ =~ $first) { + die "$cfg:$.:section=$section:$_" unless $section == 0; + $section = 1; + } + push @{$lines[$section]}, $_; + next if /^\#/ || /^\s*$/ || /^\:/; + if ($_ =~ $last) { + die "$cfg:$.:section=$section:$_" unless $section == 1; + $section = 2; + } + # foo='bar' + # foo=bar + # (optionally with a trailing comment) + if (/^(\w+)=(?:'.*'|[^'].*)(?: #.*)?$/) { + ++$cfg{$1}; + } else { + warn "$cfg:$.:$_"; + } } } close $fh; + ++$test; + my $missing; if ($cfg eq 'configure.com') { - $cfg{startperl}++; # Cheat. + print "ok $test # skip $cfg doesn't need to be sorted\n" + if $tap; + } elsif (join("", @{$lines[1]}) eq join("", sort @{$lines[1]})) { + print "ok $test - $cfg sorted\n" + if $tap; + } elsif ($tap) { + print "not ok $test - $cfg is not sorted\n"; + } elsif ($opt_r || $opt_l) { + # A reference to an empty array is true, hence this flags the + # file for later attention by --regen and --list, even if + # nothing is missing. Actual sort and output are done later. + $missing = []; + } else { + print "$cfg: unsorted\n" } - my $problems; for my $v (@MASTER_CFG) { - exists $cfg{$v} and next; - if ($opt_l) { - # print the name once, for the first problem we encounter. - print "$cfg\n" unless $problems++; - } - else { - print "$cfg: missing '$v'\n"; + # This only creates a reference in $missing if something is missing: + push @$missing, $v unless exists $cfg{$v}; + } + + ++$test; + if ($missing) { + if ($tap) { + print "not ok $test - $cfg missing keys @$missing\n"; + } elsif ($opt_l) { + # print the name once, however many problems + print "$cfg\n"; + } elsif ($opt_r && $cfg ne 'configure.com') { + if (defined $default) { + push @{$lines[1]}, map {"$_='$default'\n"} @$missing; + } else { + print "$cfg: missing '$_', use --default to add it\n" + foreach @$missing; + } + + @{$lines[1]} = sort @{$lines[1]}; + my $fh = open_new($cfg); + print $fh @{$_} foreach @lines; + close_and_rename($fh); + } else { + print "$cfg: missing '$_'\n" foreach @$missing; } + } elsif ($tap) { + print "ok $test - $cfg has no missing keys\n"; } } diff --git a/Porting/cherrymaint b/Porting/cherrymaint index c7fb10920c8..ab27d3558bd 100644 --- a/Porting/cherrymaint +++ b/Porting/cherrymaint @@ -91,6 +91,10 @@ either on the command line with --address, or by doing \$ git config cherrymaint.address host:port HERE + +# Note that you can vote through your browser by pointing it at the the local +# end of the tunnel. For example, L if you went with +# the suggested default values } exit 0; diff --git a/Porting/config.sh b/Porting/config.sh index eb9db2a6a0d..2c7c2aa8ac5 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -45,12 +45,12 @@ alignbytes='4' ansi2knr='' aphostname='' api_revision='5' -api_subversion='2' +api_subversion='3' api_version='15' -api_versionstring='5.15.2' +api_versionstring='5.15.3' ar='ar' -archlib='/opt/perl/lib/5.15.2/i686-linux-64int' -archlibexp='/opt/perl/lib/5.15.2/i686-linux-64int' +archlib='/opt/perl/lib/5.15.3/i686-linux-64int' +archlibexp='/opt/perl/lib/5.15.3/i686-linux-64int' archname64='64int' archname='i686-linux-64int' archobjs='' @@ -693,6 +693,7 @@ i_sgtty='undef' i_shadow='define' i_socks='undef' i_stdarg='define' +i_stdbool='undef' i_stddef='define' i_stdlib='define' i_string='define' @@ -742,7 +743,7 @@ inc_version_list_init='0' incpath='' inews='' initialinstalllocation='/opt/perl/bin' -installarchlib='/opt/perl/lib/5.15.2/i686-linux-64int' +installarchlib='/opt/perl/lib/5.15.3/i686-linux-64int' installbin='/opt/perl/bin' installhtml1dir='' installhtml3dir='' @@ -750,13 +751,13 @@ installman1dir='/opt/perl/man/man1' installman3dir='/opt/perl/man/man3' installprefix='/opt/perl' installprefixexp='/opt/perl' -installprivlib='/opt/perl/lib/5.15.2' +installprivlib='/opt/perl/lib/5.15.3' installscript='/opt/perl/bin' -installsitearch='/opt/perl/lib/site_perl/5.15.2/i686-linux-64int' +installsitearch='/opt/perl/lib/site_perl/5.15.3/i686-linux-64int' installsitebin='/opt/perl/bin' installsitehtml1dir='' installsitehtml3dir='' -installsitelib='/opt/perl/lib/site_perl/5.15.2' +installsitelib='/opt/perl/lib/site_perl/5.15.3' installsiteman1dir='/opt/perl/man/man1' installsiteman3dir='/opt/perl/man/man3' installsitescript='/opt/perl/bin' @@ -879,7 +880,7 @@ perl_patchlevel='34948' perl_static_inline='static __inline__' perladmin='yourname@yourhost.yourplace.com' perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc' -perlpath='/opt/perl/bin/perl5.15.2' +perlpath='/opt/perl/bin/perl5.15.3' pg='pg' phostname='' pidtype='pid_t' @@ -888,8 +889,8 @@ pmake='' pr='' prefix='/opt/perl' prefixexp='/opt/perl' -privlib='/opt/perl/lib/5.15.2' -privlibexp='/opt/perl/lib/5.15.2' +privlib='/opt/perl/lib/5.15.3' +privlibexp='/opt/perl/lib/5.15.3' procselfexe='"/proc/self/exe"' prototype='define' ptrsize='4' @@ -955,17 +956,17 @@ sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 6, 17, 29, 31, 0' sig_size='69' signal_t='void' -sitearch='/opt/perl/lib/site_perl/5.15.2/i686-linux-64int' -sitearchexp='/opt/perl/lib/site_perl/5.15.2/i686-linux-64int' +sitearch='/opt/perl/lib/site_perl/5.15.3/i686-linux-64int' +sitearchexp='/opt/perl/lib/site_perl/5.15.3/i686-linux-64int' sitebin='/opt/perl/bin' sitebinexp='/opt/perl/bin' sitehtml1dir='' sitehtml1direxp='' sitehtml3dir='' sitehtml3direxp='' -sitelib='/opt/perl/lib/site_perl/5.15.2' +sitelib='/opt/perl/lib/site_perl/5.15.3' sitelib_stem='/opt/perl/lib/site_perl' -sitelibexp='/opt/perl/lib/site_perl/5.15.2' +sitelibexp='/opt/perl/lib/site_perl/5.15.3' siteman1dir='/opt/perl/man/man1' siteman1direxp='/opt/perl/man/man1' siteman3dir='/opt/perl/man/man3' @@ -989,7 +990,9 @@ srand48_r_proto='0' srandom_r_proto='0' src='.' ssizetype='ssize_t' -startperl='#!/opt/perl/bin/perl5.15.2' +st_ino_sign='1' +st_ino_size='4' +startperl='#!/opt/perl/bin/perl5.15.3' startsh='#!/bin/sh' static_ext=' ' stdchar='char' @@ -999,12 +1002,10 @@ stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)' stdio_filbuf='' stdio_ptr='((fp)->_IO_read_ptr)' stdio_stream_array='' -st_ino_sign='1' -st_ino_size='4' strerror_r_proto='0' strings='/usr/include/string.h' submit='' -subversion='2' +subversion='3' sysman='/usr/share/man/man1' tail='' tar='' @@ -1092,8 +1093,8 @@ vendorprefix='' vendorprefixexp='' vendorscript='' vendorscriptexp='' -version='5.15.2' -version_patchlevel_string='version 15 subversion 2' +version='5.15.3' +version_patchlevel_string='version 15 subversion 3' versiononly='define' vi='' voidflags='15' @@ -1117,10 +1118,10 @@ config_arg8='-Dusedevel' config_arg9='-dE' PERL_REVISION=5 PERL_VERSION=15 -PERL_SUBVERSION=2 +PERL_SUBVERSION=3 PERL_API_REVISION=5 PERL_API_VERSION=15 -PERL_API_SUBVERSION=2 +PERL_API_SUBVERSION=3 PERL_PATCHLEVEL=34948 PERL_CONFIG_SH=true : Variables propagated from previous config.sh file. diff --git a/Porting/config_H b/Porting/config_H index 190ea8e5cf6..5f4d965b418 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -713,6 +713,12 @@ */ /*#define I_SFIO / **/ +/* I_STDBOOL: + * This symbol, if defined, indicates that exists and should + * be included. + */ +/*#define I_STDBOOL / **/ + /* I_STDDEF: * This symbol, if defined, indicates that exists and should * be included. @@ -960,8 +966,8 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "/pro/lib/perl5/5.15.2/i686-linux-64int-ld" /**/ -#define ARCHLIB_EXP "/pro/lib/perl5/5.15.2/i686-linux-64int-ld" /**/ +#define ARCHLIB "/pro/lib/perl5/5.15.3/i686-linux-64int-ld" /**/ +#define ARCHLIB_EXP "/pro/lib/perl5/5.15.3/i686-linux-64int-ld" /**/ /* ARCHNAME: * This symbol holds a string representing the architecture name. @@ -2068,8 +2074,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "/pro/lib/perl5/5.15.2" /**/ -#define PRIVLIB_EXP "/pro/lib/perl5/5.15.2" /**/ +#define PRIVLIB "/pro/lib/perl5/5.15.3" /**/ +#define PRIVLIB_EXP "/pro/lib/perl5/5.15.3" /**/ /* PTRSIZE: * This symbol contains the size of a pointer, so that the C preprocessor @@ -2119,8 +2125,8 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "/pro/lib/perl5/site_perl/5.15.2/i686-linux-64int-ld" /**/ -#define SITEARCH_EXP "/pro/lib/perl5/site_perl/5.15.2/i686-linux-64int-ld" /**/ +#define SITEARCH "/pro/lib/perl5/site_perl/5.15.3/i686-linux-64int-ld" /**/ +#define SITEARCH_EXP "/pro/lib/perl5/site_perl/5.15.3/i686-linux-64int-ld" /**/ /* SITELIB: * This symbol contains the name of the private library for this package. @@ -2142,8 +2148,8 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "/pro/lib/perl5/site_perl/5.15.2" /**/ -#define SITELIB_EXP "/pro/lib/perl5/site_perl/5.15.2" /**/ +#define SITELIB "/pro/lib/perl5/site_perl/5.15.3" /**/ +#define SITELIB_EXP "/pro/lib/perl5/site_perl/5.15.3" /**/ #define SITELIB_STEM "/pro/lib/perl5/site_perl" /**/ /* SSize_t: @@ -4363,7 +4369,7 @@ * script to make sure (one hopes) that it runs with perl and not * some shell. */ -#define STARTPERL "#!/pro/bin/perl5.15.2" /**/ +#define STARTPERL "#!/pro/bin/perl5.15.3" /**/ /* HAS_STDIO_STREAM_ARRAY: * This symbol, if defined, tells that there is an array diff --git a/Porting/epigraphs.pod b/Porting/epigraphs.pod index 224435bd96b..5d898b96cb3 100644 --- a/Porting/epigraphs.pod +++ b/Porting/epigraphs.pod @@ -17,6 +17,47 @@ Consult your favorite dictionary for details. =head1 EPIGRAPHS +=head2 v5.14.2 - L<< Larry Wall, January 12, 1988 <992@devvax.JPL.NASA.GOV> | http://groups.google.com/group/comp.sources.d/msg/5d17fa68c250b9b2 >> + +L + + +It's not so much that people don't value the programs after they have them--they +do value them. But they're not the sort of thing that would ever catch on if +they had to overcome the marketing barrier. (I don't yet know if perl will +catch on at all--I'm worried enough about it that I specifically included an +awk-to-perl translator just to help it catch on.) Maybe it's all just an +inferiority complex. Or maybe I don't like to be mercenary. + +So I guess I'd say that the reason some software comes free is that the +mechanism for selling it is missing, either from the work environment, or from +the heart of the programmer. + + +=head2 v5.15.3 - Oscar Wilde, All Art is Quite Useless + +L + + All art is at once surface and symbol. Those who go beneath + the surface do so at their peril. Those who read the symbol + do so at their peril. + + It is the spectator, and not life, that art really mirrors. + Diversity of opinion about a work of art shows that the + work is new, complex, and vital. When critics disagree, the + artist is in accord with himself. + + We can forgive a man for making a useful thing as long as + he does not admire it. The only excuse for making a useless + thing is that one admires it intensely. + + All art is quite useless. + + -- Oscar Wilde, From the preface to The Picture of Dorian Gray + + =head2 v5.15.2 - Rainer Maria Rilke, The Third Duina Elegy L ['', 'CCFLAGS=-Dperl=rules -Dzzz'], Deq => ['', '-Dbeer=foamy'], D => ['', '-DPERL_IMPLICIT_SYS'], - cctype => ['', map {"CCTYPE=$_"} qw (MSVC60 GCC BORLAND)], + cctype => ['', map {"CCTYPE=$_"} qw (MSVC60 GCC)], filetype => ['', 'FILETYPE=def', 'FILETYPE=imp'], targ_dir => ['', 'TARG_DIR=t/../'], ); diff --git a/Porting/makerel b/Porting/makerel index 0f94b8878cf..35c8dceec6e 100755 --- a/Porting/makerel +++ b/Porting/makerel @@ -155,9 +155,12 @@ my @writables = qw( win32/Makefile win32/Makefile.ce win32/makefile.mk - win32/config_H.bc + win32/config_H.ce win32/config_H.gc + win32/config_H.gc64 + win32/config_H.gc64nox win32/config_H.vc + win32/config_H.vc64 utils/Makefile uconfig.h ); diff --git a/Porting/perldelta_template.pod b/Porting/perldelta_template.pod index 562dca3e958..942d9694bbc 100644 --- a/Porting/perldelta_template.pod +++ b/Porting/perldelta_template.pod @@ -355,7 +355,7 @@ here. XXX Generate this with: - perl Porting/acknowledgements.pl v5.15.2..HEAD + perl Porting/acknowledgements.pl v5.15.3..HEAD =head1 Reporting Bugs diff --git a/Porting/release_managers_guide.pod b/Porting/release_managers_guide.pod index 935394b1a65..153e31ebf1e 100644 --- a/Porting/release_managers_guide.pod +++ b/Porting/release_managers_guide.pod @@ -376,16 +376,45 @@ run through pod and spell checkers, e.g. Also, you may want to generate and view an HTML version of it to check formatting, e.g. - $ ./perl -Ilib ext/Pod-Html/pod2html pod/perldelta.pod > /tmp/perldelta.html + $ ./perl -Ilib ext/Pod-Html/bin/pod2html pod/perldelta.pod > /tmp/perldelta.html Another good HTML preview option is http://search.cpan.org/pod2html If you make changes, be sure to commit them. +=head3 remove stale perldeltas + +For the first RC release that is ONLY for a BLEAD-FINAL, the perldeltas +from the BLEAD-POINT releases since the previous BLEAD_FINAL should have +now been consolidated into the current perldelta, and hence are now just +useless clutter. They can be removed using: + + $ git rm ... + +For example, for RC0 of 5.16.0: + + $ cd pod + $ git rm perldelta515*.pod + +All mention to them should also be removed. Currently the files that +need to be edited for this task are F, F, +F, and F (including C<.man>, C<.html>, and +C<.tex> entries for each removed pod). + +Then build a clean perl and do a full test + + $ git status + $ git clean -dxf + $ ./Configure -Dusedevel -des + $ make + $ make test + +Once all tests pass, commit your changes. =head3 build a clean perl -Make sure you have a gitwise-clean perl directory (no modified files, +If you skipped the previous step (removing the stale perldeltas) +make sure you have a gitwise-clean perl directory (no modified files, unpushed commits etc): $ git status @@ -395,7 +424,6 @@ then configure and build perl so that you have a Makefile and porting tools: $ ./Configure -Dusedevel -des && make - =head3 update Module::CoreList Update C with module version data for the new release. @@ -418,7 +446,7 @@ Then change to your perl checkout, and if necessary, $ make -If this not the first update for this version (e.g. if it was updated +If this is not the first update for this version (e.g. if it was updated when the version number was originally bumped), first edit F to delete the existing entries for this version from the C<%released> and C<%version> hashes: @@ -784,16 +812,18 @@ may need to contact a PAUSE administrator or even bump the version of perl. Upload both the .gz and .bz2 versions of the tarball. -Wait until you receive notification emails from the PAUSE indexer -confirming that your uploads have been received. IMPORTANT -- you will -probably get an email that indexing has failed, due to module permissions. -This is considered normal. - Do not proceed any further until you are sure that your tarballs are on CPAN. Check your authors directory on one of the "fast" CPAN mirrors (e.g., cpan.hexten.net or cpan.cpantesters.org) to confirm that your uploads have been successful. +I + +Wait until you receive notification emails from the PAUSE indexer +confirming that your uploads have been received. IMPORTANT -- you will +probably get an email that indexing has failed, due to module permissions. +This is considered normal. + =head3 publish tag diff --git a/README.haiku b/README.haiku index 8ae07687b85..2e7d9084ddc 100644 --- a/README.haiku +++ b/README.haiku @@ -22,9 +22,9 @@ The build procedure is completely standard: Make perl executable and create a symlink for libperl: chmod a+x /boot/common/bin/perl - cd /boot/common/lib; ln -s perl5/5.15.2/BePC-haiku/CORE/libperl.so . + cd /boot/common/lib; ln -s perl5/5.15.3/BePC-haiku/CORE/libperl.so . -Replace C<5.15.2> with your respective version of Perl. +Replace C<5.15.3> with your respective version of Perl. =head1 KNOWN PROBLEMS diff --git a/README.os2 b/README.os2 index d5acfdddc91..5cd27a24ff4 100644 --- a/README.os2 +++ b/README.os2 @@ -618,7 +618,7 @@ C in F, see L<"PERLLIB_PREFIX">. =item Additional Perl modules - unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.15.2/ + unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.15.3/ Same remark as above applies. Additionally, if this directory is not one of directories on @INC (and @INC is influenced by C), you diff --git a/README.vms b/README.vms index 8195d6af8f7..26c7a57bd70 100644 --- a/README.vms +++ b/README.vms @@ -154,12 +154,12 @@ recent versions of vmstar (e.g. V3.4 or later). Contrary to advice provided with previous versions of Perl, do I use the ODS-2 compatibility qualifier. Instead, use a command like the following: - vmstar -xvf perl-5^.15^.2.tar + vmstar -xvf perl-5^.15^.3.tar Then rename the top-level source directory like so: - set security/protection=(o:rwed) perl-5^.15^.2.dir - rename perl-5^.15^.2.dir perl-5_15_2.dir + set security/protection=(o:rwed) perl-5^.15^.3.dir + rename perl-5^.15^.3.dir perl-5_15_3.dir The reason for this last step is that while filenames with multiple dots are generally supported by Perl on VMS, I names with multiple diff --git a/README.win32 b/README.win32 index 106d6990cb9..c7c8fd26cd5 100644 --- a/README.win32 +++ b/README.win32 @@ -39,7 +39,6 @@ additional software to run (other than what came with your operating system). Currently, this port is capable of using one of the following compilers on the Intel x86 architecture: - Borland C++ version 5.02 or later Microsoft Visual C++ version 6.0 or later Gcc by mingw.org gcc version 3.2 or later Gcc by mingw-w64.sf.net gcc version 4.4.3 or later @@ -62,14 +61,11 @@ that are also supported by perl's makefile. =back -The Borland C++ and Microsoft Visual C++ compilers are also now being given -away free. The Borland compiler is available as "Borland C++ Compiler Free -Command Line Tools" and is the same compiler that ships with the full -"Borland C++ Builder" product. The Microsoft compiler is available as -"Visual C++ Toolkit 2003" or "Visual C++ 2005/2008/2010 Express Edition" (and -also as part of the ".NET Framework SDK") and is the same compiler that ships -with "Visual C++ .NET 2003 Professional" or "Visual C++ 2005/2008/2010 -Professional" respectively. +The Microsoft Visual C++ compilers are also now being given away free. They are +available as "Visual C++ Toolkit 2003" or "Visual C++ 2005/2008/2010 Express +Edition" (and also as part of the ".NET Framework SDK") and are the same +compilers that ship with "Visual C++ .NET 2003 Professional" or "Visual C++ +2005/2008/2010 Professional" respectively. This port can also be built on IA64/AMD64 using: @@ -100,7 +96,7 @@ See L below for general hints about this. You need a "make" program to build the sources. If you are using Visual C++ or the Windows SDK tools, nmake will work. Builds using -the Borland compiler or gcc need dmake. +the gcc need dmake. dmake is a freely available make that has very nice macro features and parallelability. @@ -111,16 +107,6 @@ L Fetch and install dmake somewhere on your path. -There exists a minor coexistence problem with dmake and Borland C++ -compilers. Namely, if a distribution has C files named with mixed -case letters, they will be compiled into appropriate .obj-files named -with all lowercase letters, and every time dmake is invoked -to bring files up to date, it will try to recompile such files again. -For example, Tk distribution has a lot of such files, resulting in -needless recompiles every time dmake is invoked. To avoid this, you -may use the script "sync_ext.pl" after a successful build. It is -available in the win32 subdirectory of the Perl source distribution. - =item Command Shell Use the default "cmd" shell that comes with Windows. Some versions of the @@ -131,14 +117,6 @@ shell. Make sure the path to the build directory does not contain spaces. The build usually works in this circumstance, but some tests will fail. -=item Borland C++ - -If you are using the Borland compiler, you will need dmake. -(The make that Borland supplies is seriously crippled and will not -work for MakeMaker builds.) - -See L above. - =item Microsoft Visual C++ The nmake that comes with Visual C++ will suffice for building. @@ -409,20 +387,6 @@ spaces. So don't do that. If you are running the tests from a emacs shell window, you may see failures in op/stat.t. Run "dmake test-notty" in that case. -If you're using the Borland compiler, you may see a failure in op/taint.t -arising from the inability to find the Borland Runtime DLLs on the system -default path. You will need to copy the DLLs reported by the messages -from where Borland chose to install it, into the Windows system directory -(usually somewhere like C:\WINDOWS\SYSTEM32) and rerun the test. - -If you're using Borland compiler versions 5.2 and below, you may run into -problems finding the correct header files when building extensions. For -example, building the "Tk" extension may fail because both perl and Tk -contain a header file called "patchlevel.h". The latest Borland compiler -(v5.5) is free of this misbehaviour, and it even supports an -option -VI- for backward (bugward) compatibility for using the old Borland -search algorithm to locate header files. - If you run the tests on a FAT partition, you may see some failures for C related tests (I, I ...). Testing on NTFS avoids these errors. @@ -523,15 +487,18 @@ using a non-standard shell, be inconsistent). The only (useful) quote character is the double quote ("). It can be used to protect spaces and other special characters in arguments. -The Windows documentation has almost no description of how the -quoting rules are implemented, but here are some general observations -based on experiments: The C runtime breaks arguments at spaces and -passes them to programs in argc/argv. Double quotes can be used to -prevent arguments with spaces in them from being split up. You can -put a double quote in an argument by escaping it with a backslash and -enclosing the whole argument within double quotes. The backslash and -the pair of double quotes surrounding the argument will be stripped by -the C runtime. +The Windows documentation describes the shell parsing rules here: +L +and the C runtime parsing rules here: +L. + +Here are some further observations based on experiments: The C runtime +breaks arguments at spaces and passes them to programs in argc/argv. +Double quotes can be used to prevent arguments with spaces in them from +being split up. You can put a double quote in an argument by escaping +it with a backslash and enclosing the whole argument within double quotes. +The backslash and the pair of double quotes surrounding the argument will +be stripped by the C runtime. The file redirection characters "E", "E", and "|" can be quoted by double quotes (although there are suggestions that this may not always @@ -913,8 +880,6 @@ and borrowed from the Hip Communications port that was available at the time. Various people have made numerous and sundry hacks since then. -Borland support was added in 5.004_01 (Gurusamy Sarathy). - GCC/mingw32 support was added in 5.005 (Nick Ing-Simmons). Support for PERL_OBJECT was added in 5.005 (ActiveState Tool Corp). @@ -925,6 +890,6 @@ Win9x support was added in 5.6 (Benjamin Stuhl). Support for 64-bit Windows added in 5.8 (ActiveState Corp). -Last updated: 18 November 2010 +Last updated: 10 September 2011 =cut diff --git a/config_h.SH b/config_h.SH index 96748fa5b86..43743b68586 100755 --- a/config_h.SH +++ b/config_h.SH @@ -912,46 +912,18 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define _V(args) () #endif -/* INTSIZE: - * This symbol contains the value of sizeof(int) so that the C - * preprocessor can make decisions based on it. - */ -/* LONGSIZE: - * This symbol contains the value of sizeof(long) so that the C - * preprocessor can make decisions based on it. - */ -/* SHORTSIZE: - * This symbol contains the value of sizeof(short) so that the C - * preprocessor can make decisions based on it. - */ -#define INTSIZE $intsize /**/ -#define LONGSIZE $longsize /**/ -#define SHORTSIZE $shortsize /**/ - -/* MULTIARCH: - * This symbol, if defined, signifies that the build - * process will produce some binary files that are going to be - * used in a cross-platform environment. This is the case for - * example with the NeXT "fat" binaries that contain executables - * for several CPUs. +/* OSNAME: + * This symbol contains the name of the operating system, as determined + * by Configure. You shouldn't rely on it too much; the specific + * feature tests from Configure are generally more reliable. */ -#$multiarch MULTIARCH /**/ - -/* HAS_QUAD: - * This symbol, if defined, tells that there's a 64-bit integer type, - * Quad_t, and its unsigned counterpart, Uquad_t. QUADKIND will be one - * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, or QUAD_IS_INT64_T. +/* OSVERS: + * This symbol contains the version of the operating system, as determined + * by Configure. You shouldn't rely on it too much; the specific + * feature tests from Configure are generally more reliable. */ -#$d_quad HAS_QUAD /**/ -#ifdef HAS_QUAD -# define Quad_t $quadtype /**/ -# define Uquad_t $uquadtype /**/ -# define QUADKIND $quadkind /**/ -# define QUAD_IS_INT 1 -# define QUAD_IS_LONG 2 -# define QUAD_IS_LONG_LONG 3 -# define QUAD_IS_INT64_T 4 -#endif +#define OSNAME "$osname" /**/ +#define OSVERS "$osvers" /**/ /* USE_CROSS_COMPILE: * This symbol, if defined, indicates that Perl is being cross-compiled. @@ -965,6 +937,15 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define PERL_TARGETARCH "$targetarch" /**/ #endif +/* MULTIARCH: + * This symbol, if defined, signifies that the build + * process will produce some binary files that are going to be + * used in a cross-platform environment. This is the case for + * example with the NeXT "fat" binaries that contain executables + * for several CPUs. + */ +#$multiarch MULTIARCH /**/ + /* MEM_ALIGNBYTES: * This symbol contains the number of bytes required to align a * double, or a long double when applicable. Usual values are 2, @@ -1016,6 +997,22 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define BIN_EXP "$binexp" /**/ #define PERL_RELOCATABLE_INC "$userelocatableinc" /**/ +/* INTSIZE: + * This symbol contains the value of sizeof(int) so that the C + * preprocessor can make decisions based on it. + */ +/* LONGSIZE: + * This symbol contains the value of sizeof(long) so that the C + * preprocessor can make decisions based on it. + */ +/* SHORTSIZE: + * This symbol contains the value of sizeof(short) so that the C + * preprocessor can make decisions based on it. + */ +#define INTSIZE $intsize /**/ +#define LONGSIZE $longsize /**/ +#define SHORTSIZE $shortsize /**/ + /* BYTEORDER: * This symbol holds the hexadecimal constant defined in byteorder, * in a UV, i.e. 0x1234 or 0x4321 or 0x12345678, etc... @@ -1065,6 +1062,64 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #define CHARBITS $charbits /**/ +/* CAT2: + * This macro concatenates 2 tokens together. + */ +/* STRINGIFY: + * This macro surrounds its token with double quotes. + */ +#if $cpp_stuff == 1 +#define CAT2(a,b) a/**/b +#define STRINGIFY(a) "a" +#endif +#if $cpp_stuff == 42 +#define PeRl_CaTiFy(a, b) a ## b +#define PeRl_StGiFy(a) #a +#define CAT2(a,b) PeRl_CaTiFy(a,b) +#define StGiFy(a) PeRl_StGiFy(a) +#define STRINGIFY(a) PeRl_StGiFy(a) +#endif +#if $cpp_stuff != 1 && $cpp_stuff != 42 +#include "Bletch: How does this C preprocessor concatenate tokens?" +#endif + +/* CPPSTDIN: + * This symbol contains the first part of the string which will invoke + * the C preprocessor on the standard input and produce to standard + * output. Typical value of "cc -E" or "/lib/cpp", but it can also + * call a wrapper. See CPPRUN. + */ +/* CPPMINUS: + * This symbol contains the second part of the string which will invoke + * the C preprocessor on the standard input and produce to standard + * output. This symbol will have the value "-" if CPPSTDIN needs a minus + * to specify standard input, otherwise the value is "". + */ +/* CPPRUN: + * This symbol contains the string which will invoke a C preprocessor on + * the standard input and produce to standard output. It needs to end + * with CPPLAST, after all other preprocessor flags have been specified. + * The main difference with CPPSTDIN is that this program will never be a + * pointer to a shell wrapper, i.e. it will be empty if no preprocessor is + * available directly to the user. Note that it may well be different from + * the preprocessor used to compile the C program. + */ +/* CPPLAST: + * This symbol is intended to be used along with CPPRUN in the same manner + * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "". + */ +#define CPPSTDIN "$cppstdin" +#define CPPMINUS "$cppminus" +#define CPPRUN "$cpprun" +#define CPPLAST "$cpplast" + +/* HAS_ACCESS: + * This manifest constant lets the C program know that the access() + * system call is available to check for accessibility using real UID/GID. + * (always present on UNIX.) + */ +#$d_access HAS_ACCESS /**/ + /* HAS_ACCESSX: * This symbol, if defined, indicates that the accessx routine is * available to do extended access checks. @@ -1084,6 +1139,43 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_asctime_r HAS_ASCTIME_R /**/ #define ASCTIME_R_PROTO $asctime_r_proto /**/ +/* HASATTRIBUTE_FORMAT: + * Can we handle GCC attribute for checking printf-style formats + */ +/* PRINTF_FORMAT_NULL_OK: + * Allows __printf__ format to be null when checking printf-style + */ +/* HASATTRIBUTE_MALLOC: + * Can we handle GCC attribute for malloc-style functions. + */ +/* HASATTRIBUTE_NONNULL: + * Can we handle GCC attribute for nonnull function parms. + */ +/* HASATTRIBUTE_NORETURN: + * Can we handle GCC attribute for functions that do not return + */ +/* HASATTRIBUTE_PURE: + * Can we handle GCC attribute for pure functions + */ +/* HASATTRIBUTE_UNUSED: + * Can we handle GCC attribute for unused variables and arguments + */ +/* HASATTRIBUTE_DEPRECATED: + * Can we handle GCC attribute for marking deprecated APIs + */ +/* HASATTRIBUTE_WARN_UNUSED_RESULT: + * Can we handle GCC attribute for warning on unused results + */ +#$d_attribute_deprecated HASATTRIBUTE_DEPRECATED /**/ +#$d_attribute_format HASATTRIBUTE_FORMAT /**/ +#$d_printf_format_null PRINTF_FORMAT_NULL_OK /**/ +#$d_attribute_noreturn HASATTRIBUTE_NORETURN /**/ +#$d_attribute_malloc HASATTRIBUTE_MALLOC /**/ +#$d_attribute_nonnull HASATTRIBUTE_NONNULL /**/ +#$d_attribute_pure HASATTRIBUTE_PURE /**/ +#$d_attribute_unused HASATTRIBUTE_UNUSED /**/ +#$d_attribute_warn_unused_result HASATTRIBUTE_WARN_UNUSED_RESULT /**/ + /* CASTI32: * This symbol is defined if the C compiler can cast negative * or large floating point numbers to 32-bit ints. @@ -1111,6 +1203,17 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_void_closedir VOID_CLOSEDIR /**/ +/* HASCONST: + * This symbol, if defined, indicates that this C compiler knows about + * the const type. There is no need to actually test for that symbol + * within your programs. The mere use of the "const" keyword will + * trigger the necessary tests. + */ +#$d_const HASCONST /**/ +#ifndef HASCONST +#define const +#endif + /* HAS_CRYPT_R: * This symbol, if defined, indicates that the crypt_r routine * is available to crypt re-entrantly. @@ -1124,6 +1227,17 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_crypt_r HAS_CRYPT_R /**/ #define CRYPT_R_PROTO $crypt_r_proto /**/ +/* HAS_CSH: + * This symbol, if defined, indicates that the C-shell exists. + */ +/* CSH: + * This symbol, if defined, contains the full pathname of csh. + */ +#$d_csh HAS_CSH /**/ +#ifdef HAS_CSH +#define CSH "$full_csh" /**/ +#endif + /* HAS_CTERMID_R: * This symbol, if defined, indicates that the ctermid_r routine * is available to ctermid re-entrantly. @@ -1150,6 +1264,26 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_ctime_r HAS_CTIME_R /**/ #define CTIME_R_PROTO $ctime_r_proto /**/ +/* SETUID_SCRIPTS_ARE_SECURE_NOW: + * This symbol, if defined, indicates that the bug that prevents + * setuid scripts from being secure is not present in this kernel. + */ +/* DOSUID: + * This symbol, if defined, indicates that the C program should + * check the script that it is executing for setuid/setgid bits, and + * attempt to emulate setuid/setgid on systems that have disabled + * setuid #! scripts because the kernel can't do it securely. + * It is up to the package designer to make sure that this emulation + * is done securely. Among other things, it should do an fstat on + * the script it just opened to make sure it really is a setuid/setgid + * script, it should make sure the arguments passed correspond exactly + * to the argument on the #! line, and it should not trust any + * subprocesses to which it must pass the filename rather than the + * file descriptor of the script to be executed. + */ +#$d_suidsafe SETUID_SCRIPTS_ARE_SECURE_NOW /**/ +#$d_dosuid DOSUID /**/ + /* HAS_DRAND48_R: * This symbol, if defined, indicates that the drand48_r routine * is available to drand48 re-entrantly. @@ -1163,12 +1297,26 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_drand48_r HAS_DRAND48_R /**/ #define DRAND48_R_PROTO $drand48_r_proto /**/ +/* HAS_DRAND48_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the drand48() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern double drand48(void); + */ +#$d_drand48proto HAS_DRAND48_PROTO /**/ + /* HAS_EACCESS: * This symbol, if defined, indicates that the eaccess routine is * available to do extended access checks. */ #$d_eaccess HAS_EACCESS /**/ +/* HAS_ENDGRENT: + * This symbol, if defined, indicates that the getgrent routine is + * available for finalizing sequential access of the group database. + */ +#$d_endgrent HAS_ENDGRENT /**/ + /* HAS_ENDGRENT_R: * This symbol, if defined, indicates that the endgrent_r routine * is available to endgrent re-entrantly. @@ -1182,6 +1330,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_endgrent_r HAS_ENDGRENT_R /**/ #define ENDGRENT_R_PROTO $endgrent_r_proto /**/ +/* HAS_ENDHOSTENT: + * This symbol, if defined, indicates that the endhostent() routine is + * available to close whatever was being used for host queries. + */ +#$d_endhent HAS_ENDHOSTENT /**/ + /* HAS_ENDHOSTENT_R: * This symbol, if defined, indicates that the endhostent_r routine * is available to endhostent re-entrantly. @@ -1195,6 +1349,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_endhostent_r HAS_ENDHOSTENT_R /**/ #define ENDHOSTENT_R_PROTO $endhostent_r_proto /**/ +/* HAS_ENDNETENT: + * This symbol, if defined, indicates that the endnetent() routine is + * available to close whatever was being used for network queries. + */ +#$d_endnent HAS_ENDNETENT /**/ + /* HAS_ENDNETENT_R: * This symbol, if defined, indicates that the endnetent_r routine * is available to endnetent re-entrantly. @@ -1208,6 +1368,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_endnetent_r HAS_ENDNETENT_R /**/ #define ENDNETENT_R_PROTO $endnetent_r_proto /**/ +/* HAS_ENDPROTOENT: + * This symbol, if defined, indicates that the endprotoent() routine is + * available to close whatever was being used for protocol queries. + */ +#$d_endpent HAS_ENDPROTOENT /**/ + /* HAS_ENDPROTOENT_R: * This symbol, if defined, indicates that the endprotoent_r routine * is available to endprotoent re-entrantly. @@ -1221,6 +1387,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_endprotoent_r HAS_ENDPROTOENT_R /**/ #define ENDPROTOENT_R_PROTO $endprotoent_r_proto /**/ +/* HAS_ENDPWENT: + * This symbol, if defined, indicates that the getgrent routine is + * available for finalizing sequential access of the passwd database. + */ +#$d_endpwent HAS_ENDPWENT /**/ + /* HAS_ENDPWENT_R: * This symbol, if defined, indicates that the endpwent_r routine * is available to endpwent re-entrantly. @@ -1234,6 +1406,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_endpwent_r HAS_ENDPWENT_R /**/ #define ENDPWENT_R_PROTO $endpwent_r_proto /**/ +/* HAS_ENDSERVENT: + * This symbol, if defined, indicates that the endservent() routine is + * available to close whatever was being used for service queries. + */ +#$d_endsent HAS_ENDSERVENT /**/ + /* HAS_ENDSERVENT_R: * This symbol, if defined, indicates that the endservent_r routine * is available to endservent re-entrantly. @@ -1253,9 +1431,15 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_fd_set HAS_FD_SET /**/ -/* Gconvert: - * This preprocessor macro is defined to convert a floating point - * number to a string without a trailing decimal point. This +/* FLEXFILENAMES: + * This symbol, if defined, indicates that the system supports filenames + * longer than 14 characters. + */ +#$d_flexfnam FLEXFILENAMES /**/ + +/* Gconvert: + * This preprocessor macro is defined to convert a floating point + * number to a string without a trailing decimal point. This * emulates the behavior of sprintf("%g"), but is sometimes much more * efficient. If gconvert() is not available, but gcvt() drops the * trailing decimal point, then gcvt() is used. If all else fails, @@ -1270,6 +1454,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #define Gconvert(x,n,t,b) $d_Gconvert +/* HAS_GETGRENT: + * This symbol, if defined, indicates that the getgrent routine is + * available for sequential access of the group database. + */ +#$d_getgrent HAS_GETGRENT /**/ + /* HAS_GETGRENT_R: * This symbol, if defined, indicates that the getgrent_r routine * is available to getgrent re-entrantly. @@ -1309,6 +1499,53 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_getgrnam_r HAS_GETGRNAM_R /**/ #define GETGRNAM_R_PROTO $getgrnam_r_proto /**/ +/* HAS_GETHOSTBYADDR: + * This symbol, if defined, indicates that the gethostbyaddr() routine is + * available to look up hosts by their IP addresses. + */ +#$d_gethbyaddr HAS_GETHOSTBYADDR /**/ + +/* HAS_GETHOSTBYNAME: + * This symbol, if defined, indicates that the gethostbyname() routine is + * available to look up host names in some data base or other. + */ +#$d_gethbyname HAS_GETHOSTBYNAME /**/ + +/* HAS_GETHOSTENT: + * This symbol, if defined, indicates that the gethostent() routine is + * available to look up host names in some data base or another. + */ +#$d_gethent HAS_GETHOSTENT /**/ + +/* HAS_GETHOSTNAME: + * This symbol, if defined, indicates that the C program may use the + * gethostname() routine to derive the host name. See also HAS_UNAME + * and PHOSTNAME. + */ +/* HAS_UNAME: + * This symbol, if defined, indicates that the C program may use the + * uname() routine to derive the host name. See also HAS_GETHOSTNAME + * and PHOSTNAME. + */ +/* PHOSTNAME: + * This symbol, if defined, indicates the command to feed to the + * popen() routine to derive the host name. See also HAS_GETHOSTNAME + * and HAS_UNAME. Note that the command uses a fully qualified path, + * so that it is safe even if used by a process with super-user + * privileges. + */ +/* HAS_PHOSTNAME: + * This symbol, if defined, indicates that the C program may use the + * contents of PHOSTNAME as a command to feed to the popen() routine + * to derive the host name. + */ +#$d_gethname HAS_GETHOSTNAME /**/ +#$d_uname HAS_UNAME /**/ +#$d_phostname HAS_PHOSTNAME /**/ +#ifdef HAS_PHOSTNAME +#define PHOSTNAME "$aphostname" /* How to get the host name */ +#endif + /* HAS_GETHOSTBYADDR_R: * This symbol, if defined, indicates that the gethostbyaddr_r routine * is available to gethostbyaddr re-entrantly. @@ -1348,6 +1585,14 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_gethostent_r HAS_GETHOSTENT_R /**/ #define GETHOSTENT_R_PROTO $gethostent_r_proto /**/ +/* HAS_GETHOST_PROTOS: + * This symbol, if defined, indicates that includes + * prototypes for gethostent(), gethostbyname(), and + * gethostbyaddr(). Otherwise, it is up to the program to guess + * them. See netdbtype.U for probing for various Netdb_xxx_t types. + */ +#$d_gethostprotos HAS_GETHOST_PROTOS /**/ + /* HAS_GETLOGIN_R: * This symbol, if defined, indicates that the getlogin_r routine * is available to getlogin re-entrantly. @@ -1361,6 +1606,24 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_getlogin_r HAS_GETLOGIN_R /**/ #define GETLOGIN_R_PROTO $getlogin_r_proto /**/ +/* HAS_GETNETBYADDR: + * This symbol, if defined, indicates that the getnetbyaddr() routine is + * available to look up networks by their IP addresses. + */ +#$d_getnbyaddr HAS_GETNETBYADDR /**/ + +/* HAS_GETNETBYNAME: + * This symbol, if defined, indicates that the getnetbyname() routine is + * available to look up networks by their names. + */ +#$d_getnbyname HAS_GETNETBYNAME /**/ + +/* HAS_GETNETENT: + * This symbol, if defined, indicates that the getnetent() routine is + * available to look up network names in some data base or another. + */ +#$d_getnent HAS_GETNETENT /**/ + /* HAS_GETNETBYADDR_R: * This symbol, if defined, indicates that the getnetbyaddr_r routine * is available to getnetbyaddr re-entrantly. @@ -1400,6 +1663,14 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_getnetent_r HAS_GETNETENT_R /**/ #define GETNETENT_R_PROTO $getnetent_r_proto /**/ +/* HAS_GETNET_PROTOS: + * This symbol, if defined, indicates that includes + * prototypes for getnetent(), getnetbyname(), and + * getnetbyaddr(). Otherwise, it is up to the program to guess + * them. See netdbtype.U for probing for various Netdb_xxx_t types. + */ +#$d_getnetprotos HAS_GETNET_PROTOS /**/ + /* HAS_GETPAGESIZE: * This symbol, if defined, indicates that the getpagesize system call * is available to get system page size, which is the granularity of @@ -1407,6 +1678,34 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_getpagsz HAS_GETPAGESIZE /**/ +/* HAS_GETPROTOENT: + * This symbol, if defined, indicates that the getprotoent() routine is + * available to look up protocols in some data base or another. + */ +#$d_getpent HAS_GETPROTOENT /**/ + +/* HAS_GETPGRP: + * This symbol, if defined, indicates that the getpgrp routine is + * available to get the current process group. + */ +/* USE_BSD_GETPGRP: + * This symbol, if defined, indicates that getpgrp needs one + * arguments whereas USG one needs none. + */ +#$d_getpgrp HAS_GETPGRP /**/ +#$d_bsdgetpgrp USE_BSD_GETPGRP /**/ + +/* HAS_GETPROTOBYNAME: + * This symbol, if defined, indicates that the getprotobyname() + * routine is available to look up protocols by their name. + */ +/* HAS_GETPROTOBYNUMBER: + * This symbol, if defined, indicates that the getprotobynumber() + * routine is available to look up protocols by their number. + */ +#$d_getpbyname HAS_GETPROTOBYNAME /**/ +#$d_getpbynumber HAS_GETPROTOBYNUMBER /**/ + /* HAS_GETPROTOBYNAME_R: * This symbol, if defined, indicates that the getprotobyname_r routine * is available to getprotobyname re-entrantly. @@ -1446,6 +1745,21 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_getprotoent_r HAS_GETPROTOENT_R /**/ #define GETPROTOENT_R_PROTO $getprotoent_r_proto /**/ +/* HAS_GETPROTO_PROTOS: + * This symbol, if defined, indicates that includes + * prototypes for getprotoent(), getprotobyname(), and + * getprotobyaddr(). Otherwise, it is up to the program to guess + * them. See netdbtype.U for probing for various Netdb_xxx_t types. + */ +#$d_getprotoprotos HAS_GETPROTO_PROTOS /**/ + +/* HAS_GETPWENT: + * This symbol, if defined, indicates that the getpwent routine is + * available for sequential access of the passwd database. + * If this is not available, the older getpw() function may be available. + */ +#$d_getpwent HAS_GETPWENT /**/ + /* HAS_GETPWENT_R: * This symbol, if defined, indicates that the getpwent_r routine * is available to getpwent re-entrantly. @@ -1485,6 +1799,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_getpwuid_r HAS_GETPWUID_R /**/ #define GETPWUID_R_PROTO $getpwuid_r_proto /**/ +/* HAS_GETSERVENT: + * This symbol, if defined, indicates that the getservent() routine is + * available to look up network services in some data base or another. + */ +#$d_getsent HAS_GETSERVENT /**/ + /* HAS_GETSERVBYNAME_R: * This symbol, if defined, indicates that the getservbyname_r routine * is available to getservbyname re-entrantly. @@ -1524,6 +1844,14 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_getservent_r HAS_GETSERVENT_R /**/ #define GETSERVENT_R_PROTO $getservent_r_proto /**/ +/* HAS_GETSERV_PROTOS: + * This symbol, if defined, indicates that includes + * prototypes for getservent(), getservbyname(), and + * getservbyaddr(). Otherwise, it is up to the program to guess + * them. See netdbtype.U for probing for various Netdb_xxx_t types. + */ +#$d_getservprotos HAS_GETSERV_PROTOS /**/ + /* HAS_GETSPNAM_R: * This symbol, if defined, indicates that the getspnam_r routine * is available to getspnam re-entrantly. @@ -1537,6 +1865,17 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_getspnam_r HAS_GETSPNAM_R /**/ #define GETSPNAM_R_PROTO $getspnam_r_proto /**/ +/* HAS_GETSERVBYNAME: + * This symbol, if defined, indicates that the getservbyname() + * routine is available to look up services by their name. + */ +/* HAS_GETSERVBYPORT: + * This symbol, if defined, indicates that the getservbyport() + * routine is available to look up services by their port. + */ +#$d_getsbyname HAS_GETSERVBYNAME /**/ +#$d_getsbyport HAS_GETSERVBYPORT /**/ + /* HAS_GMTIME_R: * This symbol, if defined, indicates that the gmtime_r routine * is available to gmtime re-entrantly. @@ -1560,6 +1899,31 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un # define _GNU_SOURCE #endif +/* HAS_HTONL: + * This symbol, if defined, indicates that the htonl() routine (and + * friends htons() ntohl() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_HTONS: + * This symbol, if defined, indicates that the htons() routine (and + * friends htonl() ntohl() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_NTOHL: + * This symbol, if defined, indicates that the ntohl() routine (and + * friends htonl() htons() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_NTOHS: + * This symbol, if defined, indicates that the ntohs() routine (and + * friends htonl() htons() ntohl()) are available to do network + * order byte swapping. + */ +#$d_htonl HAS_HTONL /**/ +#$d_htonl HAS_HTONS /**/ +#$d_htonl HAS_NTOHL /**/ +#$d_htonl HAS_NTOHS /**/ + /* HAS_ISASCII: * This manifest constant lets the C program know that isascii * is available. @@ -1599,6 +1963,72 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_localtime_r HAS_LOCALTIME_R /**/ #define LOCALTIME_R_PROTO $localtime_r_proto /**/ +/* HAS_LONG_DOUBLE: + * This symbol will be defined if the C compiler supports long + * doubles. + */ +/* LONG_DOUBLESIZE: + * This symbol contains the size of a long double, so that the + * C preprocessor can make decisions based on it. It is only + * defined if the system supports long doubles. + */ +#$d_longdbl HAS_LONG_DOUBLE /**/ +#ifdef HAS_LONG_DOUBLE +#define LONG_DOUBLESIZE $longdblsize /**/ +#endif + +/* HAS_LONG_LONG: + * This symbol will be defined if the C compiler supports long long. + */ +/* LONGLONGSIZE: + * This symbol contains the size of a long long, so that the + * C preprocessor can make decisions based on it. It is only + * defined if the system supports long long. + */ +#$d_longlong HAS_LONG_LONG /**/ +#ifdef HAS_LONG_LONG +#define LONGLONGSIZE $longlongsize /**/ +#endif + +/* HAS_LSEEK_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the lseek() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern off_t lseek(int, off_t, int); + */ +#$d_lseekproto HAS_LSEEK_PROTO /**/ + +/* HAS_MEMCHR: + * This symbol, if defined, indicates that the memchr routine is available + * to locate characters within a C string. + */ +#$d_memchr HAS_MEMCHR /**/ + +/* HAS_MKSTEMP: + * This symbol, if defined, indicates that the mkstemp routine is + * available to exclusively create and open a uniquely named + * temporary file. + */ +#$d_mkstemp HAS_MKSTEMP /**/ + +/* HAS_MMAP: + * This symbol, if defined, indicates that the mmap system call is + * available to map a file into memory. + */ +/* Mmap_t: + * This symbol holds the return type of the mmap() system call + * (and simultaneously the type of the first argument). + * Usually set to 'void *' or 'caddr_t'. + */ +#$d_mmap HAS_MMAP /**/ +#define Mmap_t $mmaptype /**/ + +/* HAS_MSG: + * This symbol, if defined, indicates that the entire msg*(2) library is + * supported (IPC mechanism based on message queues). + */ +#$d_msg HAS_MSG /**/ + /* HAS_OPEN3: * This manifest constant lets the C program know that the three * argument form of open(2) is available. @@ -1702,7 +2132,19 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_sanemcmp HAS_SANE_MEMCMP /**/ -/* HAS_SETGRENT_R: +/* HAS_SEM: + * This symbol, if defined, indicates that the entire sem*(2) library is + * supported. + */ +#$d_sem HAS_SEM /**/ + +/* HAS_SETGRENT: + * This symbol, if defined, indicates that the setgrent routine is + * available for initializing sequential access of the group database. + */ +#$d_setgrent HAS_SETGRENT /**/ + +/* HAS_SETGRENT_R: * This symbol, if defined, indicates that the setgrent_r routine * is available to setgrent re-entrantly. */ @@ -1715,6 +2157,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_setgrent_r HAS_SETGRENT_R /**/ #define SETGRENT_R_PROTO $setgrent_r_proto /**/ +/* HAS_SETHOSTENT: + * This symbol, if defined, indicates that the sethostent() routine is + * available. + */ +#$d_sethent HAS_SETHOSTENT /**/ + /* HAS_SETHOSTENT_R: * This symbol, if defined, indicates that the sethostent_r routine * is available to sethostent re-entrantly. @@ -1741,6 +2189,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_setlocale_r HAS_SETLOCALE_R /**/ #define SETLOCALE_R_PROTO $setlocale_r_proto /**/ +/* HAS_SETNETENT: + * This symbol, if defined, indicates that the setnetent() routine is + * available. + */ +#$d_setnent HAS_SETNETENT /**/ + /* HAS_SETNETENT_R: * This symbol, if defined, indicates that the setnetent_r routine * is available to setnetent re-entrantly. @@ -1754,6 +2208,24 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_setnetent_r HAS_SETNETENT_R /**/ #define SETNETENT_R_PROTO $setnetent_r_proto /**/ +/* HAS_SETPROTOENT: + * This symbol, if defined, indicates that the setprotoent() routine is + * available. + */ +#$d_setpent HAS_SETPROTOENT /**/ + +/* HAS_SETPGRP: + * This symbol, if defined, indicates that the setpgrp routine is + * available to set the current process group. + */ +/* USE_BSD_SETPGRP: + * This symbol, if defined, indicates that setpgrp needs two + * arguments whereas USG one needs none. See also HAS_SETPGID + * for a POSIX interface. + */ +#$d_setpgrp HAS_SETPGRP /**/ +#$d_bsdsetpgrp USE_BSD_SETPGRP /**/ + /* HAS_SETPROTOENT_R: * This symbol, if defined, indicates that the setprotoent_r routine * is available to setprotoent re-entrantly. @@ -1767,6 +2239,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_setprotoent_r HAS_SETPROTOENT_R /**/ #define SETPROTOENT_R_PROTO $setprotoent_r_proto /**/ +/* HAS_SETPWENT: + * This symbol, if defined, indicates that the setpwent routine is + * available for initializing sequential access of the passwd database. + */ +#$d_setpwent HAS_SETPWENT /**/ + /* HAS_SETPWENT_R: * This symbol, if defined, indicates that the setpwent_r routine * is available to setpwent re-entrantly. @@ -1780,6 +2258,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_setpwent_r HAS_SETPWENT_R /**/ #define SETPWENT_R_PROTO $setpwent_r_proto /**/ +/* HAS_SETSERVENT: + * This symbol, if defined, indicates that the setservent() routine is + * available. + */ +#$d_setsent HAS_SETSERVENT /**/ + /* HAS_SETSERVENT_R: * This symbol, if defined, indicates that the setservent_r routine * is available to setservent re-entrantly. @@ -1793,6 +2277,33 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_setservent_r HAS_SETSERVENT_R /**/ #define SETSERVENT_R_PROTO $setservent_r_proto /**/ +/* HAS_SETVBUF: + * This symbol, if defined, indicates that the setvbuf routine is + * available to change buffering on an open stdio stream. + * to a line-buffered mode. + */ +#$d_setvbuf HAS_SETVBUF /**/ + +/* HAS_SHM: + * This symbol, if defined, indicates that the entire shm*(2) library is + * supported. + */ +#$d_shm HAS_SHM /**/ + +/* Shmat_t: + * This symbol holds the return type of the shmat() system call. + * Usually set to 'void *' or 'char *'. + */ +/* HAS_SHMAT_PROTOTYPE: + * This symbol, if defined, indicates that the sys/shm.h includes + * a prototype for shmat(). Otherwise, it is up to the program to + * guess one. Shmat_t shmat(int, Shmat_t, int) is a good guess, + * but not always right so it should be emitted by the program only + * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs. + */ +#define Shmat_t $shmattype /**/ +#$d_shmatprototype HAS_SHMAT_PROTOTYPE /**/ + /* HAS_SIGACTION: * This symbol, if defined, indicates that Vr4's sigaction() routine * is available. @@ -1830,6 +2341,64 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define Siglongjmp(buf,retval) longjmp((buf),(retval)) #endif +/* HAS_SOCKET: + * This symbol, if defined, indicates that the BSD socket interface is + * supported. + */ +/* HAS_SOCKETPAIR: + * This symbol, if defined, indicates that the BSD socketpair() call is + * supported. + */ +/* HAS_MSG_CTRUNC: + * This symbol, if defined, indicates that the MSG_CTRUNC is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_DONTROUTE: + * This symbol, if defined, indicates that the MSG_DONTROUTE is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_OOB: + * This symbol, if defined, indicates that the MSG_OOB is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_PEEK: + * This symbol, if defined, indicates that the MSG_PEEK is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_PROXY: + * This symbol, if defined, indicates that the MSG_PROXY is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_SCM_RIGHTS: + * This symbol, if defined, indicates that the SCM_RIGHTS is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_SOCKADDR_SA_LEN: + * This symbol, if defined, indicates that the struct sockaddr + * structure has a member called sa_len, indicating the length of + * the structure. + */ +/* HAS_SIN6_SCOPE_ID: + * This symbol, if defined, indicates that the struct sockaddr_in6 + * structure has a member called sin6_scope_id. + */ +#$d_socket HAS_SOCKET /**/ +#$d_sockpair HAS_SOCKETPAIR /**/ +#$d_sockaddr_sa_len HAS_SOCKADDR_SA_LEN /**/ +#$d_msg_ctrunc HAS_MSG_CTRUNC /**/ +#$d_msg_dontroute HAS_MSG_DONTROUTE /**/ +#$d_msg_oob HAS_MSG_OOB /**/ +#$d_msg_peek HAS_MSG_PEEK /**/ +#$d_msg_proxy HAS_MSG_PROXY /**/ +#$d_scm_rights HAS_SCM_RIGHTS /**/ +#$d_sin6_scope_id HAS_SIN6_SCOPE_ID /**/ + /* HAS_SRAND48_R: * This symbol, if defined, indicates that the srand48_r routine * is available to srand48 re-entrantly. @@ -1856,6 +2425,35 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_srandom_r HAS_SRANDOM_R /**/ #define SRANDOM_R_PROTO $srandom_r_proto /**/ +/* USE_STAT_BLOCKS: + * This symbol is defined if this system has a stat structure declaring + * st_blksize and st_blocks. + */ +#ifndef USE_STAT_BLOCKS +#$d_statblks USE_STAT_BLOCKS /**/ +#endif + +/* HAS_STATIC_INLINE: + * This symbol, if defined, indicates that the C compiler supports + * C99-style static inline. That is, the function can't be called + * from another translation unit. + */ +/* PERL_STATIC_INLINE: + * This symbol gives the best-guess incantation to use for static + * inline functions. If HAS_STATIC_INLINE is defined, this will + * give C99-style inline. If HAS_STATIC_INLINE is not defined, + * this will give a plain 'static'. It will always be defined + * to something that gives static linkage. + * Possibilities include + * static inline (c99) + * static __inline__ (gcc -ansi) + * static __inline (MSVC) + * static _inline (older MSVC) + * static (c89 compilers) + */ +#$d_static_inline HAS_STATIC_INLINE /**/ +#define PERL_STATIC_INLINE $perl_static_inline /**/ + /* USE_STDIO_PTR: * This symbol is defined if the _ptr and _cnt fields (or similar) * of the stdio FILE structure can be used to access the stdio buffer @@ -1926,6 +2524,32 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define FILE_bufsiz(fp) $stdio_bufsiz #endif +/* USE_STRUCT_COPY: + * This symbol, if defined, indicates that this C compiler knows how + * to copy structures. If undefined, you'll need to use a block copy + * routine of some sort instead. + */ +#$d_strctcpy USE_STRUCT_COPY /**/ + +/* HAS_STRERROR: + * This symbol, if defined, indicates that the strerror routine is + * available to translate error numbers to strings. See the writeup + * of Strerror() in this file before you try to define your own. + */ +/* HAS_SYS_ERRLIST: + * This symbol, if defined, indicates that the sys_errlist array is + * available to translate error numbers to strings. The extern int + * sys_nerr gives the size of that table. + */ +/* Strerror: + * This preprocessor symbol is defined as a macro if strerror() is + * not available to translate error numbers to strings but sys_errlist[] + * array is there. + */ +#$d_strerror HAS_STRERROR /**/ +#$d_syserrlst HAS_SYS_ERRLIST /**/ +#define Strerror(e) $d_strerrm + /* HAS_STRERROR_R: * This symbol, if defined, indicates that the strerror_r routine * is available to strerror re-entrantly. @@ -1939,6 +2563,30 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_strerror_r HAS_STRERROR_R /**/ #define STRERROR_R_PROTO $strerror_r_proto /**/ +/* HAS_STRTOUL: + * This symbol, if defined, indicates that the strtoul routine is + * available to provide conversion of strings to unsigned long. + */ +#$d_strtoul HAS_STRTOUL /**/ + +/* HAS_TIME: + * This symbol, if defined, indicates that the time() routine exists. + */ +/* Time_t: + * This symbol holds the type returned by time(). It can be long, + * or time_t on BSD sites (in which case should be + * included). + */ +#$d_time HAS_TIME /**/ +#define Time_t $timetype /* Time type */ + +/* HAS_TIMES: + * This symbol, if defined, indicates that the times() routine exists. + * Note that this became obsolete on some systems (SUNOS), which now + * use getrusage(). It may be necessary to include . + */ +#$d_times HAS_TIMES /**/ + /* HAS_TMPNAM_R: * This symbol, if defined, indicates that the tmpnam_r routine * is available to tmpnam re-entrantly. @@ -1965,912 +2613,32 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_ttyname_r HAS_TTYNAME_R /**/ #define TTYNAME_R_PROTO $ttyname_r_proto /**/ -/* HAS_VPRINTF: - * This symbol, if defined, indicates that the vprintf routine is available - * to printf with a pointer to an argument list. If unavailable, you - * may need to write your own, probably in terms of _doprnt(). +/* HAS_UNION_SEMUN: + * This symbol, if defined, indicates that the union semun is + * defined by including . If not, the user code + * probably needs to define it as: + * union semun { + * int val; + * struct semid_ds *buf; + * unsigned short *array; + * } */ -/* USE_CHAR_VSPRINTF: - * This symbol is defined if this system has vsprintf() returning type - * (char*). The trend seems to be to declare it as "int vsprintf()". It - * is up to the package author to declare vsprintf correctly based on the - * symbol. +/* USE_SEMCTL_SEMUN: + * This symbol, if defined, indicates that union semun is + * used for semctl IPC_STAT. */ -#$d_vprintf HAS_VPRINTF /**/ -#$d_charvspr USE_CHAR_VSPRINTF /**/ +/* USE_SEMCTL_SEMID_DS: + * This symbol, if defined, indicates that struct semid_ds * is + * used for semctl IPC_STAT. + */ +#$d_union_semun HAS_UNION_SEMUN /**/ +#$d_semctl_semun USE_SEMCTL_SEMUN /**/ +#$d_semctl_semid_ds USE_SEMCTL_SEMID_DS /**/ -/* DOUBLESIZE: - * This symbol contains the size of a double, so that the C preprocessor - * can make decisions based on it. +/* HAS_VFORK: + * This symbol, if defined, indicates that vfork() exists. */ -#define DOUBLESIZE $doublesize /**/ - -/* I_MACH_CTHREADS: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -#$i_machcthr I_MACH_CTHREADS /**/ - -/* I_PTHREAD: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -#$i_pthread I_PTHREAD /**/ - -/* I_SYS_ACCESS: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -#$i_sysaccess I_SYS_ACCESS /**/ - -/* I_SYS_SECURITY: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -#$i_syssecrt I_SYS_SECURITY /**/ - -/* I_TIME: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/* I_SYS_TIME: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/* I_SYS_TIME_KERNEL: - * This symbol, if defined, indicates to the C program that it should - * include with KERNEL defined. - */ -/* HAS_TM_TM_ZONE: - * This symbol, if defined, indicates to the C program that - * the struct tm has a tm_zone field. - */ -/* HAS_TM_TM_GMTOFF: - * This symbol, if defined, indicates to the C program that - * the struct tm has a tm_gmtoff field. - */ -#$i_time I_TIME /**/ -#$i_systime I_SYS_TIME /**/ -#$i_systimek I_SYS_TIME_KERNEL /**/ -#$d_tm_tm_zone HAS_TM_TM_ZONE /**/ -#$d_tm_tm_gmtoff HAS_TM_TM_GMTOFF /**/ - -/* PERL_INC_VERSION_LIST: - * This variable specifies the list of subdirectories in over - * which perl.c:incpush() and lib/lib.pm will automatically - * search when adding directories to @INC, in a format suitable - * for a C initialization string. See the inc_version_list entry - * in Porting/Glossary for more details. - */ -#$d_inc_version_list PERL_INC_VERSION_LIST $inc_version_list_init /**/ - -/* INSTALL_USR_BIN_PERL: - * This symbol, if defined, indicates that Perl is to be installed - * also as /usr/bin/perl. - */ -#$installusrbinperl INSTALL_USR_BIN_PERL /**/ - -/* VAL_O_NONBLOCK: - * This symbol is to be used during open() or fcntl(F_SETFL) to turn on - * non-blocking I/O for the file descriptor. Note that there is no way - * back, i.e. you cannot turn it blocking again this way. If you wish to - * alternatively switch between blocking and non-blocking, use the - * ioctl(FIOSNBIO) call instead, but that is not supported by all devices. - */ -/* VAL_EAGAIN: - * This symbol holds the errno error code set by read() when no data was - * present on the non-blocking file descriptor. - */ -/* RD_NODATA: - * This symbol holds the return code from read() when no data is present - * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is - * not defined, then you can't distinguish between no data and EOF by - * issuing a read(). You'll have to find another way to tell for sure! - */ -/* EOF_NONBLOCK: - * This symbol, if defined, indicates to the C program that a read() on - * a non-blocking file descriptor will return 0 on EOF, and not the value - * held in RD_NODATA (-1 usually, in that case!). - */ -#define VAL_O_NONBLOCK $o_nonblock -#define VAL_EAGAIN $eagain -#define RD_NODATA $rd_nodata -#$d_eofnblk EOF_NONBLOCK - -/* PERL_OTHERLIBDIRS: - * This variable contains a colon-separated set of paths for the perl - * binary to search for additional library files or modules. - * These directories will be tacked to the end of @INC. - * Perl will automatically search below each path for version- - * and architecture-specific directories. See PERL_INC_VERSION_LIST - * for more details. - */ -#$d_perl_otherlibdirs PERL_OTHERLIBDIRS "$otherlibdirs" /**/ - -/* PRIVLIB: - * This symbol contains the name of the private library for this package. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. The program - * should be prepared to do ~ expansion. - */ -/* PRIVLIB_EXP: - * 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 "$privlib" /**/ -#define PRIVLIB_EXP "$privlibexp" /**/ - -/* PTRSIZE: - * This symbol contains the size of a pointer, so that the C preprocessor - * can make decisions based on it. It will be sizeof(void *) if - * the compiler supports (void *); otherwise it will be - * sizeof(char *). - */ -#define PTRSIZE $ptrsize /**/ - -/* Drand01: - * This macro is to be used to generate uniformly distributed - * random numbers over the range [0., 1.[. You may have to supply - * an 'extern double drand48();' in your program since SunOS 4.1.3 - * doesn't provide you with anything relevant in its headers. - * See HAS_DRAND48_PROTO. - */ -/* Rand_seed_t: - * This symbol defines the type of the argument of the - * random seed function. - */ -/* seedDrand01: - * This symbol defines the macro to be used in seeding the - * random number generator (see Drand01). - */ -/* RANDBITS: - * This symbol indicates how many bits are produced by the - * function used to generate normalized random numbers. - * Values include 15, 16, 31, and 48. - */ -#define Drand01() $drand01 /**/ -#define Rand_seed_t $randseedtype /**/ -#define seedDrand01(x) $seedfunc((Rand_seed_t)x) /**/ -#define RANDBITS $randbits /**/ - -/* SITEARCH: - * This symbol contains the name of the private library for this package. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. The program - * should be prepared to do ~ expansion. - * The standard distribution will put nothing in this directory. - * After perl has been installed, users may install their own local - * architecture-dependent modules in this directory with - * MakeMaker Makefile.PL - * or equivalent. See INSTALL for details. - */ -/* SITEARCH_EXP: - * 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. - */ -#$d_sitearch SITEARCH "$sitearch" /**/ -#$d_sitearch SITEARCH_EXP "$sitearchexp" /**/ - -/* SITELIB: - * This symbol contains the name of the private library for this package. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. The program - * should be prepared to do ~ expansion. - * The standard distribution will put nothing in this directory. - * After perl has been installed, users may install their own local - * architecture-independent modules in this directory with - * MakeMaker Makefile.PL - * or equivalent. See INSTALL for details. - */ -/* SITELIB_EXP: - * This symbol contains the ~name expanded version of SITELIB, to be used - * in programs that are not prepared to deal with ~ expansion at run-time. - */ -/* SITELIB_STEM: - * This define is SITELIB_EXP with any trailing version-specific component - * 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 "$sitelib" /**/ -#define SITELIB_EXP "$sitelibexp" /**/ -#define SITELIB_STEM "$sitelib_stem" /**/ - -/* SSize_t: - * This symbol holds the type used by functions that return - * a count of bytes or an error condition. It must be a signed type. - * It is usually ssize_t, but may be long or int, etc. - * It may be necessary to include or - * to get any typedef'ed information. - * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t). - */ -#define SSize_t $ssizetype /* signed count of bytes */ - -/* USE_ITHREADS: - * This symbol, if defined, indicates that Perl should be built to - * use the interpreter-based threading implementation. - */ -/* USE_5005THREADS: - * This symbol, if defined, indicates that Perl should be built to - * use the 5.005-based threading implementation. - * Only valid up to 5.8.x. - */ -/* OLD_PTHREADS_API: - * This symbol, if defined, indicates that Perl should - * be built to use the old draft POSIX threads API. - */ -/* USE_REENTRANT_API: - * This symbol, if defined, indicates that Perl should - * try to use the various _r versions of library functions. - * This is extremely experimental. - */ -#$use5005threads USE_5005THREADS /**/ -#$useithreads USE_ITHREADS /**/ -#if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ -#endif -#$d_oldpthreads OLD_PTHREADS_API /**/ -#$usereentrant USE_REENTRANT_API /**/ - -/* PERL_VENDORARCH: - * If defined, this symbol contains the name of a private library. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. - * It may have a ~ on the front. - * The standard distribution will put nothing in this directory. - * Vendors who distribute perl may wish to place their own - * architecture-dependent modules and extensions in this directory with - * MakeMaker Makefile.PL INSTALLDIRS=vendor - * or equivalent. See INSTALL for details. - */ -/* PERL_VENDORARCH_EXP: - * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used - * in programs that are not prepared to deal with ~ expansion at run-time. - */ -#$d_vendorarch PERL_VENDORARCH "$vendorarch" /**/ -#$d_vendorarch PERL_VENDORARCH_EXP "$vendorarchexp" /**/ - -/* PERL_VENDORLIB_EXP: - * This symbol contains the ~name expanded version of VENDORLIB, to be used - * in programs that are not prepared to deal with ~ expansion at run-time. - */ -/* PERL_VENDORLIB_STEM: - * This define is PERL_VENDORLIB_EXP with any trailing version-specific component - * 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. - */ -#$d_vendorlib PERL_VENDORLIB_EXP "$vendorlibexp" /**/ -#$d_vendorlib PERL_VENDORLIB_STEM "$vendorlib_stem" /**/ - -/* HAS_STATIC_INLINE: - * This symbol, if defined, indicates that the C compiler supports - * C99-style static inline. That is, the function can't be called - * from another translation unit. - */ -/* PERL_STATIC_INLINE: - * This symbol gives the best-guess incantation to use for static - * inline functions. If HAS_STATIC_INLINE is defined, this will - * give C99-style inline. If HAS_STATIC_INLINE is not defined, - * this will give a plain 'static'. It will always be defined - * to something that gives static linkage. - * Possibilities include - * static inline (c99) - * static __inline__ (gcc -ansi) - * static __inline (MSVC) - * static _inline (older MSVC) - * static (c89 compilers) - */ -#$d_static_inline HAS_STATIC_INLINE /**/ -#define PERL_STATIC_INLINE $perl_static_inline /**/ - -/* EBCDIC: - * This symbol, if defined, indicates that this system uses - * EBCDIC encoding. - */ -#$ebcdic EBCDIC /**/ - -/* OSNAME: - * This symbol contains the name of the operating system, as determined - * by Configure. You shouldn't rely on it too much; the specific - * feature tests from Configure are generally more reliable. - */ -/* OSVERS: - * This symbol contains the version of the operating system, as determined - * by Configure. You shouldn't rely on it too much; the specific - * feature tests from Configure are generally more reliable. - */ -#define OSNAME "$osname" /**/ -#define OSVERS "$osvers" /**/ - -/* CAT2: - * This macro concatenates 2 tokens together. - */ -/* STRINGIFY: - * This macro surrounds its token with double quotes. - */ -#if $cpp_stuff == 1 -#define CAT2(a,b) a/**/b -#define STRINGIFY(a) "a" -#endif -#if $cpp_stuff == 42 -#define PeRl_CaTiFy(a, b) a ## b -#define PeRl_StGiFy(a) #a -#define CAT2(a,b) PeRl_CaTiFy(a,b) -#define StGiFy(a) PeRl_StGiFy(a) -#define STRINGIFY(a) PeRl_StGiFy(a) -#endif -#if $cpp_stuff != 1 && $cpp_stuff != 42 -#include "Bletch: How does this C preprocessor concatenate tokens?" -#endif - -/* CPPSTDIN: - * This symbol contains the first part of the string which will invoke - * the C preprocessor on the standard input and produce to standard - * output. Typical value of "cc -E" or "/lib/cpp", but it can also - * call a wrapper. See CPPRUN. - */ -/* CPPMINUS: - * This symbol contains the second part of the string which will invoke - * the C preprocessor on the standard input and produce to standard - * output. This symbol will have the value "-" if CPPSTDIN needs a minus - * to specify standard input, otherwise the value is "". - */ -/* CPPRUN: - * This symbol contains the string which will invoke a C preprocessor on - * the standard input and produce to standard output. It needs to end - * with CPPLAST, after all other preprocessor flags have been specified. - * The main difference with CPPSTDIN is that this program will never be a - * pointer to a shell wrapper, i.e. it will be empty if no preprocessor is - * available directly to the user. Note that it may well be different from - * the preprocessor used to compile the C program. - */ -/* CPPLAST: - * This symbol is intended to be used along with CPPRUN in the same manner - * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "". - */ -#define CPPSTDIN "$cppstdin" -#define CPPMINUS "$cppminus" -#define CPPRUN "$cpprun" -#define CPPLAST "$cpplast" - -/* HAS_ACCESS: - * This manifest constant lets the C program know that the access() - * system call is available to check for accessibility using real UID/GID. - * (always present on UNIX.) - */ -#$d_access HAS_ACCESS /**/ - -/* HASATTRIBUTE_FORMAT: - * Can we handle GCC attribute for checking printf-style formats - */ -/* PRINTF_FORMAT_NULL_OK: - * Allows __printf__ format to be null when checking printf-style - */ -/* HASATTRIBUTE_MALLOC: - * Can we handle GCC attribute for malloc-style functions. - */ -/* HASATTRIBUTE_NONNULL: - * Can we handle GCC attribute for nonnull function parms. - */ -/* HASATTRIBUTE_NORETURN: - * Can we handle GCC attribute for functions that do not return - */ -/* HASATTRIBUTE_PURE: - * Can we handle GCC attribute for pure functions - */ -/* HASATTRIBUTE_UNUSED: - * Can we handle GCC attribute for unused variables and arguments - */ -/* HASATTRIBUTE_DEPRECATED: - * Can we handle GCC attribute for marking deprecated APIs - */ -/* HASATTRIBUTE_WARN_UNUSED_RESULT: - * Can we handle GCC attribute for warning on unused results - */ -#$d_attribute_deprecated HASATTRIBUTE_DEPRECATED /**/ -#$d_attribute_format HASATTRIBUTE_FORMAT /**/ -#$d_printf_format_null PRINTF_FORMAT_NULL_OK /**/ -#$d_attribute_noreturn HASATTRIBUTE_NORETURN /**/ -#$d_attribute_malloc HASATTRIBUTE_MALLOC /**/ -#$d_attribute_nonnull HASATTRIBUTE_NONNULL /**/ -#$d_attribute_pure HASATTRIBUTE_PURE /**/ -#$d_attribute_unused HASATTRIBUTE_UNUSED /**/ -#$d_attribute_warn_unused_result HASATTRIBUTE_WARN_UNUSED_RESULT /**/ - -/* HASCONST: - * This symbol, if defined, indicates that this C compiler knows about - * the const type. There is no need to actually test for that symbol - * within your programs. The mere use of the "const" keyword will - * trigger the necessary tests. - */ -#$d_const HASCONST /**/ -#ifndef HASCONST -#define const -#endif - -/* HAS_CSH: - * This symbol, if defined, indicates that the C-shell exists. - */ -/* CSH: - * This symbol, if defined, contains the full pathname of csh. - */ -#$d_csh HAS_CSH /**/ -#ifdef HAS_CSH -#define CSH "$full_csh" /**/ -#endif - -/* SETUID_SCRIPTS_ARE_SECURE_NOW: - * This symbol, if defined, indicates that the bug that prevents - * setuid scripts from being secure is not present in this kernel. - */ -/* DOSUID: - * This symbol, if defined, indicates that the C program should - * check the script that it is executing for setuid/setgid bits, and - * attempt to emulate setuid/setgid on systems that have disabled - * setuid #! scripts because the kernel can't do it securely. - * It is up to the package designer to make sure that this emulation - * is done securely. Among other things, it should do an fstat on - * the script it just opened to make sure it really is a setuid/setgid - * script, it should make sure the arguments passed correspond exactly - * to the argument on the #! line, and it should not trust any - * subprocesses to which it must pass the filename rather than the - * file descriptor of the script to be executed. - */ -#$d_suidsafe SETUID_SCRIPTS_ARE_SECURE_NOW /**/ -#$d_dosuid DOSUID /**/ - -/* HAS_ENDGRENT: - * This symbol, if defined, indicates that the getgrent routine is - * available for finalizing sequential access of the group database. - */ -#$d_endgrent HAS_ENDGRENT /**/ - -/* HAS_ENDHOSTENT: - * This symbol, if defined, indicates that the endhostent() routine is - * available to close whatever was being used for host queries. - */ -#$d_endhent HAS_ENDHOSTENT /**/ - -/* HAS_ENDNETENT: - * This symbol, if defined, indicates that the endnetent() routine is - * available to close whatever was being used for network queries. - */ -#$d_endnent HAS_ENDNETENT /**/ - -/* HAS_ENDPROTOENT: - * This symbol, if defined, indicates that the endprotoent() routine is - * available to close whatever was being used for protocol queries. - */ -#$d_endpent HAS_ENDPROTOENT /**/ - -/* HAS_ENDPWENT: - * This symbol, if defined, indicates that the getgrent routine is - * available for finalizing sequential access of the passwd database. - */ -#$d_endpwent HAS_ENDPWENT /**/ - -/* HAS_ENDSERVENT: - * This symbol, if defined, indicates that the endservent() routine is - * available to close whatever was being used for service queries. - */ -#$d_endsent HAS_ENDSERVENT /**/ - -/* FLEXFILENAMES: - * This symbol, if defined, indicates that the system supports filenames - * longer than 14 characters. - */ -#$d_flexfnam FLEXFILENAMES /**/ - -/* HAS_GETGRENT: - * This symbol, if defined, indicates that the getgrent routine is - * available for sequential access of the group database. - */ -#$d_getgrent HAS_GETGRENT /**/ - -/* HAS_GETHOSTBYADDR: - * This symbol, if defined, indicates that the gethostbyaddr() routine is - * available to look up hosts by their IP addresses. - */ -#$d_gethbyaddr HAS_GETHOSTBYADDR /**/ - -/* HAS_GETHOSTBYNAME: - * This symbol, if defined, indicates that the gethostbyname() routine is - * available to look up host names in some data base or other. - */ -#$d_gethbyname HAS_GETHOSTBYNAME /**/ - -/* HAS_GETHOSTENT: - * This symbol, if defined, indicates that the gethostent() routine is - * available to look up host names in some data base or another. - */ -#$d_gethent HAS_GETHOSTENT /**/ - -/* HAS_GETHOSTNAME: - * This symbol, if defined, indicates that the C program may use the - * gethostname() routine to derive the host name. See also HAS_UNAME - * and PHOSTNAME. - */ -/* HAS_UNAME: - * This symbol, if defined, indicates that the C program may use the - * uname() routine to derive the host name. See also HAS_GETHOSTNAME - * and PHOSTNAME. - */ -/* PHOSTNAME: - * This symbol, if defined, indicates the command to feed to the - * popen() routine to derive the host name. See also HAS_GETHOSTNAME - * and HAS_UNAME. Note that the command uses a fully qualified path, - * so that it is safe even if used by a process with super-user - * privileges. - */ -/* HAS_PHOSTNAME: - * This symbol, if defined, indicates that the C program may use the - * contents of PHOSTNAME as a command to feed to the popen() routine - * to derive the host name. - */ -#$d_gethname HAS_GETHOSTNAME /**/ -#$d_uname HAS_UNAME /**/ -#$d_phostname HAS_PHOSTNAME /**/ -#ifdef HAS_PHOSTNAME -#define PHOSTNAME "$aphostname" /* How to get the host name */ -#endif - -/* HAS_GETNETBYADDR: - * This symbol, if defined, indicates that the getnetbyaddr() routine is - * available to look up networks by their IP addresses. - */ -#$d_getnbyaddr HAS_GETNETBYADDR /**/ - -/* HAS_GETNETBYNAME: - * This symbol, if defined, indicates that the getnetbyname() routine is - * available to look up networks by their names. - */ -#$d_getnbyname HAS_GETNETBYNAME /**/ - -/* HAS_GETNETENT: - * This symbol, if defined, indicates that the getnetent() routine is - * available to look up network names in some data base or another. - */ -#$d_getnent HAS_GETNETENT /**/ - -/* HAS_GETPROTOENT: - * This symbol, if defined, indicates that the getprotoent() routine is - * available to look up protocols in some data base or another. - */ -#$d_getpent HAS_GETPROTOENT /**/ - -/* HAS_GETPGRP: - * This symbol, if defined, indicates that the getpgrp routine is - * available to get the current process group. - */ -/* USE_BSD_GETPGRP: - * This symbol, if defined, indicates that getpgrp needs one - * arguments whereas USG one needs none. - */ -#$d_getpgrp HAS_GETPGRP /**/ -#$d_bsdgetpgrp USE_BSD_GETPGRP /**/ - -/* HAS_GETPROTOBYNAME: - * This symbol, if defined, indicates that the getprotobyname() - * routine is available to look up protocols by their name. - */ -/* HAS_GETPROTOBYNUMBER: - * This symbol, if defined, indicates that the getprotobynumber() - * routine is available to look up protocols by their number. - */ -#$d_getpbyname HAS_GETPROTOBYNAME /**/ -#$d_getpbynumber HAS_GETPROTOBYNUMBER /**/ - -/* HAS_GETPWENT: - * This symbol, if defined, indicates that the getpwent routine is - * available for sequential access of the passwd database. - * If this is not available, the older getpw() function may be available. - */ -#$d_getpwent HAS_GETPWENT /**/ - -/* HAS_GETSERVENT: - * This symbol, if defined, indicates that the getservent() routine is - * available to look up network services in some data base or another. - */ -#$d_getsent HAS_GETSERVENT /**/ - -/* HAS_GETSERVBYNAME: - * This symbol, if defined, indicates that the getservbyname() - * routine is available to look up services by their name. - */ -/* HAS_GETSERVBYPORT: - * This symbol, if defined, indicates that the getservbyport() - * routine is available to look up services by their port. - */ -#$d_getsbyname HAS_GETSERVBYNAME /**/ -#$d_getsbyport HAS_GETSERVBYPORT /**/ - -/* HAS_HTONL: - * This symbol, if defined, indicates that the htonl() routine (and - * friends htons() ntohl() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_HTONS: - * This symbol, if defined, indicates that the htons() routine (and - * friends htonl() ntohl() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_NTOHL: - * This symbol, if defined, indicates that the ntohl() routine (and - * friends htonl() htons() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_NTOHS: - * This symbol, if defined, indicates that the ntohs() routine (and - * friends htonl() htons() ntohl()) are available to do network - * order byte swapping. - */ -#$d_htonl HAS_HTONL /**/ -#$d_htonl HAS_HTONS /**/ -#$d_htonl HAS_NTOHL /**/ -#$d_htonl HAS_NTOHS /**/ - -/* HAS_LONG_DOUBLE: - * This symbol will be defined if the C compiler supports long - * doubles. - */ -/* LONG_DOUBLESIZE: - * This symbol contains the size of a long double, so that the - * C preprocessor can make decisions based on it. It is only - * defined if the system supports long doubles. - */ -#$d_longdbl HAS_LONG_DOUBLE /**/ -#ifdef HAS_LONG_DOUBLE -#define LONG_DOUBLESIZE $longdblsize /**/ -#endif - -/* HAS_LONG_LONG: - * This symbol will be defined if the C compiler supports long long. - */ -/* LONGLONGSIZE: - * This symbol contains the size of a long long, so that the - * C preprocessor can make decisions based on it. It is only - * defined if the system supports long long. - */ -#$d_longlong HAS_LONG_LONG /**/ -#ifdef HAS_LONG_LONG -#define LONGLONGSIZE $longlongsize /**/ -#endif - -/* HAS_MEMCHR: - * This symbol, if defined, indicates that the memchr routine is available - * to locate characters within a C string. - */ -#$d_memchr HAS_MEMCHR /**/ - -/* HAS_MKSTEMP: - * This symbol, if defined, indicates that the mkstemp routine is - * available to exclusively create and open a uniquely named - * temporary file. - */ -#$d_mkstemp HAS_MKSTEMP /**/ - -/* HAS_MMAP: - * This symbol, if defined, indicates that the mmap system call is - * available to map a file into memory. - */ -/* Mmap_t: - * This symbol holds the return type of the mmap() system call - * (and simultaneously the type of the first argument). - * Usually set to 'void *' or 'caddr_t'. - */ -#$d_mmap HAS_MMAP /**/ -#define Mmap_t $mmaptype /**/ - -/* HAS_MSG: - * This symbol, if defined, indicates that the entire msg*(2) library is - * supported (IPC mechanism based on message queues). - */ -#$d_msg HAS_MSG /**/ - -/* HAS_SEM: - * This symbol, if defined, indicates that the entire sem*(2) library is - * supported. - */ -#$d_sem HAS_SEM /**/ - -/* HAS_SETGRENT: - * This symbol, if defined, indicates that the setgrent routine is - * available for initializing sequential access of the group database. - */ -#$d_setgrent HAS_SETGRENT /**/ - -/* HAS_SETHOSTENT: - * This symbol, if defined, indicates that the sethostent() routine is - * available. - */ -#$d_sethent HAS_SETHOSTENT /**/ - -/* HAS_SETNETENT: - * This symbol, if defined, indicates that the setnetent() routine is - * available. - */ -#$d_setnent HAS_SETNETENT /**/ - -/* HAS_SETPROTOENT: - * This symbol, if defined, indicates that the setprotoent() routine is - * available. - */ -#$d_setpent HAS_SETPROTOENT /**/ - -/* HAS_SETPGRP: - * This symbol, if defined, indicates that the setpgrp routine is - * available to set the current process group. - */ -/* USE_BSD_SETPGRP: - * This symbol, if defined, indicates that setpgrp needs two - * arguments whereas USG one needs none. See also HAS_SETPGID - * for a POSIX interface. - */ -#$d_setpgrp HAS_SETPGRP /**/ -#$d_bsdsetpgrp USE_BSD_SETPGRP /**/ - -/* HAS_SETPWENT: - * This symbol, if defined, indicates that the setpwent routine is - * available for initializing sequential access of the passwd database. - */ -#$d_setpwent HAS_SETPWENT /**/ - -/* HAS_SETSERVENT: - * This symbol, if defined, indicates that the setservent() routine is - * available. - */ -#$d_setsent HAS_SETSERVENT /**/ - -/* HAS_SETVBUF: - * This symbol, if defined, indicates that the setvbuf routine is - * available to change buffering on an open stdio stream. - * to a line-buffered mode. - */ -#$d_setvbuf HAS_SETVBUF /**/ - -/* HAS_SHM: - * This symbol, if defined, indicates that the entire shm*(2) library is - * supported. - */ -#$d_shm HAS_SHM /**/ - -/* Shmat_t: - * This symbol holds the return type of the shmat() system call. - * Usually set to 'void *' or 'char *'. - */ -/* HAS_SHMAT_PROTOTYPE: - * This symbol, if defined, indicates that the sys/shm.h includes - * a prototype for shmat(). Otherwise, it is up to the program to - * guess one. Shmat_t shmat(int, Shmat_t, int) is a good guess, - * but not always right so it should be emitted by the program only - * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs. - */ -#define Shmat_t $shmattype /**/ -#$d_shmatprototype HAS_SHMAT_PROTOTYPE /**/ - -/* HAS_SOCKET: - * This symbol, if defined, indicates that the BSD socket interface is - * supported. - */ -/* HAS_SOCKETPAIR: - * This symbol, if defined, indicates that the BSD socketpair() call is - * supported. - */ -/* HAS_MSG_CTRUNC: - * This symbol, if defined, indicates that the MSG_CTRUNC is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_DONTROUTE: - * This symbol, if defined, indicates that the MSG_DONTROUTE is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_OOB: - * This symbol, if defined, indicates that the MSG_OOB is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_PEEK: - * This symbol, if defined, indicates that the MSG_PEEK is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_PROXY: - * This symbol, if defined, indicates that the MSG_PROXY is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_SCM_RIGHTS: - * This symbol, if defined, indicates that the SCM_RIGHTS is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_SOCKADDR_SA_LEN: - * This symbol, if defined, indicates that the struct sockaddr - * structure has a member called sa_len, indicating the length of - * the structure. - */ -/* HAS_SIN6_SCOPE_ID: - * This symbol, if defined, indicates that the struct sockaddr_in6 - * structure has a member called sin6_scope_id. - */ -#$d_socket HAS_SOCKET /**/ -#$d_sockpair HAS_SOCKETPAIR /**/ -#$d_sockaddr_sa_len HAS_SOCKADDR_SA_LEN /**/ -#$d_msg_ctrunc HAS_MSG_CTRUNC /**/ -#$d_msg_dontroute HAS_MSG_DONTROUTE /**/ -#$d_msg_oob HAS_MSG_OOB /**/ -#$d_msg_peek HAS_MSG_PEEK /**/ -#$d_msg_proxy HAS_MSG_PROXY /**/ -#$d_scm_rights HAS_SCM_RIGHTS /**/ -#$d_sin6_scope_id HAS_SIN6_SCOPE_ID /**/ - -/* USE_STAT_BLOCKS: - * This symbol is defined if this system has a stat structure declaring - * st_blksize and st_blocks. - */ -#ifndef USE_STAT_BLOCKS -#$d_statblks USE_STAT_BLOCKS /**/ -#endif - -/* USE_STRUCT_COPY: - * This symbol, if defined, indicates that this C compiler knows how - * to copy structures. If undefined, you'll need to use a block copy - * routine of some sort instead. - */ -#$d_strctcpy USE_STRUCT_COPY /**/ - -/* HAS_STRERROR: - * This symbol, if defined, indicates that the strerror routine is - * available to translate error numbers to strings. See the writeup - * of Strerror() in this file before you try to define your own. - */ -/* HAS_SYS_ERRLIST: - * This symbol, if defined, indicates that the sys_errlist array is - * available to translate error numbers to strings. The extern int - * sys_nerr gives the size of that table. - */ -/* Strerror: - * This preprocessor symbol is defined as a macro if strerror() is - * not available to translate error numbers to strings but sys_errlist[] - * array is there. - */ -#$d_strerror HAS_STRERROR /**/ -#$d_syserrlst HAS_SYS_ERRLIST /**/ -#define Strerror(e) $d_strerrm - -/* HAS_STRTOUL: - * This symbol, if defined, indicates that the strtoul routine is - * available to provide conversion of strings to unsigned long. - */ -#$d_strtoul HAS_STRTOUL /**/ - -/* HAS_UNION_SEMUN: - * This symbol, if defined, indicates that the union semun is - * defined by including . If not, the user code - * probably needs to define it as: - * union semun { - * int val; - * struct semid_ds *buf; - * unsigned short *array; - * } - */ -/* USE_SEMCTL_SEMUN: - * This symbol, if defined, indicates that union semun is - * used for semctl IPC_STAT. - */ -/* USE_SEMCTL_SEMID_DS: - * This symbol, if defined, indicates that struct semid_ds * is - * used for semctl IPC_STAT. - */ -#$d_union_semun HAS_UNION_SEMUN /**/ -#$d_semctl_semun USE_SEMCTL_SEMUN /**/ -#$d_semctl_semid_ds USE_SEMCTL_SEMID_DS /**/ - -/* HAS_VFORK: - * This symbol, if defined, indicates that vfork() exists. - */ -#$d_vfork HAS_VFORK /**/ +#$d_vfork HAS_VFORK /**/ /* HAS_PSEUDOFORK: * This symbol, if defined, indicates that an emulation of the @@ -2895,6 +2663,64 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define volatile #endif +/* HAS_VPRINTF: + * This symbol, if defined, indicates that the vprintf routine is available + * to printf with a pointer to an argument list. If unavailable, you + * may need to write your own, probably in terms of _doprnt(). + */ +/* USE_CHAR_VSPRINTF: + * This symbol is defined if this system has vsprintf() returning type + * (char*). The trend seems to be to declare it as "int vsprintf()". It + * is up to the package author to declare vsprintf correctly based on the + * symbol. + */ +#$d_vprintf HAS_VPRINTF /**/ +#$d_charvspr USE_CHAR_VSPRINTF /**/ + +/* DOUBLESIZE: + * This symbol contains the size of a double, so that the C preprocessor + * can make decisions based on it. + */ +#define DOUBLESIZE $doublesize /**/ + +/* EBCDIC: + * This symbol, if defined, indicates that this system uses + * EBCDIC encoding. + */ +#$ebcdic EBCDIC /**/ + +/* Fpos_t: + * This symbol holds the type used to declare file positions in libc. + * It can be fpos_t, long, uint, etc... It may be necessary to include + * to get any typedef'ed information. + */ +#define Fpos_t $fpostype /* File position type */ + +/* Gid_t_f: + * This symbol defines the format string used for printing a Gid_t. + */ +#define Gid_t_f $gidformat /**/ + +/* Gid_t_sign: + * This symbol holds the signedess of a Gid_t. + * 1 for unsigned, -1 for signed. + */ +#define Gid_t_sign $gidsign /* GID sign */ + +/* Gid_t_size: + * This symbol holds the size of a Gid_t in bytes. + */ +#define Gid_t_size $gidsize /* GID size */ + +/* Gid_t: + * This symbol holds the return type of getgid() and the type of + * argument to setrgid() and related functions. Typically, + * it is the type of group ids in the kernel. It can be int, ushort, + * gid_t, etc... It may be necessary to include to get + * any typedef'ed information. + */ +#define Gid_t $gidtype /* Type for getgid(), etc... */ + /* I_DIRENT: * This symbol, if defined, indicates to the C program that it should * include . Using this symbol also triggers the definition @@ -2926,6 +2752,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$i_grp I_GRP /**/ #$d_grpasswd GRPASSWD /**/ +/* I_MACH_CTHREADS: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#$i_machcthr I_MACH_CTHREADS /**/ + /* I_NDBM: * This symbol, if defined, indicates that exists and should * be included. @@ -2977,6 +2809,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$i_neterrno I_NET_ERRNO /**/ +/* I_PTHREAD: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#$i_pthread I_PTHREAD /**/ + /* I_PWD: * This symbol, if defined, indicates to the C program that it should * include . @@ -3013,52 +2851,206 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * This symbol, if defined, indicates to the C program that struct passwd * contains pw_passwd. */ -#$i_pwd I_PWD /**/ -#$d_pwquota PWQUOTA /**/ -#$d_pwage PWAGE /**/ -#$d_pwchange PWCHANGE /**/ -#$d_pwclass PWCLASS /**/ -#$d_pwexpire PWEXPIRE /**/ -#$d_pwcomment PWCOMMENT /**/ -#$d_pwgecos PWGECOS /**/ -#$d_pwpasswd PWPASSWD /**/ +#$i_pwd I_PWD /**/ +#$d_pwquota PWQUOTA /**/ +#$d_pwage PWAGE /**/ +#$d_pwchange PWCHANGE /**/ +#$d_pwclass PWCLASS /**/ +#$d_pwexpire PWEXPIRE /**/ +#$d_pwcomment PWCOMMENT /**/ +#$d_pwgecos PWGECOS /**/ +#$d_pwpasswd PWPASSWD /**/ + +/* I_SYS_ACCESS: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#$i_sysaccess I_SYS_ACCESS /**/ + +/* I_SYS_SECURITY: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#$i_syssecrt I_SYS_SECURITY /**/ + +/* I_SYSUIO: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#$i_sysuio I_SYSUIO /**/ + +/* I_TIME: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/* I_SYS_TIME: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/* I_SYS_TIME_KERNEL: + * This symbol, if defined, indicates to the C program that it should + * include with KERNEL defined. + */ +/* HAS_TM_TM_ZONE: + * This symbol, if defined, indicates to the C program that + * the struct tm has a tm_zone field. + */ +/* HAS_TM_TM_GMTOFF: + * This symbol, if defined, indicates to the C program that + * the struct tm has a tm_gmtoff field. + */ +#$i_time I_TIME /**/ +#$i_systime I_SYS_TIME /**/ +#$i_systimek I_SYS_TIME_KERNEL /**/ +#$d_tm_tm_zone HAS_TM_TM_ZONE /**/ +#$d_tm_tm_gmtoff HAS_TM_TM_GMTOFF /**/ + +/* I_STDARG: + * This symbol, if defined, indicates that exists and should + * be included. + */ +/* I_VARARGS: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#$i_stdarg I_STDARG /**/ +#$i_varargs I_VARARGS /**/ + +/* PERL_INC_VERSION_LIST: + * This variable specifies the list of subdirectories in over + * which perl.c:incpush() and lib/lib.pm will automatically + * search when adding directories to @INC, in a format suitable + * for a C initialization string. See the inc_version_list entry + * in Porting/Glossary for more details. + */ +#$d_inc_version_list PERL_INC_VERSION_LIST $inc_version_list_init /**/ + +/* INSTALL_USR_BIN_PERL: + * This symbol, if defined, indicates that Perl is to be installed + * also as /usr/bin/perl. + */ +#$installusrbinperl INSTALL_USR_BIN_PERL /**/ + +/* Off_t: + * This symbol holds the type used to declare offsets in the kernel. + * It can be int, long, off_t, etc... It may be necessary to include + * to get any typedef'ed information. + */ +/* LSEEKSIZE: + * This symbol holds the number of bytes used by the Off_t. + */ +/* Off_t_size: + * This symbol holds the number of bytes used by the Off_t. + */ +#define Off_t $lseektype /* type */ +#define LSEEKSIZE $lseeksize /* size */ +#define Off_t_size $lseeksize /* size */ + +/* Free_t: + * This variable contains the return type of free(). It is usually + * void, but occasionally int. + */ +/* Malloc_t: + * This symbol is the type of pointer returned by malloc and realloc. + */ +#define Malloc_t $malloctype /**/ +#define Free_t $freetype /**/ + +/* PERL_MALLOC_WRAP: + * This symbol, if defined, indicates that we'd like malloc wrap checks. + */ +#$usemallocwrap PERL_MALLOC_WRAP /**/ + +/* MYMALLOC: + * This symbol, if defined, indicates that we're using our own malloc. + */ +#$d_mymalloc MYMALLOC /**/ + +/* Mode_t: + * This symbol holds the type used to declare file modes + * for systems calls. It is usually mode_t, but may be + * int or unsigned short. It may be necessary to include + * to get any typedef'ed information. + */ +#define Mode_t $modetype /* file mode parameter for system calls */ + +/* VAL_O_NONBLOCK: + * This symbol is to be used during open() or fcntl(F_SETFL) to turn on + * non-blocking I/O for the file descriptor. Note that there is no way + * back, i.e. you cannot turn it blocking again this way. If you wish to + * alternatively switch between blocking and non-blocking, use the + * ioctl(FIOSNBIO) call instead, but that is not supported by all devices. + */ +/* VAL_EAGAIN: + * This symbol holds the errno error code set by read() when no data was + * present on the non-blocking file descriptor. + */ +/* RD_NODATA: + * This symbol holds the return code from read() when no data is present + * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is + * not defined, then you can't distinguish between no data and EOF by + * issuing a read(). You'll have to find another way to tell for sure! + */ +/* EOF_NONBLOCK: + * This symbol, if defined, indicates to the C program that a read() on + * a non-blocking file descriptor will return 0 on EOF, and not the value + * held in RD_NODATA (-1 usually, in that case!). + */ +#define VAL_O_NONBLOCK $o_nonblock +#define VAL_EAGAIN $eagain +#define RD_NODATA $rd_nodata +#$d_eofnblk EOF_NONBLOCK -/* I_SYSUIO: - * This symbol, if defined, indicates that exists and - * should be included. +/* Netdb_host_t: + * This symbol holds the type used for the 1st argument + * to gethostbyaddr(). */ -#$i_sysuio I_SYSUIO /**/ - -/* I_STDARG: - * This symbol, if defined, indicates that exists and should - * be included. +/* Netdb_hlen_t: + * This symbol holds the type used for the 2nd argument + * to gethostbyaddr(). */ -/* I_VARARGS: - * This symbol, if defined, indicates to the C program that it should - * include . +/* Netdb_name_t: + * This symbol holds the type used for the argument to + * gethostbyname(). */ -#$i_stdarg I_STDARG /**/ -#$i_varargs I_VARARGS /**/ - -/* Free_t: - * This variable contains the return type of free(). It is usually - * void, but occasionally int. +/* Netdb_net_t: + * This symbol holds the type used for the 1st argument to + * getnetbyaddr(). */ -/* Malloc_t: - * This symbol is the type of pointer returned by malloc and realloc. +#define Netdb_host_t $netdb_host_type /**/ +#define Netdb_hlen_t $netdb_hlen_type /**/ +#define Netdb_name_t $netdb_name_type /**/ +#define Netdb_net_t $netdb_net_type /**/ + +/* PERL_OTHERLIBDIRS: + * This variable contains a colon-separated set of paths for the perl + * binary to search for additional library files or modules. + * These directories will be tacked to the end of @INC. + * Perl will automatically search below each path for version- + * and architecture-specific directories. See PERL_INC_VERSION_LIST + * for more details. */ -#define Malloc_t $malloctype /**/ -#define Free_t $freetype /**/ +#$d_perl_otherlibdirs PERL_OTHERLIBDIRS "$otherlibdirs" /**/ -/* PERL_MALLOC_WRAP: - * This symbol, if defined, indicates that we'd like malloc wrap checks. +/* Pid_t: + * This symbol holds the type used to declare process ids in the kernel. + * It can be int, uint, pid_t, etc... It may be necessary to include + * to get any typedef'ed information. */ -#$usemallocwrap PERL_MALLOC_WRAP /**/ +#define Pid_t $pidtype /* PID type */ -/* MYMALLOC: - * This symbol, if defined, indicates that we're using our own malloc. +/* PRIVLIB: + * This symbol contains the name of the private library for this package. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. The program + * should be prepared to do ~ expansion. */ -#$d_mymalloc MYMALLOC /**/ +/* PRIVLIB_EXP: + * 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 "$privlib" /**/ +#define PRIVLIB_EXP "$privlibexp" /**/ /* CAN_PROTOTYPE: * If defined, this macro indicates that the C compiler can handle @@ -3078,6 +3070,65 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define _(args) () #endif +/* PTRSIZE: + * This symbol contains the size of a pointer, so that the C preprocessor + * can make decisions based on it. It will be sizeof(void *) if + * the compiler supports (void *); otherwise it will be + * sizeof(char *). + */ +#define PTRSIZE $ptrsize /**/ + +/* HAS_QUAD: + * This symbol, if defined, tells that there's a 64-bit integer type, + * Quad_t, and its unsigned counterpart, Uquad_t. QUADKIND will be one + * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, QUAD_IS_INT64_T, + * or QUAD_IS___INT64. + */ +#$d_quad HAS_QUAD /**/ +#ifdef HAS_QUAD +# define Quad_t $quadtype /**/ +# define Uquad_t $uquadtype /**/ +# define QUADKIND $quadkind /**/ +# define QUAD_IS_INT 1 +# define QUAD_IS_LONG 2 +# define QUAD_IS_LONG_LONG 3 +# define QUAD_IS_INT64_T 4 +# define QUAD_IS___INT64 5 +#endif + +/* Drand01: + * This macro is to be used to generate uniformly distributed + * random numbers over the range [0., 1.[. You may have to supply + * an 'extern double drand48();' in your program since SunOS 4.1.3 + * doesn't provide you with anything relevant in its headers. + * See HAS_DRAND48_PROTO. + */ +/* Rand_seed_t: + * This symbol defines the type of the argument of the + * random seed function. + */ +/* seedDrand01: + * This symbol defines the macro to be used in seeding the + * random number generator (see Drand01). + */ +/* RANDBITS: + * This symbol indicates how many bits are produced by the + * function used to generate normalized random numbers. + * Values include 15, 16, 31, and 48. + */ +#define Drand01() $drand01 /**/ +#define Rand_seed_t $randseedtype /**/ +#define seedDrand01(x) $seedfunc((Rand_seed_t)x) /**/ +#define RANDBITS $randbits /**/ + +/* Select_fd_set_t: + * This symbol holds the type used for the 2nd, 3rd, and 4th + * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET + * is defined, and 'int *' otherwise. This is only useful if you + * have select(), of course. + */ +#define Select_fd_set_t $selecttype /**/ + /* SH_PATH: * This symbol contains the full pathname to the shell used on this * on this system to execute Bourne shell scripts. Usually, this will be @@ -3119,19 +3170,169 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * Note that this variable is initialized from the sig_num_init, * not from sig_num (which is unused). */ -/* SIG_SIZE: - * This variable contains the number of elements of the SIG_NAME - * and SIG_NUM arrays, excluding the final NULL entry. +/* SIG_SIZE: + * This variable contains the number of elements of the SIG_NAME + * and SIG_NUM arrays, excluding the final NULL entry. + */ +#define SIG_NAME $sig_name_init /**/ +#define SIG_NUM $sig_num_init /**/ +#define SIG_SIZE $sig_size /**/ + +/* SITEARCH: + * This symbol contains the name of the private library for this package. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. The program + * should be prepared to do ~ expansion. + * The standard distribution will put nothing in this directory. + * After perl has been installed, users may install their own local + * architecture-dependent modules in this directory with + * MakeMaker Makefile.PL + * or equivalent. See INSTALL for details. + */ +/* SITEARCH_EXP: + * 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. + */ +#$d_sitearch SITEARCH "$sitearch" /**/ +#$d_sitearch SITEARCH_EXP "$sitearchexp" /**/ + +/* SITELIB: + * This symbol contains the name of the private library for this package. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. The program + * should be prepared to do ~ expansion. + * The standard distribution will put nothing in this directory. + * After perl has been installed, users may install their own local + * architecture-independent modules in this directory with + * MakeMaker Makefile.PL + * or equivalent. See INSTALL for details. + */ +/* SITELIB_EXP: + * This symbol contains the ~name expanded version of SITELIB, to be used + * in programs that are not prepared to deal with ~ expansion at run-time. + */ +/* SITELIB_STEM: + * This define is SITELIB_EXP with any trailing version-specific component + * 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 "$sitelib" /**/ +#define SITELIB_EXP "$sitelibexp" /**/ +#define SITELIB_STEM "$sitelib_stem" /**/ + +/* Size_t_size: + * This symbol holds the size of a Size_t in bytes. + */ +#define Size_t_size $sizesize /**/ + +/* Size_t: + * This symbol holds the type used to declare length parameters + * for string functions. It is usually size_t, but may be + * unsigned long, int, etc. It may be necessary to include + * to get any typedef'ed information. + */ +#define Size_t $sizetype /* length parameter for string functions */ + +/* Sock_size_t: + * This symbol holds the type used for the size argument of + * various socket calls (just the base type, not the pointer-to). + */ +#define Sock_size_t $socksizetype /**/ + +/* SSize_t: + * This symbol holds the type used by functions that return + * a count of bytes or an error condition. It must be a signed type. + * It is usually ssize_t, but may be long or int, etc. + * It may be necessary to include or + * to get any typedef'ed information. + * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t). + */ +#define SSize_t $ssizetype /* signed count of bytes */ + +/* STDCHAR: + * This symbol is defined to be the type of char used in stdio.h. + * It has the values "unsigned char" or "char". + */ +#define STDCHAR $stdchar /**/ + +/* Uid_t_f: + * This symbol defines the format string used for printing a Uid_t. + */ +#define Uid_t_f $uidformat /**/ + +/* Uid_t_sign: + * This symbol holds the signedess of a Uid_t. + * 1 for unsigned, -1 for signed. + */ +#define Uid_t_sign $uidsign /* UID sign */ + +/* Uid_t_size: + * This symbol holds the size of a Uid_t in bytes. + */ +#define Uid_t_size $uidsize /* UID size */ + +/* Uid_t: + * This symbol holds the type used to declare user ids in the kernel. + * It can be int, ushort, uid_t, etc... It may be necessary to include + * to get any typedef'ed information. + */ +#define Uid_t $uidtype /* UID type */ + +/* USE_ITHREADS: + * This symbol, if defined, indicates that Perl should be built to + * use the interpreter-based threading implementation. + */ +/* USE_5005THREADS: + * This symbol, if defined, indicates that Perl should be built to + * use the 5.005-based threading implementation. + * Only valid up to 5.8.x. + */ +/* OLD_PTHREADS_API: + * This symbol, if defined, indicates that Perl should + * be built to use the old draft POSIX threads API. */ -#define SIG_NAME $sig_name_init /**/ -#define SIG_NUM $sig_num_init /**/ -#define SIG_SIZE $sig_size /**/ +/* USE_REENTRANT_API: + * This symbol, if defined, indicates that Perl should + * try to use the various _r versions of library functions. + * This is extremely experimental. + */ +#$use5005threads USE_5005THREADS /**/ +#$useithreads USE_ITHREADS /**/ +#if defined(USE_5005THREADS) && !defined(USE_ITHREADS) +#define USE_THREADS /* until src is revised*/ +#endif +#$d_oldpthreads OLD_PTHREADS_API /**/ +#$usereentrant USE_REENTRANT_API /**/ -/* STDCHAR: - * This symbol is defined to be the type of char used in stdio.h. - * It has the values "unsigned char" or "char". +/* PERL_VENDORARCH: + * If defined, this symbol contains the name of a private library. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. + * It may have a ~ on the front. + * The standard distribution will put nothing in this directory. + * Vendors who distribute perl may wish to place their own + * architecture-dependent modules and extensions in this directory with + * MakeMaker Makefile.PL INSTALLDIRS=vendor + * or equivalent. See INSTALL for details. */ -#define STDCHAR $stdchar /**/ +/* PERL_VENDORARCH_EXP: + * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used + * in programs that are not prepared to deal with ~ expansion at run-time. + */ +#$d_vendorarch PERL_VENDORARCH "$vendorarch" /**/ +#$d_vendorarch PERL_VENDORARCH_EXP "$vendorarchexp" /**/ + +/* PERL_VENDORLIB_EXP: + * This symbol contains the ~name expanded version of VENDORLIB, to be used + * in programs that are not prepared to deal with ~ expansion at run-time. + */ +/* PERL_VENDORLIB_STEM: + * This define is PERL_VENDORLIB_EXP with any trailing version-specific component + * 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. + */ +#$d_vendorlib PERL_VENDORLIB_EXP "$vendorlibexp" /**/ +#$d_vendorlib PERL_VENDORLIB_STEM "$vendorlib_stem" /**/ /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this @@ -3552,7 +3753,7 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * of significant digits in a long double precision number. Unlike * for DBL_DIG, there's no good guess for LDBL_DIG if it is undefined. */ -#$d_ldbl_dig HAS_LDBL_DIG /**/ +#$d_ldbl_dig HAS_LDBL_DIG /* */ /* LIBM_LIB_VERSION: * This symbol, if defined, indicates that libm exports _LIB_VERSION @@ -4118,6 +4319,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$i_socks I_SOCKS /**/ +/* I_STDBOOL: + * This symbol, if defined, indicates that exists and + * can be included. + */ +#$i_stdbool I_STDBOOL /**/ + /* I_SUNMATH: * This symbol, if defined, indicates that exists and * should be included. @@ -4527,205 +4734,6 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$usesocks USE_SOCKS /**/ #endif -/* HAS_DRAND48_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the drand48() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern double drand48(void); - */ -#$d_drand48proto HAS_DRAND48_PROTO /**/ - -/* HAS_GETHOST_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for gethostent(), gethostbyname(), and - * gethostbyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -#$d_gethostprotos HAS_GETHOST_PROTOS /**/ - -/* HAS_GETNET_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for getnetent(), getnetbyname(), and - * getnetbyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -#$d_getnetprotos HAS_GETNET_PROTOS /**/ - -/* HAS_GETPROTO_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for getprotoent(), getprotobyname(), and - * getprotobyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -#$d_getprotoprotos HAS_GETPROTO_PROTOS /**/ - -/* HAS_GETSERV_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for getservent(), getservbyname(), and - * getservbyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -#$d_getservprotos HAS_GETSERV_PROTOS /**/ - -/* HAS_LSEEK_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the lseek() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern off_t lseek(int, off_t, int); - */ -#$d_lseekproto HAS_LSEEK_PROTO /**/ - -/* Netdb_host_t: - * This symbol holds the type used for the 1st argument - * to gethostbyaddr(). - */ -/* Netdb_hlen_t: - * This symbol holds the type used for the 2nd argument - * to gethostbyaddr(). - */ -/* Netdb_name_t: - * This symbol holds the type used for the argument to - * gethostbyname(). - */ -/* Netdb_net_t: - * This symbol holds the type used for the 1st argument to - * getnetbyaddr(). - */ -#define Netdb_host_t $netdb_host_type /**/ -#define Netdb_hlen_t $netdb_hlen_type /**/ -#define Netdb_name_t $netdb_name_type /**/ -#define Netdb_net_t $netdb_net_type /**/ - -/* Select_fd_set_t: - * This symbol holds the type used for the 2nd, 3rd, and 4th - * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET - * is defined, and 'int *' otherwise. This is only useful if you - * have select(), of course. - */ -#define Select_fd_set_t $selecttype /**/ - -/* Sock_size_t: - * This symbol holds the type used for the size argument of - * various socket calls (just the base type, not the pointer-to). - */ -#define Sock_size_t $socksizetype /**/ - -/* HAS_TIME: - * This symbol, if defined, indicates that the time() routine exists. - */ -/* Time_t: - * This symbol holds the type returned by time(). It can be long, - * or time_t on BSD sites (in which case should be - * included). - */ -#$d_time HAS_TIME /**/ -#define Time_t $timetype /* Time type */ - -/* HAS_TIMES: - * This symbol, if defined, indicates that the times() routine exists. - * Note that this became obsolete on some systems (SUNOS), which now - * use getrusage(). It may be necessary to include . - */ -#$d_times HAS_TIMES /**/ - -/* Fpos_t: - * This symbol holds the type used to declare file positions in libc. - * It can be fpos_t, long, uint, etc... It may be necessary to include - * to get any typedef'ed information. - */ -#define Fpos_t $fpostype /* File position type */ - -/* Gid_t_f: - * This symbol defines the format string used for printing a Gid_t. - */ -#define Gid_t_f $gidformat /**/ - -/* Gid_t_sign: - * This symbol holds the signedess of a Gid_t. - * 1 for unsigned, -1 for signed. - */ -#define Gid_t_sign $gidsign /* GID sign */ - -/* Gid_t_size: - * This symbol holds the size of a Gid_t in bytes. - */ -#define Gid_t_size $gidsize /* GID size */ - -/* Gid_t: - * This symbol holds the return type of getgid() and the type of - * argument to setrgid() and related functions. Typically, - * it is the type of group ids in the kernel. It can be int, ushort, - * gid_t, etc... It may be necessary to include to get - * any typedef'ed information. - */ -#define Gid_t $gidtype /* Type for getgid(), etc... */ - -/* Off_t: - * This symbol holds the type used to declare offsets in the kernel. - * It can be int, long, off_t, etc... It may be necessary to include - * to get any typedef'ed information. - */ -/* LSEEKSIZE: - * This symbol holds the number of bytes used by the Off_t. - */ -/* Off_t_size: - * This symbol holds the number of bytes used by the Off_t. - */ -#define Off_t $lseektype /* type */ -#define LSEEKSIZE $lseeksize /* size */ -#define Off_t_size $lseeksize /* size */ - -/* Mode_t: - * This symbol holds the type used to declare file modes - * for systems calls. It is usually mode_t, but may be - * int or unsigned short. It may be necessary to include - * to get any typedef'ed information. - */ -#define Mode_t $modetype /* file mode parameter for system calls */ - -/* Pid_t: - * This symbol holds the type used to declare process ids in the kernel. - * It can be int, uint, pid_t, etc... It may be necessary to include - * to get any typedef'ed information. - */ -#define Pid_t $pidtype /* PID type */ - -/* Size_t_size: - * This symbol holds the size of a Size_t in bytes. - */ -#define Size_t_size $sizesize /**/ - -/* Size_t: - * This symbol holds the type used to declare length parameters - * for string functions. It is usually size_t, but may be - * unsigned long, int, etc. It may be necessary to include - * to get any typedef'ed information. - */ -#define Size_t $sizetype /* length parameter for string functions */ - -/* Uid_t_f: - * This symbol defines the format string used for printing a Uid_t. - */ -#define Uid_t_f $uidformat /**/ - -/* Uid_t_sign: - * This symbol holds the signedess of a Uid_t. - * 1 for unsigned, -1 for signed. - */ -#define Uid_t_sign $uidsign /* UID sign */ - -/* Uid_t_size: - * This symbol holds the size of a Uid_t in bytes. - */ -#define Uid_t_size $uidsize /* UID size */ - -/* Uid_t: - * This symbol holds the type used to declare user ids in the kernel. - * It can be int, ushort, uid_t, etc... It may be necessary to include - * to get any typedef'ed information. - */ -#define Uid_t $uidtype /* UID type */ - #endif !GROK!THIS! ;; diff --git a/configure.com b/configure.com index c23bdf01067..14a73f1fc4b 100644 --- a/configure.com +++ b/configure.com @@ -6458,6 +6458,12 @@ $ WC "i_sgtty='undef'" $ WC "i_shadow='" + i_shadow + "'" $ WC "i_socks='" + i_socks + "'" $ WC "i_stdarg='define'" +$ IF (ccname .EQS. "DEC") .AND. (F$INTEGER(Dec_C_Version).GE.60400000) +$ THEN +$ WC "i_stdbool='define'" +$ ELSE +$ WC "i_stdbool='undef'" +$ ENDIF $ WC "i_stddef='define'" $ WC "i_stdlib='define'" $ WC "i_string='define'" diff --git a/cop.h b/cop.h index 8cd8a8ae25b..83c86980ba3 100644 --- a/cop.h +++ b/cop.h @@ -554,30 +554,6 @@ be zero. /* OutCopFILE() is CopFILE for output (caller, die, warn, etc.) */ #define OutCopFILE(c) CopFILE(c) -/* If $[ is non-zero, it's stored in cop_hints under the key "$[", and - HINT_ARYBASE is set to indicate this. - Setting it is inefficient due to the need to create 2 mortal SVs, but as - using $[ is highly discouraged, no sane Perl code will be using it. */ -#define CopARYBASE_get(c) \ - ((CopHINTS_get(c) & HINT_ARYBASE) \ - ? SvIV(cop_hints_fetch_pvs((c), "$[", 0)) \ - : 0) -#define CopARYBASE_set(c, b) STMT_START { \ - if (b || ((c)->cop_hints & HINT_ARYBASE)) { \ - (c)->cop_hints |= HINT_ARYBASE; \ - if ((c) == &PL_compiling) { \ - SV *val = newSViv(b); \ - (void)hv_stores(GvHV(PL_hintgv), "$[", val); \ - mg_set(val); \ - PL_hints |= HINT_ARYBASE; \ - } else { \ - CopHINTHASH_set((c), \ - cophh_store_pvs(CopHINTHASH_get((c)), "$[", \ - sv_2mortal(newSViv(b)), 0)); \ - } \ - } \ - } STMT_END - /* FIXME NATIVE_HINTS if this is changed from op_private (see perl.h) */ #define CopHINTS_get(c) ((c)->cop_hints + 0) #define CopHINTS_set(c, h) STMT_START { \ diff --git a/cpan/Archive-Tar/bin/ptar b/cpan/Archive-Tar/bin/ptar index 7b7cda7d080..14c09128fc0 100644 --- a/cpan/Archive-Tar/bin/ptar +++ b/cpan/Archive-Tar/bin/ptar @@ -59,13 +59,13 @@ if( $opts->{c} ) { my $print = $verbose || $opts->{'t'} || 0; my $iter = Archive::Tar->iter( $file ); - + while( my $f = $iter->() ) { print $f->full_path . $/ if $print; ### data dumper output print Dumper( $f ) if $opts->{'D'}; - + ### extract it $f->extract if $opts->{'x'}; } @@ -112,10 +112,10 @@ sub usage { ### strip the pod directives $usage =~ s/=pod\n//g; $usage =~ s/=head1 //g; - + ### add some newlines $usage .= $/.$/; - + return $usage; } diff --git a/cpan/Archive-Tar/bin/ptardiff b/cpan/Archive-Tar/bin/ptardiff index 21e7d6cce59..5205d63c3fb 100644 --- a/cpan/Archive-Tar/bin/ptardiff +++ b/cpan/Archive-Tar/bin/ptardiff @@ -21,12 +21,12 @@ my $tar = Archive::Tar->new( $arch ) or die "Couldn't read '$arch': $!"; foreach my $file ( $tar->get_files ) { next unless $file->is_file; my $name = $file->name; - - diff( \($file->get_content), $name, + + diff( \($file->get_content), $name, { FILENAME_A => $name, MTIME_A => $file->mtime, OUTPUT => \*STDOUT - } + } ); } @@ -38,27 +38,27 @@ sub usage { Usage: ptardiff ARCHIVE_FILE ptardiff -h - + ptardiff is a small program that diffs an extracted archive against an unextracted one, using the perl module Archive::Tar. - - This effectively lets you view changes made to an archives contents. - + + This effectively lets you view changes made to an archives contents. + Provide the progam with an ARCHIVE_FILE and it will look up all the files with in the archive, scan the current working directory for a file with the name and diff it against the contents of the archive. - + Options: h Prints this help message Sample Usage: - $ tar -xzf Acme-Buffy-1.3.tar.gz + $ tar -xzf Acme-Buffy-1.3.tar.gz $ vi Acme-Buffy-1.3/README - + [...] $ ptardiff Acme-Buffy-1.3.tar.gz > README.patch @@ -70,7 +70,7 @@ See Also: Archive::Tar ] . $/; -} +} @@ -82,9 +82,9 @@ ptardiff - program that diffs an extracted archive against an unextracted one ptardiff is a small program that diffs an extracted archive against an unextracted one, using the perl module Archive::Tar. - - This effectively lets you view changes made to an archives contents. - + + This effectively lets you view changes made to an archives contents. + Provide the progam with an ARCHIVE_FILE and it will look up all the files with in the archive, scan the current working directory for a file with the name and diff it against the contents of the @@ -95,7 +95,7 @@ ptardiff - program that diffs an extracted archive against an unextracted one ptardiff ARCHIVE_FILE ptardiff -h - $ tar -xzf Acme-Buffy-1.3.tar.gz + $ tar -xzf Acme-Buffy-1.3.tar.gz $ vi Acme-Buffy-1.3/README [...] $ ptardiff Acme-Buffy-1.3.tar.gz > README.patch diff --git a/cpan/Archive-Tar/bin/ptargrep b/cpan/Archive-Tar/bin/ptargrep index f0582d84132..0367d849d7e 100644 --- a/cpan/Archive-Tar/bin/ptargrep +++ b/cpan/Archive-Tar/bin/ptargrep @@ -180,7 +180,7 @@ Display this documentation. Copyright 2010 Grant McLean Egrantm@cpan.orgE This program is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. +under the same terms as Perl itself. =cut diff --git a/cpan/Archive-Tar/lib/Archive/Tar.pm b/cpan/Archive-Tar/lib/Archive/Tar.pm index 0a35cf77cc7..e279b44dba8 100644 --- a/cpan/Archive-Tar/lib/Archive/Tar.pm +++ b/cpan/Archive-Tar/lib/Archive/Tar.pm @@ -31,7 +31,7 @@ use vars qw[$DEBUG $error $VERSION $WARN $FOLLOW_SYMLINK $CHOWN $CHMOD $DEBUG = 0; $WARN = 1; $FOLLOW_SYMLINK = 0; -$VERSION = "1.76"; +$VERSION = "1.78"; $CHOWN = 1; $CHMOD = 1; $SAME_PERMISSIONS = $> == 0 ? 1 : 0; @@ -68,6 +68,8 @@ Archive::Tar - module for manipulations of tar archives $tar->add_data('file/baz.txt', 'This is the contents now'); $tar->rename('oldname', 'new/file/name'); + $tar->chown('/', 'root'); + $tar->chown('/', 'root:root'); $tar->write('files.tar'); # plain tar $tar->write('files.tgz', COMPRESS_GZIP); # gzip compressed @@ -332,7 +334,7 @@ sub _read_tar { $self->_error( qq[Cannot read compressed format in tar-mode] ); return; } - + ### size is < HEAD, which means a corrupted file, as the minimum ### length is _at least_ HEAD if (length $chunk != HEAD) { @@ -415,7 +417,7 @@ sub _read_tar { if ($skip) { # # Since we're skipping, do not allocate memory for the - # whole file. Read it 64 BLOCKS at a time. Do not + # whole file. Read it 64 BLOCKS at a time. Do not # complete the skip yet because maybe what we read is a # longlink and it won't get skipped after all # @@ -1082,6 +1084,26 @@ sub rename { return $entry->rename( $new ); } +=head2 $tar->chown( $file, $uname [, $gname] ) + +Change owner $file to $uname and $gname. + +Returns true on success and false on failure. + +=cut + +sub chown { + my $self = shift; + my $file = shift; return unless defined $file; + my $uname = shift; return unless defined $uname; + my @args = ($uname); + push(@args, shift); + + my $entry = $self->_find_entry( $file ) or return; + my $x = $entry->chown( @args ); + return $x; +} + =head2 $tar->remove (@filenamelist) Removes any entries with names matching any of the given filenames @@ -1645,7 +1667,7 @@ Example usage: sub iter { my $class = shift; my $filename = shift or return; - my $compressed = shift or 0; + my $compressed = shift || 0; my $opts = shift || {}; ### get a handle to read from. @@ -1930,7 +1952,7 @@ doing. =head2 $Archive::Tar::ZERO_PAD_NUMBERS This variable holds a boolean indicating if we will create -zero padded numbers for C, C and C. +zero padded numbers for C, C and C. The default is C<0>, indicating that we will create space padded numbers. Added for compatibility with C implementations. @@ -2114,7 +2136,7 @@ encoded in a different way. =head1 CAVEATS -The AIX tar does not fill all unused space in the tar archive with 0x00. +The AIX tar does not fill all unused space in the tar archive with 0x00. This sometimes leads to warning messages from C. Invalid header block at offset nnn @@ -2126,14 +2148,14 @@ of AIX, all of which should be coming out in the 4th quarter of 2009: AIX 5.3 TL8 SP8 AIX 5.3 TL9 SP5 AIX 5.3 TL10 SP2 - + AIX 6.1 TL0 SP11 AIX 6.1 TL1 SP7 AIX 6.1 TL2 SP6 AIX 6.1 TL3 SP3 -The IBM APAR number for this problem is IZ50240 (Reported component ID: -5765G0300 / AIX 5.3). It is possible to get an ifix for that problem. +The IBM APAR number for this problem is IZ50240 (Reported component ID: +5765G0300 / AIX 5.3). It is possible to get an ifix for that problem. If you need an ifix please contact your local IBM AIX support. =head1 TODO diff --git a/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm b/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm index abeb824a050..7a25f334121 100644 --- a/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm +++ b/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm @@ -2,8 +2,8 @@ package Archive::Tar::Constant; BEGIN { require Exporter; - - $VERSION = '1.76'; + + $VERSION = '1.78'; @ISA = qw[Exporter]; require Time::Local if $^O eq "MacOS"; @@ -56,7 +56,7 @@ use constant PACK => 'a100 a8 a8 a8 a12 a12 A8 a1 a100 a6 a2 a32 a32 a use constant NAME_LENGTH => 100; use constant PREFIX_LENGTH => 155; -use constant TIME_OFFSET => ($^O eq "MacOS") ? Time::Local::timelocal(0,0,0,1,0,70) : 0; +use constant TIME_OFFSET => ($^O eq "MacOS") ? Time::Local::timelocal(0,0,0,1,0,70) : 0; use constant MAGIC => "ustar"; use constant TAR_VERSION => "00"; use constant LONGLINK_NAME => '././@LongLink'; @@ -65,14 +65,14 @@ use constant PAX_HEADER => 'pax_global_header'; ### allow ZLIB to be turned off using ENV: DEBUG only use constant ZLIB => do { !$ENV{'PERL5_AT_NO_ZLIB'} and eval { require IO::Zlib }; - $ENV{'PERL5_AT_NO_ZLIB'} || $@ ? 0 : 1 + $ENV{'PERL5_AT_NO_ZLIB'} || $@ ? 0 : 1 }; - ### allow BZIP to be turned off using ENV: DEBUG only + ### allow BZIP to be turned off using ENV: DEBUG only use constant BZIP => do { !$ENV{'PERL5_AT_NO_BZIP'} and eval { require IO::Uncompress::Bunzip2; require IO::Compress::Bzip2; }; - $ENV{'PERL5_AT_NO_BZIP'} || $@ ? 0 : 1 + $ENV{'PERL5_AT_NO_BZIP'} || $@ ? 0 : 1 }; use constant GZIP_MAGIC_NUM => qr/^(?:\037\213|\037\235)/; @@ -81,6 +81,6 @@ use constant BZIP_MAGIC_NUM => qr/^BZh\d/; use constant CAN_CHOWN => sub { ($> == 0 and $^O ne "MacOS" and $^O ne "MSWin32") }; use constant CAN_READLINK => ($^O ne 'MSWin32' and $^O !~ /RISC(?:[ _])?OS/i and $^O ne 'VMS'); use constant ON_UNIX => ($^O ne 'MSWin32' and $^O ne 'MacOS' and $^O ne 'VMS'); -use constant ON_VMS => $^O eq 'VMS'; +use constant ON_VMS => $^O eq 'VMS'; 1; diff --git a/cpan/Archive-Tar/lib/Archive/Tar/File.pm b/cpan/Archive-Tar/lib/Archive/Tar/File.pm index 8604ab83247..b7000904fa5 100644 --- a/cpan/Archive-Tar/lib/Archive/Tar/File.pm +++ b/cpan/Archive-Tar/lib/Archive/Tar/File.pm @@ -13,7 +13,7 @@ use Archive::Tar::Constant; use vars qw[@ISA $VERSION]; #@ISA = qw[Archive::Tar]; -$VERSION = '1.76'; +$VERSION = '1.78'; ### set value to 1 to oct() it during the unpack ### my $tmpl = [ @@ -236,23 +236,23 @@ sub _new_from_chunk { sub _new_from_file { my $class = shift; - my $path = shift; - + my $path = shift; + ### path has to at least exist return unless defined $path; - + my $type = __PACKAGE__->_filetype($path); my $data = ''; - READ: { + READ: { unless ($type == DIR ) { my $fh = IO::File->new; - + unless( $fh->open($path) ) { ### dangling symlinks are fine, stop reading but continue ### creating the object last READ if $type == SYMLINK; - + ### otherwise, return from this function -- ### anything that's *not* a symlink should be ### resolvable @@ -405,7 +405,7 @@ sub _prefix_and_file { sub _filetype { my $self = shift; my $file = shift; - + return unless defined $file; return SYMLINK if (-l $file); # Symlink @@ -442,7 +442,7 @@ sub _downgrade_to_plainfile { =head2 $bool = $file->extract( [ $alternative_name ] ) -Extract this object, optionally to an alternative name. +Extract this object, optionally to an alternative name. See C<< Archive::Tar->extract_file >> for details. @@ -452,9 +452,9 @@ Returns true on success and false on failure. sub extract { my $self = shift; - + local $Carp::CarpLevel += 1; - + return Archive::Tar->_extract_file( $self, @_ ); } @@ -576,7 +576,7 @@ Returns true on success and false on failure. sub rename { my $self = shift; my $path = shift; - + return unless defined $path; my ($prefix,$file) = $self->_prefix_and_file( $path ); @@ -587,6 +587,32 @@ sub rename { return 1; } +=head2 $bool = $file->chown( $user [, $group]) + +Change owner of $file to $user. If a $group is given that is changed +as well. You can also pass a single parameter with a colon separating the +use and group as in 'root:wheel'. + +Returns true on success and false on failure. + +=cut + +sub chown { + my $self = shift; + my $uname = shift; + return unless defined $uname; + my $gname; + if (-1 != index($uname, ':')) { + ($uname, $gname) = split(/:/, $uname); + } else { + $gname = shift if @_ > 0; + } + + $self->uname( $uname ); + $self->gname( $gname ) if $gname; + return 1; +} + =head1 Convenience methods To quickly check the type of a C object, you can diff --git a/cpan/Archive-Tar/t/03_file.t b/cpan/Archive-Tar/t/03_file.t index 33c1cf2b634..e7248f7a4b1 100644 --- a/cpan/Archive-Tar/t/03_file.t +++ b/cpan/Archive-Tar/t/03_file.t @@ -1,5 +1,4 @@ ### This program tests Archive::Tar::File ### - use Test::More 'no_plan'; use strict; @@ -24,7 +23,7 @@ my @test_files = ( ### we didnt handle 'false' filenames very well across A::T as of version ### 1.32, as reported in #28687. Test for the handling of such files here. [ 0, '', ], - + ### keep this one as the last entry [ 'x/yy/z', '', { type => DIR, mode => 0777, @@ -72,20 +71,20 @@ for my $f ( @test_files ) { ok( ! $obj->devminor, " devminor ok" ); ok( ! $obj->raw, " raw ok" ); - ### test type checkers + ### test type checkers SKIP: { skip "Attributes defined, may not be plainfile", 11 if keys %$attr; - + ok( $obj->is_file, " Object is a file" ); - - for my $name (qw[dir hardlink symlink chardev blockdev fifo + + for my $name (qw[dir hardlink symlink chardev blockdev fifo socket unknown longlink label ] ) { my $method = 'is_' . $name; - + ok(!$obj->$method(), " Object is not a '$name'"); } - } + } ### Use "ok" not "is" to avoid binary data screwing up the screen ### ok( $obj->get_content eq $contents, " get_content ok" ); @@ -100,6 +99,11 @@ for my $f ( @test_files ) { ok( $obj->get_content eq $contents, " get_content ok" ); ok( $obj->rename( $rename_path ), " rename ok" ); + ok( $obj->chown( 'root' ), " chown 1 arg ok" ); + is( $obj->uname, 'root', " chown to root ok" ); + ok( $obj->chown( 'rocky', 'perl'), " chown 2 args ok" ); + is( $obj->uname, 'rocky', " chown to rocky ok" ); + is( $obj->gname, 'perl', " chown to rocky:perl ok" ); is( $obj->name, $rename_file, " name '$file' ok" ); is( $obj->prefix, $rename_dir, " prefix '$dir' ok" ); ok( $obj->rename( $unix_path ), " rename ok" ); @@ -116,23 +120,23 @@ for my $f ( @test_files ) { { my $aref = $test_files[-1]; my $unix_path = $aref->[0]; my $contents = $aref->[1]; - my $attr = $aref->[2]; - + my $attr = $aref->[2]; + my $obj = Archive::Tar::File->new( data => $unix_path, $contents, $attr ); - + ### check if the object is as expected isa_ok( $obj, 'Archive::Tar::File' ); ok( $obj->is_dir, " Is a directory" ); - - ### do the downgrade + + ### do the downgrade ok( $obj->_downgrade_to_plainfile, " Downgraded to plain file" ); - + ### now check if it's downgraded ok( $obj->is_file, " Is now a file" ); is( $obj->linkname, '', " No link entered" ); is( $obj->mode, MODE, " Mode as expected" ); -} - +} + ### helper subs ### sub dir_and_file { my $unix_path = shift; diff --git a/cpan/Archive-Tar/t/04_resolved_issues.t b/cpan/Archive-Tar/t/04_resolved_issues.t index 8e3cdbad235..7c4dd7c287b 100644 --- a/cpan/Archive-Tar/t/04_resolved_issues.t +++ b/cpan/Archive-Tar/t/04_resolved_issues.t @@ -22,42 +22,42 @@ use_ok( $FileClass ); ### encoding style local $Archive::Tar::DO_NOT_USE_PREFIX = 1; local $Archive::Tar::DO_NOT_USE_PREFIX = 1; - - my $dir = 'Catalyst-Helper-Controller-Scaffold-HTML-Template-0_03/' . + + my $dir = 'Catalyst-Helper-Controller-Scaffold-HTML-Template-0_03/' . 'lib/Catalyst/Helper/Controller/Scaffold/HTML/'; my $file = 'Template.pm'; my $out = $$ . '.tar'; - + ### first create the file { my $tar = $Class->new; - + isa_ok( $tar, $Class, " Object" ); ok( $tar->add_data( $dir.$file => $$ ), " Added long file" ); - + ok( $tar->write($out), " File written to $out" ); } - + ### then read it back in { my $tar = $Class->new; isa_ok( $tar, $Class, " Object" ); ok( $tar->read( $out ), " Read in $out again" ); - + my @files = $tar->get_files; is( scalar(@files), 1, " Only 1 entry found" ); - + my $entry = shift @files; ok( $entry->is_file, " Entry is a file" ); is( $entry->name, $dir.$file, " With the proper name" ); - } - + } + ### remove the file unless( $NO_UNLINK ) { 1 while unlink $out } -} +} ### bug #14922 -### There's a bug in Archive::Tar that causes a file like: foo/foo.txt +### There's a bug in Archive::Tar that causes a file like: foo/foo.txt ### to be stored in the tar file as: foo/.txt ### XXX could not be reproduced in 1.26 -- leave test to be sure { ok( 1, "Testing bug 14922" ); @@ -65,14 +65,14 @@ use_ok( $FileClass ); my $dir = $$ . '/'; my $file = $$ . '.txt'; my $out = $$ . '.tar'; - + ### first create the file { my $tar = $Class->new; - + isa_ok( $tar, $Class, " Object" ); ok( $tar->add_data( $dir.$file => $$ ), " Added long file" ); - + ok( $tar->write($out), " File written to $out" ); } @@ -80,39 +80,45 @@ use_ok( $FileClass ); { my $tar = $Class->new; isa_ok( $tar, $Class, " Object" ); ok( $tar->read( $out ), " Read in $out again" ); - + my @files = $tar->get_files; is( scalar(@files), 1, " Only 1 entry found" ); - + my $entry = shift @files; ok( $entry->is_file, " Entry is a file" ); is( $entry->full_path, $dir.$file, " With the proper name" ); - } - + } + ### remove the file unless( $NO_UNLINK ) { 1 while unlink $out } -} - -### bug #30380: directory traversal vulnerability in Archive-Tar +} + +### bug #30380: directory traversal vulnerability in Archive-Tar ### Archive::Tar allowed files to be extracted to a dir outside ### it's cwd(), effectively allowing you to overwrite any files ### on the system, given the right permissions. { ok( 1, "Testing bug 30880" ); my $tar = $Class->new; - isa_ok( $tar, $Class, " Object" ); - + isa_ok( $tar, $Class, " Object" ); + ### absolute paths are already taken care of. Only relative paths ### matter my $in_file = basename($0); my $out_file = '../' . $in_file . "_$$"; - - ok( $tar->add_files( $in_file ), + + ok( $tar->add_files( $in_file ), " Added '$in_file'" ); + ok( $tar->chown( $in_file, 'root' ), + " chown to root" ); + + ok( $tar->chown( $in_file, 'root', 'root' ), + " chown to root:root" ); + ok( $tar->rename( $in_file, $out_file ), " Renamed to '$out_file'" ); - + ### first, test with strict extract permissions on { local $Archive::Tar::INSECURE_EXTRACT_MODE = 0; @@ -125,40 +131,40 @@ use_ok( $FileClass ); ok( ! $tar->extract_file( $out_file ), " File not extracted" ); ok( ! -e $out_file, " File '$out_file' does not exist" ); - + ok( $tar->error, " Error message stored" ); like( $tar->error, qr/attempting to leave/, " Proper violation detected" ); } - + ### now disable those { local $Archive::Tar::INSECURE_EXTRACT_MODE = 1; ok( 1, " Extracting in insecure mode" ); - + ok( $tar->extract_file( $out_file ), " File extracted" ); ok( -e $out_file, " File '$out_file' exists" ); - + ### and clean up unless( $NO_UNLINK ) { 1 while unlink $out_file }; - } + } } ### bug #43513: [PATCH] Accept wrong checksums from SunOS and HP-UX tar ### like GNU tar does. See here for details: ### http://www.gnu.org/software/tar/manual/tar.html#SEC139 { ok( 1, "Testing bug 43513" ); - + my $src = File::Spec->catfile( qw[src header signed.tar] ); my $tar = $Class->new; - + isa_ok( $tar, $Class, " Object" ); ok( $tar->read( $src ), " Read non-Posix file with signed Checksum" ); - + for my $file ( $tar->get_files ) { ok( $file, " File object retrieved" ); ok( $file->validate, " File validates" ); - } + } } ### return error properly on corrupted archives @@ -166,16 +172,16 @@ use_ok( $FileClass ); { ok( 1, "Testing bug 44680" ); { ### XXX whitebox test -- resetting the error string - no warnings 'once'; + no warnings 'once'; $Archive::Tar::error = ""; } my $src = File::Spec->catfile( qw[src short b] ); my $tar = $Class->new; - + isa_ok( $tar, $Class, " Object" ); - - + + ### we quell the error on STDERR local $Archive::Tar::WARN = 0; diff --git a/cpan/Archive-Tar/t/05_iter.t b/cpan/Archive-Tar/t/05_iter.t index 8d3486c5fd5..3f80e945883 100644 --- a/cpan/Archive-Tar/t/05_iter.t +++ b/cpan/Archive-Tar/t/05_iter.t @@ -18,15 +18,15 @@ my @Expect = ( use_ok( $Class ); ### crazy ref to special case 'all' -for my $index ( \0, 0 .. $#Expect ) { +for my $index ( \0, 0 .. $#Expect ) { my %opts = (); my @expect = (); - + my $dotest = sub { my $desc = shift; my $next = $Class->iter( $File, 0, \%opts ); - + my $pp_opts = join " => ", %opts; ok( $next, "Iterator created from $File ($pp_opts $desc)" ); isa_ok( $next, "CODE", " Iterator $desc" ); @@ -38,16 +38,16 @@ for my $index ( \0, 0 .. $#Expect ) { push @names, $f->name; } - + is( scalar(@names), scalar(@expect), " Found correct number of files $desc" ); - + my $i = 0; for my $name ( @names ) { ok( 1, " Inspecting '$name' $desc" ); like($name, $expect[$i]," Matches $Expect[$i] $desc" ); $i++; - } + } }; ### do a full test vs individual filters @@ -61,5 +61,5 @@ for my $index ( \0, 0 .. $#Expect ) { } else { @expect = @Expect; $dotest->("all"); - } + } } diff --git a/cpan/Archive-Tar/t/90_symlink.t b/cpan/Archive-Tar/t/90_symlink.t index 9c461155b60..3d7b4068606 100644 --- a/cpan/Archive-Tar/t/90_symlink.t +++ b/cpan/Archive-Tar/t/90_symlink.t @@ -12,7 +12,7 @@ plan skip_all => "Skipping tests on this platform" unless @ARGV; plan 'no_plan'; my $Class = 'Archive::Tar'; -my $Dir = File::Spec->catdir( qw[src linktest] ); +my $Dir = File::Spec->catdir( qw[src linktest] ); my %Map = ( File::Spec->catfile( $Dir, "linktest_with_dir.tar" ) => [ [ 0, qr/SECURE EXTRACT MODE/ ], @@ -38,7 +38,7 @@ use_ok( $Class ); ### damn warnings local $Archive::Tar::INSECURE_EXTRACT_MODE = $mode; local $Archive::Tar::INSECURE_EXTRACT_MODE = $mode; - + ok( 1, " Extracting with insecure mode: $mode" ); my $warning; @@ -48,8 +48,8 @@ use_ok( $Class ); ok( !$@, " No fatal error" ); is( !!$rv, !!$expect, " RV as expected" ); like( $warning, $regex, " Error matches $regex" ); - + rmtree( 'linktest' ); } - } -} + } +} diff --git a/cpan/Archive-Tar/t/99_pod.t b/cpan/Archive-Tar/t/99_pod.t index 45be965f040..39c8a209aa7 100644 --- a/cpan/Archive-Tar/t/99_pod.t +++ b/cpan/Archive-Tar/t/99_pod.t @@ -8,8 +8,8 @@ BEGIN { chdir 't' if -d 't' }; eval 'use Test::Pod'; plan skip_all => "Test::Pod v0.95 required for testing POD" if $@ || $Test::Pod::VERSION < 0.95; - -plan skip_all => "Pod tests disabled under perl core" if $ENV{PERL_CORE}; + +plan skip_all => "Pod tests disabled under perl core" if $ENV{PERL_CORE}; my @files; find( sub { push @files, File::Spec->catfile( diff --git a/cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm b/cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm index 2e94a180840..1b1ae995780 100644 --- a/cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm +++ b/cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm @@ -1,6 +1,6 @@ package CPAN::Meta::YAML; -BEGIN { - $CPAN::Meta::YAML::VERSION = '0.003'; +{ + $CPAN::Meta::YAML::VERSION = '0.004'; } use strict; @@ -459,7 +459,7 @@ sub _write_scalar { $string =~ s/([\x00-\x1f])/\\$UNPRINTABLE[ord($1)]/g; return qq|"$string"|; } - if ( $string =~ /(?:^\W|\s)/ or $QUOTE{$string} ) { + if ( $string =~ /(?:^\W|\s|:\z)/ or $QUOTE{$string} ) { return "'$string'"; } return $string; @@ -610,12 +610,13 @@ sub LoadFile { # Use Scalar::Util if possible, otherwise emulate it BEGIN { + local $@; eval { require Scalar::Util; - *refaddr = *Scalar::Util::refaddr; }; - eval <<'END_PERL' if $@; -# Failed to load Scalar::Util + if ( $@ or $Scalar::Util::VERSION < 1.18 ) { + eval <<'END_PERL' if $@; +# Scalar::Util failed to load or too old sub refaddr { my $pkg = ref($_[0]) or return undef; if ( !! UNIVERSAL::can($_[0], 'can') ) { @@ -629,7 +630,9 @@ sub refaddr { $i; } END_PERL - + } else { + *refaddr = *Scalar::Util::refaddr; + } } 1; @@ -644,7 +647,7 @@ CPAN::Meta::YAML - Read and write a subset of YAML for CPAN Meta files =head1 VERSION -version 0.003 +version 0.004 =head1 SYNOPSIS @@ -682,6 +685,25 @@ L L, L, L +=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders + +=head1 SUPPORT + +=head2 Bugs / Feature Requests + +Please report any bugs or feature requests by email to C, or through +the web interface at L. You will be automatically notified of any +progress on the request by the system. + +=head2 Source Code + +This is open source software. The code repository is available for +public review and contribution under the terms of the license. + +L + + git clone http://github.com/dagolden/cpan-meta-yaml + =head1 AUTHORS =over 4 diff --git a/cpan/CPAN-Meta-YAML/t/03_regression.t b/cpan/CPAN-Meta-YAML/t/03_regression.t index 27a7519ba57..8fae7e4ba2b 100644 --- a/cpan/CPAN-Meta-YAML/t/03_regression.t +++ b/cpan/CPAN-Meta-YAML/t/03_regression.t @@ -10,7 +10,7 @@ BEGIN { use File::Spec::Functions ':ALL'; use t::lib::Test; -use Test::More tests(37, 0, 12); +use Test::More tests(37, 0, 13); use CPAN::Meta::YAML qw{ Load Dump LoadFile DumpFile @@ -701,3 +701,16 @@ is_deeply( CPAN::Meta::YAML->new( [ qw{ - 'Off' - 'OFF' END_YAML + + + + + +###################################################################### +# Always quote for scalars ending with : + +is_deeply( + CPAN::Meta::YAML->new( [ 'A:' ] )->write_string, + "---\n- 'A:'\n", + 'Simple scalar ending in a colon is correctly quoted', +); diff --git a/cpan/CPAN-Meta/Changes b/cpan/CPAN-Meta/Changes index f91f71daae9..873d41a1e08 100644 --- a/cpan/CPAN-Meta/Changes +++ b/cpan/CPAN-Meta/Changes @@ -1,5 +1,32 @@ Revision history for CPAN-Meta +2.112621 2011-09-19 12:15:16 America/New_York + + [BUGFIX] + + - Spell BACKEND environment variables correctly this time + [noticed by Stevan Little] + +2.112620 2011-09-18 20:56:06 America/New_York + + [BUGFIX] + + - Protect tests against PERL_(YAML|JSON)_BACKEND settings that could + cause tests to fail. (RT #69979) + +2.112600 2011-09-17 12:21:09 America/New_York + + [DOCUMENTATION] + + - Fixed spelling error in CPAN::Meta::Spec (RT #71036) [Gregor Hermann] + +2.112580 2011-09-15 10:53:59 America/New_York + + [BUGFIX] + + - Use UTF-8 mode for internal structure cloning to avoid bugs + in Perl <= 5.8.6 (RT #70936) [Dagfinn Ilmari Mannsåker] + 2.112150 2011-08-02 22:25:41 America/New_York [BUGFIX] @@ -124,7 +151,7 @@ Revision history for CPAN-Meta 2.110240 2011-01-24 16:28:25 EST5EDT - Reading JSON/YAML is delegated entirely to Parse::CPAN::Meta (1.4200) - + - JSON.pm is dropped as a prerequisite and JSON::PP is added to prepare for CPAN::Meta to be added to the Perl core @@ -138,7 +165,7 @@ Revision history for CPAN-Meta 2.102160 2010-08-04 12:27:10 EST5EDT - Fix bugtracker conversion bug (RT#60017) - + 2.101670 2010-06-15 21:02:42 EST5EDT - converting 1.x 'repository' field now puts converted url into the @@ -170,7 +197,7 @@ Revision history for CPAN-Meta 2.101590 2010-06-07 21:49:36 EST5EDT - - won't automatically add 'unknown' as repository type when converting; + - won't automatically add 'unknown' as repository type when converting; instead, will only add a repository type if a repository 'url' is present and it is of the 'svn:' or 'git:' scheme. diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta.pm b/cpan/CPAN-Meta/lib/CPAN/Meta.pm index 36f26d80a75..cfb1b259a95 100644 --- a/cpan/CPAN-Meta/lib/CPAN/Meta.pm +++ b/cpan/CPAN-Meta/lib/CPAN/Meta.pm @@ -2,7 +2,7 @@ use 5.006; use strict; use warnings; package CPAN::Meta; -our $VERSION = '2.112150'; # VERSION +our $VERSION = '2.112621'; # VERSION use Carp qw(carp croak); @@ -346,7 +346,7 @@ CPAN::Meta - the distribution metadata for a CPAN dist =head1 VERSION -version 2.112150 +version 2.112621 =head1 SYNOPSIS diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm index 9fedacba31b..e468720fe68 100644 --- a/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm +++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm @@ -2,7 +2,7 @@ use 5.006; use strict; use warnings; package CPAN::Meta::Converter; -our $VERSION = '2.112150'; # VERSION +our $VERSION = '2.112621'; # VERSION use CPAN::Meta::Validator; @@ -20,8 +20,8 @@ sub _dclone { local *UNIVERSAL::TO_JSON = sub { return "$_[0]" }; my $backend = Parse::CPAN::Meta->json_backend(); - return $backend->new->decode( - $backend->new->allow_blessed->convert_blessed->encode($ref) + return $backend->new->utf8->decode( + $backend->new->utf8->allow_blessed->convert_blessed->encode($ref) ); } @@ -1260,7 +1260,7 @@ CPAN::Meta::Converter - Convert CPAN distribution metadata structures =head1 VERSION -version 2.112150 +version 2.112621 =head1 SYNOPSIS diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm index fdec692cfe9..4002b748e21 100644 --- a/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm +++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm @@ -2,7 +2,7 @@ use 5.006; use strict; use warnings; package CPAN::Meta::Feature; -our $VERSION = '2.112150'; # VERSION +our $VERSION = '2.112621'; # VERSION use CPAN::Meta::Prereqs; @@ -42,7 +42,7 @@ CPAN::Meta::Feature - an optional feature provided by a CPAN distribution =head1 VERSION -version 2.112150 +version 2.112621 =head1 DESCRIPTION diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm index 49a614b82d5..1f2e9aeb19f 100644 --- a/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm +++ b/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm @@ -3,7 +3,7 @@ use 5.006; use strict; use warnings; package CPAN::Meta::History; -our $VERSION = '2.112150'; # VERSION +our $VERSION = '2.112621'; # VERSION 1; @@ -20,7 +20,7 @@ CPAN::Meta::History - history of CPAN Meta Spec changes =head1 VERSION -version 2.112150 +version 2.112621 =head1 DESCRIPTION diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm index 5d1d1f0600d..04c5cf7c9c7 100644 --- a/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm +++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm @@ -2,7 +2,7 @@ use 5.006; use strict; use warnings; package CPAN::Meta::Prereqs; -our $VERSION = '2.112150'; # VERSION +our $VERSION = '2.112621'; # VERSION use Carp qw(confess); @@ -149,7 +149,7 @@ CPAN::Meta::Prereqs - a set of distribution prerequisites by phase and type =head1 VERSION -version 2.112150 +version 2.112621 =head1 DESCRIPTION diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm index c5f8213aee7..09bfc23c154 100644 --- a/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm +++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm @@ -3,7 +3,7 @@ use 5.006; use strict; use warnings; package CPAN::Meta::Spec; -our $VERSION = '2.112150'; # VERSION +our $VERSION = '2.112621'; # VERSION 1; @@ -20,7 +20,7 @@ CPAN::Meta::Spec - specification for CPAN distribution metadata =head1 VERSION -version 2.112150 +version 2.112621 =head1 SYNOPSIS @@ -572,7 +572,7 @@ B include C phase prereqs. =back Consumers B include optional features as prerequisites without -explict instruction from users (whether via interactive prompting, +explicit instruction from users (whether via interactive prompting, a function parameter or a configuration value, etc. ). If an optional feature is used by a consumer to add additional diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm index b9f9868b653..c3d69063334 100644 --- a/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm +++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm @@ -2,7 +2,7 @@ use 5.006; use strict; use warnings; package CPAN::Meta::Validator; -our $VERSION = '2.112150'; # VERSION +our $VERSION = '2.112621'; # VERSION #--------------------------------------------------------------------------# @@ -838,7 +838,7 @@ CPAN::Meta::Validator - validate CPAN distribution metadata structures =head1 VERSION -version 2.112150 +version 2.112621 =head1 SYNOPSIS diff --git a/cpan/CPAN-Meta/t/converter-bad.t b/cpan/CPAN-Meta/t/converter-bad.t index 1225e421845..fdfea25f9e6 100644 --- a/cpan/CPAN-Meta/t/converter-bad.t +++ b/cpan/CPAN-Meta/t/converter-bad.t @@ -9,6 +9,8 @@ use File::Spec; use IO::Dir; use Parse::CPAN::Meta 1.4400; +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + my $data_dir = IO::Dir->new( 't/data-bad' ); my @files = sort grep { /^\w/ } $data_dir->read; diff --git a/cpan/CPAN-Meta/t/converter-fail.t b/cpan/CPAN-Meta/t/converter-fail.t index 3a82f2d5afc..065b3d70802 100644 --- a/cpan/CPAN-Meta/t/converter-fail.t +++ b/cpan/CPAN-Meta/t/converter-fail.t @@ -9,6 +9,8 @@ use File::Spec; use IO::Dir; use Parse::CPAN::Meta 1.4400; +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + my $data_dir = IO::Dir->new( 't/data-fail' ); my @files = sort grep { /^\w/ } $data_dir->read; diff --git a/cpan/CPAN-Meta/t/converter.t b/cpan/CPAN-Meta/t/converter.t index 4bab8173032..ede8d03111b 100644 --- a/cpan/CPAN-Meta/t/converter.t +++ b/cpan/CPAN-Meta/t/converter.t @@ -1,6 +1,7 @@ use strict; use warnings; use Test::More 0.88; +use utf8; use CPAN::Meta; use CPAN::Meta::Validator; @@ -10,6 +11,8 @@ use IO::Dir; use Parse::CPAN::Meta 1.4400; use version; +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + # mock file object package File::StringObject; @@ -174,4 +177,14 @@ for my $f ( reverse sort @files ) { ok( my $converted = $cmc->convert( version => 2 ), "conversion successful" ); } +# specific test for UTF-8 handling +{ + my $path = File::Spec->catfile('t','data','unicode.yml'); + my $original = CPAN::Meta->load_file( $path ) + or die "Couldn't load $path"; + ok( $original, "unicode.yml" ); + my @authors = $original->authors; + like( $authors[0], qr/Williåms/, "Unicode characters preserved in authors" ); +} + done_testing; diff --git a/cpan/CPAN-Meta/t/data/unicode.yml b/cpan/CPAN-Meta/t/data/unicode.yml new file mode 100644 index 00000000000..8aa5bca7429 --- /dev/null +++ b/cpan/CPAN-Meta/t/data/unicode.yml @@ -0,0 +1,132 @@ +--- +abstract: 'Build and install Perl modules' +author: + - 'Ken Williåms ' + - "Development questions, bug reports, and patches should be sent to the\nModule-Build mailing list at ." +build_requires: + File::Temp: 0.15 + Test::Harness: 3.16 + Test::More: 0.49 +generated_by: 'Module::Build version 0.3608' +license: perl +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: Module-Build +provides: + Module::Build: + file: lib/Module/Build.pm + version: 0.36_08 + Module::Build::Base: + file: lib/Module/Build/Base.pm + version: 0.36_08 + Module::Build::Compat: + file: lib/Module/Build/Compat.pm + version: 0.36_08 + Module::Build::Config: + file: lib/Module/Build/Config.pm + version: 0.36_08 + Module::Build::Cookbook: + file: lib/Module/Build/Cookbook.pm + version: 0.36_08 + Module::Build::Dumper: + file: lib/Module/Build/Dumper.pm + version: 0.36_08 + Module::Build::ModuleInfo: + file: lib/Module/Build/ModuleInfo.pm + version: 0.36_08 + Module::Build::Notes: + file: lib/Module/Build/Notes.pm + version: 0.36_08 + Module::Build::PPMMaker: + file: lib/Module/Build/PPMMaker.pm + version: 0.36_08 + Module::Build::Platform::Amiga: + file: lib/Module/Build/Platform/Amiga.pm + version: 0.36_08 + Module::Build::Platform::Default: + file: lib/Module/Build/Platform/Default.pm + version: 0.36_08 + Module::Build::Platform::EBCDIC: + file: lib/Module/Build/Platform/EBCDIC.pm + version: 0.36_08 + Module::Build::Platform::MPEiX: + file: lib/Module/Build/Platform/MPEiX.pm + version: 0.36_08 + Module::Build::Platform::MacOS: + file: lib/Module/Build/Platform/MacOS.pm + version: 0.36_08 + Module::Build::Platform::RiscOS: + file: lib/Module/Build/Platform/RiscOS.pm + version: 0.36_08 + Module::Build::Platform::Unix: + file: lib/Module/Build/Platform/Unix.pm + version: 0.36_08 + Module::Build::Platform::VMS: + file: lib/Module/Build/Platform/VMS.pm + version: 0.36_08 + Module::Build::Platform::VOS: + file: lib/Module/Build/Platform/VOS.pm + version: 0.36_08 + Module::Build::Platform::Windows: + file: lib/Module/Build/Platform/Windows.pm + version: 0.36_08 + Module::Build::Platform::aix: + file: lib/Module/Build/Platform/aix.pm + version: 0.36_08 + Module::Build::Platform::cygwin: + file: lib/Module/Build/Platform/cygwin.pm + version: 0.36_08 + Module::Build::Platform::darwin: + file: lib/Module/Build/Platform/darwin.pm + version: 0.36_08 + Module::Build::Platform::os2: + file: lib/Module/Build/Platform/os2.pm + version: 0.36_08 + Module::Build::PodParser: + file: lib/Module/Build/PodParser.pm + version: 0.36_08 + Module::Build::Version: + file: lib/Module/Build/Version.pm + version: 0.77 + Module::Build::YAML: + file: lib/Module/Build/YAML.pm + version: 1.40 + inc::latest: + file: lib/inc/latest.pm + version: 0.36_08 + inc::latest::private: + file: lib/inc/latest/private.pm + version: 0.36_08 +recommends: + ExtUtils::Install: 0.3 + ExtUtils::Manifest: 1.54 + version: 0.74 +requires: + Cwd: 0 + Data::Dumper: 0 + ExtUtils::CBuilder: 0.27 + ExtUtils::Install: 0 + ExtUtils::Manifest: 0 + ExtUtils::Mkbootstrap: 0 + ExtUtils::ParseXS: 2.21 + File::Basename: 0 + File::Compare: 0 + File::Copy: 0 + File::Find: 0 + File::Path: 0 + File::Spec: 0.82 + Getopt::Long: 0 + IO::File: 0 + Test::Harness: 0 + Text::Abbrev: 0 + Text::ParseWords: 0 + perl: 5.006001 +resources: + MailingList: mailto:module-build@perl.org + license: http://dev.perl.org/licenses/ + repository: http://github.com/dagolden/module-build/ +version: 0.36_08 +x-whatever: this is a custom field +x_whatelse: so is this +XWhatNow: and this diff --git a/cpan/CPAN-Meta/t/load-bad.t b/cpan/CPAN-Meta/t/load-bad.t index d18b65caa67..22a651079ee 100644 --- a/cpan/CPAN-Meta/t/load-bad.t +++ b/cpan/CPAN-Meta/t/load-bad.t @@ -8,6 +8,8 @@ use IO::Dir; sub _slurp { do { local(@ARGV,$/)=shift(@_); <> } } +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + my $data_dir = IO::Dir->new( 't/data-bad' ); my @files = sort grep { /^\w/ } $data_dir->read; diff --git a/cpan/CPAN-Meta/t/meta-obj.t b/cpan/CPAN-Meta/t/meta-obj.t index 522f67dbde7..bb39c460660 100644 --- a/cpan/CPAN-Meta/t/meta-obj.t +++ b/cpan/CPAN-Meta/t/meta-obj.t @@ -6,6 +6,8 @@ use CPAN::Meta; use Scalar::Util qw(blessed); +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + my $distmeta = { name => 'Module-Build', abstract => 'Build and install Perl modules', diff --git a/cpan/CPAN-Meta/t/no-index.t b/cpan/CPAN-Meta/t/no-index.t index 4f8df45eb5b..b1516801643 100644 --- a/cpan/CPAN-Meta/t/no-index.t +++ b/cpan/CPAN-Meta/t/no-index.t @@ -4,6 +4,8 @@ use Test::More 0.88; use CPAN::Meta; +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + my %distmeta = ( name => 'Module-Billed', abstract => 'inscrutable', diff --git a/cpan/CPAN-Meta/t/prereqs-finalize.t b/cpan/CPAN-Meta/t/prereqs-finalize.t index 040e3f3b243..e974f99a1a5 100644 --- a/cpan/CPAN-Meta/t/prereqs-finalize.t +++ b/cpan/CPAN-Meta/t/prereqs-finalize.t @@ -4,6 +4,8 @@ use Test::More 0.88; use CPAN::Meta::Prereqs; +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + sub dies_ok (&@) { my ($code, $qr, $comment) = @_; diff --git a/cpan/CPAN-Meta/t/prereqs-merge.t b/cpan/CPAN-Meta/t/prereqs-merge.t index 63e267e84e1..37bca7dfa96 100644 --- a/cpan/CPAN-Meta/t/prereqs-merge.t +++ b/cpan/CPAN-Meta/t/prereqs-merge.t @@ -4,6 +4,8 @@ use Test::More 0.88; use CPAN::Meta::Prereqs; +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + my $prereq_struct_1 = { runtime => { requires => { diff --git a/cpan/CPAN-Meta/t/prereqs.t b/cpan/CPAN-Meta/t/prereqs.t index a24f27274cf..1ffacb55dc4 100644 --- a/cpan/CPAN-Meta/t/prereqs.t +++ b/cpan/CPAN-Meta/t/prereqs.t @@ -4,6 +4,8 @@ use Test::More 0.88; use CPAN::Meta::Prereqs; +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + my $prereq_struct = { runtime => { requires => { diff --git a/cpan/CPAN-Meta/t/repository.t b/cpan/CPAN-Meta/t/repository.t index b8800d913f6..8bb1da7ce98 100644 --- a/cpan/CPAN-Meta/t/repository.t +++ b/cpan/CPAN-Meta/t/repository.t @@ -4,6 +4,8 @@ use Test::More 0.88; use CPAN::Meta; +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + # 1.4 repository upgrade { my $label = "(version 1.4) old repository winds up in 'url'"; diff --git a/cpan/CPAN-Meta/t/save-load.t b/cpan/CPAN-Meta/t/save-load.t index 73cac57ea97..79650b1d93a 100644 --- a/cpan/CPAN-Meta/t/save-load.t +++ b/cpan/CPAN-Meta/t/save-load.t @@ -6,6 +6,8 @@ use CPAN::Meta; use File::Temp 0.20 (); use Parse::CPAN::Meta 1.4400; +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + my $distmeta = { name => 'Module-Build', abstract => 'Build and install Perl modules', diff --git a/cpan/CPAN-Meta/t/validator.t b/cpan/CPAN-Meta/t/validator.t index e76fcc2eca7..847f768ed56 100644 --- a/cpan/CPAN-Meta/t/validator.t +++ b/cpan/CPAN-Meta/t/validator.t @@ -8,6 +8,8 @@ use File::Spec; use IO::Dir; use Parse::CPAN::Meta 1.4400; +delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults + { my $data_dir = IO::Dir->new( 't/data' ); my @files = sort grep { /^\w/ } $data_dir->read; diff --git a/cpan/CPANPLUS/lib/CPANPLUS.pm b/cpan/CPANPLUS/lib/CPANPLUS.pm index 715be772871..6a37717d053 100644 --- a/cpan/CPANPLUS/lib/CPANPLUS.pm +++ b/cpan/CPANPLUS/lib/CPANPLUS.pm @@ -13,7 +13,7 @@ BEGIN { use vars qw( @EXPORT @ISA $VERSION ); @EXPORT = qw( shell fetch get install ); @ISA = qw( Exporter ); - $VERSION = "0.9110"; #have to hardcode or cpan.org gets unhappy + $VERSION = "0.9111"; #have to hardcode or cpan.org gets unhappy } ### purely for backward compatibility, so we can call it from the commandline: diff --git a/cpan/CPANPLUS/lib/CPANPLUS/Dist/MM.pm b/cpan/CPANPLUS/lib/CPANPLUS/Dist/MM.pm index f031e2b7864..de3d1382353 100644 --- a/cpan/CPANPLUS/lib/CPANPLUS/Dist/MM.pm +++ b/cpan/CPANPLUS/lib/CPANPLUS/Dist/MM.pm @@ -418,8 +418,12 @@ sub prepare { ### Make (haha) sure that Makefile.PL is older than the Makefile ### we just generated. eval { - my $ftime = time - 4; - utime $ftime, $ftime, MAKEFILE_PL->( $cb->_safe_path( path => $dir ) ); + my $makestat = ( stat MAKEFILE->( $dir ) )[9]; + my $mplstat = ( stat MAKEFILE_PL->( $cb->_safe_path( path => $dir ) ) )[9]; + if ( $makestat < $mplstat ) { + my $ftime = $makestat - 60; + utime $ftime, $ftime, MAKEFILE_PL->( $cb->_safe_path( path => $dir ) ); + } }; ### start resolving prereqs ### diff --git a/cpan/CPANPLUS/lib/CPANPLUS/Internals.pm b/cpan/CPANPLUS/lib/CPANPLUS/Internals.pm index 647da5a7b51..f070b1452d3 100644 --- a/cpan/CPANPLUS/lib/CPANPLUS/Internals.pm +++ b/cpan/CPANPLUS/lib/CPANPLUS/Internals.pm @@ -42,7 +42,7 @@ use vars qw[@ISA $VERSION]; CPANPLUS::Internals::Report ]; -$VERSION = "0.9110"; +$VERSION = "0.9111"; =pod diff --git a/cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm b/cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm index d8ec27523ff..2350615c214 100644 --- a/cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm +++ b/cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm @@ -26,7 +26,7 @@ local $Data::Dumper::Indent = 1; # for dumpering from ! BEGIN { use vars qw[ $VERSION @ISA ]; @ISA = qw[ CPANPLUS::Shell::_Base::ReadLine ]; - $VERSION = "0.9110"; + $VERSION = "0.9111"; } load CPANPLUS::Shell; diff --git a/cpan/Devel-PPPort/Changes b/cpan/Devel-PPPort/Changes index fb8ba3a0970..e4159f9c962 100644 --- a/cpan/Devel-PPPort/Changes +++ b/cpan/Devel-PPPort/Changes @@ -1,3 +1,37 @@ +3.20 - 2011-09-10 + + * fix CPAN #56749: isASCII and isCNTRL macros are buggy + (thanks to Karl Williamson for providing a patch and patiently + waiting almost two years for me to integrate it) + * fix CPAN #70427: RealPPPort.xs:1587: error: lvalue required as unary ‘&’ operand + +3.19_03 - 2011-04-13 + + * keep up with latest core changes + +3.19_02 - 2010-03-07 + + * fix a warning emitted by the test suite with older perls + * added support for the following API + newSVpvs_share + get_cvn_flags + get_cvs + (thanks to Goro Fuji for providing a patch to + implement all of these, fixes CPAN #47174) + +3.19_01 - 2010-02-20 + + * fix CPAN #50763: mistaken use of $[ + (thanks to Zefram for spotting this) + * remove spurious PUSHMARK from Perl_ppaddr_t + (thanks to Gerard Goossen for providing a patch) + * improved support for newer compilers in buildperl.pl + (thanks to Philippe Bruhat (BooK) for providing a patch) + * added support for the following API + memEQs + memNEs + * lots of small toolchain updates + 3.19 - 2009-06-14 * updated base/todo files diff --git a/cpan/Devel-PPPort/HACKERS b/cpan/Devel-PPPort/HACKERS index 540947f4d11..4a620ba883c 100644 --- a/cpan/Devel-PPPort/HACKERS +++ b/cpan/Devel-PPPort/HACKERS @@ -11,15 +11,15 @@ lying around in this distribution. =head1 DESCRIPTION -=head2 How to build 114 versions of Perl +=head2 How to build 136 versions of Perl C supports Perl versions between 5.003 and bleadperl. To guarantee this support, I need some of these versions on my -machine. I currently have 114 different Perl version/configuration +machine. I currently have 136 different Perl version/configuration combinations installed on my laptop. As many of the old Perl distributions need patching to compile -cleanly on newer systems (and because building 114 Perls by hand +cleanly on newer systems (and because building 136 Perls by hand just isn't fun), I wrote a tool to build all the different versions and configurations. You can find it in F. It can currently build the following Perl releases: @@ -148,7 +148,7 @@ in the root directory of the distribution. Finally, add the remaining baseline information by running perl Makefile.PL && make - perl devel/scanprov write + perl devel/scanprov --mode=write =back @@ -309,7 +309,7 @@ module in the core: =head1 COPYRIGHT -Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. Version 2.x, Copyright (C) 2001, Paul Marquess. diff --git a/cpan/Devel-PPPort/Makefile.PL b/cpan/Devel-PPPort/Makefile.PL index 67eebc1b528..8a77ae5e82b 100644 --- a/cpan/Devel-PPPort/Makefile.PL +++ b/cpan/Devel-PPPort/Makefile.PL @@ -4,13 +4,13 @@ # ################################################################################ # -# $Revision: 30 $ +# $Revision: 32 $ # $Author: mhx $ -# $Date: 2009/06/12 04:07:05 +0200 $ +# $Date: 2010/03/07 13:15:42 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # diff --git a/cpan/Devel-PPPort/PPPort_pm.PL b/cpan/Devel-PPPort/PPPort_pm.PL index fcc8671ef6e..e1118caf66c 100644 --- a/cpan/Devel-PPPort/PPPort_pm.PL +++ b/cpan/Devel-PPPort/PPPort_pm.PL @@ -4,13 +4,13 @@ # ################################################################################ # -# $Revision: 65 $ +# $Revision: 67 $ # $Author: mhx $ -# $Date: 2009/06/12 04:10:36 +0200 $ +# $Date: 2010/03/07 13:15:41 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -126,7 +126,7 @@ $data =~ s{^__UNSUPPORTED_API__(\s*?)^} {join "\n", @todo}gem; $data =~ s{__MIN_PERL__}{5.003}g; -$data =~ s{__MAX_PERL__}{5.10.0}g; +$data =~ s{__MAX_PERL__}{5.11.5}g; open FH, ">PPPort.pm" or die "PPPort.pm: $!\n"; print FH $data; @@ -372,13 +372,13 @@ __DATA__ # ################################################################################ # -# $Revision: 65 $ +# $Revision: 67 $ # $Author: mhx $ -# $Date: 2009/06/12 04:10:36 +0200 $ +# $Date: 2010/03/07 13:15:41 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -515,7 +515,7 @@ Version 3.x was ported back to CPAN by Marcus Holland-Moritz. =head1 COPYRIGHT -Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. Version 2.x, Copyright (C) 2001, Paul Marquess. @@ -535,7 +535,7 @@ package Devel::PPPort; use strict; use vars qw($VERSION $data); -$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.19 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.20 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; sub _init_data { diff --git a/cpan/Devel-PPPort/PPPort_xs.PL b/cpan/Devel-PPPort/PPPort_xs.PL index 8d9fd4f674c..f1921c8f7d7 100644 --- a/cpan/Devel-PPPort/PPPort_xs.PL +++ b/cpan/Devel-PPPort/PPPort_xs.PL @@ -4,13 +4,13 @@ # ################################################################################ # -# $Revision: 15 $ +# $Revision: 16 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:48 +0100 $ +# $Date: 2010/03/07 13:15:41 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -93,13 +93,13 @@ __DATA__ * ******************************************************************************** * -* $Revision: 15 $ +* $Revision: 16 $ * $Author: mhx $ -* $Date: 2009/01/18 14:10:48 +0100 $ +* $Date: 2010/03/07 13:15:41 +0100 $ * ******************************************************************************** * -* Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +* Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. * Version 2.x, Copyright (C) 2001, Paul Marquess. * Version 1.x, Copyright (C) 1999, Kenneth Albanowski. * diff --git a/cpan/Devel-PPPort/README b/cpan/Devel-PPPort/README index fc243099647..2ccd6af2831 100644 --- a/cpan/Devel-PPPort/README +++ b/cpan/Devel-PPPort/README @@ -69,7 +69,7 @@ to create a ticket for the module. 5. COPYRIGHT ------------ -Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. Version 2.x, Copyright (C) 2001, Paul Marquess. Version 1.x, Copyright (C) 1999, Kenneth Albanowski. diff --git a/cpan/Devel-PPPort/apicheck_c.PL b/cpan/Devel-PPPort/apicheck_c.PL index e4d861e18af..1abf66c84fe 100644 --- a/cpan/Devel-PPPort/apicheck_c.PL +++ b/cpan/Devel-PPPort/apicheck_c.PL @@ -4,13 +4,13 @@ # ################################################################################ # -# $Revision: 11 $ +# $Revision: 12 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:49 +0100 $ +# $Date: 2010/03/07 13:15:41 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # diff --git a/cpan/Devel-PPPort/devel/buildperl.pl b/cpan/Devel-PPPort/devel/buildperl.pl index 49b7fbbf292..3dd0c7576fc 100644 --- a/cpan/Devel-PPPort/devel/buildperl.pl +++ b/cpan/Devel-PPPort/devel/buildperl.pl @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 15 $ +# $Revision: 18 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:50 +0100 $ +# $Date: 2010/03/07 13:15:42 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -132,6 +132,25 @@ [ \&patch_sysv ], ], }, + { + perl => [ + qr/^5\.004_05$/, + qr/^5\.005(?:_0[1-4])?$/, + qr/^5\.6\.[01]$/, + ], + subs => [ + [ \&patch_configure ], + [ \&patch_makedepend_lc ], + ], + }, + { + perl => [ + '5.8.0', + ], + subs => [ + [ \&patch_makedepend_lc ], + ], + }, ); my(%perl, @perls); @@ -176,7 +195,7 @@ } find(sub { - /^(perl-?(5\..*))\.tar\.(gz|bz2)$/ or return; + /^(perl-?(5\..*))\.tar\.(gz|bz2|lzma)$/ or return; $perl{$1} = { version => $2, source => $File::Find::name, compress => $3 }; }, $opt{source}); @@ -338,10 +357,12 @@ sub build_and_install my $perl = shift; my $prefix = expand($opt{prefix}); + run_or_die(q{sed -i -e "s:\\*/\\*) finc=\\"-I\\`echo \\$file | sed 's#/\\[^/\\]\\*\\$##\\`\\" ;;:*/*) finc=\\"-I\\`echo \\$file | sed 's#/[^/]\\*\\$##'\\`\\" ;;:" makedepend.SH}); + print "building perl $perl->{version} ($current{config})\n"; run_or_die("./Configure $config{$current{config}}{config_args} -Dusedevel -Uinstallusrbinperl -Dprefix=$prefix"); - run_or_die("sed -i -e '/^.*/d' -e '/^.*/d' makefile x2p/makefile"); + run_or_die("sed -i -e '/^.*/d' -e '/^.*/d' -e '/^.*/d' -e '/^.*/d' makefile x2p/makefile"); run_or_die("make all"); run("make test") if $opt{test}; if ($opt{install}) { @@ -425,6 +446,52 @@ END } } +sub patch_configure +{ + patch(<<'END'); +--- Configure ++++ Configure +@@ -3380,6 +3380,18 @@ + test "X$gfpthkeep" != Xy && gfpth="" + EOSC + ++# gcc 3.1 complains about adding -Idirectories that it already knows about, ++# so we will take those off from locincpth. ++case "$gccversion" in ++3*) ++ echo "main(){}">try.c ++ for incdir in `$cc -v -c try.c 2>&1 | \ ++ sed '1,/^#include <\.\.\.>/d;/^End of search list/,$d;s/^ //'` ; do ++ locincpth=`echo $locincpth | sed s!$incdir!!` ++ done ++ $rm -f try try.* ++esac ++ + : What should the include directory be ? + echo " " + $echo $n "Hmm... $c" +END +} + +sub patch_makedepend_lc +{ + patch(<<'END'); +--- makedepend.SH ++++ makedepend.SH +@@ -58,6 +58,10 @@ case $PERL_CONFIG_SH in + ;; + esac + ++# Avoid localized gcc/cc messages ++LC_ALL=C ++export LC_ALL ++ + # We need .. when we are in the x2p directory if we are using the + # cppstdin wrapper script. + # Put .. and . first so that we pick up the present cppstdin, not +END +} + sub patch { my($patch) = @_; @@ -528,7 +595,7 @@ =head1 EXAMPLES =head1 COPYRIGHT -Copyright (c) 2004-2009, Marcus Holland-Moritz. +Copyright (c) 2004-2010, Marcus Holland-Moritz. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/Devel-PPPort/devel/devtools.pl b/cpan/Devel-PPPort/devel/devtools.pl index a87c172000c..65011d6dd5d 100644 --- a/cpan/Devel-PPPort/devel/devtools.pl +++ b/cpan/Devel-PPPort/devel/devtools.pl @@ -4,13 +4,13 @@ # ################################################################################ # -# $Revision: 5 $ +# $Revision: 6 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:50 +0100 $ +# $Date: 2010/03/07 13:15:42 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # diff --git a/cpan/Devel-PPPort/devel/mkapidoc.sh b/cpan/Devel-PPPort/devel/mkapidoc.sh index a4de2b4a277..1dd27f26497 100644 --- a/cpan/Devel-PPPort/devel/mkapidoc.sh +++ b/cpan/Devel-PPPort/devel/mkapidoc.sh @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 13 $ +# $Revision: 14 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:50 +0100 $ +# $Date: 2010/03/07 13:15:43 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # diff --git a/cpan/Devel-PPPort/devel/mktodo b/cpan/Devel-PPPort/devel/mktodo index d2bf8b8d8cb..4a2e394cf13 100644 --- a/cpan/Devel-PPPort/devel/mktodo +++ b/cpan/Devel-PPPort/devel/mktodo @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 16 $ +# $Revision: 18 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:50 +0100 $ +# $Date: 2010/03/07 13:15:43 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -29,20 +29,23 @@ our %opt = ( base => 0, check => 1, verbose => 0, + install => '/tmp/perl/install/default', + blead => 'bleadperl', ); -GetOptions(\%opt, qw( base check! verbose )) or die; +GetOptions(\%opt, qw( base check! verbose install=s blead=s blead-version=s )) or die; identify(); my $outdir = 'parts/todo'; -my $install = '/tmp/perl/install/default'; -# my $install = '/tmp/perl/install/thread'; - my @perls = sort { $b->{version} <=> $a->{version} } map { { version => `$_ -e 'printf "%.6f", \$]'`, path => $_ } } - ('bleadperl', glob "$install/*/bin/perl5.*"); + ($opt{blead}, glob "$opt{install}/*/bin/perl5.*"); + +if (exists $opt{'blead-version'}) { + $perls[0]{version} = $opt{'blead-version'}; +} for (1 .. $#perls) { $perls[$_]{todo} = $perls[$_-1]{version}; diff --git a/cpan/Devel-PPPort/devel/mktodo.pl b/cpan/Devel-PPPort/devel/mktodo.pl index 156a1c85184..22183f74a11 100644 --- a/cpan/Devel-PPPort/devel/mktodo.pl +++ b/cpan/Devel-PPPort/devel/mktodo.pl @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 16 $ +# $Revision: 18 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:51 +0100 $ +# $Date: 2011/04/13 09:38:10 +0200 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -316,10 +316,28 @@ sub read_sym sub get_apicheck_symbol_map { - my $r = run(qw(make apicheck.i)); - - if ($r->{didnotrun} or $r->{status}) { - die "cannot run make apicheck.i"; + my $r; + + while (1) { + $r = run(qw(make apicheck.i)); + + last unless $r->{didnotrun} or $r->{status}; + + my %sym = map { /error: macro "(\w+)" (?:requires|passed) \d+ argument/ ? ($1 => 'A') : () } + @{$r->{stderr}}; + + if (keys %sym) { + for my $s (sort keys %sym) { + sym('new', $s, $sym{$s}); + $all{$s} = $sym{$s}; + } + write_todo($opt{todo}, $opt{version}, \%all); + regen_apicheck(); + } + else { + die "cannot run make apicheck.i ($r->{didnotrun} / $r->{status}):\n". + join('', @{$r->{stdout}})."\n---\n".join('', @{$r->{stderr}}); + } } my $fh = IO::File->new('apicheck.i') diff --git a/cpan/Devel-PPPort/devel/regenerate b/cpan/Devel-PPPort/devel/regenerate index 31765055cd1..1ab00532dad 100644 --- a/cpan/Devel-PPPort/devel/regenerate +++ b/cpan/Devel-PPPort/devel/regenerate @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 8 $ +# $Revision: 10 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:50 +0100 $ +# $Date: 2010/03/07 13:15:42 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -33,7 +33,7 @@ our %opt = ( verbose => 0, ); -GetOptions(\%opt, qw( check! verbose )) or die pod2usage(); +GetOptions(\%opt, qw( check! verbose install=s blead=s blead-version=s )) or die pod2usage(); identify(); @@ -83,9 +83,15 @@ for my $dir (qw( base todo )) { } } +my @perlargs; +push @perlargs, "--install=$opt{install}" if exists $opt{install}; +push @perlargs, "--blead=$opt{blead}" if exists $opt{blead}; + my $T0 = time; my @args = ddverbose(); push @args, '--nocheck' unless $opt{check}; +push @args, "--blead-version=$opt{'blead-version'}" if exists $opt{'blead-version'}; +push @args, @perlargs; print "\nBuilding baseline files...\n\n"; @@ -113,7 +119,7 @@ print "\nAdding remaining baseline info...\n\n"; unless (runperl('Makefile.PL') and runtool('make') and - runperl('devel/scanprov', 'write')) { + runperl('devel/scanprov', '--mode=write', @perlargs)) { print "\nSomething went wrong while adding the baseline info.\n"; quit_now(); } @@ -148,7 +154,7 @@ regenerate - Automatically regeneate Devel::PPPort's API information =head1 COPYRIGHT -Copyright (c) 2006-2009, Marcus Holland-Moritz. +Copyright (c) 2006-2010, Marcus Holland-Moritz. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/Devel-PPPort/devel/scanprov b/cpan/Devel-PPPort/devel/scanprov index 19d294472aa..b958eca7c19 100644 --- a/cpan/Devel-PPPort/devel/scanprov +++ b/cpan/Devel-PPPort/devel/scanprov @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 9 $ +# $Revision: 11 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:50 +0100 $ +# $Date: 2010/03/07 13:15:42 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -21,10 +21,19 @@ ################################################################################ use strict; +use Getopt::Long; + require 'parts/ppptools.pl'; -die "Usage: $0 [check|write]\n" unless @ARGV && $ARGV[0] =~ /^(check|write)$/; -my $mode = $1; +our %opt = ( + mode => 'check', + install => '/tmp/perl/install/default', + blead => 'bleadperl', +); + +GetOptions(\%opt, qw( install=s mode=s blead=s )) or die; + +my $write = $opt{mode} eq 'write'; my %embed = map { ( $_->{name} => 1 ) } parse_embed(qw(parts/embed.fnc parts/apidoc.fnc parts/ppport.fnc )); @@ -33,11 +42,9 @@ my @provided = grep { !exists $embed{$_} } map { /^(\w+)/ ? $1 : () } `$^X ppport.h --list-provided`; -my $install = '/tmp/perl/install/default'; - my @perls = sort { $b->{version} <=> $a->{version} } map { { version => `$_ -e 'printf "%.6f", \$]'`, path => $_ } } - ('bleadperl', glob "$install/*/bin/perl5.*"); + ($opt{blead}, glob "$opt{install}/*/bin/perl5.*"); for (1 .. $#perls) { $perls[$_]{todo} = $perls[$_-1]{version}; @@ -68,10 +75,10 @@ for my $v (keys %v) { $file = "$out/$file"; -e $file or die "non-existent: $file\n"; print "-- $file --\n"; - $mode eq 'write' and (open F, ">>$file" or die "$file: $!\n"); + $write and (open F, ">>$file" or die "$file: $!\n"); for (@new) { print "adding $_\n"; - $mode eq 'write' and printf F "%-30s # added by $0\n", $_; + $write and printf F "%-30s # added by $0\n", $_; } - $mode eq 'write' and close F; + $write and close F; } diff --git a/cpan/Devel-PPPort/mktests.PL b/cpan/Devel-PPPort/mktests.PL index 82ccab32383..09fc71dfc64 100644 --- a/cpan/Devel-PPPort/mktests.PL +++ b/cpan/Devel-PPPort/mktests.PL @@ -4,13 +4,13 @@ # ################################################################################ # -# $Revision: 31 $ +# $Revision: 33 $ # $Author: mhx $ -# $Date: 2009/06/11 20:53:42 +0200 $ +# $Date: 2010/03/07 13:15:41 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -77,6 +77,8 @@ __DATA__ BEGIN { if ($ENV{'PERL_CORE'}) { + chdir 't' if -d 't'; + @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext'; require Config; import Config; use vars '%Config'; if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) { diff --git a/cpan/Devel-PPPort/module2.c b/cpan/Devel-PPPort/module2.c index e5f4ef607ce..1053017eda1 100644 --- a/cpan/Devel-PPPort/module2.c +++ b/cpan/Devel-PPPort/module2.c @@ -4,13 +4,13 @@ * ******************************************************************************** * -* $Revision: 12 $ +* $Revision: 13 $ * $Author: mhx $ -* $Date: 2009/01/18 14:10:49 +0100 $ +* $Date: 2010/03/07 13:15:41 +0100 $ * ******************************************************************************** * -* Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +* Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. * Version 2.x, Copyright (C) 2001, Paul Marquess. * Version 1.x, Copyright (C) 1999, Kenneth Albanowski. * diff --git a/cpan/Devel-PPPort/module3.c b/cpan/Devel-PPPort/module3.c index bcfbcd08b30..6a7e89a1ad9 100644 --- a/cpan/Devel-PPPort/module3.c +++ b/cpan/Devel-PPPort/module3.c @@ -4,13 +4,13 @@ * ******************************************************************************** * -* $Revision: 12 $ +* $Revision: 13 $ * $Author: mhx $ -* $Date: 2009/01/18 14:10:49 +0100 $ +* $Date: 2010/03/07 13:15:41 +0100 $ * ******************************************************************************** * -* Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +* Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. * Version 2.x, Copyright (C) 2001, Paul Marquess. * Version 1.x, Copyright (C) 1999, Kenneth Albanowski. * diff --git a/cpan/Devel-PPPort/parts/apicheck.pl b/cpan/Devel-PPPort/parts/apicheck.pl index e6caab57c9e..e93fbe81a3f 100644 --- a/cpan/Devel-PPPort/parts/apicheck.pl +++ b/cpan/Devel-PPPort/parts/apicheck.pl @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 35 $ +# $Revision: 37 $ # $Author: mhx $ -# $Date: 2009/06/12 12:29:35 +0200 $ +# $Date: 2010/03/07 13:15:43 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -261,7 +261,7 @@ } my $aTHX_args = "$aTHX$args"; - unless ($f->{flags}{'m'} and @arg == 0) { + if (!$f->{flags}{'m'} or $f->{flags}{'b'} or @arg > 0) { $args = "($args)"; $aTHX_args = "($aTHX_args)"; } diff --git a/cpan/Devel-PPPort/parts/apidoc.fnc b/cpan/Devel-PPPort/parts/apidoc.fnc index 740e04fc459..f68bfd35ed0 100644 --- a/cpan/Devel-PPPort/parts/apidoc.fnc +++ b/cpan/Devel-PPPort/parts/apidoc.fnc @@ -14,15 +14,19 @@ : Ama|char*|savepvs|const char* s +Ama|char*|savesharedpvs|const char* s Ama|SV*|newSVpvs|const char* s Ama|SV*|newSVpvs_flags|const char* s|U32 flags Ama|SV*|newSVpvs_share|const char* s -Am|bool|isALNUM|char ch Am|bool|isALPHA|char ch +Am|bool|isASCII|char ch Am|bool|isDIGIT|char ch Am|bool|isLOWER|char ch +Am|bool|isOCTAL|char ch Am|bool|isSPACE|char ch Am|bool|isUPPER|char ch +Am|bool|isWORDCHAR|char ch +Am|bool|isXDIGIT|char ch Am|bool|strEQ|char* s1|char* s2 Am|bool|strGE|char* s1|char* s2 Am|bool|strGT|char* s1|char* s2 @@ -37,14 +41,15 @@ Am|bool|SvIsCOW_shared_hash|SV* sv Am|bool|SvIsCOW|SV* sv Am|bool|SvRXOK|SV* sv Am|bool|SvTAINTED|SV* sv +Am|bool|SvTRUE_nomg|SV* sv Am|bool|SvTRUE|SV* sv Am|bool|SvUOK|SV* sv Am|bool|SvVOK|SV* sv Am|char*|HePV|HE* he|STRLEN len -Am|char*|HeUTF8|HE* he|STRLEN len +Am|char*|HeUTF8|HE* he +Am|char*|HvENAME|HV* stash Am|char*|HvNAME|HV* stash Am|char*|SvEND|SV* sv -Am|char*|SvGAMAGIC|SV* sv Am|char *|SvGROW|SV* sv|STRLEN len Am|char*|SvPVbyte_force|SV* sv|STRLEN len Am|char*|SvPVbyte_nolen|SV* sv @@ -54,6 +59,7 @@ Am|char*|SvPVbytex|SV* sv|STRLEN len Am|char*|SvPV_force_nomg|SV* sv|STRLEN len Am|char*|SvPV_force|SV* sv|STRLEN len Am|char*|SvPV_nolen|SV* sv +Am|char*|SvPV_nomg_nolen|SV* sv Am|char*|SvPV_nomg|SV* sv|STRLEN len Am|char*|SvPV|SV* sv|STRLEN len Am|char*|SvPVutf8_force|SV* sv|STRLEN len @@ -65,6 +71,9 @@ Am|char*|SvPVX|SV* sv Am|char*|SvPVx|SV* sv|STRLEN len Am|char|toLOWER|char ch Am|char|toUPPER|char ch +Am|const char *|OP_DESC|OP *o +Am|const char *|OP_NAME|OP *o +Am|HV *|cop_hints_2hv|const COP *cop|U32 flags Am|HV*|CvSTASH|CV* cv Am|HV*|gv_stashpvs|const char* name|I32 create Am|HV*|SvSTASH|SV* sv @@ -84,6 +93,9 @@ Amn|I32|ix Amn|IV|POPi Amn|long|POPl Amn|NV|POPn +Amn|peep_t|PL_peepp +Amn|peep_t|PL_rpeepp +Amn|Perl_ophook_t|PL_opfreehook Amn|STRLEN|PL_na Amn|SV|PL_sv_no Amn|SV|PL_sv_undef @@ -91,11 +103,13 @@ Amn|SV|PL_sv_yes Amn|SV*|POPs Amn|U32|GIMME Amn|U32|GIMME_V +Am|NV|SvNV_nomg|SV* sv Am|NV|SvNV|SV* sv Am|NV|SvNVx|SV* sv Am|NV|SvNVX|SV* sv Amn|(whatever)|RETVAL Amn|(whatever)|THIS +Am|OP*|LINKLIST|OP *o Am|REGEXP *|SvRX|SV *sv Ams||dAX Ams||dAXMARK @@ -120,6 +134,10 @@ Ams||SPAGAIN Am|STRLEN|HeKLEN|HE* he Am|STRLEN|SvCUR|SV* sv Am|STRLEN|SvLEN|SV* sv +Am|SV *|cop_hints_fetch_pv|const COP *cop|const char *key|U32 hash|U32 flags +Am|SV *|cop_hints_fetch_pvn|const COP *cop|const char *keypv|STRLEN keylen|U32 hash|U32 flags +Am|SV *|cop_hints_fetch_pvs|const COP *cop|const char *key|U32 flags +Am|SV *|cop_hints_fetch_sv|const COP *cop|SV *key|U32 hash|U32 flags Am|SV*|GvSV|GV* gv Am|SV*|HeSVKEY_force|HE* he Am|SV*|HeSVKEY|HE* he @@ -135,14 +153,18 @@ Am|SV*|SvREFCNT_inc_simple_NN|SV* sv Am|SV*|SvREFCNT_inc_simple|SV* sv Am|SV*|SvREFCNT_inc|SV* sv Am|SV*|SvRV|SV* sv +Am|SV *|sv_setref_pvs|SV *rv|const char* classname|const char* s Am|svtype|SvTYPE|SV* sv Ams||XCPT_RETHROW +Ams||XS_APIVERSION_BOOTCHECK Ams||XSRETURN_EMPTY Ams||XSRETURN_NO Ams||XSRETURN_UNDEF Ams||XSRETURN_YES Ams||XS_VERSION_BOOTCHECK Am|U32|HeHASH|HE* he +Am|U32|OP_CLASS|OP *o +Am|U32|SvGAMAGIC|SV* sv Am|U32|SvIOKp|SV* sv Am|U32|SvIOK|SV* sv Am|U32|SvNIOKp|SV* sv @@ -156,6 +178,7 @@ Am|U32|SvPOK|SV* sv Am|U32|SvREFCNT|SV* sv Am|U32|SvROK|SV* sv Am|U32|SvUTF8|SV* sv +Am|U32|XopFLAGS|XOP *xop AmU||G_ARRAY AmU||G_DISCARD AmU||G_EVAL @@ -188,8 +211,10 @@ Am|UV|SvUVX|SV* sv AmU||XCPT_CATCH AmU||XCPT_TRY_END AmU||XCPT_TRY_START +AmUx|Perl_keyword_plugin_t|PL_keyword_plugin AmU||XS AmU||XS_VERSION +AmU|yy_parser *|PL_parser Am|void *|CopyD|void* src|void* dest|int nitems|type Am|void|Copy|void* src|void* dest|int nitems|type Am|void|EXTEND|SP|int nitems @@ -228,6 +253,10 @@ Am|void|Renew|void* ptr|int nitems|type Am|void|Safefree|void* ptr Am|void|StructCopy|type src|type dest|type Am|void|sv_catpvn_nomg|SV* sv|const char* ptr|STRLEN len +Am|void|sv_catpv_nomg|SV* sv|const char* ptr +Am|void|sv_catpvs_flags|SV* sv|const char* s|I32 flags +Am|void|sv_catpvs_mg|SV* sv|const char* s +Am|void|sv_catpvs_nomg|SV* sv|const char* s Am|void|sv_catpvs|SV* sv|const char* s Am|void|sv_catsv_nomg|SV* dsv|SV* ssv Am|void|SvCUR_set|SV* sv|STRLEN len @@ -262,6 +291,7 @@ Am|void|SvRV_set|SV* sv|SV* val Am|void|SvSetMagicSV_nosteal|SV* dsv|SV* ssv Am|void|SvSETMAGIC|SV* sv Am|void|SvSetMagicSV|SV* dsb|SV* ssv +Am|void|sv_setpvs_mg|SV* sv|const char* s Am|void|sv_setpvs|SV* sv|const char* s Am|void|sv_setsv_nomg|SV* dsv|SV* ssv Am|void|SvSetSV_nosteal|SV* dsv|SV* ssv @@ -276,6 +306,9 @@ Am|void|SvUPGRADE|SV* sv|svtype type Am|void|SvUTF8_off|SV *sv Am|void|SvUTF8_on|SV *sv Am|void|SvUV_set|SV* sv|UV val +Am|void|XopDISABLE|XOP *xop|which +Am|void|XopENABLE|XOP *xop|which +Am|void|XopENTRY_set|XOP *xop|which|value Am|void|XPUSHi|IV iv Am|void|XPUSHmortal Am|void|XPUSHn|NV nv @@ -295,6 +328,31 @@ Am|void|XST_mUNDEF|int pos Am|void|XST_mYES|int pos Am|void *|ZeroD|void* dest|int nitems|type Am|void|Zero|void* dest|int nitems|type +Amx|COPHH *|cophh_copy|COPHH *cophh +Amx|COPHH *|cophh_delete_pv|const COPHH *cophh|const char *key|U32 hash|U32 flags +Amx|COPHH *|cophh_delete_pvn|COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|U32 flags +Amx|COPHH *|cophh_delete_pvs|const COPHH *cophh|const char *key|U32 flags +Amx|COPHH *|cophh_delete_sv|const COPHH *cophh|SV *key|U32 hash|U32 flags +Amx|COPHH *|cophh_new_empty +Amx|COPHH *|cophh_store_pv|const COPHH *cophh|const char *key|U32 hash|SV *value|U32 flags +Amx|COPHH *|cophh_store_pvn|COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|SV *value|U32 flags +Amx|COPHH *|cophh_store_pvs|const COPHH *cophh|const char *key|SV *value|U32 flags +Amx|COPHH *|cophh_store_sv|const COPHH *cophh|SV *key|U32 hash|SV *value|U32 flags +Amx|HV *|cophh_2hv|const COPHH *cophh|U32 flags +Am||XopENTRY|XOP *xop|which +Amx|SV *|cophh_fetch_pv|const COPHH *cophh|const char *key|U32 hash|U32 flags +Amx|SV *|cophh_fetch_pvn|const COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|U32 flags +Amx|SV *|cophh_fetch_pvs|const COPHH *cophh|const char *key|U32 flags +Amx|SV *|cophh_fetch_sv|const COPHH *cophh|SV *key|U32 hash|U32 flags +AmxU|char *|PL_parser-Ebufend +AmxU|char *|PL_parser-Ebufptr +AmxU|char *|PL_parser-Elinestart +AmxU|SV *|PL_parser-Elinestr +Amx|void|BhkDISABLE|BHK *hk|which +Amx|void|BhkENABLE|BHK *hk|which +Amx|void|BhkENTRY_set|BHK *hk|which|void *ptr +Amx|void|cophh_free|COPHH *cophh +Amx|void|lex_stuff_pvs|const char *pv|U32 flags m|AV *|CvPADLIST|CV *cv m|bool|CvWEAKOUTSIDE|CV *cv m|char *|PAD_COMPNAME_PV|PADOFFSET po @@ -310,10 +368,12 @@ mn|SV*|PL_rs ms||djSP m|STRLEN|PAD_COMPNAME_GEN|PADOFFSET po m|STRLEN|PAD_COMPNAME_GEN_set|PADOFFSET po|int gen +m|struct refcounted_he *|refcounted_he_new_pvs|struct refcounted_he *parent|const char *key|SV *value|U32 flags m|SV *|CX_CURPAD_SV|struct context|PADOFFSET po m|SV *|PAD_BASE_SV |PADLIST padlist|PADOFFSET po m|SV *|PAD_SETSV |PADOFFSET po|SV* sv m|SV *|PAD_SVl |PADOFFSET po +m|SV *|refcounted_he_fetch_pvs|const struct refcounted_he *chain|const char *key|U32 flags m|U32|PAD_COMPNAME_FLAGS|PADOFFSET po mU||LVRET m|void|CX_CURPAD_SAVE|struct context @@ -328,3 +388,6 @@ m|void|PAD_SV |PADOFFSET po m|void|SAVECLEARSV |SV **svp m|void|SAVECOMPPAD m|void|SAVEPADSV |PADOFFSET po +mx|U32|BhkFLAGS|BHK *hk +mx|void *|BhkENTRY|BHK *hk|which +mx|void|CALL_BLOCK_HOOKS|which|arg diff --git a/cpan/Devel-PPPort/parts/base/5004000 b/cpan/Devel-PPPort/parts/base/5004000 index 5350285413b..c16c360b8b3 100644 --- a/cpan/Devel-PPPort/parts/base/5004000 +++ b/cpan/Devel-PPPort/parts/base/5004000 @@ -24,7 +24,7 @@ XPUSHu # U block_gimme # E call_list # E cv_const_sv # E -delimcpy # E +delimcpy # U do_open # E (Perl_do_open) gv_autoload4 # E gv_efullname3 # U @@ -39,7 +39,7 @@ hv_free_ent # E hv_iterkeysv # E hv_ksplit # E hv_store_ent # U -ibcmp_locale # E +ibcmp_locale # U my_failure_exit # E my_memcmp # U my_pclose # E (Perl_my_pclose) diff --git a/cpan/Devel-PPPort/parts/base/5004050 b/cpan/Devel-PPPort/parts/base/5004050 index f0e04564221..82fdcf0fd55 100644 --- a/cpan/Devel-PPPort/parts/base/5004050 +++ b/cpan/Devel-PPPort/parts/base/5004050 @@ -7,7 +7,7 @@ SvGETMAGIC # U do_binmode # E newCONSTSUB # E newSVpvn # E -save_aelem # E +save_aelem # U save_helem # U sv_catpv_mg # E sv_catpvn_mg # U @@ -31,8 +31,6 @@ PL_dirty # added by devel/scanprov PL_errgv # added by devel/scanprov PL_perl_destruct_level # added by devel/scanprov PL_perldb # added by devel/scanprov -PL_rsfp # added by devel/scanprov -PL_rsfp_filters # added by devel/scanprov PL_stack_base # added by devel/scanprov PL_stack_sp # added by devel/scanprov PL_stdingv # added by devel/scanprov diff --git a/cpan/Devel-PPPort/parts/base/5005000 b/cpan/Devel-PPPort/parts/base/5005000 index 1f2bf063322..c41e3bb50a6 100644 --- a/cpan/Devel-PPPort/parts/base/5005000 +++ b/cpan/Devel-PPPort/parts/base/5005000 @@ -18,6 +18,7 @@ regnext # E (Perl_regnext) runops_debug # E runops_standard # E save_iv # E (save_iv) +save_op # U screaminstr # E (Perl_screaminstr) sv_iv # E sv_peek # U diff --git a/cpan/Devel-PPPort/parts/base/5006000 b/cpan/Devel-PPPort/parts/base/5006000 index 924da63a68d..5c665b29a71 100644 --- a/cpan/Devel-PPPort/parts/base/5006000 +++ b/cpan/Devel-PPPort/parts/base/5006000 @@ -66,10 +66,10 @@ get_sv # E (perl_get_sv) gv_dump # E init_i18nl10n # E (perl_init_i18nl10n) init_i18nl14n # E (perl_init_i18nl14n) +isASCII # U +isXDIGIT # U is_uni_alnum # E is_uni_alnum_lc # E -is_uni_alnumc # E -is_uni_alnumc_lc # E is_uni_alpha # E is_uni_alpha_lc # E is_uni_ascii # E @@ -95,10 +95,9 @@ is_uni_upper_lc # E is_uni_xdigit # E is_uni_xdigit_lc # E is_utf8_alnum # E -is_utf8_alnumc # E is_utf8_alpha # E is_utf8_ascii # E -is_utf8_char # E +is_utf8_char # U is_utf8_cntrl # E is_utf8_digit # E is_utf8_graph # E @@ -150,7 +149,6 @@ set_numeric_local # E (perl_set_numeric_local) set_numeric_radix # E set_numeric_standard # E (perl_set_numeric_standard) str_to_version # E -sv_2nv # E (Perl_sv_2nv) sv_2pv_nolen # U sv_2pvbyte # E sv_2pvbyte_nolen # U @@ -286,10 +284,8 @@ dTHXa # added by devel/scanprov dTHXoa # added by devel/scanprov dXSTARG # added by devel/scanprov isALNUMC # added by devel/scanprov -isASCII # added by devel/scanprov isCNTRL # added by devel/scanprov isGRAPH # added by devel/scanprov isPUNCT # added by devel/scanprov -isXDIGIT # added by devel/scanprov pTHX # added by devel/scanprov pTHX_ # added by devel/scanprov diff --git a/cpan/Devel-PPPort/parts/base/5007003 b/cpan/Devel-PPPort/parts/base/5007003 index 325f06ad936..c7a87701868 100644 --- a/cpan/Devel-PPPort/parts/base/5007003 +++ b/cpan/Devel-PPPort/parts/base/5007003 @@ -1,4 +1,7 @@ 5.007003 +OP_DESC # U +OP_NAME # U +PL_peepp # E PerlIO_clearerr # U (PerlIO_clearerr) PerlIO_close # U (PerlIO_close) PerlIO_eof # U (PerlIO_eof) diff --git a/cpan/Devel-PPPort/parts/base/5008009 b/cpan/Devel-PPPort/parts/base/5008009 new file mode 100644 index 00000000000..129e018f45f --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5008009 @@ -0,0 +1 @@ +5.008009 diff --git a/cpan/Devel-PPPort/parts/base/5009003 b/cpan/Devel-PPPort/parts/base/5009003 index 23060550f09..15499c63bd0 100644 --- a/cpan/Devel-PPPort/parts/base/5009003 +++ b/cpan/Devel-PPPort/parts/base/5009003 @@ -31,7 +31,6 @@ newSVhek # U newSVpvs # U newSVpvs_share # U newWHENOP # U -newWHILEOP # E (Perl_newWHILEOP) savepvs # U sortsv_flags # U sv_catpvs # U diff --git a/cpan/Devel-PPPort/parts/base/5009004 b/cpan/Devel-PPPort/parts/base/5009004 index 2f88d2a2ffa..fa236f03669 100644 --- a/cpan/Devel-PPPort/parts/base/5009004 +++ b/cpan/Devel-PPPort/parts/base/5009004 @@ -11,6 +11,7 @@ SvREFCNT_inc_simple_void_NN # U SvREFCNT_inc_void # U SvREFCNT_inc_void_NN # U gv_name_set # U +hv_copy_hints_hv # U hv_stores # U my_snprintf # U my_strlcat # U diff --git a/cpan/Devel-PPPort/parts/base/5009005 b/cpan/Devel-PPPort/parts/base/5009005 index 68ceff2b010..de29b9f8be0 100644 --- a/cpan/Devel-PPPort/parts/base/5009005 +++ b/cpan/Devel-PPPort/parts/base/5009005 @@ -1,4 +1,5 @@ 5.009005 +PL_parser # E Perl_signbit # U SvRX # U SvRXOK # U @@ -6,6 +7,7 @@ av_create_and_push # U av_create_and_unshift_one # U get_cvn_flags # U gv_fetchfile_flags # U +lex_start # E (Perl_lex_start) mro_get_linear_isa # U mro_method_changed_in # U my_dirfd # U @@ -30,6 +32,7 @@ savesharedpvn # U scan_vstring # E (Perl_scan_vstring) upg_version # E (Perl_upg_version) PERL_PV_ESCAPE_RE # added by devel/scanprov -PL_parser # added by devel/scanprov SV_COW_SHARED_HASH_KEYS # added by devel/scanprov SVfARG # added by devel/scanprov +memEQs # added by devel/scanprov +memNEs # added by devel/scanprov diff --git a/cpan/Devel-PPPort/parts/base/5010001 b/cpan/Devel-PPPort/parts/base/5010001 new file mode 100644 index 00000000000..d6d0545bee8 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5010001 @@ -0,0 +1,20 @@ +5.010001 +HeUTF8 # U +croak_xs_usage # U +mPUSHs # U +mXPUSHs # U +mro_get_from_name # U +mro_get_private_data # U +mro_register # U +mro_set_mro # U +mro_set_private_data # U +newSVpvn_flags # U +newSVpvn_utf8 # U +newSVpvs_flags # U +save_hints # U +save_padsv_and_mortalize # U +save_pushi32ptr # U +save_pushptr # U +save_pushptrptr # U +sv_insert_flags # U +DEFSV_set # added by devel/scanprov diff --git a/cpan/Devel-PPPort/parts/base/5011000 b/cpan/Devel-PPPort/parts/base/5011000 index fe92c15d261..246315c1e35 100644 --- a/cpan/Devel-PPPort/parts/base/5011000 +++ b/cpan/Devel-PPPort/parts/base/5011000 @@ -1,52 +1,16 @@ 5.011000 -HeUTF8 # U -MULTICALL # E -PERL_SYS_TERM # E -POP_MULTICALL # E -PUSH_MULTICALL # E +Gv_AMupdate # E (Perl_Gv_AMupdate) +PL_opfreehook # E SvOOK_offset # U av_iter_p # U -croak_xs_usage # U fetch_cop_label # U +gv_add_by_type # U gv_fetchmethod_flags # U -hv_assert # U -mPUSHs # U -mXPUSHs # U -mro_get_from_name # U -mro_get_private_data # U -mro_register # U -mro_set_mro # U -mro_set_private_data # U -newSVpvn_flags # U -newSVpvn_utf8 # U -newSVpvs_flags # U -pad_sv # U +is_ascii_string # U pregfree2 # U -ref # U (Perl_ref) save_adelete # U +save_aelem_flags # U +save_hdelete # U save_helem_flags # U -save_padsv_and_mortalize # U -save_pushptr # U -stashpv_hvname_match # U -sv_insert_flags # U -sv_magic_portable # U sv_utf8_upgrade_flags_grow # U -DEFSV_set # added by devel/scanprov -PERL_BCDVERSION # added by devel/scanprov -PERL_MAGIC_glob # added by devel/scanprov -PERL_MAGIC_mutex # added by devel/scanprov -PL_bufend # added by devel/scanprov -PL_bufptr # added by devel/scanprov -PL_copline # added by devel/scanprov -PL_error_count # added by devel/scanprov -PL_expect # added by devel/scanprov -PL_in_my # added by devel/scanprov -PL_in_my_stash # added by devel/scanprov -PL_lex_state # added by devel/scanprov -PL_lex_stuff # added by devel/scanprov -PL_linestr # added by devel/scanprov -PL_tokenbuf # added by devel/scanprov -WARN_ASSERTIONS # added by devel/scanprov -aTHXR # added by devel/scanprov -aTHXR_ # added by devel/scanprov -dTHXR # added by devel/scanprov +get_cvs # added by devel/scanprov diff --git a/cpan/Devel-PPPort/parts/base/5011001 b/cpan/Devel-PPPort/parts/base/5011001 new file mode 100644 index 00000000000..f42409363b7 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5011001 @@ -0,0 +1,6 @@ +5.011001 +ck_warner # U +ck_warner_d # U +is_utf8_perl_space # U +is_utf8_perl_word # U +is_utf8_posix_digit # U diff --git a/cpan/Devel-PPPort/parts/base/5011002 b/cpan/Devel-PPPort/parts/base/5011002 new file mode 100644 index 00000000000..4e66714450a --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5011002 @@ -0,0 +1,14 @@ +5.011002 +PL_keyword_plugin # E +lex_bufutf8 # U +lex_discard_to # U +lex_grow_linestr # U +lex_next_chunk # U +lex_peek_unichar # U +lex_read_space # U +lex_read_to # U +lex_read_unichar # U +lex_stuff_pvn # U +lex_stuff_sv # U +lex_unstuff # U +pad_findmy # E (Perl_pad_findmy) diff --git a/cpan/Devel-PPPort/parts/base/5011003 b/cpan/Devel-PPPort/parts/base/5011003 new file mode 100644 index 00000000000..3fd94ca1b60 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5011003 @@ -0,0 +1 @@ +5.011003 diff --git a/cpan/Devel-PPPort/parts/base/5011004 b/cpan/Devel-PPPort/parts/base/5011004 new file mode 100644 index 00000000000..86c1fce4f2a --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5011004 @@ -0,0 +1,2 @@ +5.011004 +prescan_version # U diff --git a/cpan/Devel-PPPort/parts/base/5011005 b/cpan/Devel-PPPort/parts/base/5011005 new file mode 100644 index 00000000000..d9b0d6a4c94 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5011005 @@ -0,0 +1,2 @@ +5.011005 +sv_pos_u2b_flags # U diff --git a/cpan/Devel-PPPort/parts/base/5012000 b/cpan/Devel-PPPort/parts/base/5012000 new file mode 100644 index 00000000000..82cbce2d6d9 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5012000 @@ -0,0 +1 @@ +5.012000 diff --git a/cpan/Devel-PPPort/parts/base/5012001 b/cpan/Devel-PPPort/parts/base/5012001 new file mode 100644 index 00000000000..90dc03fdf35 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5012001 @@ -0,0 +1 @@ +5.012001 diff --git a/cpan/Devel-PPPort/parts/base/5012002 b/cpan/Devel-PPPort/parts/base/5012002 new file mode 100644 index 00000000000..8ab87f08d8a --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5012002 @@ -0,0 +1 @@ +5.012002 diff --git a/cpan/Devel-PPPort/parts/base/5012003 b/cpan/Devel-PPPort/parts/base/5012003 new file mode 100644 index 00000000000..f2abab4c17c --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5012003 @@ -0,0 +1 @@ +5.012003 diff --git a/cpan/Devel-PPPort/parts/base/5013000 b/cpan/Devel-PPPort/parts/base/5013000 new file mode 100644 index 00000000000..f2f116d2fab --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013000 @@ -0,0 +1 @@ +5.013000 diff --git a/cpan/Devel-PPPort/parts/base/5013001 b/cpan/Devel-PPPort/parts/base/5013001 new file mode 100644 index 00000000000..679bf3c35e5 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013001 @@ -0,0 +1,6 @@ +5.013001 +croak_sv # U +die_sv # U +mess_sv # U +sv_2nv_flags # U +warn_sv # U diff --git a/cpan/Devel-PPPort/parts/base/5013002 b/cpan/Devel-PPPort/parts/base/5013002 new file mode 100644 index 00000000000..fa6d99b4076 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013002 @@ -0,0 +1,9 @@ +5.013002 +SvNV_nomg # U +find_rundefsv # U +foldEQ # U +foldEQ_locale # U +foldEQ_utf8 # U +hv_fill # U +sv_dec_nomg # U +sv_inc_nomg # U diff --git a/cpan/Devel-PPPort/parts/base/5013003 b/cpan/Devel-PPPort/parts/base/5013003 new file mode 100644 index 00000000000..5e04f03c8a5 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013003 @@ -0,0 +1,3 @@ +5.013003 +blockhook_register # E +croak_no_modify # U diff --git a/cpan/Devel-PPPort/parts/base/5013004 b/cpan/Devel-PPPort/parts/base/5013004 new file mode 100644 index 00000000000..20b0810cbe7 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013004 @@ -0,0 +1,2 @@ +5.013004 +XS_APIVERSION_BOOTCHECK # E diff --git a/cpan/Devel-PPPort/parts/base/5013005 b/cpan/Devel-PPPort/parts/base/5013005 new file mode 100644 index 00000000000..88c7c7b80b4 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013005 @@ -0,0 +1,6 @@ +5.013005 +PL_rpeepp # E +caller_cx # U +isOCTAL # U +lex_stuff_pvs # U +parse_fullstmt # U diff --git a/cpan/Devel-PPPort/parts/base/5013006 b/cpan/Devel-PPPort/parts/base/5013006 new file mode 100644 index 00000000000..9b7d2a0b2af --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013006 @@ -0,0 +1,33 @@ +5.013006 +LINKLIST # U +SvTRUE_nomg # U +ck_entersub_args_list # U +ck_entersub_args_proto # U +ck_entersub_args_proto_or_list # U +cv_get_call_checker # E +cv_set_call_checker # E +isWORDCHAR # U +lex_stuff_pv # U +mg_free_type # U +newSVpv_share # U +op_append_elem # U +op_append_list # U +op_contextualize # U +op_linklist # U +op_prepend_elem # U +parse_stmtseq # U +rv2cv_op_cv # U +savesharedpvs # U +savesharedsvpv # U +sv_2bool_flags # U +sv_catpv_flags # U +sv_catpv_nomg # U +sv_catpvs_flags # U +sv_catpvs_mg # U +sv_catpvs_nomg # U +sv_cmp_flags # U +sv_cmp_locale_flags # U +sv_collxfrm_flags # U +sv_eq_flags # U +sv_setpvs_mg # U +sv_setref_pvs # U diff --git a/cpan/Devel-PPPort/parts/base/5013007 b/cpan/Devel-PPPort/parts/base/5013007 new file mode 100644 index 00000000000..79a9a5f44a1 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013007 @@ -0,0 +1,36 @@ +5.013007 +HvENAME # U +OP_CLASS # U +SvPV_nomg_nolen # U +XopFLAGS # E +amagic_deref_call # U +bytes_cmp_utf8 # U +cop_hints_2hv # A +cop_hints_fetch_pv # U +cop_hints_fetch_pvn # U +cop_hints_fetch_pvs # U +cop_hints_fetch_sv # U +cophh_2hv # E +cophh_copy # E +cophh_delete_pv # E +cophh_delete_pvn # E +cophh_delete_pvs # E +cophh_delete_sv # E +cophh_fetch_pv # E +cophh_fetch_pvn # E +cophh_fetch_pvs # E +cophh_fetch_sv # E +cophh_free # E +cophh_store_pv # E +cophh_store_pvn # E +cophh_store_pvs # E +cophh_store_sv # E +custom_op_register # E +custom_op_xop # E +newFOROP # A +newWHILEOP # A +op_lvalue # U +op_scope # U +parse_barestmt # U +parse_block # U +parse_label # U diff --git a/cpan/Devel-PPPort/parts/base/5013008 b/cpan/Devel-PPPort/parts/base/5013008 new file mode 100644 index 00000000000..5c315d671ba --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013008 @@ -0,0 +1,8 @@ +5.013008 +foldEQ_latin1 # U +mg_findext # U +parse_arithexpr # U +parse_fullexpr # U +parse_listexpr # U +parse_termexpr # U +sv_unmagicext # U diff --git a/cpan/Devel-PPPort/parts/base/5013009 b/cpan/Devel-PPPort/parts/base/5013009 new file mode 100644 index 00000000000..51160ae344d --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013009 @@ -0,0 +1 @@ +5.013009 diff --git a/cpan/Devel-PPPort/parts/base/5013010 b/cpan/Devel-PPPort/parts/base/5013010 new file mode 100644 index 00000000000..d7f4365bfb1 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013010 @@ -0,0 +1,4 @@ +5.013010 +foldEQ_utf8_flags # U +is_utf8_xidcont # U +is_utf8_xidfirst # U diff --git a/cpan/Devel-PPPort/parts/base/5013011 b/cpan/Devel-PPPort/parts/base/5013011 new file mode 100644 index 00000000000..a33715f749e --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5013011 @@ -0,0 +1 @@ +5.013011 diff --git a/cpan/Devel-PPPort/parts/base/5014000 b/cpan/Devel-PPPort/parts/base/5014000 new file mode 100644 index 00000000000..f348abe6f73 --- /dev/null +++ b/cpan/Devel-PPPort/parts/base/5014000 @@ -0,0 +1,38 @@ +5.014000 +BhkDISABLE # E +BhkENABLE # E +BhkENTRY_set # E +MULTICALL # E +PERL_SYS_TERM # E +POP_MULTICALL # E +PUSH_MULTICALL # E +XopDISABLE # E +XopENABLE # E +XopENTRY # E +XopENTRY_set # E +cophh_new_empty # E +my_lstat # U (Perl_my_lstat) +my_stat # U (Perl_my_stat) +ref # U (Perl_ref) +stashpv_hvname_match # U +sv_magic_portable # U +PERL_BCDVERSION # added by devel/scanprov +PERL_MAGIC_glob # added by devel/scanprov +PERL_MAGIC_mutex # added by devel/scanprov +PL_bufend # added by devel/scanprov +PL_bufptr # added by devel/scanprov +PL_copline # added by devel/scanprov +PL_error_count # added by devel/scanprov +PL_expect # added by devel/scanprov +PL_in_my # added by devel/scanprov +PL_in_my_stash # added by devel/scanprov +PL_lex_state # added by devel/scanprov +PL_lex_stuff # added by devel/scanprov +PL_linestr # added by devel/scanprov +PL_rsfp # added by devel/scanprov +PL_rsfp_filters # added by devel/scanprov +PL_tokenbuf # added by devel/scanprov +WARN_ASSERTIONS # added by devel/scanprov +aTHXR # added by devel/scanprov +aTHXR_ # added by devel/scanprov +dTHXR # added by devel/scanprov diff --git a/cpan/Devel-PPPort/parts/embed.fnc b/cpan/Devel-PPPort/parts/embed.fnc index 68f38171c7b..b891b434276 100644 --- a/cpan/Devel-PPPort/parts/embed.fnc +++ b/cpan/Devel-PPPort/parts/embed.fnc @@ -1,4 +1,6 @@ -: BEGIN {die "You meant to run embed.pl"} # Stop early if fed to perl. +: BEGIN{die "You meant to run regen/embed.pl"} # Stop early if fed to perl. +: +: This file is processed by regen/embed.pl and autodoc.pl : : Lines are of the form: : flags|return_type|function_name|arg1|arg2|...|argN @@ -7,29 +9,110 @@ : Leading and trailing whitespace will be ignored in each component. : : flags are single letters with following meanings: -: A member of public API -: m Implemented as a macro - no export, no -: proto, no #define -: d function has documentation with its source -: s static function, should have an S_ prefix in -: source file; for macros (m), suffix the usage -: example with a semicolon -: n has no implicit interpreter/thread context argument -: p function has a Perl_ prefix -: f function takes printf style format string, varargs -: r function never returns -: o has no compatibility macro (#define foo Perl_foo) -: x not exported -: X explicitly exported -: M may change -: E visible to extensions included in the Perl core -: b binary backward compatibility; function is a macro -: but has also Perl_ implementation (which is exported) -: U suppress usage example in autogenerated documentation -: a allocates memory a la malloc/calloc. Is also "R". -: R Return value must not be ignored. -: P pure function: no effects except the return value; -: return value depends only on parms and/or globals +: +: A Member of public API: +: +: add entry to global.sym (unless x or m); +: any doc entry goes in perlapi.pod rather than perlintern.pod +: makes '#define foo Perl_foo' scope not just for PERL_CORE/PERL_EXT +: +: a Allocates memory a la malloc/calloc. Also implies "R": +: +: proto.h: add __attribute__malloc__ +: +: b Binary backward compatibility; function is a macro +: but has also Perl_ implementation (which is exported): +: +: add entry to global.sym; +: don't define PERL_ARGS_ASSERT_FOO +: +: D Function is deprecated: +: +: proto.h: add __attribute__deprecated__ +: +: d Function has documentation with its source: +: +: enables 'no docs for foo" warning in autodoc.pl +: +: E Visible to extensions included in the Perl core: +: +: in embed.h, change "#ifdef PERL_CORE" +: into "#if defined(PERL_CORE) || defined(PERL_EXT)" +: +: Should always be combined with "X" to be usable from dynamically +: loaded extensions. +: +: f Function takes printf style format string, varargs: +: +: proto.h: add __attribute__format__ (or ...null_ok__) +: +: i Static inline: function in source code has a S_ prefix: +: +: proto.h: function is declared as S_foo rather than foo, +: PERL_STATIC_INLINE is added to declaration; +: embed.h: "#define foo S_foo" entries added +: +: M May change: +: +: any doc entry is marked that function may change +: +: m Implemented as a macro: +: +: suppress proto.h entry +: suppress global.sym entry +: suppress embed.h entry +: +: n Has no implicit interpreter/thread context argument: +: +: suppress the pTHX part of "foo(pTHX...)" in proto.h; +: In the PERL_IMPLICIT_SYS branch of embed.h, generates +: "#define foo Perl_foo", rather than +: "#define foo(a,b,c) Perl_foo(aTHX_ a,b,c) +: +: O Has a perl_ compatibility macro. +: +: The really OLD name for API funcs +: +: o Has no Perl_foo compatibility macro: +: +: embed.h: suppress "#define foo Perl_foo" +: +: P Pure function: no effects except the return value; +: return value depends only on params and/or globals: +: +: proto.h: add __attribute__pure__ +: +: p Function in source code has a Perl_ prefix: +: +: proto.h: function is declared as Perl_foo rather than foo +: embed.h: "#define foo Perl_foo" entries added +: +: R Return value must not be ignored (also implied by 'a' flag): +: +: proto.h: add __attribute__warn_unused_result__ +: +: r Function never returns: +: +: proto.h: add __attribute__noreturn__ +: +: s Static function: function in source code has a S_ prefix: +: +: proto.h: function is declared as S_foo rather than foo, +: STATIC is added to declaration; +: embed.h: "#define foo S_foo" entries added +: +: U Suppress usage example in autogenerated documentation +: +: (currently no effect) +: +: X Explicitly exported: +: +: add entry to global.sym, unless x or m +: +: x Not exported +: +: suppress entry in global.sym +: : (see also L for those flags.) : : Pointer parameters that must not be passed NULLs should be prefixed with NN. @@ -41,8 +124,6 @@ : : Individual flags may be separated by whitespace. -START_EXTERN_C - #if defined(PERL_IMPLICIT_SYS) Ano |PerlInterpreter*|perl_alloc_using \ |NN struct IPerlMem *ipM \ @@ -93,18 +174,16 @@ npR |MEM_SIZE|malloc_good_size |size_t nbytes AnpR |void* |get_context Anp |void |set_context |NN void *t -END_EXTERN_C - -/* functions with flag 'n' should come before here */ -START_EXTERN_C -# include "pp_proto.h" +XEop |bool |try_amagic_bin |int method|int flags +XEop |bool |try_amagic_un |int method|int flags Ap |SV* |amagic_call |NN SV* left|NN SV* right|int method|int dir -Ap |bool |Gv_AMupdate |NN HV* stash +Ap |SV * |amagic_deref_call|NN SV *ref|int method +Ap |int |Gv_AMupdate |NN HV* stash|bool destructing ApR |CV* |gv_handler |NULLOK HV* stash|I32 id -: Used in perly.y -p |OP* |append_elem |I32 optype|NULLOK OP* first|NULLOK OP* last -: Used in perly.y -p |OP* |append_list |I32 optype|NULLOK LISTOP* first|NULLOK LISTOP* last +Apd |OP* |op_append_elem |I32 optype|NULLOK OP* first|NULLOK OP* last +Apd |OP* |op_append_list |I32 optype|NULLOK OP* first|NULLOK OP* last +Apd |OP* |op_linklist |NN OP *o +Apd |OP* |op_prepend_elem|I32 optype|NULLOK OP* first|NULLOK OP* last : FIXME - this is only called by pp_chown. They should be merged. p |I32 |apply |I32 type|NN SV** mark|NN SV** sp ApM |void |apply_attrs_string|NN const char *stashpv|NN CV *cv|NN const char *attrstr|STRLEN len @@ -128,7 +207,7 @@ ApdoxM |SV** |av_create_and_unshift_one|NN AV **const avp|NN SV *const val Apd |void |av_unshift |NN AV *av|I32 num Apo |SV** |av_arylen_p |NN AV *av Apo |IV* |av_iter_p |NN AV *av -#if defined(PERL_IN_AV_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_AV_C) s |MAGIC* |get_aux_mg |NN AV *av #endif : Used in perly.y @@ -138,12 +217,15 @@ pR |OP* |block_end |I32 floor|NULLOK OP* seq ApR |I32 |block_gimme : Used in perly.y pR |int |block_start |int full +Aodp |void |blockhook_register |NN BHK *hk : Used in perl.c p |void |boot_core_UNIVERSAL : Used in perl.c p |void |boot_core_PerlIO Ap |void |call_list |I32 oldscope|NN AV *paramList -: Used in serveral source files +Apd |const PERL_CONTEXT * |caller_cx|I32 level \ + |NULLOK const PERL_CONTEXT **dbcxp +: Used in several source files pR |bool |cando |Mode_t mode|bool effective|NN const Stat_t* statbufp ApR |U32 |cast_ulong |NV f ApR |I32 |cast_i32 |NV f @@ -156,15 +238,17 @@ ApR |I32 |my_chsize |int fd|Off_t length pR |OP* |convert |I32 optype|I32 flags|NULLOK OP* o : Used in op.c and perl.c pM |PERL_CONTEXT* |create_eval_scope|U32 flags +Aprd |void |croak_sv |NN SV *baseex : croak()'s first parm can be NULL. Otherwise, mod_perl breaks. Afprd |void |croak |NULLOK const char* pat|... -Apr |void |vcroak |NULLOK const char* pat|NULLOK va_list* args +Aprd |void |vcroak |NULLOK const char* pat|NULLOK va_list* args +Aprd |void |croak_no_modify Aprd |void |croak_xs_usage |NN const CV *const cv \ |NN const char *const params #if defined(PERL_IMPLICIT_CONTEXT) Afnrp |void |croak_nocontext|NULLOK const char* pat|... -Afnp |OP* |die_nocontext |NN const char* pat|... +Afnp |OP* |die_nocontext |NULLOK const char* pat|... Afnp |void |deb_nocontext |NN const char* pat|... Afnp |char* |form_nocontext |NN const char* pat|... Anp |void |load_module_nocontext|U32 flags|NN SV* name|NULLOK SV* ver|... @@ -201,27 +285,21 @@ pPR |const char* |get_no_modify pPR |U32* |get_opargs ApPR |PPADDR_t*|get_ppaddr : Used by CXINC, which appears to be in widespread use -EXpR |I32 |cxinc +ApR |I32 |cxinc Afp |void |deb |NN const char* pat|... Ap |void |vdeb |NN const char* pat|NULLOK va_list* args Ap |void |debprofdump Ap |I32 |debop |NN const OP* o Ap |I32 |debstack Ap |I32 |debstackptrs -Ap |char* |delimcpy |NN char* to|NN const char* toend|NN const char* from \ +Anp |char* |delimcpy |NN char* to|NN const char* toend|NN const char* from \ |NN const char* fromend|int delim|NN I32* retlen : Used in op.c, perl.c pM |void |delete_eval_scope -: Used in various files -p |void |deprecate |NN const char *const s -: Used in various files -p |void |deprecate_old |NN const char *const s -Afp |OP* |die |NULLOK const char* pat|... -#if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT) -s |OP* |vdie |NULLOK const char* pat|NULLOK va_list* args -#endif +Apd |OP* |die_sv |NN SV *baseex +Afpd |OP* |die |NULLOK const char* pat|... : Used in util.c -p |OP* |die_where |NULLOK const char* message|STRLEN msglen +pr |void |die_unwind |NN SV* msv Ap |void |dounwind |I32 cxix : FIXME pmb |bool |do_aexec |NULLOK SV* really|NN SV** mark|NN SV** sp @@ -229,7 +307,6 @@ pmb |bool |do_aexec |NULLOK SV* really|NN SV** mark|NN SV** sp p |bool |do_aexec5 |NULLOK SV* really|NN SV** mark|NN SV** sp|int fd|int do_report Ap |int |do_binmode |NN PerlIO *fp|int iotype|int mode : Used in pp.c -p |void |do_chop |NN SV *astr|NN SV *sv Ap |bool |do_close |NULLOK GV* gv|bool not_implicit : Defined in doio.c, used only in pp_sys.c p |bool |do_eof |NN GV* gv @@ -249,7 +326,7 @@ Ap |int |do_spawn_nowait|NN char* cmd p |bool |do_exec3 |NN const char *incmd|int fd|int do_report #endif p |void |do_execfree -#if defined(PERL_IN_DOIO_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_DOIO_C) s |void |exec_failed |NN const char *cmd|int fd|int do_report #endif #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM) @@ -267,8 +344,8 @@ p |I32 |do_semop |NN SV** mark|NN SV** sp p |I32 |do_shmio |I32 optype|NN SV** mark|NN SV** sp #endif Ap |void |do_join |NN SV *sv|NN SV *delim|NN SV **mark|NN SV **sp -: Used in pp.c and pp_hot.c -p |OP* |do_kv +: Used in pp.c and pp_hot.c, prototype generated by regen/opcode.pl +: p |OP* |do_kv Apmb |bool |do_open |NN GV* gv|NN const char* name|I32 len|int as_raw \ |int rawmode|int rawperm|NULLOK PerlIO* supplied_fp Ap |bool |do_open9 |NN GV *gv|NN const char *name|I32 len|int as_raw \ @@ -282,8 +359,6 @@ Ap |bool |do_openn |NN GV *gv|NN const char *oname|I32 len \ p |bool |do_print |NULLOK SV* sv|NN PerlIO* fp : Used in pp_sys.c pR |OP* |do_readline -: Used in pp.c -p |I32 |do_chomp |NN SV* sv : Defined in doio.c, used only in pp_sys.c p |bool |do_seek |NULLOK GV* gv|Off_t pos|int whence Ap |void |do_sprintf |NN SV* sv|I32 len|NN SV** sarg @@ -303,6 +378,7 @@ p |void |do_vop |I32 optype|NN SV* sv|NN SV* left|NN SV* right p |OP* |dofile |NN OP* term|I32 force_builtin ApR |I32 |dowantarray Ap |void |dump_all +p |void |dump_all_perl |bool justperl Ap |void |dump_eval #if defined(DUMP_FDS) Ap |void |dump_fds |NN char* s @@ -312,14 +388,16 @@ Ap |void |gv_dump |NN GV* gv Ap |void |op_dump |NN const OP *o Ap |void |pmop_dump |NULLOK PMOP* pm Ap |void |dump_packsubs |NN const HV* stash +p |void |dump_packsubs_perl |NN const HV* stash|bool justperl Ap |void |dump_sub |NN const GV* gv +p |void |dump_sub_perl |NN const GV* gv|bool justperl Apd |void |fbm_compile |NN SV* sv|U32 flags ApdR |char* |fbm_instr |NN unsigned char* big|NN unsigned char* bigend \ |NN SV* littlestr|U32 flags : Defined in util.c, used only in perl.c p |char* |find_script |NN const char *scriptname|bool dosearch \ |NULLOK const char *const *const search_ext|I32 flags -#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_OP_C) s |OP* |force_list |NULLOK OP* arg : FIXME s |OP* |fold_constants |NN OP *o @@ -327,7 +405,7 @@ s |OP* |fold_constants |NN OP *o Afpd |char* |form |NN const char* pat|... Ap |char* |vform |NN const char* pat|NULLOK va_list* args Ap |void |free_tmps -#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_OP_C) s |OP* |gen_constant_list|NULLOK OP* o #endif #if !defined(HAS_GETENV_LEN) @@ -338,9 +416,10 @@ p |char* |getenv_len |NN const char *env_elem|NN unsigned long *len pox |void |get_db_sub |NULLOK SV **svp|NN CV *cv Ap |void |gp_free |NULLOK GV* gv Ap |GP* |gp_ref |NULLOK GP* gp -Ap |GV* |gv_AVadd |NN GV* gv -Ap |GV* |gv_HVadd |NN GV* gv -Ap |GV* |gv_IOadd |NN GV* gv +Ap |GV* |gv_add_by_type |NULLOK GV *gv|svtype type +Apmb |GV* |gv_AVadd |NULLOK GV *gv +Apmb |GV* |gv_HVadd |NULLOK GV *gv +Apmb |GV* |gv_IOadd |NULLOK GV* gv ApR |GV* |gv_autoload4 |NULLOK HV* stash|NN const char* name|STRLEN len|I32 method Ap |void |gv_check |NN const HV* stash Ap |void |gv_efullname |NN SV* sv|NN const GV* gv @@ -354,7 +433,7 @@ Apd |GV* |gv_fetchmeth_autoload |NULLOK HV* stash|NN const char* name|STRLEN len Apdmb |GV* |gv_fetchmethod |NN HV* stash|NN const char* name Apd |GV* |gv_fetchmethod_autoload|NN HV* stash|NN const char* name \ |I32 autoload -ApdM |GV* |gv_fetchmethod_flags|NN HV* stash|NN const char* name \ +ApM |GV* |gv_fetchmethod_flags|NN HV* stash|NN const char* name \ |U32 flags Ap |GV* |gv_fetchpv |NN const char *nambeg|I32 add|const svtype sv_type Ap |void |gv_fullname |NN SV* sv|NN const GV* gv @@ -362,14 +441,17 @@ Apmb |void |gv_fullname3 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix Ap |void |gv_fullname4 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix|bool keepmain : Used in scope.c pMox |GP * |newGP |NN GV *const gv +pX |void |cvgv_set |NN CV* cv|NULLOK GV* gv +pX |void |cvstash_set |NN CV* cv|NULLOK HV* stash Ap |void |gv_init |NN GV* gv|NULLOK HV* stash|NN const char* name|STRLEN len|int multi Ap |void |gv_name_set |NN GV* gv|NN const char *name|U32 len|U32 flags +XMpd |void |gv_try_downgrade|NN GV* gv Apd |HV* |gv_stashpv |NN const char* name|I32 flags Apd |HV* |gv_stashpvn |NN const char* name|U32 namelen|I32 flags Apd |HV* |gv_stashsv |NN SV* sv|I32 flags Apd |void |hv_clear |NULLOK HV *hv : used in SAVEHINTS() and op.c -poM |HV * |hv_copy_hints_hv|NULLOK HV *const ohv +ApdR |HV * |hv_copy_hints_hv|NULLOK HV *const ohv Ap |void |hv_delayfree_ent|NN HV *hv|NULLOK HE *entry Abmd |SV* |hv_delete |NULLOK HV *hv|NN const char *key|I32 klen \ |I32 flags @@ -385,6 +467,7 @@ Ap |void* |hv_common |NULLOK HV *hv|NULLOK SV *keysv \ Ap |void* |hv_common_key_len|NULLOK HV *hv|NN const char *key \ |I32 klen_i32|const int action|NULLOK SV *val \ |const U32 hash +Apod |STRLEN |hv_fill |NN HV const *const hv Ap |void |hv_free_ent |NN HV *hv|NULLOK HE *entryK Apd |I32 |hv_iterinit |NN HV *hv ApdR |char* |hv_iterkey |NN HE* entry|NN I32* retlen @@ -395,50 +478,66 @@ ApMdR |HE* |hv_iternext_flags|NN HV *hv|I32 flags ApdR |SV* |hv_iterval |NN HV *hv|NN HE *entry Ap |void |hv_ksplit |NN HV *hv|IV newmax Apdbm |void |hv_magic |NN HV *hv|NULLOK GV *gv|int how -: Used in B.xs -XEdpoM |HV * |refcounted_he_chain_2hv|NULLOK const struct refcounted_he *c -: Used in APItest.xs -XEpoM |SV * |refcounted_he_fetch|NULLOK const struct refcounted_he *chain \ - |NULLOK SV *keysv|NULLOK const char *key \ - |STRLEN klen, int flags, U32 hash -: Used in various files -dpoM |void |refcounted_he_free|NULLOK struct refcounted_he *he -: Used in various files -XEdpoM |struct refcounted_he *|refcounted_he_new \ - |NULLOK struct refcounted_he *const parent \ - |NULLOK SV *const key|NULLOK SV *const value -#if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT) -s |struct refcounted_he * |refcounted_he_new_common \ - |NULLOK struct refcounted_he *const parent \ - |NN const char *const key_p \ - |const STRLEN key_len|const char flags \ - |char value_type|NN const void *value \ - |const STRLEN value_len -#endif +#if defined(PERL_IN_HV_C) +s |SV * |refcounted_he_value |NN const struct refcounted_he *he +#endif +Xpd |HV * |refcounted_he_chain_2hv|NULLOK const struct refcounted_he *c|U32 flags +Xpd |SV * |refcounted_he_fetch_pvn|NULLOK const struct refcounted_he *chain \ + |NN const char *keypv|STRLEN keylen|U32 hash|U32 flags +Xpd |SV * |refcounted_he_fetch_pv|NULLOK const struct refcounted_he *chain \ + |NN const char *key|U32 hash|U32 flags +Xpd |SV * |refcounted_he_fetch_sv|NULLOK const struct refcounted_he *chain \ + |NN SV *key|U32 hash|U32 flags +Xpd |struct refcounted_he *|refcounted_he_new_pvn \ + |NULLOK struct refcounted_he *parent \ + |NN const char *keypv|STRLEN keylen \ + |U32 hash|NULLOK SV *value|U32 flags +Xpd |struct refcounted_he *|refcounted_he_new_pv \ + |NULLOK struct refcounted_he *parent \ + |NN const char *key \ + |U32 hash|NULLOK SV *value|U32 flags +Xpd |struct refcounted_he *|refcounted_he_new_sv \ + |NULLOK struct refcounted_he *parent \ + |NN SV *key \ + |U32 hash|NULLOK SV *value|U32 flags +Xpd |void |refcounted_he_free|NULLOK struct refcounted_he *he +Xpd |struct refcounted_he *|refcounted_he_inc|NULLOK struct refcounted_he *he Abmd |SV** |hv_store |NULLOK HV *hv|NULLOK const char *key \ |I32 klen|NULLOK SV *val|U32 hash Abmd |HE* |hv_store_ent |NULLOK HV *hv|NULLOK SV *key|NULLOK SV *val\ |U32 hash -AbmdM |SV** |hv_store_flags |NULLOK HV *hv|NULLOK const char *key \ +AbmM |SV** |hv_store_flags |NULLOK HV *hv|NULLOK const char *key \ |I32 klen|NULLOK SV *val|U32 hash|int flags -Apd |void |hv_undef |NULLOK HV *hv -ApP |I32 |ibcmp |NN const char* a|NN const char* b|I32 len -ApP |I32 |ibcmp_locale |NN const char* a|NN const char* b|I32 len -Apd |I32 |ibcmp_utf8 |NN const char *s1|NULLOK char **pe1|UV l1 \ +Amd |void |hv_undef |NULLOK HV *hv +poX |void |hv_undef_flags |NULLOK HV *hv|U32 flags +Am |I32 |ibcmp |NN const char* a|NN const char* b|I32 len +AnpP |I32 |foldEQ |NN const char* a|NN const char* b|I32 len +Am |I32 |ibcmp_locale |NN const char* a|NN const char* b|I32 len +AnpP |I32 |foldEQ_locale |NN const char* a|NN const char* b|I32 len +Am |I32 |ibcmp_utf8 |NN const char *s1|NULLOK char **pe1|UV l1 \ + |bool u1|NN const char *s2|NULLOK char **pe2 \ + |UV l2|bool u2 +Amd |I32 |foldEQ_utf8 |NN const char *s1|NULLOK char **pe1|UV l1 \ |bool u1|NN const char *s2|NULLOK char **pe2 \ |UV l2|bool u2 -#if defined(PERL_IN_DOIO_C) || defined(PERL_DECL_PROT) +AMp |I32 |foldEQ_utf8_flags |NN const char *s1|NULLOK char **pe1|UV l1 \ + |bool u1|NN const char *s2|NULLOK char **pe2 \ + |UV l2|bool u2|U32 flags +AnpP |I32 |foldEQ_latin1 |NN const char* a|NN const char* b|I32 len +#if defined(PERL_IN_DOIO_C) sR |bool |ingroup |Gid_t testgid|bool effective #endif : Used in toke.c p |void |init_argv_symbols|int argc|NN char **argv +: Used in pp_ctl.c +po |void |init_dbargs : Used in mg.c p |void |init_debugger Ap |void |init_stacks Ap |void |init_tm |NN struct tm *ptm : Used in perly.y pd |U32 |intro_my -ApPR |char* |instr |NN const char* big|NN const char* little +AnpPR |char* |instr |NN const char* big|NN const char* little : Used in sv.c p |bool |io_close |NN IO* io|bool not_implicit : Used in perly.y @@ -448,7 +547,6 @@ ApPR |U32 |to_uni_upper_lc|U32 c ApPR |U32 |to_uni_title_lc|U32 c ApPR |U32 |to_uni_lower_lc|U32 c ApPR |bool |is_uni_alnum |UV c -ApPR |bool |is_uni_alnumc |UV c ApPR |bool |is_uni_idfirst |UV c ApPR |bool |is_uni_alpha |UV c ApPR |bool |is_uni_ascii |UV c @@ -466,7 +564,6 @@ Ap |UV |to_uni_title |UV c|NN U8 *p|NN STRLEN *lenp Ap |UV |to_uni_lower |UV c|NN U8 *p|NN STRLEN *lenp Ap |UV |to_uni_fold |UV c|NN U8 *p|NN STRLEN *lenp ApPR |bool |is_uni_alnum_lc|UV c -ApPR |bool |is_uni_alnumc_lc|UV c ApPR |bool |is_uni_idfirst_lc|UV c ApPR |bool |is_uni_alpha_lc|UV c ApPR |bool |is_uni_ascii_lc|UV c @@ -479,19 +576,24 @@ ApPR |bool |is_uni_lower_lc|UV c ApPR |bool |is_uni_print_lc|UV c ApPR |bool |is_uni_punct_lc|UV c ApPR |bool |is_uni_xdigit_lc|UV c -Apd |STRLEN |is_utf8_char |NN const U8 *s -Apd |bool |is_utf8_string |NN const U8 *s|STRLEN len -Apdmb |bool |is_utf8_string_loc|NN const U8 *s|STRLEN len|NULLOK const U8 **p -Apd |bool |is_utf8_string_loclen|NN const U8 *s|STRLEN len|NULLOK const U8 **ep|NULLOK STRLEN *el +Anpd |bool |is_ascii_string|NN const U8 *s|STRLEN len +Anpd |STRLEN |is_utf8_char |NN const U8 *s +Anpd |bool |is_utf8_string |NN const U8 *s|STRLEN len +Anpdmb |bool |is_utf8_string_loc|NN const U8 *s|STRLEN len|NULLOK const U8 **p +Anpd |bool |is_utf8_string_loclen|NN const U8 *s|STRLEN len|NULLOK const U8 **ep|NULLOK STRLEN *el ApR |bool |is_utf8_alnum |NN const U8 *p -ApR |bool |is_utf8_alnumc |NN const U8 *p ApR |bool |is_utf8_idfirst|NN const U8 *p +ApR |bool |is_utf8_xidfirst|NN const U8 *p ApR |bool |is_utf8_idcont |NN const U8 *p +ApR |bool |is_utf8_xidcont |NN const U8 *p ApR |bool |is_utf8_alpha |NN const U8 *p ApR |bool |is_utf8_ascii |NN const U8 *p ApR |bool |is_utf8_space |NN const U8 *p +ApR |bool |is_utf8_perl_space |NN const U8 *p +ApR |bool |is_utf8_perl_word |NN const U8 *p ApR |bool |is_utf8_cntrl |NN const U8 *p ApR |bool |is_utf8_digit |NN const U8 *p +ApR |bool |is_utf8_posix_digit |NN const U8 *p ApR |bool |is_utf8_graph |NN const U8 *p ApR |bool |is_utf8_upper |NN const U8 *p ApR |bool |is_utf8_lower |NN const U8 *p @@ -499,22 +601,56 @@ ApR |bool |is_utf8_print |NN const U8 *p ApR |bool |is_utf8_punct |NN const U8 *p ApR |bool |is_utf8_xdigit |NN const U8 *p ApR |bool |is_utf8_mark |NN const U8 *p +EXpR |bool |is_utf8_X_begin |NN const U8 *p +EXpR |bool |is_utf8_X_extend |NN const U8 *p +EXpR |bool |is_utf8_X_prepend |NN const U8 *p +EXpR |bool |is_utf8_X_non_hangul |NN const U8 *p +EXpR |bool |is_utf8_X_L |NN const U8 *p +EXpR |bool |is_utf8_X_LV |NN const U8 *p +EXpR |bool |is_utf8_X_LVT |NN const U8 *p +EXpR |bool |is_utf8_X_LV_LVT_V |NN const U8 *p +EXpR |bool |is_utf8_X_T |NN const U8 *p +EXpR |bool |is_utf8_X_V |NN const U8 *p : Used in perly.y p |OP* |jmaybe |NN OP *o : Used in pp.c pP |I32 |keyword |NN const char *name|I32 len|bool all_keywords +#if defined(PERL_IN_OP_C) +s |OP* |opt_scalarhv |NN OP* rep_op +s |OP* |is_inplace_av |NN OP* o|NULLOK OP* oright +#endif Ap |void |leave_scope |I32 base -: Used in pp_ctl.c, and by Data::Alias -EXp |void |lex_end +: Public lexer API +AMpd |void |lex_start |NULLOK SV* line|NULLOK PerlIO *rsfp|U32 flags +AMpd |bool |lex_bufutf8 +AMpd |char* |lex_grow_linestr|STRLEN len +AMpd |void |lex_stuff_pvn |NN const char* pv|STRLEN len|U32 flags +AMpd |void |lex_stuff_pv |NN const char* pv|U32 flags +AMpd |void |lex_stuff_sv |NN SV* sv|U32 flags +AMpd |void |lex_unstuff |NN char* ptr +AMpd |void |lex_read_to |NN char* ptr +AMpd |void |lex_discard_to |NN char* ptr +AMpd |bool |lex_next_chunk |U32 flags +AMpd |I32 |lex_peek_unichar|U32 flags +AMpd |I32 |lex_read_unichar|U32 flags +AMpd |void |lex_read_space |U32 flags +: Public parser API +AMpd |OP* |parse_arithexpr|U32 flags +AMpd |OP* |parse_termexpr |U32 flags +AMpd |OP* |parse_listexpr |U32 flags +AMpd |OP* |parse_fullexpr |U32 flags +AMpd |OP* |parse_block |U32 flags +AMpd |OP* |parse_barestmt |U32 flags +AMpd |SV* |parse_label |U32 flags +AMpd |OP* |parse_fullstmt |U32 flags +AMpd |OP* |parse_stmtseq |U32 flags : Used in various files -p |void |lex_start |NULLOK SV* line|NULLOK PerlIO *rsfp|bool new_filter Ap |void |op_null |NN OP* o : FIXME. Used by Data::Alias EXp |void |op_clear |NN OP* o Ap |void |op_refcnt_lock Ap |void |op_refcnt_unlock -#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT) -s |OP* |linklist |NN OP *o +#if defined(PERL_IN_OP_C) s |OP* |listkids |NULLOK OP* o #endif : Used in S_doeval in pp_ctl.c @@ -525,6 +661,10 @@ Ap |void |vload_module|U32 flags|NN SV* name|NULLOK SV* ver|NULLOK va_list* args p |OP* |localize |NN OP *o|I32 lex ApdR |I32 |looks_like_number|NN SV *const sv Apd |UV |grok_bin |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result +#ifdef PERL_IN_DQUOTE_STATIC_C +EMsR |char |grok_bslash_c |const char source|const bool utf8|const bool output_warning +EMsR |bool |grok_bslash_o |NN const char* s|NN UV* uv|NN STRLEN* len|NN const char** error_msg|const bool output_warning +#endif Apd |UV |grok_hex |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result Apd |int |grok_number |NN const char *pv|STRLEN len|NULLOK UV *valuep ApdR |bool |grok_numeric_radix|NN const char **sp|NN const char *send @@ -533,6 +673,7 @@ Apd |UV |grok_oct |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV p |int |magic_clearenv |NN SV* sv|NN MAGIC* mg p |int |magic_clear_all_env|NN SV* sv|NN MAGIC* mg dp |int |magic_clearhint|NN SV* sv|NN MAGIC* mg +dp |int |magic_clearhints|NN SV* sv|NN MAGIC* mg p |int |magic_clearisa |NULLOK SV* sv|NN MAGIC* mg p |int |magic_clearpack|NN SV* sv|NN MAGIC* mg p |int |magic_clearsig |NN SV* sv|NN MAGIC* mg @@ -577,14 +718,18 @@ p |int |magic_setutf8 |NN SV* sv|NN MAGIC* mg p |int |magic_set_all_env|NN SV* sv|NN MAGIC* mg p |U32 |magic_sizepack |NN SV* sv|NN MAGIC* mg p |int |magic_wipepack |NN SV* sv|NN MAGIC* mg +pod |SV* |magic_methcall |NN SV *sv|NN const MAGIC *mg \ + |NN const char *meth|U32 flags \ + |U32 argc|... Ap |void |markstack_grow #if defined(USE_LOCALE_COLLATE) p |int |magic_setcollxfrm|NN SV* sv|NN MAGIC* mg : Defined in locale.c, used only in sv.c p |char* |mem_collxfrm |NN const char* s|STRLEN len|NN STRLEN* xlen #endif -Afp |SV* |mess |NN const char* pat|... -Ap |SV* |vmess |NN const char* pat|NULLOK va_list* args +Afpd |SV* |mess |NN const char* pat|... +Apd |SV* |mess_sv |NN SV* basemsg|bool consume +Apd |SV* |vmess |NN const char* pat|NULLOK va_list* args : FIXME - either make it public, or stop exporting it. (Data::Alias uses this) : Used in gv.c, op.c, toke.c EXp |void |qerror |NN SV* err @@ -596,14 +741,17 @@ Apd |int |mg_copy |NN SV *sv|NN SV *nsv|NULLOK const char *key \ : Defined in mg.c, used only in scope.c pd |void |mg_localize |NN SV* sv|NN SV* nsv|bool setmagic ApdR |MAGIC* |mg_find |NULLOK const SV* sv|int type +ApdR |MAGIC* |mg_findext |NULLOK const SV* sv|int type|NULLOK const MGVTBL *vtbl Apd |int |mg_free |NN SV* sv +Apd |void |mg_free_type |NN SV* sv|int how Apd |int |mg_get |NN SV* sv Apd |U32 |mg_length |NN SV* sv Apd |void |mg_magical |NN SV* sv Apd |int |mg_set |NN SV* sv Ap |I32 |mg_size |NN SV* sv Ap |void |mini_mktime |NN struct tm *ptm -: Used by MOD(), which Data::Alias uses +AMpd |OP* |op_lvalue |NULLOK OP* o|I32 type +: To be removed after 5.14 (see [perl #78908]): EXp |OP* |mod |NULLOK OP* o|I32 type : Used in op.c and pp_sys.c p |int |mode_from_discipline|NULLOK const char* s|STRLEN len @@ -621,7 +769,8 @@ Ap |I32 |my_fflush_all Anp |Pid_t |my_fork Anp |void |atfork_lock Anp |void |atfork_unlock -Ap |I32 |my_lstat +Apmb |I32 |my_lstat +pX |I32 |my_lstat_flags |NULLOK const U32 flags #if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP) AnpP |I32 |my_memcmp |NN const char* s1|NN const char* s2|I32 len #endif @@ -632,7 +781,8 @@ Ap |I32 |my_pclose |NULLOK PerlIO* ptr Ap |PerlIO*|my_popen |NN const char* cmd|NN const char* mode Ap |PerlIO*|my_popen_list |NN const char* mode|int n|NN SV ** args Ap |void |my_setenv |NULLOK const char* nam|NULLOK const char* val -Ap |I32 |my_stat +Apmb |I32 |my_stat +pX |I32 |my_stat_flags |NULLOK const U32 flags Ap |char * |my_strftime |NN const char *fmt|int sec|int min|int hour|int mday|int mon|int year|int wday|int yday|int isdst #if defined(MYSWAP) ApPa |short |my_swap |short s @@ -644,27 +794,27 @@ p |void |my_unexec Apa |OP* |newANONLIST |NULLOK OP* o Apa |OP* |newANONHASH |NULLOK OP* o Ap |OP* |newANONSUB |I32 floor|NULLOK OP* proto|NULLOK OP* block -Apa |OP* |newASSIGNOP |I32 flags|NULLOK OP* left|I32 optype|NULLOK OP* right -Apa |OP* |newCONDOP |I32 flags|NN OP* first|NULLOK OP* trueop|NULLOK OP* falseop +Apda |OP* |newASSIGNOP |I32 flags|NULLOK OP* left|I32 optype|NULLOK OP* right +Apda |OP* |newCONDOP |I32 flags|NN OP* first|NULLOK OP* trueop|NULLOK OP* falseop Apd |CV* |newCONSTSUB |NULLOK HV* stash|NULLOK const char* name|NULLOK SV* sv #ifdef PERL_MAD Ap |OP* |newFORM |I32 floor|NULLOK OP* o|NULLOK OP* block #else Ap |void |newFORM |I32 floor|NULLOK OP* o|NULLOK OP* block #endif -Apa |OP* |newFOROP |I32 flags|NULLOK char* label|line_t forline \ - |NULLOK OP* sv|NN OP* expr|NULLOK OP* block|NULLOK OP* cont -Apa |OP* |newGIVENOP |NN OP* cond|NN OP* block|PADOFFSET defsv_off -Apa |OP* |newLOGOP |I32 optype|I32 flags|NN OP *first|NN OP *other -Apa |OP* |newLOOPEX |I32 type|NN OP* label -Apa |OP* |newLOOPOP |I32 flags|I32 debuggable|NULLOK OP* expr|NULLOK OP* block -Apa |OP* |newNULLLIST -Apa |OP* |newOP |I32 optype|I32 flags +Apda |OP* |newFOROP |I32 flags|NULLOK OP* sv|NN OP* expr|NULLOK OP* block|NULLOK OP* cont +Apda |OP* |newGIVENOP |NN OP* cond|NN OP* block|PADOFFSET defsv_off +Apda |OP* |newLOGOP |I32 optype|I32 flags|NN OP *first|NN OP *other +Apda |OP* |newLOOPEX |I32 type|NN OP* label +Apda |OP* |newLOOPOP |I32 flags|I32 debuggable|NULLOK OP* expr|NULLOK OP* block +Apda |OP* |newNULLLIST +Apda |OP* |newOP |I32 optype|I32 flags Ap |void |newPROG |NN OP* o -Apa |OP* |newRANGE |I32 flags|NN OP* left|NN OP* right -Apa |OP* |newSLICEOP |I32 flags|NULLOK OP* subscript|NULLOK OP* listop -Apa |OP* |newSTATEOP |I32 flags|NULLOK char* label|NULLOK OP* o -Ap |CV* |newSUB |I32 floor|NULLOK OP* o|NULLOK OP* proto|NULLOK OP* block +Apda |OP* |newRANGE |I32 flags|NN OP* left|NN OP* right +Apda |OP* |newSLICEOP |I32 flags|NULLOK OP* subscript|NULLOK OP* listop +Apda |OP* |newSTATEOP |I32 flags|NULLOK char* label|NULLOK OP* o +Abm |CV* |newSUB |I32 floor|NULLOK OP* o|NULLOK OP* proto \ + |NULLOK OP* block ApM |CV * |newXS_flags |NULLOK const char *name|NN XSUBADDR_t subaddr\ |NN const char *const filename \ |NULLOK const char *const proto|U32 flags @@ -672,26 +822,26 @@ Apd |CV* |newXS |NULLOK const char *name|NN XSUBADDR_t subaddr\ |NN const char *filename AmdbR |AV* |newAV Apa |OP* |newAVREF |NN OP* o -Apa |OP* |newBINOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last +Apda |OP* |newBINOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last Apa |OP* |newCVREF |I32 flags|NULLOK OP* o -Apa |OP* |newGVOP |I32 type|I32 flags|NN GV* gv +Apda |OP* |newGVOP |I32 type|I32 flags|NN GV* gv Apa |GV* |newGVgen |NN const char* pack Apa |OP* |newGVREF |I32 type|NULLOK OP* o ApaR |OP* |newHVREF |NN OP* o AmdbR |HV* |newHV ApaR |HV* |newHVhv |NULLOK HV *hv -Apa |IO* |newIO -Apa |OP* |newLISTOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last +Apabm |IO* |newIO +Apda |OP* |newLISTOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last #ifdef USE_ITHREADS -Apa |OP* |newPADOP |I32 type|I32 flags|NN SV* sv +Apda |OP* |newPADOP |I32 type|I32 flags|NN SV* sv #endif -Apa |OP* |newPMOP |I32 type|I32 flags -Apa |OP* |newPVOP |I32 type|I32 flags|NULLOK char* pv +Apda |OP* |newPMOP |I32 type|I32 flags +Apda |OP* |newPVOP |I32 type|I32 flags|NULLOK char* pv Apa |SV* |newRV |NN SV *const sv Apda |SV* |newRV_noinc |NN SV *const sv Apda |SV* |newSV |const STRLEN len Apa |OP* |newSVREF |NN OP* o -Apa |OP* |newSVOP |I32 type|I32 flags|NN SV* sv +Apda |OP* |newSVOP |I32 type|I32 flags|NN SV* sv Apda |SV* |newSViv |const IV i Apda |SV* |newSVuv |const UV u Apda |SV* |newSVnv |const NV n @@ -700,30 +850,40 @@ Apda |SV* |newSVpvn |NULLOK const char *const s|const STRLEN len Apda |SV* |newSVpvn_flags |NULLOK const char *const s|const STRLEN len|const U32 flags Apda |SV* |newSVhek |NULLOK const HEK *const hek Apda |SV* |newSVpvn_share |NULLOK const char* s|I32 len|U32 hash +Apda |SV* |newSVpv_share |NULLOK const char* s|U32 hash Afpda |SV* |newSVpvf |NN const char *const pat|... Apa |SV* |vnewSVpvf |NN const char *const pat|NULLOK va_list *const args Apd |SV* |newSVrv |NN SV *const rv|NULLOK const char *const classname Apda |SV* |newSVsv |NULLOK SV *const old Apda |SV* |newSV_type |const svtype type -Apa |OP* |newUNOP |I32 type|I32 flags|NULLOK OP* first -Apa |OP* |newWHENOP |NULLOK OP* cond|NN OP* block -Apa |OP* |newWHILEOP |I32 flags|I32 debuggable|NULLOK LOOP* loop \ - |I32 whileline|NULLOK OP* expr|NULLOK OP* block|NULLOK OP* cont \ +Apda |OP* |newUNOP |I32 type|I32 flags|NULLOK OP* first +Apda |OP* |newWHENOP |NULLOK OP* cond|NN OP* block +Apda |OP* |newWHILEOP |I32 flags|I32 debuggable|NULLOK LOOP* loop \ + |NULLOK OP* expr|NULLOK OP* block|NULLOK OP* cont \ |I32 has_my +Apd |CV* |rv2cv_op_cv |NN OP *cvop|U32 flags +Apd |OP* |ck_entersub_args_list|NN OP *entersubop +Apd |OP* |ck_entersub_args_proto|NN OP *entersubop|NN GV *namegv|NN SV *protosv +Apd |OP* |ck_entersub_args_proto_or_list|NN OP *entersubop|NN GV *namegv|NN SV *protosv +Apd |void |cv_get_call_checker|NN CV *cv|NN Perl_call_checker *ckfun_p|NN SV **ckobj_p +Apd |void |cv_set_call_checker|NN CV *cv|NN Perl_call_checker ckfun|NN SV *ckobj Apa |PERL_SI*|new_stackinfo|I32 stitems|I32 cxitems Ap |char* |scan_vstring |NN const char *s|NN const char *const e \ |NN SV *sv Apd |const char* |scan_version |NN const char *s|NN SV *rv|bool qv +Apd |const char* |prescan_version |NN const char *s\ + |bool strict|NULLOK const char** errstr|NULLOK bool *sqv\ + |NULLOK int *ssaw_decimal|NULLOK int *swidth|NULLOK bool *salpha Apd |SV* |new_version |NN SV *ver Apd |SV* |upg_version |NN SV *ver|bool qv -Apd |bool |vverify |NN SV *vs +Apd |SV* |vverify |NN SV *vs Apd |SV* |vnumify |NN SV *vs Apd |SV* |vnormal |NN SV *vs Apd |SV* |vstringify |NN SV *vs Apd |int |vcmp |NN SV *lhv|NN SV *rhv : Used in pp_hot.c and pp_sys.c p |PerlIO*|nextargv |NN GV* gv -ApP |char* |ninstr |NN const char* big|NN const char* bigend \ +AnpP |char* |ninstr |NN const char* big|NN const char* bigend \ |NN const char* little|NN const char* lend Ap |void |op_free |NULLOK OP* arg : Used in perly.y @@ -732,29 +892,37 @@ p |OP* |package |NN OP* o #else p |void |package |NN OP* o #endif +: Used in perly.y +p |void |package_version|NN OP* v : Used in op.c pd |PADOFFSET|pad_alloc |I32 optype|U32 tmptype : Used in toke.c and perly.y -p |PADOFFSET|allocmy |NN const char *const name +p |PADOFFSET|allocmy |NN const char *const name|const STRLEN len\ + |const U32 flags : Used in op.c and toke.c -pdR |PADOFFSET|pad_findmy |NN const char* name -Ap |PADOFFSET|find_rundefsvoffset | +AMpdR |PADOFFSET|pad_findmy |NN const char* name|STRLEN len|U32 flags +ApD |PADOFFSET|find_rundefsvoffset | +: Used in pp.c +Ap |SV* |find_rundefsv | : Used in perly.y pR |OP* |oopsAV |NN OP* o : Used in perly.y pR |OP* |oopsHV |NN OP* o : Defined in pad.c, used only in op.c pd |void |pad_leavemy +#ifdef DEBUGGING Apd |SV* |pad_sv |PADOFFSET po +#endif : Defined in pad.c, used only in op.c pd |void |pad_free |PADOFFSET po -#if defined(PERL_IN_PAD_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PAD_C) sd |void |pad_reset #endif : Used in op.c pd |void |pad_swipe |PADOFFSET po|bool refadjust -: FIXME +: peephole optimiser p |void |peep |NULLOK OP* o +p |void |rpeep |NULLOK OP* o : Defined in doio.c, used only in pp_hot.c dopM |PerlIO*|start_glob |NN SV *tmpglob|NN IO *io #if defined(USE_REENTRANT_API) @@ -763,47 +931,46 @@ Ap |void |reentrant_init Ap |void |reentrant_free Anp |void* |reentrant_retry|NN const char *f|... #endif +: "Very" special - can't use the O flag for this one: +: (The rename from perl_atexit to Perl_call_atexit was in 864dbfa3ca8032ef) Ap |void |call_atexit |ATEXIT_t fn|NULLOK void *ptr -Apd |I32 |call_argv |NN const char* sub_name|I32 flags|NN char** argv -Apd |I32 |call_method |NN const char* methname|I32 flags -Apd |I32 |call_pv |NN const char* sub_name|I32 flags -Apd |I32 |call_sv |NN SV* sv|VOL I32 flags +ApdO |I32 |call_argv |NN const char* sub_name|I32 flags|NN char** argv +ApdO |I32 |call_method |NN const char* methname|I32 flags +ApdO |I32 |call_pv |NN const char* sub_name|I32 flags +ApdO |I32 |call_sv |NN SV* sv|VOL I32 flags Ap |void |despatch_signals Ap |OP * |doref |NN OP *o|I32 type|bool set_op_ref -Apd |SV* |eval_pv |NN const char* p|I32 croak_on_error -Apd |I32 |eval_sv |NN SV* sv|I32 flags -Apd |SV* |get_sv |NN const char *name|I32 flags -Apd |AV* |get_av |NN const char *name|I32 flags -Apd |HV* |get_hv |NN const char *name|I32 flags -Apd |CV* |get_cv |NN const char* name|I32 flags +ApdO |SV* |eval_pv |NN const char* p|I32 croak_on_error +ApdO |I32 |eval_sv |NN SV* sv|I32 flags +ApdO |SV* |get_sv |NN const char *name|I32 flags +ApdO |AV* |get_av |NN const char *name|I32 flags +ApdO |HV* |get_hv |NN const char *name|I32 flags +ApdO |CV* |get_cv |NN const char* name|I32 flags Apd |CV* |get_cvn_flags |NN const char* name|STRLEN len|I32 flags -Ap |int |init_i18nl10n |int printwarn -Ap |int |init_i18nl14n |int printwarn -Ap |void |new_collate |NULLOK const char* newcoll -Ap |void |new_ctype |NN const char* newctype -Ap |void |new_numeric |NULLOK const char* newcoll +ApO |int |init_i18nl10n |int printwarn +ApO |int |init_i18nl14n |int printwarn +ApO |void |new_collate |NULLOK const char* newcoll +ApO |void |new_ctype |NN const char* newctype +ApO |void |new_numeric |NULLOK const char* newcoll Ap |void |set_numeric_local Ap |void |set_numeric_radix Ap |void |set_numeric_standard -Apd |void |require_pv |NN const char* pv +ApdO |void |require_pv |NN const char* pv Apd |void |pack_cat |NN SV *cat|NN const char *pat|NN const char *patend \ |NN SV **beglist|NN SV **endlist|NN SV ***next_in_list|U32 flags Apd |void |packlist |NN SV *cat|NN const char *pat|NN const char *patend|NN SV **beglist|NN SV **endlist #if defined(PERL_USES_PL_PIDSTATUS) && defined(PERL_IN_UTIL_C) s |void |pidgone |Pid_t pid|int status #endif -Ap |void |pmflag |NN U32* pmfl|int ch : Used in perly.y p |OP* |pmruntime |NN OP *o|NN OP *expr|bool isreg -#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_OP_C) s |OP* |pmtrans |NN OP* o|NN OP* expr|NN OP* repl #endif Ap |void |pop_scope -: Used in perly.y -p |OP* |prepend_elem |I32 optype|NULLOK OP* head|NULLOK OP* tail Ap |void |push_scope Amb |OP* |ref |NULLOK OP* o|I32 type -#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_OP_C) s |OP* |refkids |NULLOK OP* o|I32 type #endif Ap |void |regdump |NN const regexp* r @@ -811,13 +978,18 @@ Ap |void |regdump |NN const regexp* r Ap |SV* |regclass_swash |NULLOK const regexp *prog \ |NN const struct regnode *node|bool doinit \ |NULLOK SV **listsvp|NULLOK SV **altsvp +#ifdef PERL_IN_REGCOMP_C +EMi |U8 |set_regclass_bit|NN struct RExC_state_t* pRExC_state|NN regnode* node|const U8 value|NN HV** invlist_ptr|NN AV** alternate_ptr +EMs |U8 |set_regclass_bit_fold|NN struct RExC_state_t *pRExC_state|NN regnode* node|const U8 value|NN HV** invlist_ptr|NN AV** alternate_ptr +EMs |void |add_alternate |NN AV** alternate_ptr|NN U8* string|STRLEN len +#endif Ap |I32 |pregexec |NN REGEXP * const prog|NN char* stringarg \ |NN char* strend|NN char* strbeg|I32 minend \ |NN SV* screamer|U32 nosave Ap |void |pregfree |NULLOK REGEXP* r Ap |void |pregfree2 |NN REGEXP *rx : FIXME - is anything in re using this now? -EXp |REGEXP*|reg_temp_copy |NN REGEXP* r +EXp |REGEXP*|reg_temp_copy |NULLOK REGEXP* ret_x|NN REGEXP* rx Ap |void |regfree_internal|NN REGEXP *const rx #if defined(USE_ITHREADS) Ap |void* |regdupe_internal|NN REGEXP * const r|NN CLONE_PARAMS* param @@ -828,6 +1000,9 @@ Ap |char* |re_intuit_start|NN REGEXP * const rx|NULLOK SV* sv|NN char* strpos \ |NN char* strend|const U32 flags \ |NULLOK re_scream_pos_data *data Ap |SV* |re_intuit_string|NN REGEXP *const r +#if defined(PERL_IN_DQUOTE_STATIC_C) +EiPR |I32 |regcurly |NN const char *s +#endif Ap |I32 |regexec_flags |NN REGEXP *const rx|NN char *stringarg \ |NN char *strend|NN char *strbeg|I32 minend \ |NN SV *sv|NULLOK void *data|U32 flags @@ -856,8 +1031,8 @@ EXp |SV*|reg_qr_package|NN REGEXP * const rx : FIXME - why the E? Ep |void |regprop |NULLOK const regexp *prog|NN SV* sv|NN const regnode* o -Ap |void |repeatcpy |NN char* to|NN const char* from|I32 len|I32 count -ApP |char* |rninstr |NN const char* big|NN const char* bigend \ +Anp |void |repeatcpy |NN char* to|NN const char* from|I32 len|I32 count +AnpP |char* |rninstr |NN const char* big|NN const char* bigend \ |NN const char* little|NN const char* lend Ap |Sighandler_t|rsignal |int i|Sighandler_t t : Used in pp_sys.c @@ -865,7 +1040,7 @@ p |int |rsignal_restore|int i|NULLOK Sigsave_t* t : Used in pp_sys.c p |int |rsignal_save |int i|Sighandler_t t1|NN Sigsave_t* save Ap |Sighandler_t|rsignal_state|int i -#if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PP_CTL_C) s |void |rxres_free |NN void** rsp s |void |rxres_restore |NN void **rsp|NN REGEXP *rx #endif @@ -879,29 +1054,32 @@ Apda |char* |savepv |NULLOK const char* pv Apda |char* |savepvn |NULLOK const char* pv|I32 len Apda |char* |savesharedpv |NULLOK const char* pv Apda |char* |savesharedpvn |NN const char *const pv|const STRLEN len +Apda |char* |savesharedsvpv |NN SV *sv Apda |char* |savesvpv |NN SV* sv Ap |void |savestack_grow Ap |void |savestack_grow_cnt |I32 need -Ap |void |save_aelem |NN AV* av|I32 idx|NN SV **sptr +Amp |void |save_aelem |NN AV* av|I32 idx|NN SV **sptr +Ap |void |save_aelem_flags|NN AV* av|I32 idx|NN SV **sptr|const U32 flags Ap |I32 |save_alloc |I32 size|I32 pad Ap |void |save_aptr |NN AV** aptr Ap |AV* |save_ary |NN GV* gv Ap |void |save_bool |NN bool* boolp Ap |void |save_clearsv |NN SV** svp Ap |void |save_delete |NN HV *hv|NN char *key|I32 klen +Ap |void |save_hdelete |NN HV *hv|NN SV *keysv Ap |void |save_adelete |NN AV *av|I32 key Ap |void |save_destructor|DESTRUCTORFUNC_NOCONTEXT_t f|NN void* p Ap |void |save_destructor_x|DESTRUCTORFUNC_t f|NULLOK void* p Apmb |void |save_freesv |NULLOK SV* sv : Used in SAVEFREOP(), used in op.c, pp_ctl.c -pmb |void |save_freeop |NULLOK OP* o +Apmb |void |save_freeop |NULLOK OP* o Apmb |void |save_freepv |NULLOK char* pv Ap |void |save_generic_svref|NN SV** sptr Ap |void |save_generic_pvref|NN char** str Ap |void |save_shared_pvref|NN char** str Ap |void |save_gp |NN GV* gv|I32 empty Ap |HV* |save_hash |NN GV* gv -p |void |save_hints +Ap |void |save_hints Amp |void |save_helem |NN HV *hv|NN SV *key|NN SV **sptr Ap |void |save_helem_flags|NN HV *hv|NN SV *key|NN SV **sptr|const U32 flags Ap |void |save_hptr |NN HV** hptr @@ -916,7 +1094,7 @@ Ap |void |save_long |NN long* longp Apmb |void |save_mortalizesv|NN SV* sv Ap |void |save_nogv |NN GV* gv : Used in SAVEFREOP(), used in gv.c, op.c, perl.c, pp_ctl.c, pp_sort.c -pmb |void |save_op +Apmb |void |save_op Ap |SV* |save_scalar |NN GV* gv Ap |void |save_pptr |NN char** pptr Ap |void |save_vptr |NN void *ptr @@ -926,19 +1104,20 @@ Ap |void |save_sptr |NN SV** sptr Ap |SV* |save_svref |NN SV** sptr Ap |void |save_pushptr |NULLOK void *const ptr|const int type : Used by SAVECOPARYBASE() in op.c -p |void |save_pushi32ptr|const I32 i|NULLOK void *const ptr|const int type +Ap |void |save_pushi32ptr|const I32 i|NULLOK void *const ptr|const int type : Used by SAVESWITCHSTACK() in pp.c -p |void |save_pushptrptr|NULLOK void *const ptr1 \ +Ap |void |save_pushptrptr|NULLOK void *const ptr1 \ |NULLOK void *const ptr2|const int type -#if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_SCOPE_C) s |void |save_pushptri32ptr|NULLOK void *const ptr1|const I32 i \ |NULLOK void *const ptr2|const int type #endif : Used in perly.y p |OP* |sawparens |NULLOK OP* o +Apd |OP* |op_contextualize|NN OP* o|I32 context : Used in perly.y p |OP* |scalar |NULLOK OP* o -#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_OP_C) s |OP* |scalarkids |NULLOK OP* o s |OP* |scalarseq |NULLOK OP* o #endif @@ -948,8 +1127,7 @@ Apd |NV |scan_bin |NN const char* start|STRLEN len|NN STRLEN* retlen Apd |NV |scan_hex |NN const char* start|STRLEN len|NN STRLEN* retlen Ap |char* |scan_num |NN const char* s|NN YYSTYPE *lvalp Apd |NV |scan_oct |NN const char* start|STRLEN len|NN STRLEN* retlen -: Used in perly.y -p |OP* |scope |NULLOK OP* o +AMpd |OP* |op_scope |NULLOK OP* o Ap |char* |screaminstr |NN SV *bigstr|NN SV *littlestr|I32 start_shift \ |I32 end_shift|NN I32 *old_posp|I32 last Apd |void |setdefout |NULLOK GV* gv @@ -966,17 +1144,18 @@ Ap |SV** |stack_grow |NN SV** sp|NN SV** p|int n Ap |I32 |start_subparse |I32 is_format|U32 flags : Used in pp_ctl.c p |void |sub_crush_depth|NN CV* cv -Apd |bool |sv_2bool |NN SV *const sv +Amd |bool |sv_2bool |NN SV *const sv +Apd |bool |sv_2bool_flags |NN SV *const sv|const I32 flags Apd |CV* |sv_2cv |NULLOK SV* sv|NN HV **const st|NN GV **const gvp \ |const I32 lref Apd |IO* |sv_2io |NN SV *const sv -#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_SV_C) s |bool |glob_2number |NN GV* const gv #endif Amb |IV |sv_2iv |NULLOK SV *sv Apd |IV |sv_2iv_flags |NULLOK SV *const sv|const I32 flags Apd |SV* |sv_2mortal |NULLOK SV *const sv -Apd |NV |sv_2nv |NULLOK SV *const sv +Apd |NV |sv_2nv_flags |NULLOK SV *const sv|const I32 flags : Used in pp.c, pp_hot.c, sv.c pMd |SV* |sv_2num |NN SV *const sv Amb |char* |sv_2pv |NULLOK SV *sv|NULLOK STRLEN *lp @@ -993,7 +1172,7 @@ Apd |char* |sv_pvn |NN SV *sv|NN STRLEN *lp Apd |char* |sv_pvutf8n |NN SV *sv|NN STRLEN *lp Apd |char* |sv_pvbyten |NN SV *sv|NN STRLEN *lp Apd |I32 |sv_true |NULLOK SV *const sv -#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_SV_C) sd |void |sv_add_arena |NN char *const ptr|const U32 size \ |const U32 flags #endif @@ -1010,20 +1189,35 @@ Apd |void |sv_chop |NN SV *const sv|NULLOK const char *const ptr pd |I32 |sv_clean_all : Used only in perl.c pd |void |sv_clean_objs -Apd |void |sv_clear |NN SV *const sv -Apd |I32 |sv_cmp |NULLOK SV *const sv1|NULLOK SV *const sv2 -Apd |I32 |sv_cmp_locale |NULLOK SV *const sv1|NULLOK SV *const sv2 +Apd |void |sv_clear |NN SV *const orig_sv +#if defined(PERL_IN_SV_C) +s |bool |curse |NN SV * const sv|const bool check_refcnt +#endif +Aopd |I32 |sv_cmp |NULLOK SV *const sv1|NULLOK SV *const sv2 +Apd |I32 |sv_cmp_flags |NULLOK SV *const sv1|NULLOK SV *const sv2 \ + |const U32 flags +Aopd |I32 |sv_cmp_locale |NULLOK SV *const sv1|NULLOK SV *const sv2 +Apd |I32 |sv_cmp_locale_flags |NULLOK SV *const sv1 \ + |NULLOK SV *const sv2|const U32 flags #if defined(USE_LOCALE_COLLATE) -Apd |char* |sv_collxfrm |NN SV *const sv|NN STRLEN *const nxp +Amd |char* |sv_collxfrm |NN SV *const sv|NN STRLEN *const nxp +Apd |char* |sv_collxfrm_flags |NN SV *const sv|NN STRLEN *const nxp|I32 const flags #endif -Ap |OP* |sv_compile_2op |NN SV *sv|NN OP **startop \ +: Frustratingly, because regcomp.c is also compiled as ext/re/re_comp.c, +: anything it needs has to be exported. So this has to be X. I'd rather it +: wasn't. +Xpo |OP* |sv_compile_2op_is_broken|NN SV *sv|NN OP **startop \ + |NN const char *code|NN PAD **padp +ApD |OP* |sv_compile_2op |NN SV *sv|NN OP **startop \ |NN const char *code|NN PAD **padp Apd |int |getcwd_sv |NN SV* sv Apd |void |sv_dec |NULLOK SV *const sv +Apd |void |sv_dec_nomg |NULLOK SV *const sv Ap |void |sv_dump |NN SV* sv ApdR |bool |sv_derived_from|NN SV* sv|NN const char *const name ApdR |bool |sv_does |NN SV* sv|NN const char *const name -Apd |I32 |sv_eq |NULLOK SV* sv1|NULLOK SV* sv2 +Amd |I32 |sv_eq |NULLOK SV* sv1|NULLOK SV* sv2 +Apd |I32 |sv_eq_flags |NULLOK SV* sv1|NULLOK SV* sv2|const U32 flags Apd |void |sv_free |NULLOK SV *const sv : FIXME Used in SvREFCNT_dec() but only : if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) @@ -1033,6 +1227,7 @@ pd |void |sv_free_arenas Apd |char* |sv_gets |NN SV *const sv|NN PerlIO *const fp|I32 append Apd |char* |sv_grow |NN SV *const sv|STRLEN newlen Apd |void |sv_inc |NULLOK SV *const sv +Apd |void |sv_inc_nomg |NULLOK SV *const sv Amdb |void |sv_insert |NN SV *const bigstr|const STRLEN offset \ |const STRLEN len|NN const char *const little \ |const STRLEN littlelen @@ -1052,6 +1247,8 @@ ApdR |SV* |sv_newmortal Apd |SV* |sv_newref |NULLOK SV *const sv Ap |char* |sv_peek |NULLOK SV* sv Apd |void |sv_pos_u2b |NULLOK SV *const sv|NN I32 *const offsetp|NULLOK I32 *const lenp +Apd |STRLEN |sv_pos_u2b_flags|NN SV *const sv|STRLEN uoffset \ + |NULLOK STRLEN *const lenp|U32 flags Apd |void |sv_pos_b2u |NULLOK SV *const sv|NN I32 *const offsetp Amdb |char* |sv_pvn_force |NN SV* sv|NULLOK STRLEN* lp Apd |char* |sv_pvutf8n_force|NN SV *const sv|NULLOK STRLEN *const lp @@ -1082,6 +1279,7 @@ Amdb |void |sv_setsv |NN SV *dstr|NULLOK SV *sstr Amdb |void |sv_taint |NN SV* sv ApdR |bool |sv_tainted |NN SV *const sv Apd |int |sv_unmagic |NN SV *const sv|const int type +Apd |int |sv_unmagicext |NN SV *const sv|const int type|NULLOK MGVTBL *vtbl Apdmb |void |sv_unref |NN SV* sv Apd |void |sv_unref_flags |NN SV *const ref|const U32 flags Apd |void |sv_untaint |NN SV *const sv @@ -1098,6 +1296,25 @@ Apd |void |sv_vsetpvfn |NN SV *const sv|NN const char *const pat|const STRLEN pa ApR |NV |str_to_version |NN SV *sv Ap |SV* |swash_init |NN const char* pkg|NN const char* name|NN SV* listsv|I32 minbits|I32 none Ap |UV |swash_fetch |NN SV *swash|NN const U8 *ptr|bool do_utf8 +EXMpR |HV* |_swash_inversion_hash |NN SV* const swash +EXMpR |HV* |_new_invlist |IV initial_size +EXMpR |HV* |_swash_to_invlist |NN SV* const swash +EXMp |void |_append_range_to_invlist |NN HV* const invlist|const UV start|const UV end +#ifdef PERL_IN_REGCOMP_C +EiMR |HV* |add_cp_to_invlist |NULLOK HV* invlist|const UV cp +EsMR |HV* |add_range_to_invlist |NULLOK HV* invlist|const UV start|const UV end +EiMR |UV* |invlist_array |NN HV* const invlist +EiM |void |invlist_destroy |NN HV* const invlist +EsM |void |invlist_extend |NN HV* const invlist|const UV len +EsMR |HV* |invlist_intersection |NN HV* const a|NN HV* const b +EiMR |UV |invlist_len |NN HV* const invlist +EiMR |UV |invlist_max |NN HV* const invlist +EiM |void |invlist_set_array |NN HV* const invlist|NN const UV* const array +EiM |void |invlist_set_len |NN HV* const invlist|const UV len +EiM |void |invlist_set_max |NN HV* const invlist|const UV max +EiM |void |invlist_trim |NN HV* const invlist +EsMR |HV* |invlist_union |NN HV* const a|NN HV* const b +#endif Ap |void |taint_env Ap |void |taint_proper |NULLOK const char* f|NN const char *const s Apd |UV |to_utf8_case |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp \ @@ -1130,10 +1347,13 @@ AdpPR |STRLEN |utf8_length |NN const U8* s|NN const U8 *e ApdPR |IV |utf8_distance |NN const U8 *a|NN const U8 *b ApdPR |U8* |utf8_hop |NN const U8 *s|I32 off ApMd |U8* |utf8_to_bytes |NN U8 *s|NN STRLEN *len +Apd |int |bytes_cmp_utf8 |NN const U8 *b|STRLEN blen|NN const U8 *u \ + |STRLEN ulen ApMd |U8* |bytes_from_utf8|NN const U8 *s|NN STRLEN *len|NULLOK bool *is_utf8 ApMd |U8* |bytes_to_utf8 |NN const U8 *s|NN STRLEN *len Apd |UV |utf8_to_uvchr |NN const U8 *s|NULLOK STRLEN *retlen Apd |UV |utf8_to_uvuni |NN const U8 *s|NULLOK STRLEN *retlen +pM |bool |check_utf8_print |NN const U8 *s|const STRLEN len #ifdef EBCDIC Adp |UV |utf8n_to_uvchr |NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags @@ -1166,27 +1386,33 @@ Ap |U32 |seed : Only used in perl.c pR |UV |get_hash_seed : Used in doio.c, pp_hot.c, pp_sys.c -p |void |report_evil_fh |NULLOK const GV *gv|NULLOK const IO *io|I32 op +p |void |report_evil_fh |NULLOK const GV *gv +: Used in doio.c, pp_hot.c, pp_sys.c +p |void |report_wrongway_fh|NULLOK const GV *gv|const char have : Used in mg.c, pp.c, pp_hot.c, regcomp.c XEpd |void |report_uninit |NULLOK const SV *uninit_sv +Apd |void |warn_sv |NN SV *baseex Afpd |void |warn |NN const char* pat|... -Ap |void |vwarn |NN const char* pat|NULLOK va_list* args +Apd |void |vwarn |NN const char* pat|NULLOK va_list* args Afp |void |warner |U32 err|NN const char* pat|... +Afp |void |ck_warner |U32 err|NN const char* pat|... +Afp |void |ck_warner_d |U32 err|NN const char* pat|... Ap |void |vwarner |U32 err|NN const char* pat|NULLOK va_list* args : FIXME p |void |watch |NN char** addr Ap |I32 |whichsig |NN const char* sig : Used in pp_ctl.c -p |void |write_to_stderr|NN const char* message|int msglen +p |void |write_to_stderr|NN SV* msv : Used in op.c p |int |yyerror |NN const char *const s : Used in perly.y, and by Data::Alias EXp |int |yylex +p |void |yyunlex : Used in perl.c, pp_ctl.c -p |int |yyparse +p |int |yyparse |int gramtype : Only used in scope.c p |void |parser_free |NN const yy_parser *parser -#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_TOKE_C) s |int |yywarn |NN const char *const s #endif #if defined(MYMALLOC) @@ -1287,14 +1513,20 @@ ApR |HEK* |hek_dup |NULLOK HEK* e|NN CLONE_PARAMS* param Ap |void |re_dup_guts |NN const REGEXP *sstr|NN REGEXP *dstr \ |NN CLONE_PARAMS* param Ap |PerlIO*|fp_dup |NULLOK PerlIO *const fp|const char type|NN CLONE_PARAMS *const param -ApR |DIR* |dirp_dup |NULLOK DIR *const dp +ApR |DIR* |dirp_dup |NULLOK DIR *const dp|NN CLONE_PARAMS *const param ApR |GP* |gp_dup |NULLOK GP *const gp|NN CLONE_PARAMS *const param ApR |MAGIC* |mg_dup |NULLOK MAGIC *mg|NN CLONE_PARAMS *const param -#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_SV_C) s |SV ** |sv_dup_inc_multiple|NN SV *const *source|NN SV **dest \ |SSize_t items|NN CLONE_PARAMS *const param #endif +#if defined(PERL_IN_SV_C) +sR |SV* |sv_dup_common |NN const SV *const sstr \ + |NN CLONE_PARAMS *const param +#endif ApR |SV* |sv_dup |NULLOK const SV *const sstr|NN CLONE_PARAMS *const param +ApR |SV* |sv_dup_inc |NULLOK const SV *const sstr \ + |NN CLONE_PARAMS *const param Ap |void |rvpv_dup |NN SV *const dstr|NN const SV *const sstr|NN CLONE_PARAMS *const param Ap |yy_parser*|parser_dup |NULLOK const yy_parser *const proto|NN CLONE_PARAMS *const param #endif @@ -1303,7 +1535,7 @@ ApR |void* |ptr_table_fetch|NN PTR_TBL_t *const tbl|NULLOK const void *const sv Ap |void |ptr_table_store|NN PTR_TBL_t *const tbl|NULLOK const void *const oldsv \ |NN void *const newsv Ap |void |ptr_table_split|NN PTR_TBL_t *const tbl -Ap |void |ptr_table_clear|NULLOK PTR_TBL_t *const tbl +ApD |void |ptr_table_clear|NULLOK PTR_TBL_t *const tbl Ap |void |ptr_table_free|NULLOK PTR_TBL_t *const tbl #if defined(USE_ITHREADS) # if defined(HAVE_INTERP_INTERN) @@ -1315,8 +1547,11 @@ Ap |void |sys_intern_clear Ap |void |sys_intern_init #endif +AopP |const XOP * |custom_op_xop |NN const OP *o ApR |const char * |custom_op_name |NN const OP *o ApR |const char * |custom_op_desc |NN const OP *o +Aop |void |custom_op_register |NN Perl_ppaddr_t ppaddr \ + |NN const XOP *xop Adp |void |sv_nosharing |NULLOK SV *sv Adpbm |void |sv_nolocking |NULLOK SV *sv @@ -1328,9 +1563,7 @@ Adpb |void |sv_nounlocking |NULLOK SV *sv #endif Adp |int |nothreadhook -END_EXTERN_C - -#if defined(PERL_IN_DOOP_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_DOOP_C) sR |I32 |do_trans_simple |NN SV * const sv sR |I32 |do_trans_count |NN SV * const sv sR |I32 |do_trans_complex |NN SV * const sv @@ -1339,19 +1572,16 @@ sR |I32 |do_trans_count_utf8 |NN SV * const sv sR |I32 |do_trans_complex_utf8 |NN SV * const sv #endif -#if defined(PERL_IN_GV_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_GV_C) s |void |gv_init_sv |NN GV *gv|const svtype sv_type +s |void |gv_magicalize_isa |NN GV *gv +s |void |gv_magicalize_overload |NN GV *gv s |HV* |gv_get_super_pkg|NN const char* name|I32 namelen s |HV* |require_tie_mod|NN GV *gv|NN const char *varpv|NN SV* namesv \ |NN const char *methpv|const U32 flags #endif -: #if defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) -: Used in hv.c -paRxo |void* |get_arena |const size_t svtype|const U32 misc -: #endif - -#if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_HV_C) s |void |hsplit |NN HV *hv s |void |hfreeentries |NN HV *hv sa |HE* |new_he @@ -1365,62 +1595,20 @@ sM |SV* |hv_delete_common|NULLOK HV *hv|NULLOK SV *keysv \ |NULLOK const char *key|STRLEN klen|int k_flags|I32 d_flags \ |U32 hash sM |void |clear_placeholders |NN HV *hv|U32 items -sM |SV * |refcounted_he_value |NN const struct refcounted_he *he #endif -#if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_MG_C) s |void |save_magic |I32 mgs_ix|NN SV *sv -s |int |magic_methpack |NN SV *sv|NN const MAGIC *mg|NN const char *meth -s |int |magic_methcall |NN SV *sv|NN const MAGIC *mg|NN const char *meth|I32 f \ +-s |int |magic_methpack |NN SV *sv|NN const MAGIC *mg|NN const char *meth +s |SV* |magic_methcall1|NN SV *sv|NN const MAGIC *mg \ + |NN const char *meth|U32 flags \ |int n|NULLOK SV *val s |void |restore_magic |NULLOK const void *p -s |void |unwind_handler_stack|NN const void *p +s |void |unwind_handler_stack|NULLOK const void *p #endif -#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT) -: These are all indirectly referenced by globals.c. This is somewhat annoying. -pR |OP* |ck_anoncode |NN OP *o -pR |OP* |ck_bitop |NN OP *o -pR |OP* |ck_concat |NN OP *o -pR |OP* |ck_defined |NN OP *o -pR |OP* |ck_delete |NN OP *o -pR |OP* |ck_die |NN OP *o -pR |OP* |ck_eof |NN OP *o -pR |OP* |ck_eval |NN OP *o -pR |OP* |ck_exec |NN OP *o -pR |OP* |ck_exists |NN OP *o -pR |OP* |ck_exit |NN OP *o -pR |OP* |ck_ftst |NN OP *o -pR |OP* |ck_fun |NN OP *o -pR |OP* |ck_glob |NN OP *o -pR |OP* |ck_grep |NN OP *o -pR |OP* |ck_index |NN OP *o -pR |OP* |ck_join |NN OP *o -pR |OP* |ck_lfun |NN OP *o -pR |OP* |ck_listiob |NN OP *o -pR |OP* |ck_match |NN OP *o -pR |OP* |ck_method |NN OP *o -pR |OP* |ck_null |NN OP *o -pR |OP* |ck_open |NN OP *o -pR |OP* |ck_readline |NN OP *o -pR |OP* |ck_repeat |NN OP *o -pR |OP* |ck_require |NN OP *o -pR |OP* |ck_return |NN OP *o -pR |OP* |ck_rfun |NN OP *o -pR |OP* |ck_rvconst |NN OP *o -pR |OP* |ck_sassign |NN OP *o -pR |OP* |ck_select |NN OP *o -pR |OP* |ck_shift |NN OP *o -pR |OP* |ck_sort |NN OP *o -pR |OP* |ck_spair |NN OP *o -pR |OP* |ck_split |NN OP *o -pR |OP* |ck_subr |NN OP *o -pR |OP* |ck_substr |NN OP *o -pR |OP* |ck_svconst |NN OP *o -pR |OP* |ck_trunc |NN OP *o -pR |OP* |ck_unpack |NN OP *o -pR |OP* |ck_each |NN OP *o +#if defined(PERL_IN_OP_C) sRn |bool |is_handle_constructor|NN const OP *o|I32 numargs sR |I32 |is_list_assignment|NULLOK const OP *o # ifdef USE_ITHREADS @@ -1471,7 +1659,7 @@ s |void |Slab_to_rw |NN void *op # endif #endif -#if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PERL_C) s |void |find_beginning |NN SV* linestr_sv|NN PerlIO *rsfp s |void |forbid_setid |const char flag|const bool suidscript s |void |incpush |NN const char *const dir|STRLEN len \ @@ -1494,19 +1682,23 @@ so |void |validate_suid |NN PerlIO *rsfp s |void* |parse_body |NULLOK char **env|XSINIT_t xsinit rs |void |run_body |I32 oldscope +# ifndef PERL_IS_MINIPERL s |SV * |incpush_if_exists|NN AV *const av|NN SV *dir|NN SV *const stem +# endif #endif -#if defined(PERL_IN_PP_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PP_C) +s |void |do_chomp |NN SV *retval|NN SV *sv|bool chomping +s |OP* |do_delete_local sR |SV* |refto |NN SV* sv #endif -#if defined(PERL_IN_PP_C) || defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PP_C) || defined(PERL_IN_PP_HOT_C) : Used in pp_hot.c pRxo |GV* |softref2xv |NN SV *const sv|NN const char *const what \ |const svtype type|NN SV ***spp #endif -#if defined(PERL_IN_PP_PACK_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PP_PACK_C) s |I32 |unpack_rec |NN struct tempsym* symptr|NN const char *s \ |NN const char *strbeg|NN const char *strend|NULLOK const char **new_s s |SV ** |pack_rec |NN SV *cat|NN struct tempsym* symptr|NN SV **beglist|NN SV **endlist @@ -1524,7 +1716,7 @@ sR |char * |sv_exp_grow |NN SV *sv|STRLEN needed snR |char * |bytes_to_uni |NN const U8 *start|STRLEN len|NN char *dest #endif -#if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PP_CTL_C) sR |OP* |docatch |NULLOK OP *o sR |OP* |dofindlabel |NN OP *o|NN const char *label|NN OP **opstack|NN OP **oplimit sR |OP* |doparseform |NN SV *sv @@ -1537,9 +1729,9 @@ sR |I32 |dopoptosub_at |NN const PERL_CONTEXT* cxstk|I32 startingblock sR |I32 |dopoptowhen |I32 startingblock s |void |save_lines |NULLOK AV *array|NN SV *sv s |bool |doeval |int gimme|NULLOK OP** startop|NULLOK CV* outside|U32 seq -sR |PerlIO *|check_type_and_open|NN const char *name +sR |PerlIO *|check_type_and_open|NN SV *name #ifndef PERL_DISABLE_PMC -sR |PerlIO *|doopen_pm |NN const char *name|const STRLEN namelen +sR |PerlIO *|doopen_pm |NN SV *name #endif sRn |bool |path_is_absolute|NN const char *name sR |I32 |run_user_filter|int idx|NN SV *buf_sv|int maxlen @@ -1549,12 +1741,12 @@ s |void |destroy_matcher|NN PMOP* matcher s |OP* |do_smartmatch |NULLOK HV* seen_this|NULLOK HV* seen_other #endif -#if defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PP_HOT_C) s |void |do_oddball |NN HV *hash|NN SV **relem|NN SV **firstrelem sR |SV* |method_common |NN SV* meth|NULLOK U32* hashp #endif -#if defined(PERL_IN_PP_SORT_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PP_SORT_C) s |I32 |sv_ncmp |NN SV *const a|NN SV *const b s |I32 |sv_i_ncmp |NN SV *const a|NN SV *const b s |I32 |amagic_ncmp |NN SV *const a|NN SV *const b @@ -1567,15 +1759,18 @@ s |I32 |sortcv_stacked |NN SV *const a|NN SV *const b s |void |qsortsvu |NULLOK SV** array|size_t num_elts|NN SVCOMPARE_t compare #endif -#if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PP_SYS_C) s |OP* |doform |NN CV *cv|NN GV *gv|NN OP *retop # if !defined(HAS_MKDIR) || !defined(HAS_RMDIR) sR |int |dooneliner |NN const char *cmd|NN const char *filename # endif s |SV * |space_join_names_mortal|NN char *const *array #endif +p |OP * |tied_method|NN const char *const methname|NN SV **sp \ + |NN SV *const sv|NN const MAGIC *const mg \ + |const U32 flags|U32 argc|... -#if defined(PERL_IN_REGCOMP_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_REGCOMP_C) Es |regnode*|reg |NN struct RExC_state_t *pRExC_state \ |I32 paren|NN I32 *flagp|U32 depth Es |regnode*|reganode |NN struct RExC_state_t *pRExC_state|U8 op \ @@ -1587,13 +1782,12 @@ Es |regnode*|regbranch |NN struct RExC_state_t *pRExC_state \ Es |STRLEN |reguni |NN const struct RExC_state_t *pRExC_state \ |UV uv|NN char *s Es |regnode*|regclass |NN struct RExC_state_t *pRExC_state|U32 depth -ERsn |I32 |regcurly |NN const char *s Es |regnode*|reg_node |NN struct RExC_state_t *pRExC_state|U8 op Es |UV |reg_recode |const char value|NN SV **encp Es |regnode*|regpiece |NN struct RExC_state_t *pRExC_state \ |NN I32 *flagp|U32 depth Es |regnode*|reg_namedseq |NN struct RExC_state_t *pRExC_state \ - |NULLOK UV *valuep + |NULLOK UV *valuep|NULLOK I32 *flagp|U32 depth Es |void |reginsert |NN struct RExC_state_t *pRExC_state \ |U8 op|NN regnode *opnd|U32 depth Es |void |regtail |NN struct RExC_state_t *pRExC_state \ @@ -1614,8 +1808,6 @@ Esn |void |cl_anything |NN const struct RExC_state_t *pRExC_state \ EsRn |int |cl_is_anything |NN const struct regnode_charclass_class *cl Esn |void |cl_init |NN const struct RExC_state_t *pRExC_state \ |NN struct regnode_charclass_class *cl -Esn |void |cl_init_zero |NN const struct RExC_state_t *pRExC_state \ - |NN struct regnode_charclass_class *cl Esn |void |cl_and |NN struct regnode_charclass_class *cl \ |NN const struct regnode_charclass_class *and_with Esn |void |cl_or |NN const struct RExC_state_t *pRExC_state \ @@ -1662,12 +1854,12 @@ Es |U8 |regtail_study |NN struct RExC_state_t *pRExC_state \ # endif #endif -#if defined(PERL_IN_REGEXEC_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_REGEXEC_C) ERs |I32 |regmatch |NN regmatch_info *reginfo|NN regnode *prog ERs |I32 |regrepeat |NN const regexp *prog|NN const regnode *p|I32 max|int depth ERs |I32 |regtry |NN regmatch_info *reginfo|NN char **startpos -ERs |bool |reginclass |NULLOK const regexp *prog|NN const regnode *n|NN const U8 *p|NULLOK STRLEN *lenp\ - |bool do_utf8sv_is_utf8 +ERs |bool |reginclass |NULLOK const regexp * const prog|NN const regnode * const n|NN const U8 * const p|NULLOK STRLEN *lenp\ + |bool const do_utf8sv_is_utf8 Es |CHECKPOINT|regcppush |I32 parenfloor Es |char* |regcppop |NN const regexp *rex ERsn |U8* |reghop3 |NN U8 *s|I32 off|NN const U8 *lim @@ -1677,7 +1869,6 @@ ERsn |U8* |reghop4 |NN U8 *s|I32 off|NN const U8 *llim \ #endif ERsn |U8* |reghopmaybe3 |NN U8 *s|I32 off|NN const U8 *lim ERs |char* |find_byclass |NN regexp * prog|NN const regnode *c|NN char *s|NN const char *strend|NULLOK regmatch_info *reginfo -Es |void |swap_match_buff|NN regexp * prog Es |void |to_utf8_substr |NN regexp * prog Es |void |to_byte_substr |NN regexp * prog ERs |I32 |reg_check_named_buff_matched |NN const regexp *rex \ @@ -1691,7 +1882,7 @@ Es |void |debug_start_match|NN const REGEXP *prog|const bool do_utf8\ # endif #endif -#if defined(PERL_IN_DUMP_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_DUMP_C) s |CV* |deb_curcv |const I32 ix s |void |debprof |NN const OP *o s |void |sequence |NULLOK const OP *o @@ -1700,26 +1891,26 @@ s |UV |sequence_num |NULLOK const OP *o s |SV* |pm_description |NN const PMOP *pm #endif -#if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_SCOPE_C) s |SV* |save_scalar_at |NN SV **sptr|const U32 flags #endif -#if defined(PERL_IN_GV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_PAD_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_GV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C) : Used in gv.c po |void |sv_add_backref |NN SV *const tsv|NN SV *const sv #endif -#if defined(PERL_IN_HV_C) || defined(PERL_IN_MG_C) || defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_HV_C) || defined(PERL_IN_MG_C) || defined(PERL_IN_SV_C) : Used in hv.c and mg.c -poM |int |sv_kill_backrefs |NN SV *const sv|NN AV *const av +poM |void |sv_kill_backrefs |NN SV *const sv|NULLOK AV *const av #endif -#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) +pX |void |sv_del_backref |NN SV *const tsv|NN SV *const sv +#if defined(PERL_IN_SV_C) nsR |char * |uiv_2buf |NN char *const buf|const IV iv|UV uv|const int is_uv|NN char **const peob s |void |sv_unglob |NN SV *const sv s |void |not_a_number |NN SV *const sv s |I32 |visit |NN SVFUNC_t f|const U32 flags|const U32 mask -s |void |sv_del_backref |NN SV *const tsv|NN SV *const sv sR |SV * |varname |NULLOK const GV *const gv|const char gvtype \ |PADOFFSET targ|NULLOK const SV *const keyname \ |I32 aindex|int subscript_type @@ -1734,35 +1925,44 @@ s |int |sv_2iuv_non_preserve |NN SV *const sv # endif # endif sR |I32 |expect_number |NN char **const pattern -# sn |STRLEN |sv_pos_u2b_forwards|NN const U8 *const start \ - |NN const U8 *const send|STRLEN uoffset + |NN const U8 *const send|NN STRLEN *const uoffset \ + |NN bool *const at_end sn |STRLEN |sv_pos_u2b_midway|NN const U8 *const start \ - |NN const U8 *send|const STRLEN uoffset|const STRLEN uend + |NN const U8 *send|STRLEN uoffset|const STRLEN uend s |STRLEN |sv_pos_u2b_cached|NN SV *const sv|NN MAGIC **const mgp \ |NN const U8 *const start|NN const U8 *const send \ - |const STRLEN uoffset|STRLEN uoffset0|STRLEN boffset0 + |STRLEN uoffset|STRLEN uoffset0|STRLEN boffset0 +s |void |utf8_mg_len_cache_update|NN SV *const sv|NN MAGIC **const mgp \ + |const STRLEN ulen s |void |utf8_mg_pos_cache_update|NN SV *const sv|NN MAGIC **const mgp \ |const STRLEN byte|const STRLEN utf8|const STRLEN blen s |STRLEN |sv_pos_b2u_midway|NN const U8 *const s|NN const U8 *const target \ |NN const U8 *end|STRLEN endu +s |void |assert_uft8_cache_coherent|NN const char *const func \ + |STRLEN from_cache|STRLEN real|NN SV *const sv sn |char * |F0convert |NV nv|NN char *const endbuf|NN STRLEN *const len # if defined(PERL_OLD_COPY_ON_WRITE) sM |void |sv_release_COW |NN SV *sv|NN const char *pvx|NN SV *after # endif s |SV * |more_sv -s |void * |more_bodies |const svtype sv_type s |bool |sv_2iuv_common |NN SV *const sv s |void |glob_assign_glob|NN SV *const dstr|NN SV *const sstr \ |const int dtype s |void |glob_assign_ref|NN SV *const dstr|NN SV *const sstr sRn |PTR_TBL_ENT_t *|ptr_table_find|NN PTR_TBL_t *const tbl|NULLOK const void *const sv +s |void |anonymise_cv_maybe |NN GV *gv|NN CV *cv #endif -#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT) +: Used in sv.c and hv.c +po |void * |more_bodies |const svtype sv_type|const size_t body_size \ + |const size_t arena_size + +#if defined(PERL_IN_TOKE_C) s |void |check_uni s |void |force_next |I32 type s |char* |force_version |NN char *s|int guessing +s |char* |force_strict_version |NN char *s s |char* |force_word |NN char *start|int token|int check_keyword \ |int allow_pack|int allow_tick s |SV* |tokeq |NN SV *sv @@ -1783,9 +1983,12 @@ s |void |update_debugger_info|NULLOK SV *orig_sv \ |NULLOK const char *const buf|STRLEN len sR |char* |skipspace |NN char *s sR |char* |swallow_bom |NN U8 *s +#ifndef PERL_NO_UTF16_FILTER +s |I32 |utf16_textfilter|int idx|NN SV *sv|int maxlen +s |U8* |add_utf16_textfilter|NN U8 *const s|bool reversed +#endif s |void |checkcomma |NN const char *s|NN const char *name \ |NN const char *what -s |bool |feature_is_enabled|NN const char *const name|STRLEN namelen s |void |force_ident |NN const char *s|int kind s |void |incline |NN const char *s s |int |intuit_method |NN char *s|NULLOK GV *gv|NULLOK CV *cv @@ -1796,13 +1999,14 @@ s |void |no_op |NN const char *const what|NULLOK char *s sR |I32 |sublex_done sR |I32 |sublex_push sR |I32 |sublex_start -sR |char * |filter_gets |NN SV *sv|NN PerlIO *fp|STRLEN append +sR |char * |filter_gets |NN SV *sv|STRLEN append sR |HV * |find_in_my_stash|NN const char *pkgname|STRLEN len sR |char * |tokenize_use |int is_use|NN char *s so |SV* |new_constant |NULLOK const char *s|STRLEN len \ |NN const char *key|STRLEN keylen|NN SV *sv \ |NULLOK SV *pv|NULLOK const char *type \ |STRLEN typelen +s |int |deprecate_commaless_var_list s |int |ao |int toketype # if defined(PERL_CR_FILTER) s |I32 |cr_textfilter |int idx|NULLOK SV *sv|int maxlen @@ -1814,26 +2018,23 @@ s |void |printbuf |NN const char *const fmt|NN const char *const s # endif #endif -#if defined(PERL_IN_UNIVERSAL_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_UNIVERSAL_C) s |bool|isa_lookup |NN HV *stash|NN const char * const name -so |HV * |get_isa_hash |NN HV *const stash #endif -#if defined(PERL_IN_LOCALE_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_LOCALE_C) #if defined(USE_LOCALE_NUMERIC) || defined(USE_LOCALE_COLLATE) s |char* |stdize_locale |NN char* locs #endif #endif -#if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_UTIL_C) s |const COP*|closest_cop |NN const COP *cop|NULLOK const OP *o s |SV* |mess_alloc -s |const char *|vdie_croak_common|NULLOK const char *pat|NULLOK va_list *args \ - |NULLOK STRLEN *msglen|NULLOK I32* utf8 -s |bool |vdie_common |NULLOK const char *message|STRLEN msglen\ - |I32 utf8|bool warn +s |SV *|with_queued_errors|NN SV *ex +s |bool |invoke_exception_hook|NULLOK SV *ex|bool warn sr |char * |write_no_mem -#if defined(PERL_MEM_LOG) && defined(PERL_MEM_LOG_STDERR) +#if defined(PERL_MEM_LOG) && !defined(PERL_MEM_LOG_NOIMPL) sn |void |mem_log_common |enum mem_log_type mlt|const UV n|const UV typesize \ |NN const char *type_name|NULLOK const SV *sv \ |Malloc_t oldalloc|Malloc_t newalloc \ @@ -1842,24 +2043,24 @@ sn |void |mem_log_common |enum mem_log_type mlt|const UV n|const UV typesize \ #endif #endif -#if defined(PERL_IN_NUMERIC_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_NUMERIC_C) sn |NV|mulexp10 |NV value|I32 exponent #endif -#if defined(PERL_IN_UTF8_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_UTF8_C) sRn |STRLEN |is_utf8_char_slow|NN const U8 *s|const STRLEN len sR |bool |is_utf8_common |NN const U8 *const p|NN SV **swash|NN const char * const swashname sR |SV* |swash_get |NN SV* swash|UV start|UV span #endif -START_EXTERN_C - Apd |void |sv_setsv_flags |NN SV *dstr|NULLOK SV *sstr|const I32 flags Apd |void |sv_catpvn_flags|NN SV *const dstr|NN const char *sstr|const STRLEN len \ |const I32 flags +Apd |void |sv_catpv_flags |NN SV *dstr|NN const char *sstr \ + |const I32 flags Apd |void |sv_catsv_flags |NN SV *const dsv|NULLOK SV *const ssv|const I32 flags Apmd |STRLEN |sv_utf8_upgrade_flags|NN SV *const sv|const I32 flags -Apd |STRLEN |sv_utf8_upgrade_flags_grow|NN SV *const sv|const I32 flags|STRLEN extra +Ap |STRLEN |sv_utf8_upgrade_flags_grow|NN SV *const sv|const I32 flags|STRLEN extra Apd |char* |sv_pvn_force_flags|NN SV *const sv|NULLOK STRLEN *const lp|const I32 flags Apd |void |sv_copypv |NN SV *const dsv|NN SV *const ssv Ap |char* |my_atof2 |NN const char *s|NN NV* value @@ -1905,7 +2106,7 @@ ApR |PerlIO *|PerlIO_stderr : Only used in dump.c p |void |deb_stack_all -#if defined(PERL_IN_DEB_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_DEB_C) s |void |deb_stack_n |NN SV** stack_base|I32 stack_min \ |I32 stack_max|I32 mark_min|I32 mark_max #endif @@ -1913,14 +2114,15 @@ s |void |deb_stack_n |NN SV** stack_base|I32 stack_min \ : Used in perl.c, pp_ctl.c, toke.c pda |PADLIST*|pad_new |int flags : Only used in op.c -pd |void |pad_undef |NN CV* cv -: Only used in op.c -pd |PADOFFSET|pad_add_name |NN const char *name\ - |NULLOK HV* typestash|NULLOK HV* ourstash|bool clone|bool state +Mpd |PADOFFSET|pad_add_name |NN const char *name|const STRLEN len\ + |const U32 flags|NULLOK HV *typestash\ + |NULLOK HV *ourstash : Only used in op.c pd |PADOFFSET|pad_add_anon |NN SV* sv|OPCODE op_type -: Only used in op.c -pd |void |pad_check_dup |NN const char* name|bool is_our|NN const HV* ourstash +#if defined(PERL_IN_PAD_C) +sd |void |pad_check_dup |NN SV *name|const U32 flags \ + |NULLOK const HV *ourstash +#endif #ifdef DEBUGGING : Only used PAD_SETSV() in op.c pd |void |pad_setsv |PADOFFSET po|NN SV* sv @@ -1938,11 +2140,18 @@ pd |void |pad_fixup_inner_anons|NN PADLIST *padlist|NN CV *old_cv|NN CV *new_cv pdX |void |pad_push |NN PADLIST *padlist|int depth : Only used in PAD_COMPNAME_TYPE() in op.c pR |HV* |pad_compname_type|const PADOFFSET po +: Used in sv.c +#if defined(USE_ITHREADS) +pR |AV* |padlist_dup |NULLOK AV *const srcpad \ + |NN CLONE_PARAMS *const param +#endif -#if defined(PERL_IN_PAD_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_PAD_C) sd |PADOFFSET|pad_findlex |NN const char *name|NN const CV* cv|U32 seq|int warn \ |NULLOK SV** out_capture|NN SV** out_name_sv \ |NN int *out_flags +s |PADOFFSET|pad_add_name_sv|NN SV *namesv|const U32 flags \ + |NULLOK HV *typestash|NULLOK HV *ourstash # if defined(DEBUGGING) sd |void |cv_dump |NN const CV *cv|NN const char *title # endif @@ -1955,7 +2164,9 @@ p |void |free_tied_hv_pool pR |int |get_debug_opts |NN const char **s|bool givehelp #endif Ap |void |save_set_svflags|NN SV *sv|U32 mask|U32 val +#ifdef DEBUGGING Apod |void |hv_assert |NN HV *hv +#endif ApdR |SV* |hv_scalar |NN HV *hv ApoR |I32* |hv_riter_p |NN HV *hv @@ -1963,9 +2174,13 @@ ApoR |HE** |hv_eiter_p |NN HV *hv Apo |void |hv_riter_set |NN HV *hv|I32 riter Apo |void |hv_eiter_set |NN HV *hv|NULLOK HE *eiter Ap |void |hv_name_set |NN HV *hv|NULLOK const char *name|U32 len|U32 flags +p |void |hv_ename_add |NN HV *hv|NN const char *name|U32 len \ + |U32 flags +p |void |hv_ename_delete|NN HV *hv|NN const char *name|U32 len \ + |U32 flags : Used in dump.c and hv.c poM |AV** |hv_backreferences_p |NN HV *hv -#if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) : Only used in sv.c poM |void |hv_kill_backrefs |NN HV *hv #endif @@ -1977,7 +2192,7 @@ Apo |void |hv_placeholders_set |NN HV *hv|I32 ph : This is indirectly referenced by globals.c. This is somewhat annoying. p |SV* |magic_scalarpack|NN HV *hv|NN MAGIC *mg -#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_SV_C) s |SV * |find_hash_subscript|NULLOK const HV *const hv \ |NN const SV *const val s |I32 |find_array_subscript|NULLOK const AV *const av \ @@ -2077,7 +2292,10 @@ p |void |dump_sv_child |NN SV *sv #endif #ifdef PERL_DONT_CREATE_GVSV -Ap |GV* |gv_SVadd |NN GV* gv +Apbm |GV* |gv_SVadd |NULLOK GV *gv +#endif +#if defined(PERL_IN_UTIL_C) +s |bool |ckwarn_common |U32 w #endif Apo |bool |ckwarn |U32 w Apo |bool |ckwarn_d |U32 w @@ -2085,9 +2303,6 @@ Apo |bool |ckwarn_d |U32 w XEopMa |STRLEN *|new_warnings_bitfield|NULLOK STRLEN *buffer \ |NN const char *const bits|STRLEN size -: Used in av.c, hv.c -p |void |offer_nice_chunk |NN void *const chunk|const U32 chunk_size - #ifndef SPRINTF_RETURNS_STRLEN Apnod |int |my_sprintf |NN char *buffer|NN const char *pat|... #endif @@ -2107,6 +2322,15 @@ Apo |void* |my_cxt_init |NN int *index|size_t size #endif #endif +: This function is an implementation detail. The public API for this is +: XS_VERSION_BOOTCHECK +Xpo |void |xs_version_bootcheck|U32 items|U32 ax|NN const char *xs_p \ + |STRLEN xs_len +: This function is an implementation detail. The public API for this is +: XS_APIVERSION_BOOTCHECK +Xpo |void |xs_apiversion_bootcheck|NN SV *module|NN const char *api_p \ + |STRLEN api_len + #ifndef HAS_STRLCAT Apno |Size_t |my_strlcat |NULLOK char *dst|NULLOK const char *src|Size_t size #endif @@ -2117,7 +2341,7 @@ Apno |Size_t |my_strlcpy |NULLOK char *dst|NULLOK const char *src|Size_t #ifdef PERL_MAD Mnp |void |pad_peg |NN const char* s -#if defined(PERL_IN_DUMP_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_DUMP_C) sf |void |xmldump_attr |I32 level|NN PerlIO *file|NN const char* pat \ |... #endif @@ -2126,12 +2350,16 @@ Mfp |void |xmldump_indent |I32 level|NN PerlIO *file|NN const char* pat \ Mp |void |xmldump_vindent|I32 level|NN PerlIO *file|NN const char* pat \ |NULLOK va_list *args Mp |void |xmldump_all +p |void |xmldump_all_perl |bool justperl Mp |void |xmldump_packsubs |NN const HV* stash +p |void |xmldump_packsubs_perl |NN const HV* stash|bool justperl Mp |void |xmldump_sub |NN const GV* gv +Mp |void |xmldump_sub_perl |NN const GV* gv|bool justperl Mp |void |xmldump_form |NN const GV* gv Mp |void |xmldump_eval Mp |char* |sv_catxmlsv |NN SV *dsv|NN SV *ssv Mp |char* |sv_catxmlpvn |NN SV *dsv|NN const char *pv|STRLEN len|int utf8 +Mp |char* |sv_catxmlpv |NN SV *dsv|NN const char *pv|int utf8 Mp |char* |sv_xmlpeek |NN SV* sv Mp |void |do_pmop_xmldump|I32 level|NN PerlIO *file \ |NULLOK const PMOP *pm @@ -2150,11 +2378,11 @@ Mp |void |append_madprops|NULLOK MADPROP* tm|NULLOK OP* o|char slot Mp |void |addmad |NULLOK MADPROP* tm|NULLOK MADPROP** root \ |char slot Mp |MADPROP*|newMADsv |char key|NN SV* sv -Mp |MADPROP*|newMADPROP |char key|char type|NULLOK const void* val \ +Mp |MADPROP*|newMADPROP |char key|char type|NULLOK void* val \ |I32 vlen Mp |void |mad_free |NULLOK MADPROP* mp -# if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT) +# if defined(PERL_IN_TOKE_C) s |char* |skipspace0 |NN char *s s |char* |skipspace1 |NN char *s s |char* |skipspace2 |NN char *s|NULLOK SV **sv @@ -2162,7 +2390,7 @@ s |void |start_force |int where s |void |curmad |char slot|NULLOK SV *sv # endif Mp |int |madlex -Mp |int |madparse +Mp |int |madparse |int gramtype #endif #if !defined(HAS_SIGNBIT) AMdnoP |int |Perl_signbit |NV f @@ -2189,24 +2417,50 @@ Xpo |struct mro_meta* |mro_meta_init |NN HV* stash p |struct mro_meta* |mro_meta_dup |NN struct mro_meta* smeta|NN CLONE_PARAMS* param #endif Apd |AV* |mro_get_linear_isa|NN HV* stash -#if defined(PERL_IN_MRO_C) || defined(PERL_DECL_PROT) +#if defined(PERL_IN_MRO_C) sd |AV* |mro_get_linear_isa_dfs|NN HV* stash|U32 level +s |void |mro_clean_isarev|NN HV * const isa \ + |NN const char * const name \ + |const STRLEN len \ + |NULLOK HV * const exceptions +s |void |mro_gather_and_rename|NN HV * const stashes \ + |NN HV * const seen_stashes \ + |NULLOK HV *stash \ + |NULLOK HV *oldstash \ + |NN SV *namesv #endif : Used in hv.c, mg.c, pp.c, sv.c pd |void |mro_isa_changed_in|NN HV* stash Apd |void |mro_method_changed_in |NN HV* stash +pdx |void |mro_package_moved |NULLOK HV * const stash|NULLOK HV * const oldstash|NN const GV * const gv|U32 flags : Only used in perl.c p |void |boot_core_mro Apon |void |sys_init |NN int* argc|NN char*** argv Apon |void |sys_init3 |NN int* argc|NN char*** argv|NN char*** env Apon |void |sys_term -ApoM |const char *|fetch_cop_label|NULLOK struct refcounted_he *const chain \ +ApoM |const char *|fetch_cop_label|NN COP *const cop \ |NULLOK STRLEN *len|NULLOK U32 *flags : Only used in op.c -xpoM |struct refcounted_he *|store_cop_label \ - |NULLOK struct refcounted_he *const chain|NN const char *label +xpoM |void|store_cop_label \ + |NN COP *const cop|NN const char *label|STRLEN len|U32 flags + +xpo |int |keyword_plugin_standard|NN char* keyword_ptr|STRLEN keyword_len|NN OP** op_ptr +: Used in perly.y +xp |void |munge_qwlist_to_paren_list|NN OP* qwlist + +#if defined(USE_ITHREADS) +# if defined(PERL_IN_SV_C) +s |void |unreferenced_to_tmp_stack|NN AV *const unreferenced +# endif +Aanop |CLONE_PARAMS *|clone_params_new|NN PerlInterpreter *const from \ + |NN PerlInterpreter *const to +Anop |void |clone_params_del|NN CLONE_PARAMS *param +#endif + +: Used in perl.c and toke.c +op |void |populate_isa |NN const char *name|STRLEN len|... + +: Used in keywords.c and toke.c +op |bool |feature_is_enabled|NN const char *const name|STRLEN namelen -END_EXTERN_C -/* - * ex: set ts=8 sts=4 sw=4 noet: - */ +: ex: set ts=8 sts=4 sw=4 noet: diff --git a/cpan/Devel-PPPort/parts/inc/HvNAME b/cpan/Devel-PPPort/parts/inc/HvNAME index 135549db261..4d7882c47c8 100644 --- a/cpan/Devel-PPPort/parts/inc/HvNAME +++ b/cpan/Devel-PPPort/parts/inc/HvNAME @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 1 $ +## $Revision: 2 $ ## $Author: mhx $ -## $Date: 2009/06/12 12:29:57 +0200 $ +## $Date: 2010/03/07 13:15:44 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/MY_CXT b/cpan/Devel-PPPort/parts/inc/MY_CXT index d67af01377a..8e1cb4f9acc 100644 --- a/cpan/Devel-PPPort/parts/inc/MY_CXT +++ b/cpan/Devel-PPPort/parts/inc/MY_CXT @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 16 $ +## $Revision: 17 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:55 +0100 $ +## $Date: 2010/03/07 13:15:48 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/SvPV b/cpan/Devel-PPPort/parts/inc/SvPV index e81fb684c18..a7aace74588 100644 --- a/cpan/Devel-PPPort/parts/inc/SvPV +++ b/cpan/Devel-PPPort/parts/inc/SvPV @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 22 $ +## $Revision: 23 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:54 +0100 $ +## $Date: 2010/03/07 13:15:47 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/SvREFCNT b/cpan/Devel-PPPort/parts/inc/SvREFCNT index 46c5deb3561..3a2f8498024 100644 --- a/cpan/Devel-PPPort/parts/inc/SvREFCNT +++ b/cpan/Devel-PPPort/parts/inc/SvREFCNT @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 5 $ +## $Revision: 6 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:52 +0100 $ +## $Date: 2010/03/07 13:15:45 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/Sv_set b/cpan/Devel-PPPort/parts/inc/Sv_set index 95cf2d672ea..2c2ff448f09 100644 --- a/cpan/Devel-PPPort/parts/inc/Sv_set +++ b/cpan/Devel-PPPort/parts/inc/Sv_set @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 7 $ +## $Revision: 8 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:53 +0100 $ +## $Date: 2010/03/07 13:15:46 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/call b/cpan/Devel-PPPort/parts/inc/call index 85159e22a84..d8f2046be61 100644 --- a/cpan/Devel-PPPort/parts/inc/call +++ b/cpan/Devel-PPPort/parts/inc/call @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 19 $ +## $Revision: 20 $ ## $Author: mhx $ -## $Date: 2009/01/23 18:27:48 +0100 $ +## $Date: 2010/03/07 13:15:46 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/cop b/cpan/Devel-PPPort/parts/inc/cop index 7c8674112da..a797109a4f8 100644 --- a/cpan/Devel-PPPort/parts/inc/cop +++ b/cpan/Devel-PPPort/parts/inc/cop @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 8 $ +## $Revision: 9 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:54 +0100 $ +## $Date: 2010/03/07 13:15:47 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/exception b/cpan/Devel-PPPort/parts/inc/exception index 122277bbb15..5fcc99d8c83 100644 --- a/cpan/Devel-PPPort/parts/inc/exception +++ b/cpan/Devel-PPPort/parts/inc/exception @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 7 $ +## $Revision: 8 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:53 +0100 $ +## $Date: 2010/03/07 13:15:46 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/format b/cpan/Devel-PPPort/parts/inc/format index d39670416c2..3a95b10a2b1 100644 --- a/cpan/Devel-PPPort/parts/inc/format +++ b/cpan/Devel-PPPort/parts/inc/format @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 9 $ +## $Revision: 10 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:55 +0100 $ +## $Date: 2010/03/07 13:15:48 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/grok b/cpan/Devel-PPPort/parts/inc/grok index 5e32f8e9909..1db6db3bca9 100644 --- a/cpan/Devel-PPPort/parts/inc/grok +++ b/cpan/Devel-PPPort/parts/inc/grok @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 16 $ +## $Revision: 17 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:55 +0100 $ +## $Date: 2010/03/07 13:15:49 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/gv b/cpan/Devel-PPPort/parts/inc/gv index 1b911e738d2..e17d259675f 100644 --- a/cpan/Devel-PPPort/parts/inc/gv +++ b/cpan/Devel-PPPort/parts/inc/gv @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 1 $ +## $Revision: 4 $ ## $Author: mhx $ -## $Date: 2009/06/12 12:29:56 +0200 $ +## $Date: 2010/03/07 13:15:44 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## @@ -23,6 +23,10 @@ __UNDEFINED__ __UNDEFINED__ GvSVn(gv) GvSV(gv) __UNDEFINED__ isGV_with_GP(gv) isGV(gv) +__UNDEFINED__ gv_fetchpvn_flags(name, len, flags, svt) gv_fetchpv(name, flags, svt) +__UNDEFINED__ gv_fetchsv(name, flags, svt) gv_fetchpv(SvPV_nolen_const(name), flags, svt) + +__UNDEFINED__ get_cvn_flags(name, namelen, flags) get_cv(name, flags) =xsubs @@ -58,9 +62,44 @@ isGV_with_GP() OUTPUT: RETVAL +int +get_cvn_flags() + PREINIT: + CV* xv; + CODE: + RETVAL = 0; + xv = get_cvn_flags("Devel::PPPort::foobar", sizeof("Devel::PPPort::foobar")-1, 0); + if(xv == NULL) RETVAL++; + xv = get_cvn_flags("Devel::PPPort::foobar", sizeof("Devel::PPPort::foobar")-1, GV_ADDMULTI); + if(xv && SvTYPE(xv) == SVt_PVCV) RETVAL++; + xv = get_cvn_flags("Devel::PPPort::get_cvn_flags", sizeof("Devel::PPPort::get_cvn_flags")-1, 0); + if(xv && SvTYPE(xv) == SVt_PVCV) RETVAL++; + OUTPUT: + RETVAL + +SV* +gv_fetchpvn_flags() + CODE: + RETVAL = newRV_inc((SV*)gv_fetchpvn_flags("Devel::PPPort::VERSION", sizeof("Devel::PPPort::VERSION")-1, 0, SVt_PV)); + OUTPUT: + RETVAL + +SV* +gv_fetchsv(name) + SV *name + CODE: + RETVAL = newRV_inc((SV*)gv_fetchsv(name, 0, SVt_PV)); + OUTPUT: + RETVAL -=tests plan => 2 +=tests plan => 5 ok(Devel::PPPort::GvSVn(), 1); -ok(Devel::PPPort::isGV_with_GP(), 2) +ok(Devel::PPPort::isGV_with_GP(), 2); + +ok(Devel::PPPort::get_cvn_flags(), 3); + +ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION); + +ok(Devel::PPPort::gv_fetchsv("Devel::PPPort::VERSION"), \*Devel::PPPort::VERSION); diff --git a/cpan/Devel-PPPort/parts/inc/limits b/cpan/Devel-PPPort/parts/inc/limits index 25b39401790..b745ee9448b 100644 --- a/cpan/Devel-PPPort/parts/inc/limits +++ b/cpan/Devel-PPPort/parts/inc/limits @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 7 $ +## $Revision: 8 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:54 +0100 $ +## $Date: 2010/03/07 13:15:47 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/mPUSH b/cpan/Devel-PPPort/parts/inc/mPUSH index 3613058837a..52292c0fadc 100644 --- a/cpan/Devel-PPPort/parts/inc/mPUSH +++ b/cpan/Devel-PPPort/parts/inc/mPUSH @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 11 $ +## $Revision: 12 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:54 +0100 $ +## $Date: 2010/03/07 13:15:47 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/magic b/cpan/Devel-PPPort/parts/inc/magic index 31721715ea2..558feddd952 100644 --- a/cpan/Devel-PPPort/parts/inc/magic +++ b/cpan/Devel-PPPort/parts/inc/magic @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 17 $ +## $Revision: 21 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:55 +0100 $ +## $Date: 2010/03/07 13:15:49 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## @@ -358,9 +358,10 @@ ok($h{sv}, 4711); &Devel::PPPort::sv_usepvn_mg($h{sv}, 'Perl'); ok($h{sv}, 'Perl'); -my $ver = eval qq[qv("v1.2.0")]; -ok($[ < 5.009 || $@ eq ''); -ok($@ || Devel::PPPort::SvVSTRING_mg($ver)); +# v1 is treated as a bareword in older perls... +my $ver = do { local $SIG{'__WARN__'} = sub {}; eval qq[v1.2.0] }; +ok($] < 5.009 || $@ eq ''); +ok($] < 5.009 || Devel::PPPort::SvVSTRING_mg($ver)); ok(!Devel::PPPort::SvVSTRING_mg(4711)); my $foo = 'bar'; diff --git a/cpan/Devel-PPPort/parts/inc/memory b/cpan/Devel-PPPort/parts/inc/memory index 761d80c9592..4d7ae4828fb 100644 --- a/cpan/Devel-PPPort/parts/inc/memory +++ b/cpan/Devel-PPPort/parts/inc/memory @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 5 $ +## $Revision: 7 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:53 +0100 $ +## $Date: 2010/03/07 13:15:46 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## @@ -29,6 +29,10 @@ __UNDEFINED__ memNE(s1,s2,l) (bcmp(s1,s2,l)) __UNDEFINED__ memEQ(s1,s2,l) (!bcmp(s1,s2,l)) #endif +__UNDEFINED__ memEQs(s1, l, s2) \ + (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1))) +__UNDEFINED__ memNEs(s1, l, s2) !memEQs(s1, l, s2) + __UNDEFINED__ MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t)) __UNDEFINED__ CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) #ifdef HAS_MEMSET @@ -62,9 +66,13 @@ checkmem() ZeroD(p, 6, char); if (memEQ(p, "\0\0\0\0\0\0", 6)) RETVAL++; + if (memEQs(p, 6, "\0\0\0\0\0\0")) + RETVAL++; Poison(p, 6, char); if (memNE(p, "\0\0\0\0\0\0", 6)) RETVAL++; + if (memNEs(p, 6, "\0\0\0\0\0\0")) + RETVAL++; Safefree(p); Newxz(p, 6, char); @@ -80,5 +88,5 @@ checkmem() =tests plan => 1 -ok(Devel::PPPort::checkmem(), 4); +ok(Devel::PPPort::checkmem(), 6); diff --git a/cpan/Devel-PPPort/parts/inc/misc b/cpan/Devel-PPPort/parts/inc/misc index 3844bbb3173..59c326a56a3 100644 --- a/cpan/Devel-PPPort/parts/inc/misc +++ b/cpan/Devel-PPPort/parts/inc/misc @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 53 $ +## $Revision: 56 $ ## $Author: mhx $ -## $Date: 2009/03/31 23:05:55 +0200 $ +## $Date: 2011/09/10 20:38:10 +0200 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## @@ -275,8 +275,8 @@ __UNDEFINED__ isXDIGIT(c) isxdigit(c) # undef isPRINT # endif __UNDEFINED__ isALNUMC(c) (isALPHA(c) || isDIGIT(c)) -__UNDEFINED__ isASCII(c) ((c) <= 127) -__UNDEFINED__ isCNTRL(c) ((c) < ' ' || (c) == 127) +__UNDEFINED__ isASCII(c) ((U8) (c) <= 127) +__UNDEFINED__ isCNTRL(c) ((U8) (c) < ' ' || (c) == 127) __UNDEFINED__ isGRAPH(c) (isALNUM(c) || isPUNCT(c)) __UNDEFINED__ isPRINT(c) (((c) >= 32 && (c) < 127)) __UNDEFINED__ isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126)) @@ -475,7 +475,6 @@ Perl_ppaddr_t(string) Perl_ppaddr_t lower; PPCODE: lower = PL_ppaddr[OP_LC]; - PUSHMARK(SP); mXPUSHs(newSVpv(string, 0)); PUTBACK; ENTER; diff --git a/cpan/Devel-PPPort/parts/inc/newCONSTSUB b/cpan/Devel-PPPort/parts/inc/newCONSTSUB index 4b266d79903..d536f8b319a 100644 --- a/cpan/Devel-PPPort/parts/inc/newCONSTSUB +++ b/cpan/Devel-PPPort/parts/inc/newCONSTSUB @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 15 $ +## $Revision: 16 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:55 +0100 $ +## $Date: 2010/03/07 13:15:48 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/newRV b/cpan/Devel-PPPort/parts/inc/newRV index 1467d1ae9d6..3d0a2d25ad9 100644 --- a/cpan/Devel-PPPort/parts/inc/newRV +++ b/cpan/Devel-PPPort/parts/inc/newRV @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 9 $ +## $Revision: 10 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:55 +0100 $ +## $Date: 2010/03/07 13:15:48 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/newSV_type b/cpan/Devel-PPPort/parts/inc/newSV_type index 06ebdb41006..104dba9370e 100644 --- a/cpan/Devel-PPPort/parts/inc/newSV_type +++ b/cpan/Devel-PPPort/parts/inc/newSV_type @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 1 $ +## $Revision: 2 $ ## $Author: mhx $ -## $Date: 2009/06/12 12:29:57 +0200 $ +## $Date: 2010/03/07 13:15:44 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/newSVpv b/cpan/Devel-PPPort/parts/inc/newSVpv index 3a38549f982..6925a7a34f7 100644 --- a/cpan/Devel-PPPort/parts/inc/newSVpv +++ b/cpan/Devel-PPPort/parts/inc/newSVpv @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 6 $ +## $Revision: 7 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:51 +0100 $ +## $Date: 2010/03/07 13:15:44 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/podtest b/cpan/Devel-PPPort/parts/inc/podtest index ceea0cf7a23..83dd4408072 100644 --- a/cpan/Devel-PPPort/parts/inc/podtest +++ b/cpan/Devel-PPPort/parts/inc/podtest @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 9 $ +## $Revision: 10 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:52 +0100 $ +## $Date: 2010/03/07 13:15:45 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/ppphbin b/cpan/Devel-PPPort/parts/inc/ppphbin index 583f266a778..83fe71a7d30 100644 --- a/cpan/Devel-PPPort/parts/inc/ppphbin +++ b/cpan/Devel-PPPort/parts/inc/ppphbin @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 50 $ +## $Revision: 51 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:54 +0100 $ +## $Date: 2010/03/07 13:15:48 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/ppphdoc b/cpan/Devel-PPPort/parts/inc/ppphdoc index 62d484106f3..addd581e3fa 100644 --- a/cpan/Devel-PPPort/parts/inc/ppphdoc +++ b/cpan/Devel-PPPort/parts/inc/ppphdoc @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 32 $ +## $Revision: 33 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:54 +0100 $ +## $Date: 2010/03/07 13:15:47 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## @@ -336,7 +336,7 @@ module from CPAN. =head1 COPYRIGHT -Version 3.x, Copyright (c) 2004-2009, Marcus Holland-Moritz. +Version 3.x, Copyright (c) 2004-2010, Marcus Holland-Moritz. Version 2.x, Copyright (C) 2001, Paul Marquess. diff --git a/cpan/Devel-PPPort/parts/inc/ppphtest b/cpan/Devel-PPPort/parts/inc/ppphtest index f94cc7de2d9..8deccacb74e 100644 --- a/cpan/Devel-PPPort/parts/inc/ppphtest +++ b/cpan/Devel-PPPort/parts/inc/ppphtest @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 46 $ +## $Revision: 47 $ ## $Author: mhx $ -## $Date: 2009/01/23 18:28:00 +0100 $ +## $Date: 2010/03/07 13:15:46 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/pv_tools b/cpan/Devel-PPPort/parts/inc/pv_tools index c7e4c1e907c..71f007c8a21 100644 --- a/cpan/Devel-PPPort/parts/inc/pv_tools +++ b/cpan/Devel-PPPort/parts/inc/pv_tools @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 5 $ +## $Revision: 6 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:51 +0100 $ +## $Date: 2010/03/07 13:15:44 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/pvs b/cpan/Devel-PPPort/parts/inc/pvs index 71485ad32e7..082b297ec75 100644 --- a/cpan/Devel-PPPort/parts/inc/pvs +++ b/cpan/Devel-PPPort/parts/inc/pvs @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 11 $ +## $Revision: 14 $ ## $Author: mhx $ -## $Date: 2009/06/12 12:19:15 +0200 $ +## $Date: 2010/03/07 13:15:45 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## @@ -30,15 +30,21 @@ __UNDEFINED__ STR_WITH_LEN(s) (s ""), (sizeof(s)-1) __UNDEFINED__ newSVpvs(str) newSVpvn(str "", sizeof(str) - 1) __UNDEFINED__ newSVpvs_flags(str, flags) newSVpvn_flags(str "", sizeof(str) - 1, flags) +__UNDEFINED__ newSVpvs_share(str) newSVpvn_share(str "", sizeof(str) - 1, 0) __UNDEFINED__ sv_catpvs(sv, str) sv_catpvn(sv, str "", sizeof(str) - 1) __UNDEFINED__ sv_setpvs(sv, str) sv_setpvn(sv, str "", sizeof(str) - 1) __UNDEFINED__ hv_fetchs(hv, key, lval) hv_fetch(hv, key "", sizeof(key) - 1, lval) __UNDEFINED__ hv_stores(hv, key, val) hv_store(hv, key "", sizeof(key) - 1, val, 0) -__UNDEFINED__ gv_fetchpvn_flags(name, len, flags, svt) gv_fetchpv(name, flags, svt) __UNDEFINED__ gv_fetchpvs(name, flags, svt) gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt) __UNDEFINED__ gv_stashpvs(name, flags) gv_stashpvn(name "", sizeof(name) - 1, flags) +__UNDEFINED__ get_cvs(name, flags) get_cvn_flags(name "", sizeof(name)-1, flags) + +=xsinit + +#define NEED_newSVpvn_share + =xsubs void @@ -53,6 +59,22 @@ newSVpvs_flags() XPUSHs(newSVpvs_flags("newSVpvs_flags", SVs_TEMP)); XSRETURN(1); +int +newSVpvs_share() + PREINIT: + SV *sv; + U32 hash; + CODE: + RETVAL = 0; + PERL_HASH(hash, "pvs", 3); + sv = newSVpvs_share("pvs"); + RETVAL += strEQ(SvPV_nolen_const(sv), "pvs"); + RETVAL += SvCUR(sv) == 3; + RETVAL += SvSHARED_HASH(sv) == hash; + SvREFCNT_dec(sv); + OUTPUT: + RETVAL + void sv_catpvs(sv) SV *sv @@ -82,13 +104,6 @@ hv_stores(hv, sv) PPCODE: (void) hv_stores((HV *) SvRV(hv), "hv_stores", SvREFCNT_inc_simple(sv)); -SV* -gv_fetchpvn_flags() - CODE: - RETVAL = newRV_inc((SV*)gv_fetchpvn_flags("Devel::PPPort::VERSION", sizeof("Devel::PPPort::VERSION")-1, 0, SVt_PV)); - OUTPUT: - RETVAL - SV* gv_fetchpvs() CODE: @@ -103,13 +118,29 @@ gv_stashpvs() OUTPUT: RETVAL +int +get_cvs() + PREINIT: + CV* xv; + CODE: + RETVAL = 0; + xv = get_cvs("Devel::PPPort::foobar", 0); + if(xv == NULL) RETVAL++; + xv = get_cvs("Devel::PPPort::foobar", GV_ADDMULTI); + if(xv && SvTYPE(xv) == SVt_PVCV) RETVAL++; + xv = get_cvs("Devel::PPPort::get_cvs", 0); + if(xv && SvTYPE(xv) == SVt_PVCV) RETVAL++; +OUTPUT: + RETVAL -=tests plan => 11 + +=tests plan => 12 my $x = 'foo'; ok(Devel::PPPort::newSVpvs(), "newSVpvs"); ok(Devel::PPPort::newSVpvs_flags(), "newSVpvs_flags"); +ok(Devel::PPPort::newSVpvs_share(), 3); Devel::PPPort::sv_catpvs($x); ok($x, "foosv_catpvs"); @@ -123,6 +154,7 @@ ok(scalar keys %h, 2); ok(exists $h{'hv_stores'}); ok($h{'hv_stores'}, 4711); ok(Devel::PPPort::hv_fetchs(\%h), 42); -ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION); -ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION); -ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::); +ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION); +ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::); + +ok(Devel::PPPort::get_cvs(), 3); diff --git a/cpan/Devel-PPPort/parts/inc/shared_pv b/cpan/Devel-PPPort/parts/inc/shared_pv index db779be8356..76b5dee0614 100644 --- a/cpan/Devel-PPPort/parts/inc/shared_pv +++ b/cpan/Devel-PPPort/parts/inc/shared_pv @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 5 $ +## $Revision: 7 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:52 +0100 $ +## $Date: 2010/03/07 13:15:44 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## @@ -22,6 +22,12 @@ __UNDEFINED__ =implementation +/* Hint: newSVpvn_share + * The SVs created by this function only mimic the behaviour of + * shared PVs without really being shared. Only use if you know + * what you're doing. + */ + #ifndef newSVpvn_share #if { NEED newSVpvn_share } diff --git a/cpan/Devel-PPPort/parts/inc/snprintf b/cpan/Devel-PPPort/parts/inc/snprintf index 310bfbaa104..a2d20397d56 100644 --- a/cpan/Devel-PPPort/parts/inc/snprintf +++ b/cpan/Devel-PPPort/parts/inc/snprintf @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 6 $ +## $Revision: 7 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:52 +0100 $ +## $Date: 2010/03/07 13:15:45 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/sprintf b/cpan/Devel-PPPort/parts/inc/sprintf index 6756f9abc9c..c7452dc524f 100644 --- a/cpan/Devel-PPPort/parts/inc/sprintf +++ b/cpan/Devel-PPPort/parts/inc/sprintf @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 2 $ +## $Revision: 3 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:51 +0100 $ +## $Date: 2010/03/07 13:15:44 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/strlfuncs b/cpan/Devel-PPPort/parts/inc/strlfuncs index d351703e198..f29ccb3f859 100644 --- a/cpan/Devel-PPPort/parts/inc/strlfuncs +++ b/cpan/Devel-PPPort/parts/inc/strlfuncs @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 6 $ +## $Revision: 7 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:52 +0100 $ +## $Date: 2010/03/07 13:15:45 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/sv_xpvf b/cpan/Devel-PPPort/parts/inc/sv_xpvf index 3c990c6e934..c2ad0dfc924 100644 --- a/cpan/Devel-PPPort/parts/inc/sv_xpvf +++ b/cpan/Devel-PPPort/parts/inc/sv_xpvf @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 10 $ +## $Revision: 11 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:53 +0100 $ +## $Date: 2010/03/07 13:15:46 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/threads b/cpan/Devel-PPPort/parts/inc/threads index 518bdf1fcb9..7df6bd7f8ff 100644 --- a/cpan/Devel-PPPort/parts/inc/threads +++ b/cpan/Devel-PPPort/parts/inc/threads @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 11 $ +## $Revision: 12 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:53 +0100 $ +## $Date: 2010/03/07 13:15:47 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/uv b/cpan/Devel-PPPort/parts/inc/uv index 5fdec7afa0c..d1ddd3449d6 100644 --- a/cpan/Devel-PPPort/parts/inc/uv +++ b/cpan/Devel-PPPort/parts/inc/uv @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 17 $ +## $Revision: 18 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:54 +0100 $ +## $Date: 2010/03/07 13:15:47 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/variables b/cpan/Devel-PPPort/parts/inc/variables index 3fbb566a988..aee0bb13d2b 100644 --- a/cpan/Devel-PPPort/parts/inc/variables +++ b/cpan/Devel-PPPort/parts/inc/variables @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 20 $ +## $Revision: 22 $ ## $Author: mhx $ -## $Date: 2009/06/12 04:10:50 +0200 $ +## $Date: 2011/04/13 09:39:16 +0200 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## @@ -383,8 +383,10 @@ other_variables() ppp_TESTVAR(PL_debstash); ppp_TESTVAR(PL_defgv); ppp_TESTVAR(PL_diehook); -#if PERL_VERSION >= 14 - ppp_PARSERVAR_dummy; +#if { VERSION >= 5.13.7 } + /* can't get a pointer any longer */ + mXPUSHi(PL_dirty ? 1 : 1); + count++; #else ppp_TESTVAR(PL_dirty); #endif diff --git a/cpan/Devel-PPPort/parts/inc/version b/cpan/Devel-PPPort/parts/inc/version index ca8d8a6e358..ce87f76f807 100644 --- a/cpan/Devel-PPPort/parts/inc/version +++ b/cpan/Devel-PPPort/parts/inc/version @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 10 $ +## $Revision: 11 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:54 +0100 $ +## $Date: 2010/03/07 13:15:48 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/inc/warn b/cpan/Devel-PPPort/parts/inc/warn index 76bd881e970..779239fbeec 100644 --- a/cpan/Devel-PPPort/parts/inc/warn +++ b/cpan/Devel-PPPort/parts/inc/warn @@ -1,12 +1,12 @@ ################################################################################ ## -## $Revision: 7 $ +## $Revision: 8 $ ## $Author: mhx $ -## $Date: 2009/01/18 14:10:52 +0100 $ +## $Date: 2010/03/07 13:15:45 +0100 $ ## ################################################################################ ## -## Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +## Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. ## Version 2.x, Copyright (C) 2001, Paul Marquess. ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski. ## diff --git a/cpan/Devel-PPPort/parts/ppport.fnc b/cpan/Devel-PPPort/parts/ppport.fnc index 567955e3bc2..f5f4032d335 100644 --- a/cpan/Devel-PPPort/parts/ppport.fnc +++ b/cpan/Devel-PPPort/parts/ppport.fnc @@ -4,13 +4,13 @@ : :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: : -: $Revision: 3 $ +: $Revision: 4 $ : $Author: mhx $ -: $Date: 2009/01/18 14:10:51 +0100 $ +: $Date: 2010/03/07 13:15:43 +0100 $ : :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: : -: Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +: Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. : Version 2.x, Copyright (C) 2001, Paul Marquess. : Version 1.x, Copyright (C) 1999, Kenneth Albanowski. : diff --git a/cpan/Devel-PPPort/parts/ppptools.pl b/cpan/Devel-PPPort/parts/ppptools.pl index 36830eb1867..2487a41b1b5 100644 --- a/cpan/Devel-PPPort/parts/ppptools.pl +++ b/cpan/Devel-PPPort/parts/ppptools.pl @@ -4,13 +4,13 @@ # ################################################################################ # -# $Revision: 27 $ +# $Revision: 29 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:51 +0100 $ +# $Date: 2010/03/07 13:15:43 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -312,17 +312,22 @@ sub parse_embed my @e = split /\s*\|\s*/, $line; if( @e >= 3 ) { my($flags, $ret, $name, @args) = @e; - for (@args) { - $_ = [trim_arg($_)]; + if ($name =~ /^[^\W\d]\w*$/) { + for (@args) { + $_ = [trim_arg($_)]; + } + ($ret) = trim_arg($ret); + push @func, { + name => $name, + flags => { map { $_, 1 } $flags =~ /./g }, + ret => $ret, + args => \@args, + cond => ppcond(\@pps), + }; + } + else { + warn "mysterious name [$name] in $file, line $.\n"; } - ($ret) = trim_arg($ret); - push @func, { - name => $name, - flags => { map { $_, 1 } $flags =~ /./g }, - ret => $ret, - args => \@args, - cond => ppcond(\@pps), - }; } } } diff --git a/cpan/Devel-PPPort/parts/todo/5005000 b/cpan/Devel-PPPort/parts/todo/5005000 index b99f61e20eb..c4f43694dc4 100644 --- a/cpan/Devel-PPPort/parts/todo/5005000 +++ b/cpan/Devel-PPPort/parts/todo/5005000 @@ -18,6 +18,7 @@ regnext # E (Perl_regnext) runops_debug # U runops_standard # U save_iv # U (save_iv) +save_op # U screaminstr # E (Perl_screaminstr) sv_iv # U sv_nv # U diff --git a/cpan/Devel-PPPort/parts/todo/5006000 b/cpan/Devel-PPPort/parts/todo/5006000 index 4e4f83e3b50..c2df4ee3348 100644 --- a/cpan/Devel-PPPort/parts/todo/5006000 +++ b/cpan/Devel-PPPort/parts/todo/5006000 @@ -45,8 +45,6 @@ init_i18nl10n # U (perl_init_i18nl10n) init_i18nl14n # U (perl_init_i18nl14n) is_uni_alnum # U is_uni_alnum_lc # U -is_uni_alnumc # U -is_uni_alnumc_lc # U is_uni_alpha # U is_uni_alpha_lc # U is_uni_ascii # U @@ -72,7 +70,6 @@ is_uni_upper_lc # U is_uni_xdigit # U is_uni_xdigit_lc # U is_utf8_alnum # U -is_utf8_alnumc # U is_utf8_alpha # U is_utf8_ascii # U is_utf8_char # U diff --git a/cpan/Devel-PPPort/parts/todo/5007003 b/cpan/Devel-PPPort/parts/todo/5007003 index 2271d2bcd9d..00ad0b6803b 100644 --- a/cpan/Devel-PPPort/parts/todo/5007003 +++ b/cpan/Devel-PPPort/parts/todo/5007003 @@ -1,4 +1,7 @@ 5.007003 +OP_DESC # U +OP_NAME # U +PL_peepp # E PerlIO_clearerr # U (PerlIO_clearerr) PerlIO_close # U (PerlIO_close) PerlIO_eof # U (PerlIO_eof) diff --git a/cpan/Devel-PPPort/parts/todo/5008009 b/cpan/Devel-PPPort/parts/todo/5008009 new file mode 100644 index 00000000000..129e018f45f --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5008009 @@ -0,0 +1 @@ +5.008009 diff --git a/cpan/Devel-PPPort/parts/todo/5009002 b/cpan/Devel-PPPort/parts/todo/5009002 index d00dcdac9b9..5678492aef9 100644 --- a/cpan/Devel-PPPort/parts/todo/5009002 +++ b/cpan/Devel-PPPort/parts/todo/5009002 @@ -1,7 +1,6 @@ 5.009002 SvPVbyte_force # U find_rundefsvoffset # U -gv_fetchsv # U op_refcnt_lock # U op_refcnt_unlock # U savesvpv # U diff --git a/cpan/Devel-PPPort/parts/todo/5009003 b/cpan/Devel-PPPort/parts/todo/5009003 index 6a69c9f0437..5c843c74504 100644 --- a/cpan/Devel-PPPort/parts/todo/5009003 +++ b/cpan/Devel-PPPort/parts/todo/5009003 @@ -17,9 +17,7 @@ hv_riter_set # U is_utf8_string_loclen # U newGIVENOP # U newSVhek # U -newSVpvs_share # U newWHENOP # U -newWHILEOP # E (Perl_newWHILEOP) savepvs # U sortsv_flags # U vverify # U diff --git a/cpan/Devel-PPPort/parts/todo/5009004 b/cpan/Devel-PPPort/parts/todo/5009004 index 0d6b7d50519..6295708cd65 100644 --- a/cpan/Devel-PPPort/parts/todo/5009004 +++ b/cpan/Devel-PPPort/parts/todo/5009004 @@ -1,6 +1,7 @@ 5.009004 PerlIO_context_layers # U gv_name_set # U +hv_copy_hints_hv # U my_vsnprintf # U newXS_flags # U regclass_swash # E (Perl_regclass_swash) diff --git a/cpan/Devel-PPPort/parts/todo/5009005 b/cpan/Devel-PPPort/parts/todo/5009005 index 8b847174461..c1540dfdf7e 100644 --- a/cpan/Devel-PPPort/parts/todo/5009005 +++ b/cpan/Devel-PPPort/parts/todo/5009005 @@ -1,11 +1,12 @@ 5.009005 +PL_parser # E Perl_signbit # U SvRX # U SvRXOK # U av_create_and_push # U av_create_and_unshift_one # U -get_cvn_flags # U gv_fetchfile_flags # U +lex_start # E (Perl_lex_start) mro_get_linear_isa # U mro_method_changed_in # U my_dirfd # U diff --git a/cpan/Devel-PPPort/parts/todo/5010001 b/cpan/Devel-PPPort/parts/todo/5010001 new file mode 100644 index 00000000000..9b955189468 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5010001 @@ -0,0 +1,14 @@ +5.010001 +HeUTF8 # U +croak_xs_usage # U +mro_get_from_name # U +mro_get_private_data # U +mro_register # U +mro_set_mro # U +mro_set_private_data # U +save_hints # U +save_padsv_and_mortalize # U +save_pushi32ptr # U +save_pushptr # U +save_pushptrptr # U +sv_insert_flags # U diff --git a/cpan/Devel-PPPort/parts/todo/5011000 b/cpan/Devel-PPPort/parts/todo/5011000 index f58fa284170..eca9a51dbbc 100644 --- a/cpan/Devel-PPPort/parts/todo/5011000 +++ b/cpan/Devel-PPPort/parts/todo/5011000 @@ -1,27 +1,15 @@ 5.011000 -HeUTF8 # U -MULTICALL # E -PERL_SYS_TERM # E -POP_MULTICALL # E -PUSH_MULTICALL # E +Gv_AMupdate # E (Perl_Gv_AMupdate) +PL_opfreehook # E SvOOK_offset # U av_iter_p # U -croak_xs_usage # U fetch_cop_label # U +gv_add_by_type # U gv_fetchmethod_flags # U -hv_assert # U -mro_get_from_name # U -mro_get_private_data # U -mro_register # U -mro_set_mro # U -mro_set_private_data # U -pad_sv # U +is_ascii_string # U pregfree2 # U -ref # U (Perl_ref) save_adelete # U +save_aelem_flags # U +save_hdelete # U save_helem_flags # U -save_padsv_and_mortalize # U -save_pushptr # U -stashpv_hvname_match # U -sv_insert_flags # U sv_utf8_upgrade_flags_grow # U diff --git a/cpan/Devel-PPPort/parts/todo/5011001 b/cpan/Devel-PPPort/parts/todo/5011001 new file mode 100644 index 00000000000..f42409363b7 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5011001 @@ -0,0 +1,6 @@ +5.011001 +ck_warner # U +ck_warner_d # U +is_utf8_perl_space # U +is_utf8_perl_word # U +is_utf8_posix_digit # U diff --git a/cpan/Devel-PPPort/parts/todo/5011002 b/cpan/Devel-PPPort/parts/todo/5011002 new file mode 100644 index 00000000000..4e66714450a --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5011002 @@ -0,0 +1,14 @@ +5.011002 +PL_keyword_plugin # E +lex_bufutf8 # U +lex_discard_to # U +lex_grow_linestr # U +lex_next_chunk # U +lex_peek_unichar # U +lex_read_space # U +lex_read_to # U +lex_read_unichar # U +lex_stuff_pvn # U +lex_stuff_sv # U +lex_unstuff # U +pad_findmy # E (Perl_pad_findmy) diff --git a/cpan/Devel-PPPort/parts/todo/5011003 b/cpan/Devel-PPPort/parts/todo/5011003 new file mode 100644 index 00000000000..3fd94ca1b60 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5011003 @@ -0,0 +1 @@ +5.011003 diff --git a/cpan/Devel-PPPort/parts/todo/5011004 b/cpan/Devel-PPPort/parts/todo/5011004 new file mode 100644 index 00000000000..86c1fce4f2a --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5011004 @@ -0,0 +1,2 @@ +5.011004 +prescan_version # U diff --git a/cpan/Devel-PPPort/parts/todo/5011005 b/cpan/Devel-PPPort/parts/todo/5011005 new file mode 100644 index 00000000000..d9b0d6a4c94 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5011005 @@ -0,0 +1,2 @@ +5.011005 +sv_pos_u2b_flags # U diff --git a/cpan/Devel-PPPort/parts/todo/5012000 b/cpan/Devel-PPPort/parts/todo/5012000 new file mode 100644 index 00000000000..82cbce2d6d9 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5012000 @@ -0,0 +1 @@ +5.012000 diff --git a/cpan/Devel-PPPort/parts/todo/5012001 b/cpan/Devel-PPPort/parts/todo/5012001 new file mode 100644 index 00000000000..90dc03fdf35 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5012001 @@ -0,0 +1 @@ +5.012001 diff --git a/cpan/Devel-PPPort/parts/todo/5012002 b/cpan/Devel-PPPort/parts/todo/5012002 new file mode 100644 index 00000000000..8ab87f08d8a --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5012002 @@ -0,0 +1 @@ +5.012002 diff --git a/cpan/Devel-PPPort/parts/todo/5012003 b/cpan/Devel-PPPort/parts/todo/5012003 new file mode 100644 index 00000000000..f2abab4c17c --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5012003 @@ -0,0 +1 @@ +5.012003 diff --git a/cpan/Devel-PPPort/parts/todo/5013000 b/cpan/Devel-PPPort/parts/todo/5013000 new file mode 100644 index 00000000000..f2f116d2fab --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013000 @@ -0,0 +1 @@ +5.013000 diff --git a/cpan/Devel-PPPort/parts/todo/5013001 b/cpan/Devel-PPPort/parts/todo/5013001 new file mode 100644 index 00000000000..679bf3c35e5 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013001 @@ -0,0 +1,6 @@ +5.013001 +croak_sv # U +die_sv # U +mess_sv # U +sv_2nv_flags # U +warn_sv # U diff --git a/cpan/Devel-PPPort/parts/todo/5013002 b/cpan/Devel-PPPort/parts/todo/5013002 new file mode 100644 index 00000000000..fa6d99b4076 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013002 @@ -0,0 +1,9 @@ +5.013002 +SvNV_nomg # U +find_rundefsv # U +foldEQ # U +foldEQ_locale # U +foldEQ_utf8 # U +hv_fill # U +sv_dec_nomg # U +sv_inc_nomg # U diff --git a/cpan/Devel-PPPort/parts/todo/5013003 b/cpan/Devel-PPPort/parts/todo/5013003 new file mode 100644 index 00000000000..5e04f03c8a5 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013003 @@ -0,0 +1,3 @@ +5.013003 +blockhook_register # E +croak_no_modify # U diff --git a/cpan/Devel-PPPort/parts/todo/5013004 b/cpan/Devel-PPPort/parts/todo/5013004 new file mode 100644 index 00000000000..20b0810cbe7 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013004 @@ -0,0 +1,2 @@ +5.013004 +XS_APIVERSION_BOOTCHECK # E diff --git a/cpan/Devel-PPPort/parts/todo/5013005 b/cpan/Devel-PPPort/parts/todo/5013005 new file mode 100644 index 00000000000..88c7c7b80b4 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013005 @@ -0,0 +1,6 @@ +5.013005 +PL_rpeepp # E +caller_cx # U +isOCTAL # U +lex_stuff_pvs # U +parse_fullstmt # U diff --git a/cpan/Devel-PPPort/parts/todo/5013006 b/cpan/Devel-PPPort/parts/todo/5013006 new file mode 100644 index 00000000000..9b7d2a0b2af --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013006 @@ -0,0 +1,33 @@ +5.013006 +LINKLIST # U +SvTRUE_nomg # U +ck_entersub_args_list # U +ck_entersub_args_proto # U +ck_entersub_args_proto_or_list # U +cv_get_call_checker # E +cv_set_call_checker # E +isWORDCHAR # U +lex_stuff_pv # U +mg_free_type # U +newSVpv_share # U +op_append_elem # U +op_append_list # U +op_contextualize # U +op_linklist # U +op_prepend_elem # U +parse_stmtseq # U +rv2cv_op_cv # U +savesharedpvs # U +savesharedsvpv # U +sv_2bool_flags # U +sv_catpv_flags # U +sv_catpv_nomg # U +sv_catpvs_flags # U +sv_catpvs_mg # U +sv_catpvs_nomg # U +sv_cmp_flags # U +sv_cmp_locale_flags # U +sv_collxfrm_flags # U +sv_eq_flags # U +sv_setpvs_mg # U +sv_setref_pvs # U diff --git a/cpan/Devel-PPPort/parts/todo/5013007 b/cpan/Devel-PPPort/parts/todo/5013007 new file mode 100644 index 00000000000..79a9a5f44a1 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013007 @@ -0,0 +1,36 @@ +5.013007 +HvENAME # U +OP_CLASS # U +SvPV_nomg_nolen # U +XopFLAGS # E +amagic_deref_call # U +bytes_cmp_utf8 # U +cop_hints_2hv # A +cop_hints_fetch_pv # U +cop_hints_fetch_pvn # U +cop_hints_fetch_pvs # U +cop_hints_fetch_sv # U +cophh_2hv # E +cophh_copy # E +cophh_delete_pv # E +cophh_delete_pvn # E +cophh_delete_pvs # E +cophh_delete_sv # E +cophh_fetch_pv # E +cophh_fetch_pvn # E +cophh_fetch_pvs # E +cophh_fetch_sv # E +cophh_free # E +cophh_store_pv # E +cophh_store_pvn # E +cophh_store_pvs # E +cophh_store_sv # E +custom_op_register # E +custom_op_xop # E +newFOROP # A +newWHILEOP # A +op_lvalue # U +op_scope # U +parse_barestmt # U +parse_block # U +parse_label # U diff --git a/cpan/Devel-PPPort/parts/todo/5013008 b/cpan/Devel-PPPort/parts/todo/5013008 new file mode 100644 index 00000000000..5c315d671ba --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013008 @@ -0,0 +1,8 @@ +5.013008 +foldEQ_latin1 # U +mg_findext # U +parse_arithexpr # U +parse_fullexpr # U +parse_listexpr # U +parse_termexpr # U +sv_unmagicext # U diff --git a/cpan/Devel-PPPort/parts/todo/5013009 b/cpan/Devel-PPPort/parts/todo/5013009 new file mode 100644 index 00000000000..51160ae344d --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013009 @@ -0,0 +1 @@ +5.013009 diff --git a/cpan/Devel-PPPort/parts/todo/5013010 b/cpan/Devel-PPPort/parts/todo/5013010 new file mode 100644 index 00000000000..d7f4365bfb1 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013010 @@ -0,0 +1,4 @@ +5.013010 +foldEQ_utf8_flags # U +is_utf8_xidcont # U +is_utf8_xidfirst # U diff --git a/cpan/Devel-PPPort/parts/todo/5013011 b/cpan/Devel-PPPort/parts/todo/5013011 new file mode 100644 index 00000000000..a33715f749e --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5013011 @@ -0,0 +1 @@ +5.013011 diff --git a/cpan/Devel-PPPort/parts/todo/5014000 b/cpan/Devel-PPPort/parts/todo/5014000 new file mode 100644 index 00000000000..2a7401a9755 --- /dev/null +++ b/cpan/Devel-PPPort/parts/todo/5014000 @@ -0,0 +1,17 @@ +5.014000 +BhkDISABLE # E +BhkENABLE # E +BhkENTRY_set # E +MULTICALL # E +PERL_SYS_TERM # E +POP_MULTICALL # E +PUSH_MULTICALL # E +XopDISABLE # E +XopENABLE # E +XopENTRY # E +XopENTRY_set # E +cophh_new_empty # E +my_lstat # U (Perl_my_lstat) +my_stat # U (Perl_my_stat) +ref # U (Perl_ref) +stashpv_hvname_match # U diff --git a/cpan/Devel-PPPort/ppport_h.PL b/cpan/Devel-PPPort/ppport_h.PL index e652c352d91..ef423353806 100644 --- a/cpan/Devel-PPPort/ppport_h.PL +++ b/cpan/Devel-PPPort/ppport_h.PL @@ -4,13 +4,13 @@ # ################################################################################ # -# $Revision: 7 $ +# $Revision: 8 $ # $Author: mhx $ -# $Date: 2006/06/25 03:41:08 +0200 $ +# $Date: 2010/03/07 13:16:55 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # diff --git a/cpan/Devel-PPPort/soak b/cpan/Devel-PPPort/soak index 1e9807068c5..43b1283b675 100644 --- a/cpan/Devel-PPPort/soak +++ b/cpan/Devel-PPPort/soak @@ -7,13 +7,13 @@ # ################################################################################ # -# $Revision: 19 $ +# $Revision: 20 $ # $Author: mhx $ -# $Date: 2009/01/18 14:10:50 +0100 $ +# $Date: 2010/03/07 13:15:42 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -33,7 +33,7 @@ use File::Find; use List::Util qw(max); use Config; -my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.19 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.20 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; $| = 1; my %OPT = ( @@ -589,7 +589,7 @@ going on, use the I<--verbose> option: =head1 COPYRIGHT -Version 3.x, Copyright (c) 2004-2009, Marcus Holland-Moritz. +Version 3.x, Copyright (c) 2004-2010, Marcus Holland-Moritz. Version 2.x, Copyright (C) 2001, Paul Marquess. diff --git a/cpan/Devel-PPPort/t/gv.t b/cpan/Devel-PPPort/t/gv.t index 3bf9ce6cefa..66722f27a03 100644 --- a/cpan/Devel-PPPort/t/gv.t +++ b/cpan/Devel-PPPort/t/gv.t @@ -30,9 +30,9 @@ BEGIN { require 'testutil.pl' if $@; } - if (2) { + if (5) { load(); - plan(tests => 2); + plan(tests => 5); } } @@ -50,5 +50,11 @@ package main; ok(Devel::PPPort::GvSVn(), 1); -ok(Devel::PPPort::isGV_with_GP(), 2) +ok(Devel::PPPort::isGV_with_GP(), 2); + +ok(Devel::PPPort::get_cvn_flags(), 3); + +ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION); + +ok(Devel::PPPort::gv_fetchsv("Devel::PPPort::VERSION"), \*Devel::PPPort::VERSION); diff --git a/cpan/Devel-PPPort/t/magic.t b/cpan/Devel-PPPort/t/magic.t index 23b19ed438e..0bfe0535f2e 100644 --- a/cpan/Devel-PPPort/t/magic.t +++ b/cpan/Devel-PPPort/t/magic.t @@ -84,9 +84,10 @@ ok($h{sv}, 4711); &Devel::PPPort::sv_usepvn_mg($h{sv}, 'Perl'); ok($h{sv}, 'Perl'); -my $ver = eval qq[qv("v1.2.0")]; -ok($[ < 5.009 || $@ eq ''); -ok($@ || Devel::PPPort::SvVSTRING_mg($ver)); +# v1 is treated as a bareword in older perls... +my $ver = do { local $SIG{'__WARN__'} = sub {}; eval qq[v1.2.0] }; +ok($] < 5.009 || $@ eq ''); +ok($] < 5.009 || Devel::PPPort::SvVSTRING_mg($ver)); ok(!Devel::PPPort::SvVSTRING_mg(4711)); my $foo = 'bar'; diff --git a/cpan/Devel-PPPort/t/memory.t b/cpan/Devel-PPPort/t/memory.t index 501b819864e..74ecb991bcf 100644 --- a/cpan/Devel-PPPort/t/memory.t +++ b/cpan/Devel-PPPort/t/memory.t @@ -48,5 +48,5 @@ bootstrap Devel::PPPort; package main; -ok(Devel::PPPort::checkmem(), 4); +ok(Devel::PPPort::checkmem(), 6); diff --git a/cpan/Devel-PPPort/t/ppphtest.t b/cpan/Devel-PPPort/t/ppphtest.t index ae97b74171a..fe4ade08e72 100644 --- a/cpan/Devel-PPPort/t/ppphtest.t +++ b/cpan/Devel-PPPort/t/ppphtest.t @@ -12,6 +12,8 @@ BEGIN { if ($ENV{'PERL_CORE'}) { + chdir 't' if -d 't'; + @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext'; require Config; import Config; use vars '%Config'; if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) { diff --git a/cpan/Devel-PPPort/t/pvs.t b/cpan/Devel-PPPort/t/pvs.t index 7886096615b..ff4d3e05860 100644 --- a/cpan/Devel-PPPort/t/pvs.t +++ b/cpan/Devel-PPPort/t/pvs.t @@ -30,9 +30,9 @@ BEGIN { require 'testutil.pl' if $@; } - if (11) { + if (12) { load(); - plan(tests => 11); + plan(tests => 12); } } @@ -52,6 +52,7 @@ my $x = 'foo'; ok(Devel::PPPort::newSVpvs(), "newSVpvs"); ok(Devel::PPPort::newSVpvs_flags(), "newSVpvs_flags"); +ok(Devel::PPPort::newSVpvs_share(), 3); Devel::PPPort::sv_catpvs($x); ok($x, "foosv_catpvs"); @@ -65,7 +66,8 @@ ok(scalar keys %h, 2); ok(exists $h{'hv_stores'}); ok($h{'hv_stores'}, 4711); ok(Devel::PPPort::hv_fetchs(\%h), 42); -ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION); -ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION); -ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::); +ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION); +ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::); + +ok(Devel::PPPort::get_cvs(), 3); diff --git a/cpan/Devel-PPPort/typemap b/cpan/Devel-PPPort/typemap index 7225c4076dd..b18d5e40e58 100644 --- a/cpan/Devel-PPPort/typemap +++ b/cpan/Devel-PPPort/typemap @@ -4,13 +4,13 @@ # ################################################################################ # -# $Revision: 9 $ +# $Revision: 10 $ # $Author: mhx $ -# $Date: 2009/06/12 04:07:19 +0200 $ +# $Date: 2010/03/07 13:15:40 +0100 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # diff --git a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm index be8984e8ba8..39dccf1ce2b 100644 --- a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm +++ b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm @@ -18,7 +18,7 @@ BEGIN { $FIND_VERSION $ERROR $CHECK_INC_HASH]; use Exporter; @ISA = qw[Exporter]; - $VERSION = '0.44'; + $VERSION = '0.46'; $VERBOSE = 0; $DEPRECATED = 0; $FIND_VERSION = 1; @@ -332,7 +332,7 @@ sub check_install { sub _parse_version { my $self = shift; my $str = shift or return; - my $verbose = shift or 0; + my $verbose = shift || 0; ### skip lines which doesn't contain VERSION return unless $str =~ /VERSION/; diff --git a/cpan/Module-Metadata/lib/Module/Metadata.pm b/cpan/Module-Metadata/lib/Module/Metadata.pm index 41d8214ef54..e2c83d306a6 100644 --- a/cpan/Module-Metadata/lib/Module/Metadata.pm +++ b/cpan/Module-Metadata/lib/Module/Metadata.pm @@ -11,7 +11,7 @@ package Module::Metadata; use strict; use vars qw($VERSION); -$VERSION = '1.000005_01'; +$VERSION = '1.000007'; $VERSION = eval $VERSION; use File::Spec; @@ -36,7 +36,7 @@ my $PKG_REGEXP = qr{ # match a package declaration \s* # optional whitespace ($V_NUM_REGEXP)? # optional version number \s* # optional whitesapce - ; # semicolon line terminator + [;\{] # semicolon line terminator or block start (since 5.16) }x; my $VARNAME_REGEXP = qr{ # match fully-qualified VERSION name diff --git a/cpan/Module-Metadata/t/metadata.t b/cpan/Module-Metadata/t/metadata.t index 60cb31651d4..c0e0f124643 100644 --- a/cpan/Module-Metadata/t/metadata.t +++ b/cpan/Module-Metadata/t/metadata.t @@ -7,9 +7,18 @@ use lib 't/lib'; use IO::File; use MBTest; +my $undef; + # parse various module $VERSION lines # these will be reversed later to create %modules my @modules = ( + $undef => <<'---', # no $VERSION line +package Simple; +--- + $undef => <<'---', # undefined $VERSION +package Simple; +our $VERSION; +--- '1.23' => <<'---', # declared & defined on same line with 'our' package Simple; our $VERSION = '1.23'; @@ -170,6 +179,26 @@ our $VERSION = '1.23_00_00'; package Simple; our $VERSION; $VERSION = 'onetwothree'; +--- + $undef => <<'---', # package NAME BLOCK, undef $VERSION +package Simple { + our $VERSION; +} +--- + '1.23' => <<'---', # package NAME BLOCK, with $VERSION +package Simple { + our $VERSION = '1.23'; +} +--- + '1.23' => <<'---', # package NAME VERSION BLOCK +package Simple 1.23 { + 1; +} +--- + 'v1.2.3_4' => <<'---', # package NAME VERSION BLOCK +package Simple v1.2.3_4 { + 1; +} --- ); my %modules = reverse @modules; @@ -242,11 +271,18 @@ foreach my $module ( sort keys %modules ) { # Test::Builder will prematurely numify objects, so use this form my $errs; - ok( $pm_info->version eq $expected, - "correct module version (expected '$expected')" ) - or $errs++; + my $got = $pm_info->version; + if ( defined $expected ) { + ok( $got eq $expected, + "correct module version (expected '$expected')" ) + or $errs++; + } else { + ok( !defined($got), + "correct module version (expected undef)" ) + or $errs++; + } is( $warnings, '', 'no warnings from parsing' ) or $errs++; - diag "Got: '@{[$pm_info->version]}'\nModule contents:\n$module" if $errs; + diag "Got: '$got'\nModule contents:\n$module" if $errs; } } diff --git a/cpan/perlfaq/lib/perlfaq.pm b/cpan/perlfaq/lib/perlfaq.pm index bca26a56d84..416a98873fb 100644 --- a/cpan/perlfaq/lib/perlfaq.pm +++ b/cpan/perlfaq/lib/perlfaq.pm @@ -1,6 +1,6 @@ package perlfaq; -BEGIN { - $perlfaq::VERSION = '5.01500302'; +{ + $perlfaq::VERSION = '5.0150035'; } 0; # not is it supposed to be loaded diff --git a/cpan/perlfaq/lib/perlfaq.pod b/cpan/perlfaq/lib/perlfaq.pod index 929b03deaaf..095c436270f 100644 --- a/cpan/perlfaq/lib/perlfaq.pod +++ b/cpan/perlfaq/lib/perlfaq.pod @@ -14,55 +14,32 @@ The perlfaq comes with the standard Perl distribution, so if you have Perl you should have the perlfaq. You should also have the C tool that lets you read the L: - $ perldoc perlfaq + $ perldoc perlfaq or search the perlfaq question headings: - $ perldoc -q open + $ perldoc -q open See L for more information. Besides your local system, you can find the perlfaq on the web, including -at http://perldoc.perl.org/ . +at L. The perlfaq is an evolving document and you can read the latest version -at http://faq.perl.org/ . +at L. =head2 How to contribute to the perlfaq -Please review https://github.com/perl-doc-cats/perlfaq/wiki +Please review L, if you do not find your suggestion please create an issue or pull request -against https://github.com/perl-doc-cats/perlfaq . +against L. Once approved they will then be merged into -https://github.com/tpf/perlfaq which is the latest live version that -drives http://faq.perl.org/ and will be distributed with the next +L which is the latest live version that +drives L and will be distributed with the next release of Perl 5. -You can mail corrections, additions, and suggestions to -C<< >>. The perlfaq volunteers use this -address to coordinate their efforts and track the perlfaq development. -They appreciate your contributions to the FAQ but do not have time to -provide individual help, so don't use this address to ask FAQs. - -The perlfaq server posts extracts of the perlfaq to that newsgroup -every 6 hours (or so), and the community of volunteers reviews and -updates the answers. If you'd like to help review and update the -answers, check out comp.lang.perl.misc. - -You can also fork the perl repository, make your changes, and send them -to Perl 5 Porters. See L. - -=head2 What will happen if you mail your Perl programming problems to the authors? - -The perlfaq-workers like to keep all traffic on the perlfaq-workers list -so that everyone can see the work being done (and the work that needs to -be done). The mailing list serves as an official record. If you email the -authors or maintainers directly, you'll probably get a reply asking you -to post to the mailing list. If you don't get a reply, it probably means -that the person never saw the message or didn't have time to deal with -it. Posting to the list allows the volunteers with time to deal with it -when others are busy. +=head2 What if my question isn't answered in the FAQ? If you have a question that isn't in the FAQ and you would like help with it, try the resources in L. @@ -70,10 +47,9 @@ it, try the resources in L. =head1 CREDITS Tom Christiansen wrote the original perlfaq then expanded it with the -help of Nat Torkington. The perlfaq-workers maintain current document -and the denizens of comp.lang.perl.misc regularly review and update the -FAQ. Several people have contributed answers, corrections, and comments, -and the perlfaq notes those contributions wherever appropriate. +help of Nat Torkington. brian d foy substantialy edited and expanded +the perlfaq. perlfaq-workers and others have also supplied feedback, +patches and corrections over the years. =head1 AUTHOR AND COPYRIGHT @@ -115,7 +91,7 @@ them as you see fit (and at your own risk with no warranty from anyone). =head2 L: General Questions About Perl -Very general, high-level questions about Perl. +This section of the FAQ answers very general, high-level questions about Perl. =over 4 @@ -165,18 +141,10 @@ What's the difference between "perl" and "Perl"? =item * -Is it a Perl program or a Perl script? - -=item * - What is a JAPH? =item * -Where can I get a list of Larry Wall witticisms? - -=item * - How can I convince others to use Perl? =back @@ -184,13 +152,13 @@ How can I convince others to use Perl? =head2 L: Obtaining and Learning about Perl -Where to find source and documentation for Perl, support, and related matters. +This section of the FAQ answers questions about where to find source and documentation for Perl, support, and related matters. =over 4 =item * -What machines support perl? Where do I get it? +What machines support perl? Where do I get it? =item * @@ -206,15 +174,11 @@ I copied the perl binary from one machine to another, but scripts don't work. =item * -I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work? +I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work? =item * -What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean? - -=item * - -Is there an ISO or ANSI certified version of Perl? +What modules and extensions are available for Perl? What is CPAN? =item * @@ -222,11 +186,11 @@ Where can I get information on Perl? =item * -What are the Perl newsgroups on Usenet? Where do I post questions? +What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? =item * -Where should I post source code? +Where can I post questions? =item * @@ -238,30 +202,26 @@ Which magazines have Perl content? =item * -What mailing lists are there for Perl? +Which Perl blogs should I read? =item * -Where are the archives for comp.lang.perl.misc? +What mailing lists are there for Perl? =item * -Where can I buy a commercial version of perl? +Where can I buy a commercial version of Perl? =item * Where do I send bug reports? -=item * - -What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? - =back =head2 L: Programming Tools -Programmer tools and programming support. +This section of the FAQ answers questions related to programmer tools and programming support. =over 4 @@ -390,7 +350,7 @@ What's MakeMaker? =head2 L: Data Manipulation -Manipulating numbers, dates, strings, arrays, hashes, and miscellaneous data issues. +This section of the FAQ answers questions related to manipulating numbers, dates, strings, arrays, hashes, and miscellaneous data issues. =over 4 @@ -408,7 +368,7 @@ Why isn't my octal data interpreted correctly? =item * -Does Perl have a round() function? What about ceil() and floor()? Trig functions? +Does Perl have a round() function? What about ceil() and floor()? Trig functions? =item * @@ -564,7 +524,7 @@ How can I tell whether a certain element is contained in a list or array? =item * -How do I compute the difference of two arrays? How do I compute the intersection of two arrays? +How do I compute the difference of two arrays? How do I compute the intersection of two arrays? =item * @@ -711,13 +671,13 @@ How do I pack arrays of doubles or floats for XS code? =head2 L: Files and Formats -I/O and the "f" issues: filehandles, flushing, formats, and footers. +This section deals with I/O and the "f" issues: filehandles, flushing, formats, and footers. =over 4 =item * -How do I flush/unbuffer an output filehandle? Why must I do this? +How do I flush/unbuffer an output filehandle? Why must I do this? =item * @@ -749,7 +709,7 @@ How can I manipulate fixed-record-length files? =item * -How can I make a filehandle local to a subroutine? How do I pass filehandles between subroutines? How do I make an array of filehandles? +How can I make a filehandle local to a subroutine? How do I pass filehandles between subroutines? How do I make an array of filehandles? =item * @@ -789,7 +749,7 @@ Is there a leak/bug in glob()? =item * -How can I open a file with a leading ">" or trailing blanks? +How can I open a file with a leading "E" or trailing blanks? =item * @@ -837,7 +797,7 @@ How can I read in a file by paragraphs? =item * -How can I read a single character from a file? From the keyboard? +How can I read a single character from a file? From the keyboard? =item * @@ -857,7 +817,7 @@ How do I close a file descriptor by number? =item * -Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? +Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? =item * @@ -865,7 +825,7 @@ Why doesn't glob("*.*") get all the files? =item * -Why does Perl let me delete read-only files? Why does C<-i> clobber protected files? Isn't this a bug in Perl? +Why does Perl let me delete read-only files? Why does C<-i> clobber protected files? Isn't this a bug in Perl? =item * @@ -892,7 +852,7 @@ How do I copy an entire directory? =head2 L: Regular Expressions -This section is surprisingly small because the rest of the FAQ is littered with answers involving regular expressions. For example, decoding a URL and checking whether something is a number are handled with regular expressions, but those answers are found elsewhere in this document (in L: "How do I decode or create those %-encodings on the web" and L: "How do I determine whether a scalar is a number/whole/integer/float", to be precise). +This section is surprisingly small because the rest of the FAQ is littered with answers involving regular expressions. For example, decoding a URL and checking whether something is a number can be handled with regular expressions, but those answers are found elsewhere in this document (in perlfaq9 : "How do I decode or create those %-encodings on the web" and perlfaq4 : "How do I determine whether a scalar is a number/whole/integer/float", to be precise). =over 4 @@ -926,7 +886,7 @@ How can I make C<\w> match national character sets? =item * -How can I match a locale-smart version of C? +How can I match a locale-smart version of C ? =item * @@ -997,7 +957,7 @@ How do I match a regular expression that's in a variable? =head2 L: General Perl Language Issues -General Perl language issues that don't clearly fit into any of the other sections. +This section deals with general Perl language issues that don't clearly fit into any of the other sections. =over 4 @@ -1067,7 +1027,7 @@ How do I create a static variable? =item * -What's the difference between dynamic and lexical (static) scoping? Between local() and my()? +What's the difference between dynamic and lexical (static) scoping? Between local() and my()? =item * @@ -1126,7 +1086,7 @@ What does "bad interpreter" mean? =head2 L: System Interaction -This section of the Perl FAQ covers questions involving operating system interaction. Topics include interprocess communication (IPC), control over the user-interface (keyboard, screen and pointing devices), and most anything else not related to data manipulation. Read the FAQs and documentation specific to the port of perl to your operating system (eg, L, L, ...). These should contain more detailed information on the vagaries of your perl. +This section of the Perl FAQ covers questions involving operating system interaction. Topics include interprocess communication (IPC), control over the user-interface (keyboard, screen and pointing devices), and most anything else not related to data manipulation. =over 4 @@ -1204,7 +1164,7 @@ How can I do an atexit() or setjmp()/longjmp()? (Exception handling) =item * -Why doesn't my sockets program work under System V (Solaris)? What does the error message "Protocol not supported" mean? +Why doesn't my sockets program work under System V (Solaris)? What does the error message "Protocol not supported" mean? =item * @@ -1264,7 +1224,7 @@ Is there a way to hide perl's command line from programs such as "ps"? =item * -I {changed directory, modified my environment} in a perl script. How come the change disappeared when I exited the script? How do I get my changes to be visible? +I {changed directory, modified my environment} in a perl script. How come the change disappeared when I exited the script? How do I get my changes to be visible? =item * @@ -1335,7 +1295,7 @@ What is socket.ph and where do I get it? =head2 L: Networking -Networking, the internet, and a few on the web. +This section deals with questions related to networking, the internet, and a few on the web. =over 4 @@ -1361,7 +1321,7 @@ How do I extract URLs? =item * -How do I download a file from the user's machine? How do I open a file on another machine? +How do I download a file from the user's machine? How do I open a file on another machine? =item * diff --git a/cpan/perlfaq/lib/perlfaq1.pod b/cpan/perlfaq/lib/perlfaq1.pod index 643ff4671ea..412b6bed00d 100644 --- a/cpan/perlfaq/lib/perlfaq1.pod +++ b/cpan/perlfaq/lib/perlfaq1.pod @@ -10,37 +10,35 @@ about Perl. =head2 What is Perl? Perl is a high-level programming language with an eclectic heritage -written by Larry Wall and a cast of thousands. It derives from the -ubiquitous C programming language and to a lesser extent from sed, -awk, the Unix shell, and at least a dozen other tools and languages. +written by Larry Wall and a cast of thousands. + Perl's process, file, and text manipulation facilities make it particularly well-suited for tasks involving quick prototyping, system utilities, software tools, system management tasks, database access, -graphical programming, networking, and world wide web programming. -These strengths make it especially popular with system administrators -and CGI script authors, but mathematicians, geneticists, journalists, -and even managers also use Perl. Maybe you should, too. +graphical programming, networking, and web programming. + +Perl derives from the ubiquitous C programming language and to a +lesser extent from sed, awk, the Unix shell, and many other tools +and languages. + +These strengths make it especially popular with web developers +and system administrators, but mathematicians, geneticists, journalists, +and managers also use Perl. Maybe you should, too. =head2 Who supports Perl? Who develops it? Why is it free? The original culture of the pre-populist Internet and the deeply-held beliefs of Perl's author, Larry Wall, gave rise to the free and open -distribution policy of perl. Perl is supported by its users. The +distribution policy of Perl. Perl is supported by its users. The core, the standard Perl library, the optional modules, and the -documentation you're reading now were all written by volunteers. See -the personal note at the end of the README file in the perl source -distribution for more details. See L (new as of 5.005) -for Perl's milestone releases. +documentation you're reading now were all written by volunteers. -In particular, the core development team (known as the Perl Porters) -are a rag-tag band of highly altruistic individuals committed to +The core development team (known as the Perl Porters) +are a group of highly altruistic individuals committed to producing better software for free than you could hope to purchase for -money. You may snoop on pending developments via the archives at -http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/ -and http://archive.develooper.com/perl5-porters@perl.org/ -or the news gateway nntp://nntp.perl.org/perl.perl5.porters or -its web interface at http://nntp.perl.org/group/perl.perl5.porters , -or read the faq at http://dev.perl.org/perl5/docs/p5p-faq.html , +money. You may snoop on pending developments via the +L +or read the L, or you can subscribe to the mailing list by sending perl5-porters-subscribe@perl.org a subscription request (an empty message with no subject is fine). @@ -52,7 +50,7 @@ than GNU software's tend to be. You can get commercial support of Perl if you wish, although for most users the informal support will more than suffice. See the answer to -"Where can I buy a commercial version of perl?" for more information. +"Where can I buy a commercial version of Perl?" for more information. =head2 Which version of Perl should I use? @@ -86,7 +84,7 @@ so you'll have an easier time finding help for those. Versions prior to perl5.004 had serious security problems with buffer overflows, and in some cases have CERT advisories (for instance, -http://www.cert.org/advisories/CA-1997-17.html ). +L ). =item * @@ -107,11 +105,9 @@ as its whitewashed bones have fractured or eroded. =item * -There is no Perl 6 release scheduled, but it will be available when -it's ready. The joke is that it's scheduled for Christmas, but that we -just don't know which one. Stay tuned, but don't worry that you'll -have to change major versions of Perl; no one is going to take Perl 5 -away from you. +The current leading implementation of Perl 6, Rakudo, released a "useful, +usable, 'early adopter'" distribution of Perl 6 (called Rakudo Star) in July of +2010. Please see L for more information. =item * @@ -124,50 +120,46 @@ minor release (i.e. perl5.9.x, where 9 is the minor release). =back - =head2 What are Perl 4, Perl 5, or Perl 6? -(contributed by brian d foy) - -In short, Perl 4 is the past, Perl 5 is the present, and Perl 6 is the -future. +In short, Perl 4 is the parent to both Perl 5 and Perl 6. Perl 5 is the older +sibling, and though they are different languages, someone who knows one will +spot many similarities in the other. The number after Perl (i.e. the 5 after Perl 5) is the major release of the perl interpreter as well as the version of the language. Each major version has significant differences that earlier versions cannot support. -The current major release of Perl is Perl 5, and was first released in +The current major release of Perl is Perl 5, first released in 1994. It can run scripts from the previous major release, Perl 4 -(March 1991), but has significant differences. It introduced the -concept of references, complex data structures, and modules. The Perl -5 interpreter was a complete re-write of the previous perl sources. - -Perl 6 is the next major version of Perl, although it's not intended to -replace Perl 5. It's still in development in both its syntax and -design. The work started in 2002 and is still ongoing. Some of the -most interesting features have shown up in the latest versions of Perl -5, and some Perl 5 modules allow you to use some Perl 6 syntax in your -programs. The current leading implementation of Perl 6 is Rakudo ( -http://rakudo.org ). +(March 1991), but has significant differences. + +Perl 6 is a reinvention of Perl, it is a language in the same lineage but +not compatible. The two are complementary, not mutually exclusive. Perl 6 is +not meant to replace Perl 5, and vice versa. See L below +to find out more. See L for a history of Perl revisions. =head2 What is Perl 6? -At The Second O'Reilly Open Source Software Convention, Larry Wall -announced Perl 6 development would begin in earnest. Perl 6 was an oft -used term for Chip Salzenberg's project to rewrite Perl in C++ named -Topaz. However, Topaz provided valuable insights to the next version -of Perl and its implementation, but was ultimately abandoned. +Perl 6 was I described as the community's rewrite of Perl 5. +Development started in 2002; syntax and design work continue to this day. +As the language has evolved, it has become clear that it is a separate +language, incompatible with Perl 5 but in the same language family. + +Contrary to popular belief, Perl 6 and Perl 5 peacefully coexist with one +another. Perl 6 has proven to be a fascinating source of ideas for those +using Perl 5 (the L object system is a well-known example). There is +overlap in the communities, and this overlap fosters the tradition of sharing +and borrowing that have been instrumental to Perl's success. The current +leading implementation of Perl 6 is Rakudo, and you can learn more about +it at L. If you want to learn more about Perl 6, or have a desire to help in the crusade to make Perl a better place then read the Perl 6 developers -page at http://dev.perl.org/perl6/ and get involved. - -Perl 6 is not scheduled for release yet, and Perl 5 will still be supported -for quite awhile after its release. Do not wait for Perl 6 to do whatever -you need to do. +page at L and get involved. "We're really serious about reinventing everything that needs reinventing." --Larry Wall @@ -176,14 +168,11 @@ you need to do. Production releases, which incorporate bug fixes and new functionality, are widely tested before release. Since the 5.000 release, we have -averaged only about one production release per year. +averaged about one production release per year. -Larry and the Perl development team occasionally make changes to the +The Perl development team occasionally make changes to the internal core of the language, but all possible efforts are made toward -backward compatibility. While not quite all Perl 4 scripts run flawlessly -under Perl 5, an update to perl should nearly never invalidate a program -written for an earlier version of perl (barring accidental bug fixes -and the rare new keyword). +backward compatibility. =head2 Is Perl difficult to learn? @@ -214,21 +203,25 @@ discussed in Part 2. =head2 How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl? -Favorably in some areas, unfavorably in others. Precisely which areas -are good and bad is often a personal choice, so asking this question -on Usenet runs a strong risk of starting an unproductive Holy War. +Perl can be used for almost any coding problem, even ones which require +intergrating specialist C code for extra speed. As with any tool it can +be used well or badly. Perl has many strengths, and a few weaknesses, +precisely which areas are good and bad is often a personal choice. -Probably the best thing to do is try to write equivalent code to do a -set of tasks. These languages have their own newsgroups in which you -can learn about (but hopefully not argue about) them. +When choosing a language you should also be influenced buy the +L, L +and L which surrounds it. -Some comparison documents can be found at http://www.perl.com/doc/FMTEYEWTK/versus/ -if you really can't stop yourself. +For comparisons to a specific language it is often best to create +a small project in both languages and compare the results, make sure +to use all the L of each language, +as a language is far more than just it's syntax. =head2 Can I do [task] in Perl? Perl is flexible and extensible enough for you to use on virtually any task, from one-line file-processing tasks to large, elaborate systems. + For many people, Perl serves as a great replacement for shell scripting. For others, it serves as a convenient, high-level replacement for most of what they'd program in low-level languages like C or C++. It's ultimately @@ -257,62 +250,18 @@ application written in another language that's all done (and done well), or you have an application language specifically designed for a certain task (e.g. prolog, make). -For various reasons, Perl is probably not well-suited for real-time -embedded systems, low-level operating systems development work like -device drivers or context-switching code, complex multi-threaded -shared-memory applications, or extremely large applications. You'll -notice that perl is not itself written in Perl. - -Perl remains fundamentally a dynamically typed language, not -a statically typed one. You certainly won't be chastised if you don't -trust nuclear-plant or brain-surgery monitoring code to it. And Larry -will sleep easier, too--Wall Street programs not withstanding. :-) +If you find that you need to speed up a specific part of a Perl +application (not something you often need) you may want to use C, +but you can access this from your Perl code with L. =head2 What's the difference between "perl" and "Perl"? -One bit. Oh, you weren't talking ASCII? :-) Larry now uses "Perl" to -signify the language proper and "perl" the implementation of it, i.e. -the current interpreter. Hence Tom's quip that "Nothing but perl can -parse Perl." - -Before the first edition of I, people commonly -referred to the language as "perl", and its name appeared that way in -the title because it referred to the interpreter. In the book, Randal -Schwartz capitalised the language's name to make it stand out better -when typeset. This convention was adopted by the community, and the -second edition became I, using the capitalized -version of the name to refer to the language. - -You may or may not choose to follow this usage. For example, -parallelism means "awk and perl" and "Python and Perl" look good, while -"awk and Perl" and "Python and perl" do not. But never write "PERL", -because perl is not an acronym, apocryphal folklore and post-facto -expansions notwithstanding. - -=head2 Is it a Perl program or a Perl script? - -Larry doesn't really care. He says (half in jest) that "a script is -what you give the actors. A program is what you give the audience." - -Originally, a script was a canned sequence of normally interactive -commands--that is, a chat script. Something like a UUCP or PPP chat -script or an expect script fits the bill nicely, as do configuration -scripts run by a program at its start up, such F<.cshrc> or F<.ircrc>, -for example. Chat scripts were just drivers for existing programs, -not stand-alone programs in their own right. - -A computer scientist will correctly explain that all programs are -interpreted and that the only question is at what level. But if you -ask this question of someone who isn't a computer scientist, they might -tell you that a I has been compiled to physical machine code -once and can then be run multiple times, whereas a I + - <# Just data #> + <# Just data #> - >>>>>>>>>>> ]]> + >>>>>>>>>>> ]]> If HTML comments include other tags, those solutions would also break on text like this: - + =head2 How do I extract URLs? You can easily extract all sorts of URLs from HTML with -C which handles anchors, images, objects, -frames, and many other tags that can contain a URL. If you need +L which handles anchors, images, objects, +frames, and many other tags that can contain a URL. If you need anything more complex, you can create your own subclass of -C or C. You might even use -C as an example for something specifically +L or L. You might even use +L as an example for something specifically suited to your needs. -You can use C to extract URLs from an arbitrary text document. +You can use L to extract URLs from an arbitrary text document. Less complete solutions involving regular expressions can save -you a lot of processing time if you know that the input is simple. One +you a lot of processing time if you know that the input is simple. One solution from Tom Christiansen runs 100 times faster than most module-based approaches but only extracts URLs from anchors where the first attribute is HREF and there are no other attributes. - #!/usr/bin/perl -n00 - # qxurl - tchrist@perl.com - print "$2\n" while m{ - < \s* - A \s+ HREF \s* = \s* (["']) (.*?) \g1 - \s* > - }gsix; + #!/usr/bin/perl -n00 + # qxurl - tchrist@perl.com + print "$2\n" while m{ + < \s* + A \s+ HREF \s* = \s* (["']) (.*?) \g1 + \s* > + }gsix; -=head2 How do I download a file from the user's machine? How do I open a file on another machine? +=head2 How do I download a file from the user's machine? How do I open a file on another machine? In this case, download means to use the file upload feature of HTML -forms. You allow the web surfer to specify a file to send to your web -server. To you it looks like a download, and to the user it looks -like an upload. No matter what you call it, you do it with what's -known as B encoding. The C module (which +forms. You allow the web surfer to specify a file to send to your web +server. To you it looks like a download, and to the user it looks +like an upload. No matter what you call it, you do it with what's +known as B encoding. The C module (which comes with Perl as part of the Standard Library) supports this in the C method, which isn't the same as the C method. @@ -180,69 +179,69 @@ The C module (which comes with Perl) has functions to create the HTML form widgets. See the C documentation for more examples. - use CGI qw/:standard/; - print header, - start_html('Favorite Animals'), + use CGI qw/:standard/; + print header, + start_html('Favorite Animals'), - start_form, - "What's your favorite animal? ", - popup_menu( - -name => 'animal', - -values => [ qw( Llama Alpaca Camel Ram ) ] - ), - submit, + start_form, + "What's your favorite animal? ", + popup_menu( + -name => 'animal', + -values => [ qw( Llama Alpaca Camel Ram ) ] + ), + submit, - end_form, - end_html; + end_form, + end_html; =head2 How do I fetch an HTML file? (contributed by brian d foy) -Use the libwww-perl distribution. The C module can fetch web +Use the libwww-perl distribution. The L module can fetch web resources and give their content back to you as a string: - use LWP::Simple qw(get); + use LWP::Simple qw(get); - my $html = get( "http://www.example.com/index.html" ); + my $html = get( "L ); It can also store the resource directly in a file: - use LWP::Simple qw(getstore); + use LWP::Simple qw(getstore); - getstore( "http://www.example.com/index.html", "foo.html" ); + getstore( "L, "foo.html" ); If you need to do something more complicated, you can use -C module to create your own user-agent (e.g. browser) +L module to create your own user-agent (e.g. browser) to get the job done. If you want to simulate an interactive web -browser, you can use the C module. +browser, you can use the L module. =head2 How do I automate an HTML form submission? If you are doing something complex, such as moving through many pages -and forms or a web site, you can use C. See its +and forms or a web site, you can use L. See its documentation for all the details. If you're submitting values using the GET method, create a URL and encode the form using the C method: - use LWP::Simple; - use URI::URL; + use LWP::Simple; + use URI::URL; - my $url = url('http://www.perl.com/cgi-bin/cpan_mod'); - $url->query_form(module => 'DB_File', readme => 1); - $content = get($url); + my $url = url('L; + $url->query_form(module => 'DB_File', readme => 1); + $content = get($url); If you're using the POST method, create your own user agent and encode the content appropriately. - use HTTP::Request::Common qw(POST); - use LWP::UserAgent; + use HTTP::Request::Common qw(POST); + use LWP::UserAgent; - $ua = LWP::UserAgent->new(); - my $req = POST 'http://www.perl.com/cgi-bin/cpan_mod', - [ module => 'DB_File', readme => 1 ]; - $content = $ua->request($req)->as_string; + $ua = LWP::UserAgent->new(); + my $req = POST 'L, + [ module => 'DB_File', readme => 1 ]; + $content = $ua->request($req)->as_string; =head2 How do I decode or create those %-encodings on the web? X X X X X @@ -261,30 +260,30 @@ either on the way in or the way out. If you have to encode a string yourself, remember that you should never try to encode an already-composed URI. You need to escape the components separately then put them together. To encode a string, you -can use the C module. The C function +can use the L module. The C function returns the escaped string: - my $original = "Colon : Hash # Percent %"; + my $original = "Colon : Hash # Percent %"; - my $escaped = uri_escape( $original ); + my $escaped = uri_escape( $original ); - print "$escaped\n"; # 'Colon%20%3A%20Hash%20%23%20Percent%20%25' + print "$escaped\n"; # 'Colon%20%3A%20Hash%20%23%20Percent%20%25' To decode the string, use the C function: - my $unescaped = uri_unescape( $escaped ); + my $unescaped = uri_unescape( $escaped ); - print $unescaped; # back to original + print $unescaped; # back to original If you wanted to do it yourself, you simply need to replace the reserved characters with their encodings. A global substitution is one way to do it: - # encode - $string =~ s/([^^A-Za-z0-9\-_.!~*'()])/ sprintf "%%%0x", ord $1 /eg; + # encode + $string =~ s/([^^A-Za-z0-9\-_.!~*'()])/ sprintf "%%%0x", ord $1 /eg; - #decode - $string =~ s/%([A-Fa-f\d]{2})/chr hex $1/eg; + #decode + $string =~ s/%([A-Fa-f\d]{2})/chr hex $1/eg; =head2 How do I redirect to another page? @@ -295,47 +294,47 @@ script. The other kind (an absolute URLpath) is resolved internally to the server without any HTTP redirection. The CGI specifications do not allow relative URLs in either case. -Use of C is strongly recommended. This example shows redirection +Use of C is strongly recommended. This example shows redirection with a complete URL. This redirection is handled by the web browser. - use CGI qw/:standard/; + use CGI qw/:standard/; - my $url = 'http://www.cpan.org/'; - print redirect($url); + my $url = 'L; + print redirect($url); -This example shows a redirection with an absolute URLpath. This +This example shows a redirection with an absolute URLpath. This redirection is handled by the local web server. - my $url = '/CPAN/index.html'; - print redirect($url); + my $url = '/CPAN/index.html'; + print redirect($url); But if coded directly, it could be as follows (the final "\n" is shown separately, for clarity), using either a complete URL or an absolute URLpath. - print "Location: $url\n"; # CGI response header - print "\n"; # end of headers + print "Location: $url\n"; # CGI response header + print "\n"; # end of headers =head2 How do I put a password on my web pages? To enable authentication for your web server, you need to configure -your web server. The configuration is different for different sorts +your web server. The configuration is different for different sorts of web servers--apache does it differently from iPlanet which does -it differently from IIS. Check your web server documentation for +it differently from IIS. Check your web server documentation for the details for your particular server. =head2 How do I edit my .htpasswd and .htgroup files with Perl? -The C and C modules provide a +The L and L modules provide a consistent OO interface to these files, regardless of how they're -stored. Databases may be text, dbm, Berkeley DB or any database with -a DBI compatible driver. C supports files used by the -"Basic" and "Digest" authentication schemes. Here's an example: +stored. Databases may be text, dbm, Berkeley DB or any database with +a DBI compatible driver. L supports files used by the +"Basic" and "Digest" authentication schemes. Here's an example: - use HTTPD::UserAdmin (); - HTTPD::UserAdmin - ->new(DB => "/foo/.htpasswd") - ->add($username => $password); + use HTTPD::UserAdmin (); + HTTPD::UserAdmin + ->new(DB => "/foo/.htpasswd") + ->add($username => $password); =head2 How do I make sure users can't enter values into a form that cause my CGI script to do bad things? @@ -344,12 +343,12 @@ a DBI compatible driver. C supports files used by the You can't prevent people from sending your script bad data. Even if you add some client-side checks, people may disable them or bypass them completely. For instance, someone might use a module such as -C to access your CGI program. If you want to prevent data that +L to access your CGI program. If you want to prevent data that try to use SQL injection or other sorts of attacks (and you should want to), you have to not trust any data that enter your program. The L documentation has general advice about data security. -If you are using the C module, use placeholder to fill in data. +If you are using the L module, use placeholder to fill in data. If you are running external programs with C or C, use the list forms. There are many other precautions that you should take, too many to list here, and most of them fall under the category of not @@ -357,25 +356,31 @@ using any data that you don't intend to use. Trust no one. =head2 How do I parse a mail header? -For a quick-and-dirty solution, try this solution derived -from L: +Use the L module. It's well-tested and supports all the +craziness that you'll see in the real world (comment-folding whitespace, +encodings, comments, etc.). + + use Email::MIME; + + my $message = Email::MIME->new($rfc2822); + my $subject = $message->header('Subject'); + my $from = $message->header('From'); - $/ = ''; - $header = ; - $header =~ s/\n\s+/ /g; # merge continuation lines - %head = ( UNIX_FROM_LINE, split /^([-\w]+):\s*/m, $header ); +If you've already got some other kind of email object, consider passing +it to L and then using its cast method to get an +L object: -That solution doesn't do well if, for example, you're trying to -maintain all the Received lines. A more complete approach is to use -the C module from CPAN (part of the C package). + my $mail_message_object = read_message(); + my $abstract = Email::Abstract->new($mail_message_object); + my $email_mime_object = $abstract->cast('Email::MIME'); =head2 How do I decode a CGI form? (contributed by brian d foy) -Use the C module that comes with Perl. It's quick, +Use the C module that comes with Perl. It's quick, it's easy, and it actually does quite a bit of work to -ensure things happen correctly. It handles GET, POST, and +ensure things happen correctly. It handles GET, POST, and HEAD requests, multipart forms, multivalued fields, query string and message body combinations, and many other things you probably don't want to think about. @@ -384,35 +389,35 @@ It doesn't get much easier: the C module automatically parses the input and makes each value available through the C function. - use CGI qw(:standard); + use CGI qw(:standard); - my $total = param( 'price' ) + param( 'shipping' ); + my $total = param( 'price' ) + param( 'shipping' ); - my @items = param( 'item' ); # multiple values, same field name + my @items = param( 'item' ); # multiple values, same field name If you want an object-oriented approach, C can do that too. - use CGI; + use CGI; - my $cgi = CGI->new(); + my $cgi = CGI->new(); - my $total = $cgi->param( 'price' ) + $cgi->param( 'shipping' ); + my $total = $cgi->param( 'price' ) + $cgi->param( 'shipping' ); - my @items = $cgi->param( 'item' ); + my @items = $cgi->param( 'item' ); -You might also try C which is a lightweight version -of the same thing. Other CGI::* modules on CPAN might work better +You might also try L which is a lightweight version +of the same thing. Other CGI::* modules on CPAN might work better for you, too. Many people try to write their own decoder (or copy one from another program) and then run into one of the many "gotchas" -of the task. It's much easier and less hassle to use C. +of the task. It's much easier and less hassle to use C. =head2 How do I check a valid mail address? (partly contributed by Aaron Sherman) -This isn't as simple a question as it sounds. There are two parts: +This isn't as simple a question as it sounds. There are two parts: a) How do I verify that an email address is correctly formatted? @@ -420,32 +425,8 @@ b) How do I verify that an email address targets a valid recipient? Without sending mail to the address and seeing whether there's a human on the other end to answer you, you cannot fully answer part I, but -either the C or the C module will do -both part I and part I as far as you can in real-time. - -If you want to just check part I to see that the address is valid -according to the mail header standard with a simple regular expression, -you can have problems, because there are deliverable addresses that -aren't RFC-2822 (the latest mail header standard) compliant, and -addresses that aren't deliverable which, are compliant. However, the -following will match valid RFC-2822 addresses that do not have comments, -folding whitespace, or any other obsolete or non-essential elements. -This I matches the address itself: - - my $atom = qr{[a-zA-Z0-9_!#\$\%&'*+/=?\^`{}~|\-]+}; - my $dot_atom = qr{$atom(?:\.$atom)*}; - my $quoted = qr{"(?:\\[^\r\n]|[^\\"])*"}; - my $local = qr{(?:$dot_atom|$quoted)}; - my $quotedpair = qr{\\[\x00-\x09\x0B-\x0c\x0e-\x7e]}; - my $domain_lit = qr{\[(?:$quotedpair|[\x21-\x5a\x5e-\x7e])*\]}; - my $domain = qr{(?:$dot_atom|$domain_lit)}; - my $addr_spec = qr{$local\@$domain}; - -Just match an address against C to see if it follows -the RFC2822 specification. However, because it is impossible to be -sure that such a correctly formed address is actually the correct way -to reach a particular person or even has a mailbox associated with it, -you must be very careful about how you use this. +the L module will do both part I and part I as far +as you can in real-time. Our best advice for verifying a person's mail address is to have them enter their address twice, just as you normally do to change a @@ -455,165 +436,115 @@ back and they've followed your directions, you can be reasonably assured that it's real. A related strategy that's less open to forgery is to give them a PIN -(personal ID number). Record the address and PIN (best that it be a -random one) for later processing. In the mail you send, ask them to -include the PIN in their reply. But if it bounces, or the message is -included via a "vacation" script, it'll be there anyway. So it's -best to ask them to mail back a slight alteration of the PIN, such as -with the characters reversed, one added or subtracted to each digit, etc. +(personal ID number). Record the address and PIN (best that it be a +random one) for later processing. In the mail you send, include a link to +your site with the PIN included. If the mail bounces, you know it's not +valid. If they don't click on the link, either they forged the address or +(assuming they got the message) following through wasn't important so you +don't need to worry about it. =head2 How do I decode a MIME/BASE64 string? -The C package (available from CPAN) handles this as well as -the MIME/QP encoding. Decoding BASE64 becomes as simple as: +The L package handles this as well as the MIME/QP encoding. +Decoding base 64 becomes as simple as: - use MIME::Base64; - $decoded = decode_base64($encoded); + use MIME::Base64; + $decoded = decode_base64($encoded); -The C package (available from CPAN) supports extraction with -decoding of BASE64 encoded attachments and content directly from email -messages. +The L module can decode base 64-encoded email message parts +transparently so the developer doesn't need to worry about it. -If the string to decode is short (less than 84 bytes long) -a more direct approach is to use the C function's "u" -format after minor transliterations: +=head2 How do I return the user's mail address? - tr#A-Za-z0-9+/##cd; # remove non-base64 chars - tr#A-Za-z0-9+/# -_#; # convert to uuencoded format - $len = pack("c", 32 + 0.75*length); # compute length byte - print unpack("u", $len . $_); # uudecode and print +Ask them for it. There are so many email providers available that it's +rather unlikely the local system has any idea how to determine a user's +email address. The one notable exception is for organization-specific +email (e.g. foo@yourcompany.com) where policy can be codified in your +program. In that case, you can look at $ENV{USER}, $ENV{LOGNAME}, and +getpwuid($<) in scalar context, like so: -=head2 How do I return the user's mail address? + my $user_name = getpwuid($<) -On systems that support getpwuid, the C<< $< >> variable, and the -C module (which is part of the standard perl distribution), -you can probably try using something like this: +But note that you still cannot make any assumptions about whether this +is correct unless your policy says it is. And then there are things like +localpart extensions (foo+bar@example.com). You really are best off +asking the user. - use Sys::Hostname; - $address = sprintf('%s@%s', scalar getpwuid($<), hostname); +=head2 How do I send mail? -Company policies on mail address can mean that this generates addresses -that the company's mail system will not accept, so you should ask for -users' mail addresses when this matters. Furthermore, not all systems -on which Perl runs are so forthcoming with this information as is Unix. +Use the L and L modules, like so: -The C module from CPAN (part of the C package) provides a -C function that tries to guess the mail address of the user. -It makes a more intelligent guess than the code above, using information -given when the module was installed, but it could still be incorrect. -Again, the best way is often just to ask the user. + # first, create your message + my $message = Email::MIME->create( + header_str => [ + From => 'you@example.com', + To => 'friend@example.com', + Subject => 'Happy birthday!', + ], + body_str => 'Happy birthday to you!', + ); -=head2 How do I send mail? + use Email::Sender::Simple qw(sendmail); + sendmail($message); -Use the C program directly: - - open(SENDMAIL, "|/usr/lib/sendmail -oi -t -odq") - or die "Can't fork for sendmail: $!\n"; - print SENDMAIL <<"EOF"; - From: User Originating Mail - To: Final Destination - Subject: A relevant subject line - - Body of the message goes here after the blank line - in as many lines as you like. - EOF - close(SENDMAIL) or warn "sendmail didn't close nicely"; - -The B<-oi> option prevents C from interpreting a line consisting -of a single dot as "end of message". The B<-t> option says to use the -headers to decide who to send the message to, and B<-odq> says to put -the message into the queue. This last option means your message won't -be immediately delivered, so leave it out if you want immediate -delivery. - -Alternate, less convenient approaches include calling C (sometimes -called C) directly or simply opening up port 25 have having an -intimate conversation between just you and the remote SMTP daemon, -probably C. - -Or you might be able use the CPAN module C: - - use Mail::Mailer; - - $mailer = Mail::Mailer->new(); - $mailer->open({ From => $from_address, - To => $to_address, - Subject => $subject, - }) - or die "Can't open: $!\n"; - print $mailer $body; - $mailer->close(); - -The C module uses C which is less Unix-centric than -C, but less reliable. Avoid raw SMTP commands. There -are many reasons to use a mail transport agent like C. These -include queuing, MX records, and security. +By default, L will try `sendmail` first, if it exists +in your $PATH. This generally isn't the case. If there's a remote mail +server you use to send mail, consider investigating one of the Transport +classes. At time of writing, the available transports include: -=head2 How do I use MIME to make an attachment to a mail message? +=over 4 -This answer is extracted directly from the C documentation. -Create a multipart message (i.e., one with attachments). +=item L - use MIME::Lite; +This is the default. If you can use the L or L +program to send mail from the machine where your code runs, you should +be able to use this. - ### Create a new multipart message: - $msg = MIME::Lite->new( - From =>'me@myhost.com', - To =>'you@yourhost.com', - Cc =>'some@other.com, some@more.com', - Subject =>'A message with 2 parts...', - Type =>'multipart/mixed' - ); +=item L - ### Add parts (each "attach" has same arguments as "new"): - $msg->attach(Type =>'TEXT', - Data =>"Here's the GIF file you wanted" - ); - $msg->attach(Type =>'image/gif', - Path =>'aaa000123.gif', - Filename =>'logo.gif' - ); +This transport contacts a remote SMTP server over TCP. It optionally +uses SSL and can authenticate to the server via SASL. - $text = $msg->as_string; +=item L -C also includes a method for sending these things. +This is like the SMTP transport, but uses TLS security. You can +authenticate with this module as well, using any mechanisms your server +supports after STARTTLS. - $msg->send; +=back -This defaults to using L but can be customized to use -SMTP via L. +Telling L to use your transport is straightforward. + + sendmail( + $message, + { + transport => $email_sender_transport_object, + } + ); + +=head2 How do I use MIME to make an attachment to a mail message? + +L directly supports multipart messages. L +objects themselves are parts and can be attached to other L +objects. Consult the L documentation for more information, +including all of the supported methods and examples of their use. =head2 How do I read mail? -While you could use the C module from CPAN (part of the -C package) or the C module from CPAN (part -of the C package), often a module is overkill. Here's a -mail sorter. - - #!/usr/bin/perl - - my(@msgs, @sub); - my $msgno = -1; - $/ = ''; # paragraph reads - while (<>) { - if (/^From /m) { - /^Subject:\s*(?:Re:\s*)*(.*)/mi; - $sub[++$msgno] = lc($1) || ''; - } - $msgs[$msgno] .= $_; - } - for my $i (sort { $sub[$a] cmp $sub[$b] || $a <=> $b } (0 .. $#msgs)) { - print $msgs[$i]; - } - -Or more succinctly, - - #!/usr/bin/perl -n00 - # bysub2 - awkish sort-by-subject - BEGIN { $msgno = -1 } - $sub[++$msgno] = (/^Subject:\s*(?:Re:\s*)*(.*)/mi)[0] if /^From/m; - $msg[$msgno] .= $_; - END { print @msg[ sort { $sub[$a] cmp $sub[$b] || $a <=> $b } (0 .. $#msg) ] } +Use the L module, like so: + + use Email::Folder; + + my $folder = Email::Folder->new('/path/to/email/folder'); + while(my $message = $folder->next_message) { + # next_message returns Email::Simple objects, but we want + # Email::MIME objects as they're more robust + my $mime = Email::MIME->new($message->as_string); + } + +There are different classes in the L namespace for +supporting various mailbox types. Note that these modules are generally +rather limited and only support B rather than writing. =head2 How do I find out my hostname, domainname, or IP address? X (contributed by brian d foy) -The C module, which is part of the Standard Library starting +The L module, which is part of the Standard Library starting in Perl 5.7.3, can get you the fully qualified domain name (FQDN), the host name, or the domain name. - use Net::Domain qw(hostname hostfqdn hostdomain); + use Net::Domain qw(hostname hostfqdn hostdomain); - my $host = hostfqdn(); + my $host = hostfqdn(); -The C module, part of the Standard Library, can also get the +The L module, part of the Standard Library, can also get the hostname: - use Sys::Hostname; + use Sys::Hostname; + + $host = hostname(); + + +The L module takes a different approach and tries +harder to return the fully qualified hostname: + + use Sys::Hostname::Long 'hostname_long'; - $host = hostname(); + my $hostname = hostname_long(); To get the IP address, you can use the C built-in function to turn the name into a number. To turn that number into the dotted octet form (a.b.c.d) that most people expect, use the C function -from the C module, which also comes with perl. +from the L module, which also comes with perl. - use Socket; + use Socket; - my $address = inet_ntoa( - scalar gethostbyname( $host || 'localhost' ) - ); + my $address = inet_ntoa( + scalar gethostbyname( $host || 'localhost' ) + ); =head2 How do I fetch a news article or the active newsgroups? -Use the C or C modules, both available from CPAN. +Use the L or L modules, both available from CPAN. This can make tasks like fetching the newsgroup list as simple as - perl -MNews::NNTPClient - -e 'print News::NNTPClient->new->list("newsgroups")' + perl -MNews::NNTPClient + -e 'print News::NNTPClient->new->list("newsgroups")' =head2 How do I fetch/put an FTP file? (contributed by brian d foy) -The C family of modules (available on CPAN as the libwww-perl distribution) -can work with FTP just like it can with many other protocols. C +The L family of modules (available on CPAN as the libwww-perl distribution) +can work with FTP just like it can with many other protocols. L makes it quite easy to fetch a file: - use LWP::Simple; + use LWP::Simple; - my $data = get( 'ftp://some.ftp.site/some/file.txt' ); + my $data = get( 'L ); If you want more direct or low-level control of the FTP process, you can use -the C module (in the Standard Library since Perl 5.8). It's +the L module (in the Standard Library since Perl 5.8). It's documentation has examples showing you just how to do that. =head2 How can I do RPC in Perl? @@ -676,7 +615,7 @@ documentation has examples showing you just how to do that. (contributed by brian d foy) Use one of the RPC modules you can find on CPAN ( -http://search.cpan.org/search?query=RPC&mode=all ). +L ). =head1 AUTHOR AND COPYRIGHT @@ -687,7 +626,7 @@ This documentation is free; you can redistribute it and/or modify it under the same terms as Perl itself. Irrespective of its distribution, all code examples in this file -are hereby placed into the public domain. You are permitted and +are hereby placed into the public domain. You are permitted and encouraged to use this code in your own programs for fun -or for profit as you see fit. A simple comment in the code giving +or for profit as you see fit. A simple comment in the code giving credit would be courteous but is not required. diff --git a/pod/perlglossary.pod b/cpan/perlfaq/lib/perlglossary.pod similarity index 99% rename from pod/perlglossary.pod rename to cpan/perlfaq/lib/perlglossary.pod index 4d8bf00e442..014eb99fd5d 100644 --- a/pod/perlglossary.pod +++ b/cpan/perlfaq/lib/perlglossary.pod @@ -699,7 +699,7 @@ kinds of fatal error. =item CPAN -The Comprehensive Perl Archive Network. (See LsrcE... mean?>). +The Comprehensive Perl Archive Network. (See L). =item cracker @@ -950,6 +950,10 @@ When something is contained in something else, particularly when that might be considered surprising: "I've embedded a complete Perl interpreter in my editor!" +=item empty list + +See . + =item empty subclass test The notion that an empty L should behave exactly like @@ -1067,7 +1071,8 @@ such as multithreading. In Perl, any value that would look like C<""> or C<"0"> if evaluated in a string context. Since undefined values evaluate to C<"">, all -undefined values are false, but not all false values are undefined. +undefined values are false (including the L), but not all +false values are undefined. =item FAQ @@ -2023,7 +2028,9 @@ strings, but Perl allows strings to contain a null. =item null list -A L with zero elements, represented in Perl by C<()>. +A valueless value represented in Perl by C<()>. It is not really a +L, but an expression that yields C in L and +a L with zero elements in L. =item null string diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm index 96467879e6b..28da808c1b1 100644 --- a/dist/B-Deparse/Deparse.pm +++ b/dist/B-Deparse/Deparse.pm @@ -14,7 +14,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring OPf_KIDS OPf_REF OPf_STACKED OPf_SPECIAL OPf_MOD OPpLVAL_INTRO OPpOUR_INTRO OPpENTERSUB_AMPER OPpSLICE OPpCONST_BARE OPpTRANS_SQUASH OPpTRANS_DELETE OPpTRANS_COMPLEMENT OPpTARGET_MY - OPpCONST_ARYBASE OPpEXISTS_SUB OPpSORT_NUMERIC OPpSORT_INTEGER + OPpEXISTS_SUB OPpSORT_NUMERIC OPpSORT_INTEGER OPpSORT_REVERSE SVf_IOK SVf_NOK SVf_ROK SVf_POK SVpad_OUR SVf_FAKE SVs_RMG SVs_SMG CVf_METHOD CVf_LVALUE @@ -25,8 +25,16 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring ($] < 5.008009 ? () : qw(OPpCONST_NOVER OPpPAD_STATE)), ($] < 5.009 ? 'PMf_SKIPWHITE' : qw(RXf_SKIPWHITE)), ($] < 5.011 ? 'CVf_LOCKED' : 'OPpREVERSE_INPLACE'), - ($] < 5.013 ? () : 'PMf_NONDESTRUCT'); -$VERSION = "1.06"; + ($] < 5.013 ? () : 'PMf_NONDESTRUCT'), + ($] < 5.015003 && + # This empirical feature test is required during the + # transitional phase where blead still identifies itself + # as 5.15.2 but has had $[ removed. After blead has its + # version number bumped to 5.15.3, this can be reduced to + # just test $] < 5.015003. + ($] < 5.015002 || do { require B; exists(&B::OPpCONST_ARYBASE) }) + ? qw(OPpCONST_ARYBASE) : ()); +$VERSION = "1.08"; use strict; use vars qw/$AUTOLOAD/; use warnings (); @@ -36,7 +44,7 @@ BEGIN { # be to fake up a dummy constant that will never actually be true. foreach (qw(OPpSORT_INPLACE OPpSORT_DESCEND OPpITER_REVERSED OPpCONST_NOVER OPpPAD_STATE RXf_SKIPWHITE CVf_LOCKED OPpREVERSE_INPLACE - PMf_NONDESTRUCT)) { + PMf_NONDESTRUCT OPpCONST_ARYBASE)) { no strict 'refs'; *{$_} = sub () {0} unless *{$_}{CODE}; } @@ -737,7 +745,11 @@ sub ambient_pragmas { } elsif ($name eq '$[') { - $arybase = $val; + if (OPpCONST_ARYBASE) { + $arybase = $val; + } else { + croak "\$[ can't be non-zero on this perl" unless $val == 0; + } } elsif ($name eq 'integer' @@ -1285,10 +1297,16 @@ sub stash_variable { return "$prefix$name"; } - if (defined $cx && $cx == 26) { - if ($prefix eq '@' && $name =~ /^[^\w+-]$/) { + if ($name =~ /^[^\w+-]$/) { + if (defined $cx && $cx == 26) { + if ($prefix eq '@') { return "$prefix\{$name}"; } + elsif ($name eq '#') { return '${#}' } # "${#}a" vs "$#a" + } + if ($prefix eq '$#') { + return "\$#{$name}"; + } } my $v = ($prefix eq '$#' ? '@' : $prefix) . $name; @@ -1412,7 +1430,7 @@ sub pp_nextstate { $self->{'curstash'} = $stash; } - if ($self->{'arybase'} != $op->arybase) { + if (OPpCONST_ARYBASE && $self->{'arybase'} != $op->arybase) { push @text, '$[ = '. $op->arybase .";\n"; $self->{'arybase'} = $op->arybase; } @@ -4786,6 +4804,7 @@ expect. =item $[ Takes a number, the value of the array base $[. +Cannot be non-zero on Perl 5.15.3 or later. =item bytes diff --git a/dist/B-Deparse/t/deparse.t b/dist/B-Deparse/t/deparse.t index d0d8eed2a32..99a2cc90763 100644 --- a/dist/B-Deparse/t/deparse.t +++ b/dist/B-Deparse/t/deparse.t @@ -30,7 +30,6 @@ isa_ok($deparse, 'B::Deparse', 'instantiate a B::Deparse object'); $deparse->ambient_pragmas ( hint_bits => $hint_bits, warning_bits => $warning_bits, - '$[' => 0 + $[, '%^H' => $hinthash, ); } @@ -766,3 +765,14 @@ CORE::given ($x) { CORE::break; } } +#### +# $#- $#+ $#{%} etc. +my @x; +@x = ($#{`}, $#{~}, $#{!}, $#{@}, $#{$}, $#{%}, $#{^}, $#{&}, $#{*}); +@x = ($#{(}, $#{)}, $#{[}, $#{{}, $#{]}, $#{}}, $#{'}, $#{"}, $#{,}); +@x = ($#{<}, $#{.}, $#{>}, $#{/}, $#{?}, $#{=}, $#+, $#{\}, $#{|}, $#-); +@x = ($#{;}, $#{:}); +#### +# ${#} interpolated (the first line magically disables the warning) +() = *#; +() = "${#}a"; diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm index 21fbba54212..187cef496b2 100644 --- a/dist/Carp/lib/Carp.pm +++ b/dist/Carp/lib/Carp.pm @@ -24,7 +24,7 @@ BEGIN { } } -our $VERSION = '1.22'; +our $VERSION = '1.23'; our $MaxEvalLen = 0; our $Verbose = 0; diff --git a/dist/Carp/lib/Carp/Heavy.pm b/dist/Carp/lib/Carp/Heavy.pm index 83af3fef95a..97ed2917758 100644 --- a/dist/Carp/lib/Carp/Heavy.pm +++ b/dist/Carp/lib/Carp/Heavy.pm @@ -1,9 +1,13 @@ package Carp::Heavy; -our $VERSION = '1.22'; +use Carp (); + +our $VERSION = '1.23'; 1; -# Most of the machinery of Carp used to be there. +# Most of the machinery of Carp used to be here. # It has been moved in Carp.pm now, but this placeholder remains for # the benefit of modules that like to preload Carp::Heavy directly. +# This must load Carp, because some modules rely on the historical +# behaviour of Carp::Heavy loading Carp. diff --git a/dist/Carp/t/Carp.t b/dist/Carp/t/Carp.t index edb4020192b..96f0f916259 100644 --- a/dist/Carp/t/Carp.t +++ b/dist/Carp/t/Carp.t @@ -396,7 +396,7 @@ like( runperl( prog => q< use utf8; use strict; use Carp; - BEGIN { $SIG{__DIE__} = sub { Carp::croak "aaaaa$_[0]" } } + BEGIN { $SIG{__DIE__} = sub { Carp::croak qq(aaaaa$_[0]) } } $c >, stderr=>1, @@ -414,8 +414,8 @@ SKIP: prog => q< use Carp; $SIG{__WARN__} = sub{}; - carp ("A duck, but which duck?"); - print "ok" unless exists $::{"B::"}; + carp (qq(A duck, but which duck?)); + print q(ok) unless exists $::{q(B::)}; >, ), 'ok', diff --git a/dist/Carp/t/heavy.t b/dist/Carp/t/heavy.t new file mode 100644 index 00000000000..f890d6c28f9 --- /dev/null +++ b/dist/Carp/t/heavy.t @@ -0,0 +1,7 @@ +print "1..2\n"; + +print defined(&Carp::carp) ? "not " : "", "ok 1 # control\n"; +require Carp::Heavy; +print defined(&Carp::carp) ? "" : "not ", "ok 2 # carp loaded by Carp::Heavy\n"; + +1; diff --git a/dist/Data-Dumper/Dumper.pm b/dist/Data-Dumper/Dumper.pm index 9335d034c10..883572178f5 100644 --- a/dist/Data-Dumper/Dumper.pm +++ b/dist/Data-Dumper/Dumper.pm @@ -9,7 +9,7 @@ package Data::Dumper; -$VERSION = '2.133'; # Don't forget to set version and release date in POD! +$VERSION = '2.134'; # Don't forget to set version and release date in POD! #$| = 1; @@ -1297,7 +1297,7 @@ modify it under the same terms as Perl itself. =head1 VERSION -Version 2.133 (July 20 2011) +Version 2.134 (September 7 2011) =head1 SEE ALSO diff --git a/dist/Data-Dumper/Dumper.xs b/dist/Data-Dumper/Dumper.xs index cf0717e435b..c8e96cda74a 100644 --- a/dist/Data-Dumper/Dumper.xs +++ b/dist/Data-Dumper/Dumper.xs @@ -703,11 +703,11 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv, if (sortkeys) { char *key; svp = av_fetch(keys, i, FALSE); - keysv = svp ? *svp : sv_mortalcopy(&PL_sv_undef); + keysv = svp ? *svp : sv_newmortal(); key = SvPV(keysv, keylen); svp = hv_fetch((HV*)ival, key, SvUTF8(keysv) ? -(I32)keylen : (I32)keylen, 0); - hval = svp ? *svp : sv_mortalcopy(&PL_sv_undef); + hval = svp ? *svp : sv_newmortal(); } else { keysv = hv_iterkeysv(entry); diff --git a/dist/ExtUtils-ParseXS/Changes b/dist/ExtUtils-ParseXS/Changes index be780b054ad..6f47bee6f6d 100644 --- a/dist/ExtUtils-ParseXS/Changes +++ b/dist/ExtUtils-ParseXS/Changes @@ -1,5 +1,10 @@ Revision history for Perl extension ExtUtils::ParseXS. +3.04_04 - Mon Sep 12 08:12:00 CET 2011 + + - Simplify generated XS code by emitting a compatibility version + of dVAR. [Nicholas Clark] + - Fixed "INCLUDE: $cmd |", CPAN RT #70213 3.04_03 - Sun Sep 4 18:49:00 CET 2011 diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm index 1d186cfd8f1..d4315d825ae 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm @@ -11,7 +11,7 @@ use Symbol; our $VERSION; BEGIN { - $VERSION = '3.04_03'; + $VERSION = '3.04_04'; } use ExtUtils::ParseXS::Constants $VERSION; use ExtUtils::ParseXS::CountLines $VERSION; @@ -505,11 +505,7 @@ EOM #XS_EUPXS(XS_${Full_func_name}); /* prototype to pass -Wmissing-prototypes */ #XS_EUPXS(XS_${Full_func_name}) #[[ -##ifdef dVAR # dVAR; dXSARGS; -##else -# dXSARGS; -##endif EOF print Q(<<"EOF") if $ALIAS; # dXSI32; @@ -911,11 +907,7 @@ EOF print Q(<<"EOF"); #[[ -##ifdef dVAR # dVAR; dXSARGS; -##else -# dXSARGS; -##endif EOF #Under 5.8.x and lower, newXS is declared in proto.h as expecting a non-const diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm index 4e97418211e..4de9d3cad86 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Symbol; -our $VERSION = '3.04_03'; +our $VERSION = '3.04_04'; =head1 NAME diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm index 3b166b1739c..ff8fd2e8f82 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm @@ -1,7 +1,7 @@ package ExtUtils::ParseXS::CountLines; use strict; -our $VERSION = '3.04_03'; +our $VERSION = '3.04_04'; our $SECTION_END_MARKER; diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm index 408045867cf..f3b9d094ab8 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm @@ -6,7 +6,7 @@ use File::Spec; use lib qw( lib ); use ExtUtils::ParseXS::Constants (); -our $VERSION = '3.04_03'; +our $VERSION = '3.04_04'; our (@ISA, @EXPORT_OK); @ISA = qw(Exporter); @@ -455,6 +455,10 @@ sub standard_XS_defs { # define PERL_UNUSED_VAR(var) if (0) var = var #endif +#ifndef dVAR +# define dVAR dNOOP +#endif + /* This stuff is not part of the API! You have been warned. */ #ifndef PERL_VERSION_DECIMAL diff --git a/dist/Filter-Simple/lib/Filter/Simple.pm b/dist/Filter-Simple/lib/Filter/Simple.pm index 2cfa99af379..b0068037f3f 100644 --- a/dist/Filter-Simple/lib/Filter/Simple.pm +++ b/dist/Filter-Simple/lib/Filter/Simple.pm @@ -4,7 +4,7 @@ use Text::Balanced ':ALL'; use vars qw{ $VERSION @EXPORT }; -$VERSION = '0.87'; +$VERSION = '0.88'; use Filter::Util::Call; use Carp; @@ -36,22 +36,31 @@ my $CUT = qr/\n=cut.*$EOP/; my $pod_or_DATA = qr/ ^=(?:head[1-4]|item) .*? $CUT | ^=pod .*? $CUT - | ^=for .*? $EOP - | ^=begin \s* (\S+) .*? \n=end \s* \1 .*? $EOP + | ^=for .*? $CUT + | ^=begin .*? $CUT | ^__(DATA|END)__\r?\n.* /smx; +my $variable = qr{ + [\$*\@%]\s* + \{\s*(?!::)(?:\d+|[][&`'#+*./|,";%=~:?!\@<>()-]|\^[A-Z]?)\} + | (?:\$#?|[*\@\%]|\\&)\$*\s* + (?: \{\s*(?:\^(?=[A-Z_]))?(?:\w|::|'\w)*\s*\} + | (?:\^(?=[A-Z_]))?(?:\w|::|'\w)* + | (?=\{) # ${ block } + ) + ) + | \$\s*(?!::)(?:\d+|[][&`'#+*./|,";%=~:?!\@<>()-]|\^[A-Z]?) + }x; my %extractor_for = ( - quotelike => [ $ws, \&extract_variable, $id, { MATCH => \&extract_quotelike } ], + quotelike => [ $ws, $variable, $id, { MATCH => \&extract_quotelike } ], regex => [ $ws, $pod_or_DATA, $id, $exql ], string => [ $ws, $pod_or_DATA, $id, $exql ], - code => [ $ws, { DONT_MATCH => $pod_or_DATA }, - \&extract_variable, + code => [ $ws, { DONT_MATCH => $pod_or_DATA }, $variable, $id, { DONT_MATCH => \&extract_quotelike } ], code_no_comments => [ { DONT_MATCH => $comment }, - $ncws, { DONT_MATCH => $pod_or_DATA }, - \&extract_variable, + $ncws, { DONT_MATCH => $pod_or_DATA }, $variable, $id, { DONT_MATCH => \&extract_quotelike } ], executable => [ $ws, { DONT_MATCH => $pod_or_DATA } ], executable_no_comments diff --git a/dist/Filter-Simple/t/code_no_comments.t b/dist/Filter-Simple/t/code_no_comments.t new file mode 100644 index 00000000000..444e7873f04 --- /dev/null +++ b/dist/Filter-Simple/t/code_no_comments.t @@ -0,0 +1,15 @@ +BEGIN { + unshift @INC, 't/lib/'; +} + +use Filter::Simple::CodeNoComments qr/ok/ => 'not ok'; + +print "1..1\n"; + + +# Perl bug #92436 (the second bug in the ticket) + +sub method { $_[1] } +my $obj = bless[]; + +print $obj->method("ok 1\n"); diff --git a/dist/Filter-Simple/t/filter_only.t b/dist/Filter-Simple/t/filter_only.t index f30fced6a1e..57f108677e2 100644 --- a/dist/Filter-Simple/t/filter_only.t +++ b/dist/Filter-Simple/t/filter_only.t @@ -20,6 +20,20 @@ print "ok 5\n"; ok 7 unless not ok 6; +=begin scrumbly + +=end scrumbly + +shromple + +=cut + +=for us + +shromple again + +=cut + no Filter::Simple::FilterOnlyTest; # THE FUN STOPS HERE print "not " unless "not ok" =~ /^not /; diff --git a/dist/Filter-Simple/t/lib/Filter/Simple/CodeNoComments.pm b/dist/Filter-Simple/t/lib/Filter/Simple/CodeNoComments.pm new file mode 100644 index 00000000000..168271ff2e8 --- /dev/null +++ b/dist/Filter-Simple/t/lib/Filter/Simple/CodeNoComments.pm @@ -0,0 +1,13 @@ +package Filter::Simple::CodeNoComments; + +use Filter::Simple; + +FILTER_ONLY + code_no_comments => sub { + shift; + while (my($pat, $str) = splice @_, 0, 2) { + s/$pat/$str/g; + } + }; + +1; diff --git a/dist/Filter-Simple/t/lib/Filter/Simple/FilterOnlyTest.pm b/dist/Filter-Simple/t/lib/Filter/Simple/FilterOnlyTest.pm index c10e8ea29f3..e692f8b99d5 100644 --- a/dist/Filter-Simple/t/lib/Filter/Simple/FilterOnlyTest.pm +++ b/dist/Filter-Simple/t/lib/Filter/Simple/FilterOnlyTest.pm @@ -8,4 +8,7 @@ FILTER_ONLY while (my($pat, $str) = splice @_, 0, 2) { s/$pat/$str/g; } + }, + code_no_comments => sub { + $_ =~ /shromple/ and die "We wants no shromples!"; }; diff --git a/dist/IO/IO.pm b/dist/IO/IO.pm index 09143f2e397..e6f5567b9f0 100644 --- a/dist/IO/IO.pm +++ b/dist/IO/IO.pm @@ -7,7 +7,7 @@ use Carp; use strict; use warnings; -our $VERSION = "1.25_05"; +our $VERSION = "1.25_06"; XSLoader::load 'IO', $VERSION; sub import { diff --git a/dist/IO/IO.xs b/dist/IO/IO.xs index d696603eac8..05015671578 100644 --- a/dist/IO/IO.xs +++ b/dist/IO/IO.xs @@ -57,6 +57,10 @@ typedef FILE * OutputStream; # define NORETURN_FUNCTION_END /* NOT REACHED */ return 0 #endif +#ifndef dVAR +# define dVAR dNOOP +#endif + static int not_here(const char *s) __attribute__noreturn__; static int not_here(const char *s) @@ -142,6 +146,27 @@ io_blocking(pTHX_ InputStream f, int block) #endif } +static OP * +io_pp_nextstate(pTHX) +{ + dVAR; + COP *old_curcop = PL_curcop; + OP *next = PL_ppaddr[PL_op->op_type](aTHX); + PL_curcop = old_curcop; + return next; +} + +static OP * +io_ck_lineseq(pTHX_ OP *o) +{ + OP *kid = cBINOPo->op_first; + for (; kid; kid = kid->op_sibling) + if (kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) + kid->op_ppaddr = io_pp_nextstate; + return o; +} + + MODULE = IO PACKAGE = IO::Seekable PREFIX = f void @@ -457,6 +482,18 @@ fsync(handle) OUTPUT: RETVAL +SV * +_create_getline_subs(const char *code) + PREINIT: + SV *ret; + CODE: + OP *(*io_old_ck_lineseq)(pTHX_ OP *) = PL_check[OP_LINESEQ]; + PL_check[OP_LINESEQ] = io_ck_lineseq; + RETVAL = SvREFCNT_inc(eval_pv(code,FALSE)); + PL_check[OP_LINESEQ] = io_old_ck_lineseq; + OUTPUT: + RETVAL + MODULE = IO PACKAGE = IO::Socket diff --git a/dist/IO/lib/IO/Handle.pm b/dist/IO/lib/IO/Handle.pm index c15e5a36f05..68e6d902e44 100644 --- a/dist/IO/lib/IO/Handle.pm +++ b/dist/IO/lib/IO/Handle.pm @@ -268,7 +268,7 @@ use IO (); # Load the XS module require Exporter; @ISA = qw(Exporter); -$VERSION = "1.32"; +$VERSION = "1.33"; $VERSION = eval $VERSION; @EXPORT_OK = qw( @@ -430,14 +430,14 @@ sub say { print $this @_; } +# Special XS wrapper to make them inherit lexical hints from the caller. +_create_getline_subs( <<'END' ) or die $@; sub getline { @_ == 1 or croak 'usage: $io->getline()'; my $this = shift; return scalar <$this>; } -*gets = \&getline; # deprecated - sub getlines { @_ == 1 or croak 'usage: $io->getlines()'; wantarray or @@ -445,6 +445,10 @@ sub getlines { my $this = shift; return <$this>; } +1; # return true for error checking +END + +*gets = \&getline; # deprecated sub truncate { @_ == 2 or croak 'usage: $io->truncate(LEN)'; diff --git a/dist/IO/t/IO.t b/dist/IO/t/IO.t index effd414a4c5..382e282a07c 100644 --- a/dist/IO/t/IO.t +++ b/dist/IO/t/IO.t @@ -21,8 +21,10 @@ plan(tests => 18); my @load; local $^W; + my $xsl = \&XSLoader::load; local *XSLoader::load = sub { push @load, \@_; + &$xsl(@_); }; # use_ok() calls import, which we do not want to do diff --git a/dist/IO/t/io_utf8argv.t b/dist/IO/t/io_utf8argv.t new file mode 100644 index 00000000000..a902eaf1e97 --- /dev/null +++ b/dist/IO/t/io_utf8argv.t @@ -0,0 +1,38 @@ +#!./perl + +BEGIN { + unless ($] >= 5.008 and find PerlIO::Layer 'perlio') { + print "1..0 # Skip: not perlio\n"; + exit 0; + } + require($ENV{PERL_CORE} ? "../../t/test.pl" : "./t/test.pl"); +} + +use utf8; + + +plan(tests => 2); + +open my $fh, ">:raw", 'io_utf8argv'; +print $fh + "\xce\x9c\xe1\xbd\xb7\xce\xb1\x20\xcf\x80\xe1\xbd\xb1\xcf\x80\xce". + "\xb9\xce\xb1\x2c\x20\xce\xbc\xe1\xbd\xb0\x20\xcf\x80\xce\xbf\xce". + "\xb9\xe1\xbd\xb0\x20\xcf\x80\xe1\xbd\xb1\xcf\x80\xce\xb9\xce\xb1". + "\xcd\xbe\x0a"; +close $fh or die "close: $!"; + + +use open ":std", ":utf8"; + +use IO::Handle; + +@ARGV = ('io_utf8argv') x 2; +is *ARGV->getline, "Μία πάπια, μὰ ποιὰ πάπια;\n", + 'getline respects open pragma when magically opening ARGV'; + +is join('',*ARGV->getlines), "Μία πάπια, μὰ ποιὰ πάπια;\n", + 'getlines respects open pragma when magically opening ARGV'; + +END { + 1 while unlink "io_utf8argv"; +} diff --git a/dist/Module-CoreList/Changes b/dist/Module-CoreList/Changes index 767fb2e810e..3972de84c67 100644 --- a/dist/Module-CoreList/Changes +++ b/dist/Module-CoreList/Changes @@ -1,3 +1,12 @@ +2.56 Tues Sept 20 2011 + - Updated for v5.15.3 + - Corrected version of Module::CoreList shipped + with v5.10.0 + - Corrected Errno being shipped with v5.6.0 and v5.6.1 + - Corrected VMS::Filespec being shipped with v5.12.3 + - Corrected DB_File being shipped with v5.8.2 + - Added http://perlpunks.de/corelist to SEE ALSO + 2.55 Sat Aug 20 2011 - Updated for v5.15.2 diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm index ee43e8c9ebe..619f8e400c8 100644 --- a/dist/Module-CoreList/lib/Module/CoreList.pm +++ b/dist/Module-CoreList/lib/Module/CoreList.pm @@ -2,7 +2,7 @@ package Module::CoreList; use strict; use vars qw/$VERSION %released %version %families %upstream %bug_tracker %deprecated/; -$VERSION = '2.55'; +$VERSION = '2.56'; =head1 NAME @@ -171,7 +171,8 @@ Module::CoreList currently covers the 5.000, 5.001, 5.002, 5.003_07, 5.9.0, 5.9.1, 5.9.2, 5.9.3, 5.9.4, 5.9.5, 5.10.0, 5.10.1, 5.11.0, 5.11.1, 5.11.2, 5.11.3, 5.11.4, 5.11.5, 5.12.0, 5.12.1, 5.12.2, 5.12.3, 5.12.4, 5.13.0, 5.13.1, 5.13.2, 5.13.3, 5.13.4, 5.13.5, 5.13.6, 5.13.7, 5.13.8, -5.13.9, 5.13.10, 5.13.11, 5.14.0, 5.14.1, 5.15.0, 5.15.1 and 5.15.2 releases of perl. +5.13.9, 5.13.10, 5.13.11, 5.14.0, 5.14.1, 5.14.2, 5.15.0, 5.15.1, 5.15.2 +and 5.15.3 releases of perl. =head1 HISTORY @@ -192,7 +193,7 @@ under the same terms as Perl itself. =head1 SEE ALSO -L, L, L +L, L, L, L =cut @@ -353,6 +354,8 @@ sub removed_raw { 5.015000 => '2011-06-20', 5.015001 => '2011-07-20', 5.015002 => '2011-08-20', + 5.014002 => '2011-09-26', + 5.015003 => '2011-09-20', ); for my $version ( sort { $a <=> $b } keys %released ) { @@ -1518,6 +1521,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'DynaLoader' => '1.04', 'English' => undef, #./lib/English.pm 'Env' => undef, #./lib/Env.pm + 'Errno' => '1.111', 'Exporter' => '5.562', #./lib/Exporter.pm 'Exporter::Heavy' => undef, #./lib/Exporter/Heavy.pm 'ExtUtils::Command' => '1.01', #./lib/ExtUtils/Command.pm @@ -1748,6 +1752,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'DynaLoader' => 1.04, 'English' => undef, 'Env' => undef, + 'Errno' => '1.111', 'Exporter' => 5.562, 'Exporter::Heavy' => undef, 'ExtUtils::Command' => 1.01, @@ -3231,6 +3236,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'Cwd' => 2.08, #Cwd.pm 'Data::Dumper' => 2.121, #Data\Dumper.pm 'DB' => '1.0', #DB.pm + 'DB_File' => '1.807', 'Devel::DProf' => '20030813.00', #Devel\DProf.pm 'Devel::Peek' => 1.01, #Devel\Peek.pm 'Devel::PPPort' => 2.009, #Devel\PPPort.pm @@ -8607,7 +8613,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'Module::Build::PodParser'=> '0.2808_01', 'Module::Build::Version'=> '0.7203', 'Module::Build::YAML' => '0.50', - 'Module::CoreList' => '2.12', + 'Module::CoreList' => '2.13', 'Module::Load' => '0.12', 'Module::Load::Conditional'=> '0.22', 'Module::Loaded' => '0.01', @@ -21632,6 +21638,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'User::grent' => '1.01', 'User::pwent' => '1.00', 'VMS::DCLsym' => '1.03', + 'VMS::Filespec' => '1.12', 'VMS::Stdio' => '2.4', 'Win32' => '0.39', 'Win32API::File' => '0.1101', @@ -27536,260 +27543,1586 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'warnings' => '1.12', 'warnings::register' => '1.02', }, -); - -%deprecated = ( - 5.011 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.011001 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.011002 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.011003 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.011004 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.011005 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.012000 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.013000 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.012001 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.013001 => { - 'Shell' => '1', - }, - 5.013002 => { - 'Shell' => '1', - }, - 5.013003 => { - 'Shell' => '1', - }, - 5.013004 => { - 'Shell' => '1', - }, - 5.012002 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.013005 => { - 'Shell' => '1', - }, - 5.013006 => { - 'Shell' => '1', - }, - 5.013007 => { - 'Shell' => '1', - }, - 5.013008 => { - 'Shell' => '1', - }, - 5.012003 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.013009 => { - 'Shell' => '1', - }, - 5.013010 => { - 'Shell' => '1', - }, - 5.013011 => { - 'Shell' => '1', - }, - 5.014000 => { - 'Shell' => '1', - }, - 5.012004 => { - 'Class::ISA' => '1', - 'Pod::Plainer' => '1', - 'Shell' => '1', - 'Switch' => '1', - }, - 5.014001 => { - 'Shell' => '1', - }, - 5.015000 => { - 'Devel::DProf' => '1', - }, - 5.015000 => { - }, - 5.015001 => { - }, - 5.015002 => { - }, -); - -%upstream = ( - 'AnyDBM_File' => 'blead', - 'App::Cpan' => 'cpan', - 'App::Prove' => 'cpan', - 'App::Prove::State' => 'cpan', - 'App::Prove::State::Result'=> 'cpan', - 'App::Prove::State::Result::Test'=> 'cpan', - 'Archive::Extract' => 'cpan', - 'Archive::Tar' => 'cpan', - 'Archive::Tar::Constant'=> 'cpan', - 'Archive::Tar::File' => 'cpan', - 'Attribute::Handlers' => 'blead', - 'AutoLoader' => 'cpan', - 'AutoSplit' => 'cpan', - 'B::Concise' => undef, - 'B::Debug' => 'cpan', - 'B::Deparse' => 'blead', - 'B::Lint' => 'blead', - 'B::Lint::Debug' => 'blead', - 'CGI' => 'cpan', - 'CGI::Apache' => 'cpan', - 'CGI::Carp' => 'cpan', - 'CGI::Cookie' => 'cpan', - 'CGI::Fast' => 'cpan', - 'CGI::Pretty' => 'cpan', - 'CGI::Push' => 'cpan', - 'CGI::Switch' => 'cpan', - 'CGI::Util' => 'cpan', - 'CPAN' => 'cpan', - 'CPAN::Author' => 'cpan', - 'CPAN::Bundle' => 'cpan', - 'CPAN::CacheMgr' => 'cpan', - 'CPAN::Complete' => 'cpan', - 'CPAN::Debug' => 'cpan', - 'CPAN::DeferredCode' => 'cpan', - 'CPAN::Distribution' => 'cpan', - 'CPAN::Distroprefs' => 'cpan', - 'CPAN::Distrostatus' => 'cpan', - 'CPAN::Exception::RecursiveDependency'=> 'cpan', - 'CPAN::Exception::blocked_urllist'=> 'cpan', - 'CPAN::Exception::yaml_not_installed'=> 'cpan', - 'CPAN::Exception::yaml_process_error'=> 'cpan', - 'CPAN::FTP' => 'cpan', - 'CPAN::FTP::netrc' => 'cpan', - 'CPAN::FirstTime' => 'cpan', - 'CPAN::HTTP::Client' => 'cpan', - 'CPAN::HTTP::Credentials'=> 'cpan', - 'CPAN::HandleConfig' => 'cpan', - 'CPAN::Index' => 'cpan', - 'CPAN::InfoObj' => 'cpan', - 'CPAN::Kwalify' => 'cpan', - 'CPAN::LWP::UserAgent' => 'cpan', - 'CPAN::Meta' => 'cpan', - 'CPAN::Meta::Converter' => 'cpan', - 'CPAN::Meta::Feature' => 'cpan', - 'CPAN::Meta::History' => 'cpan', - 'CPAN::Meta::Prereqs' => 'cpan', - 'CPAN::Meta::Spec' => 'cpan', - 'CPAN::Meta::Validator' => 'cpan', - 'CPAN::Meta::YAML' => 'cpan', - 'CPAN::Mirrors' => 'cpan', - 'CPAN::Module' => 'cpan', - 'CPAN::Nox' => 'cpan', - 'CPAN::Prompt' => 'cpan', - 'CPAN::Queue' => 'cpan', - 'CPAN::Shell' => 'cpan', - 'CPAN::Tarzip' => 'cpan', - 'CPAN::URL' => 'cpan', - 'CPAN::Version' => 'cpan', - 'CPANPLUS' => 'cpan', - 'CPANPLUS::Backend' => 'cpan', - 'CPANPLUS::Backend::RV' => 'cpan', - 'CPANPLUS::Config' => 'cpan', - 'CPANPLUS::Configure' => 'cpan', - 'CPANPLUS::Configure::Setup'=> 'cpan', - 'CPANPLUS::Dist' => 'cpan', - 'CPANPLUS::Dist::Autobundle'=> 'cpan', - 'CPANPLUS::Dist::Base' => 'cpan', - 'CPANPLUS::Dist::Build' => 'cpan', - 'CPANPLUS::Dist::Build::Constants'=> 'cpan', - 'CPANPLUS::Dist::MM' => 'cpan', - 'CPANPLUS::Dist::Sample'=> 'cpan', - 'CPANPLUS::Error' => 'cpan', - 'CPANPLUS::Internals' => 'cpan', - 'CPANPLUS::Internals::Constants'=> 'cpan', - 'CPANPLUS::Internals::Constants::Report'=> 'cpan', - 'CPANPLUS::Internals::Extract'=> 'cpan', - 'CPANPLUS::Internals::Fetch'=> 'cpan', - 'CPANPLUS::Internals::Report'=> 'cpan', - 'CPANPLUS::Internals::Search'=> 'cpan', - 'CPANPLUS::Internals::Source'=> 'cpan', - 'CPANPLUS::Internals::Source::Memory'=> 'cpan', - 'CPANPLUS::Internals::Source::SQLite'=> 'cpan', - 'CPANPLUS::Internals::Source::SQLite::Tie'=> 'cpan', - 'CPANPLUS::Internals::Utils'=> 'cpan', - 'CPANPLUS::Internals::Utils::Autoflush'=> 'cpan', - 'CPANPLUS::Module' => 'cpan', - 'CPANPLUS::Module::Author'=> 'cpan', - 'CPANPLUS::Module::Author::Fake'=> 'cpan', - 'CPANPLUS::Module::Checksums'=> 'cpan', - 'CPANPLUS::Module::Fake'=> 'cpan', - 'CPANPLUS::Module::Signature'=> 'cpan', - 'CPANPLUS::Selfupdate' => 'cpan', - 'CPANPLUS::Shell' => 'cpan', - 'CPANPLUS::Shell::Classic'=> 'cpan', - 'CPANPLUS::Shell::Default'=> 'cpan', - 'CPANPLUS::Shell::Default::Plugins::CustomSource'=> 'cpan', - 'CPANPLUS::Shell::Default::Plugins::Remote'=> 'cpan', - 'CPANPLUS::Shell::Default::Plugins::Source'=> 'cpan', - 'Compress::Raw::Bzip2' => 'cpan', - 'Compress::Raw::Zlib' => 'cpan', - 'Compress::Zlib' => 'cpan', - 'Cwd' => 'blead', - 'DB_File' => undef, - 'Devel::InnerPackage' => 'cpan', - 'Devel::PPPort' => 'cpan', - 'Digest' => 'cpan', - 'Digest::MD5' => 'cpan', - 'Digest::SHA' => 'cpan', - 'Digest::base' => 'cpan', - 'Digest::file' => 'cpan', - 'Encode' => 'cpan', - 'Encode::Alias' => 'cpan', - 'Encode::Byte' => 'cpan', - 'Encode::CJKConstants' => 'cpan', - 'Encode::CN' => 'cpan', - 'Encode::CN::HZ' => 'cpan', - 'Encode::Config' => 'cpan', - 'Encode::EBCDIC' => 'cpan', + 5.014002 => { + 'AnyDBM_File' => '1.00', + 'App::Cpan' => '1.5701', + 'App::Prove' => '3.23', + 'App::Prove::State' => '3.23', + 'App::Prove::State::Result'=> '3.23', + 'App::Prove::State::Result::Test'=> '3.23', + 'Archive::Extract' => '0.48', + 'Archive::Tar' => '1.76', + 'Archive::Tar::Constant'=> '1.76', + 'Archive::Tar::File' => '1.76', + 'Attribute::Handlers' => '0.89', + 'AutoLoader' => '5.71', + 'AutoSplit' => '1.06', + 'B' => '1.29', + 'B::Concise' => '0.83', + 'B::Debug' => '1.16', + 'B::Deparse' => '1.04', + 'B::Lint' => '1.13', + 'B::Lint::Debug' => '1.12', + 'B::Showlex' => '1.03', + 'B::Terse' => '1.05', + 'B::Xref' => '1.02', + 'Benchmark' => '1.12', + 'CGI' => '3.52', + 'CGI::Apache' => '1.01', + 'CGI::Carp' => '3.51', + 'CGI::Cookie' => '1.30', + 'CGI::Fast' => '1.08', + 'CGI::Pretty' => '3.46', + 'CGI::Push' => '1.05', + 'CGI::Switch' => '1.01', + 'CGI::Util' => '3.51', + 'CPAN' => '1.9600_01', + 'CPAN::Author' => '5.5001', + 'CPAN::Bundle' => '5.5', + 'CPAN::CacheMgr' => '5.5001', + 'CPAN::Complete' => '5.5', + 'CPAN::Debug' => '5.5001', + 'CPAN::DeferredCode' => '5.50', + 'CPAN::Distribution' => '1.9602_01', + 'CPAN::Distroprefs' => '6', + 'CPAN::Distrostatus' => '5.5', + 'CPAN::Exception::RecursiveDependency'=> '5.5', + 'CPAN::Exception::blocked_urllist'=> '1.001', + 'CPAN::Exception::yaml_not_installed'=> '5.5', + 'CPAN::FTP' => '5.5005', + 'CPAN::FTP::netrc' => '1.01', + 'CPAN::FirstTime' => '5.5303', + 'CPAN::HTTP::Client' => '1.9600', + 'CPAN::HTTP::Credentials'=> '1.9600', + 'CPAN::HandleConfig' => '5.5003', + 'CPAN::Index' => '1.9600', + 'CPAN::InfoObj' => '5.5', + 'CPAN::Kwalify' => '5.50', + 'CPAN::LWP::UserAgent' => '1.9600', + 'CPAN::Meta' => '2.110440', + 'CPAN::Meta::Converter' => '2.110440', + 'CPAN::Meta::Feature' => '2.110440', + 'CPAN::Meta::History' => '2.110440', + 'CPAN::Meta::Prereqs' => '2.110440', + 'CPAN::Meta::Spec' => '2.110440', + 'CPAN::Meta::Validator' => '2.110440', + 'CPAN::Meta::YAML' => '0.003', + 'CPAN::Mirrors' => '1.9600', + 'CPAN::Module' => '5.5001', + 'CPAN::Nox' => '5.50', + 'CPAN::Prompt' => '5.5', + 'CPAN::Queue' => '5.5001', + 'CPAN::Shell' => '5.5002', + 'CPAN::Tarzip' => '5.5011', + 'CPAN::URL' => '5.5', + 'CPAN::Version' => '5.5001', + 'CPANPLUS' => '0.9103', + 'CPANPLUS::Backend' => undef, + 'CPANPLUS::Backend::RV' => undef, + 'CPANPLUS::Config' => undef, + 'CPANPLUS::Configure' => undef, + 'CPANPLUS::Configure::Setup'=> undef, + 'CPANPLUS::Dist' => undef, + 'CPANPLUS::Dist::Autobundle'=> undef, + 'CPANPLUS::Dist::Base' => undef, + 'CPANPLUS::Dist::Build' => '0.54', + 'CPANPLUS::Dist::Build::Constants'=> '0.54', + 'CPANPLUS::Dist::MM' => undef, + 'CPANPLUS::Dist::Sample'=> undef, + 'CPANPLUS::Error' => undef, + 'CPANPLUS::Internals' => '0.9103', + 'CPANPLUS::Internals::Constants'=> undef, + 'CPANPLUS::Internals::Constants::Report'=> undef, + 'CPANPLUS::Internals::Extract'=> undef, + 'CPANPLUS::Internals::Fetch'=> undef, + 'CPANPLUS::Internals::Report'=> undef, + 'CPANPLUS::Internals::Search'=> undef, + 'CPANPLUS::Internals::Source'=> undef, + 'CPANPLUS::Internals::Source::Memory'=> undef, + 'CPANPLUS::Internals::Source::SQLite'=> undef, + 'CPANPLUS::Internals::Source::SQLite::Tie'=> undef, + 'CPANPLUS::Internals::Utils'=> undef, + 'CPANPLUS::Internals::Utils::Autoflush'=> undef, + 'CPANPLUS::Module' => undef, + 'CPANPLUS::Module::Author'=> undef, + 'CPANPLUS::Module::Author::Fake'=> undef, + 'CPANPLUS::Module::Checksums'=> undef, + 'CPANPLUS::Module::Fake'=> undef, + 'CPANPLUS::Module::Signature'=> undef, + 'CPANPLUS::Selfupdate' => undef, + 'CPANPLUS::Shell' => undef, + 'CPANPLUS::Shell::Classic'=> '0.0562', + 'CPANPLUS::Shell::Default'=> '0.9103', + 'CPANPLUS::Shell::Default::Plugins::CustomSource'=> undef, + 'CPANPLUS::Shell::Default::Plugins::Remote'=> undef, + 'CPANPLUS::Shell::Default::Plugins::Source'=> undef, + 'Carp' => '1.20', + 'Carp::Heavy' => '1.20', + 'Class::Struct' => '0.63', + 'Compress::Raw::Bzip2' => '2.033', + 'Compress::Raw::Zlib' => '2.033', + 'Compress::Zlib' => '2.033', + 'Config' => undef, + 'Config::Extensions' => '0.01', + 'Cwd' => '3.36', + 'DB' => '1.03', + 'DBM_Filter' => '0.04', + 'DBM_Filter::compress' => '0.02', + 'DBM_Filter::encode' => '0.02', + 'DBM_Filter::int32' => '0.02', + 'DBM_Filter::null' => '0.02', + 'DBM_Filter::utf8' => '0.02', + 'DB_File' => '1.821', + 'Data::Dumper' => '2.130_02', + 'Devel::DProf' => '20110228.00', + 'Devel::DProf::dprof::V'=> undef, + 'Devel::InnerPackage' => '0.3', + 'Devel::PPPort' => '3.19', + 'Devel::Peek' => '1.07', + 'Devel::SelfStubber' => '1.05', + 'Digest' => '1.16', + 'Digest::MD5' => '2.51', + 'Digest::SHA' => '5.61', + 'Digest::base' => '1.16', + 'Digest::file' => '1.16', + 'DirHandle' => '1.04', + 'Dumpvalue' => '1.16', + 'DynaLoader' => '1.13', + 'Encode' => '2.42_01', + 'Encode::Alias' => '2.13', + 'Encode::Byte' => '2.04', + 'Encode::CJKConstants' => '2.02', + 'Encode::CN' => '2.03', + 'Encode::CN::HZ' => '2.05', + 'Encode::Config' => '2.05', + 'Encode::EBCDIC' => '2.02', + 'Encode::Encoder' => '2.01', + 'Encode::Encoding' => '2.05', + 'Encode::GSM0338' => '2.01', + 'Encode::Guess' => '2.04', + 'Encode::JP' => '2.04', + 'Encode::JP::H2Z' => '2.02', + 'Encode::JP::JIS7' => '2.04', + 'Encode::KR' => '2.03', + 'Encode::KR::2022_KR' => '2.02', + 'Encode::MIME::Header' => '2.13', + 'Encode::MIME::Header::ISO_2022_JP'=> '1.03', + 'Encode::MIME::Name' => '1.01', + 'Encode::Symbol' => '2.02', + 'Encode::TW' => '2.03', + 'Encode::Unicode' => '2.07', + 'Encode::Unicode::UTF7' => '2.05', + 'English' => '1.04', + 'Env' => '1.02', + 'Errno' => '1.13', + 'Exporter' => '5.64_03', + 'Exporter::Heavy' => '5.64_03', + 'ExtUtils::CBuilder' => '0.280203', + 'ExtUtils::CBuilder::Base'=> '0.280203', + 'ExtUtils::CBuilder::Platform::Unix'=> '0.280203', + 'ExtUtils::CBuilder::Platform::VMS'=> '0.280203', + 'ExtUtils::CBuilder::Platform::Windows'=> '0.280203', + 'ExtUtils::CBuilder::Platform::Windows::BCC'=> '0.280203', + 'ExtUtils::CBuilder::Platform::Windows::GCC'=> '0.280203', + 'ExtUtils::CBuilder::Platform::Windows::MSVC'=> '0.280203', + 'ExtUtils::CBuilder::Platform::aix'=> '0.280203', + 'ExtUtils::CBuilder::Platform::cygwin'=> '0.280203', + 'ExtUtils::CBuilder::Platform::darwin'=> '0.280203', + 'ExtUtils::CBuilder::Platform::dec_osf'=> '0.280203', + 'ExtUtils::CBuilder::Platform::os2'=> '0.280203', + 'ExtUtils::Command' => '1.17', + 'ExtUtils::Command::MM' => '6.57_05', + 'ExtUtils::Constant' => '0.23', + 'ExtUtils::Constant::Base'=> '0.05', + 'ExtUtils::Constant::ProxySubs'=> '0.08', + 'ExtUtils::Constant::Utils'=> '0.03', + 'ExtUtils::Constant::XS'=> '0.03', + 'ExtUtils::Embed' => '1.30', + 'ExtUtils::Install' => '1.56', + 'ExtUtils::Installed' => '1.999_001', + 'ExtUtils::Liblist' => '6.57_05', + 'ExtUtils::Liblist::Kid'=> '6.5705', + 'ExtUtils::MM' => '6.57_05', + 'ExtUtils::MM_AIX' => '6.57_05', + 'ExtUtils::MM_Any' => '6.57_05', + 'ExtUtils::MM_BeOS' => '6.57_05', + 'ExtUtils::MM_Cygwin' => '6.57_05', + 'ExtUtils::MM_DOS' => '6.5705', + 'ExtUtils::MM_Darwin' => '6.57_05', + 'ExtUtils::MM_MacOS' => '6.5705', + 'ExtUtils::MM_NW5' => '6.57_05', + 'ExtUtils::MM_OS2' => '6.57_05', + 'ExtUtils::MM_QNX' => '6.57_05', + 'ExtUtils::MM_UWIN' => '6.5705', + 'ExtUtils::MM_Unix' => '6.57_05', + 'ExtUtils::MM_VMS' => '6.57_05', + 'ExtUtils::MM_VOS' => '6.57_05', + 'ExtUtils::MM_Win32' => '6.57_05', + 'ExtUtils::MM_Win95' => '6.57_05', + 'ExtUtils::MY' => '6.5705', + 'ExtUtils::MakeMaker' => '6.57_05', + 'ExtUtils::MakeMaker::Config'=> '6.57_05', + 'ExtUtils::MakeMaker::YAML'=> '1.44', + 'ExtUtils::Manifest' => '1.58', + 'ExtUtils::Miniperl' => undef, + 'ExtUtils::Mkbootstrap' => '6.57_05', + 'ExtUtils::Mksymlists' => '6.57_05', + 'ExtUtils::Packlist' => '1.44', + 'ExtUtils::ParseXS' => '2.2210', + 'ExtUtils::XSSymSet' => '1.2', + 'ExtUtils::testlib' => '6.5705', + 'Fatal' => '2.1001', + 'Fcntl' => '1.11', + 'File::Basename' => '2.82', + 'File::CheckTree' => '4.41', + 'File::Compare' => '1.1006', + 'File::Copy' => '2.21', + 'File::DosGlob' => '1.04', + 'File::Fetch' => '0.32', + 'File::Find' => '1.19', + 'File::Glob' => '1.13', + 'File::GlobMapper' => '1.000', + 'File::Path' => '2.08_01', + 'File::Spec' => '3.33', + 'File::Spec::Cygwin' => '3.33', + 'File::Spec::Epoc' => '3.33', + 'File::Spec::Functions' => '3.33', + 'File::Spec::Mac' => '3.34', + 'File::Spec::OS2' => '3.33', + 'File::Spec::Unix' => '3.33', + 'File::Spec::VMS' => '3.34', + 'File::Spec::Win32' => '3.33', + 'File::Temp' => '0.22', + 'File::stat' => '1.05', + 'FileCache' => '1.08', + 'FileHandle' => '2.02', + 'Filter::Simple' => '0.86', + 'Filter::Util::Call' => '1.08', + 'FindBin' => '1.50', + 'GDBM_File' => '1.14', + 'Getopt::Long' => '2.38', + 'Getopt::Std' => '1.06', + 'HTTP::Tiny' => '0.012', + 'Hash::Util' => '0.11', + 'Hash::Util::FieldHash' => '1.09', + 'I18N::Collate' => '1.02', + 'I18N::LangTags' => '0.35_01', + 'I18N::LangTags::Detect'=> '1.05', + 'I18N::LangTags::List' => '0.35_01', + 'I18N::Langinfo' => '0.08', + 'IO' => '1.25_04', + 'IO::Compress::Adapter::Bzip2'=> '2.033', + 'IO::Compress::Adapter::Deflate'=> '2.033', + 'IO::Compress::Adapter::Identity'=> '2.033', + 'IO::Compress::Base' => '2.033', + 'IO::Compress::Base::Common'=> '2.033', + 'IO::Compress::Bzip2' => '2.033', + 'IO::Compress::Deflate' => '2.033', + 'IO::Compress::Gzip' => '2.033', + 'IO::Compress::Gzip::Constants'=> '2.033', + 'IO::Compress::RawDeflate'=> '2.033', + 'IO::Compress::Zip' => '2.033', + 'IO::Compress::Zip::Constants'=> '2.033', + 'IO::Compress::Zlib::Constants'=> '2.033', + 'IO::Compress::Zlib::Extra'=> '2.033', + 'IO::Dir' => '1.08', + 'IO::File' => '1.15', + 'IO::Handle' => '1.31', + 'IO::Pipe' => '1.14', + 'IO::Poll' => '0.08', + 'IO::Seekable' => '1.10', + 'IO::Select' => '1.20', + 'IO::Socket' => '1.32', + 'IO::Socket::INET' => '1.31', + 'IO::Socket::UNIX' => '1.23', + 'IO::Uncompress::Adapter::Bunzip2'=> '2.033', + 'IO::Uncompress::Adapter::Identity'=> '2.033', + 'IO::Uncompress::Adapter::Inflate'=> '2.033', + 'IO::Uncompress::AnyInflate'=> '2.033', + 'IO::Uncompress::AnyUncompress'=> '2.033', + 'IO::Uncompress::Base' => '2.033', + 'IO::Uncompress::Bunzip2'=> '2.033', + 'IO::Uncompress::Gunzip'=> '2.033', + 'IO::Uncompress::Inflate'=> '2.033', + 'IO::Uncompress::RawInflate'=> '2.033', + 'IO::Uncompress::Unzip' => '2.033', + 'IO::Zlib' => '1.10', + 'IPC::Cmd' => '0.70', + 'IPC::Msg' => '2.03', + 'IPC::Open2' => '1.03', + 'IPC::Open3' => '1.09', + 'IPC::Semaphore' => '2.03', + 'IPC::SharedMem' => '2.03', + 'IPC::SysV' => '2.03', + 'JSON::PP' => '2.27105', + 'JSON::PP::Boolean' => undef, + 'List::Util' => '1.23', + 'List::Util::PP' => '1.23', + 'List::Util::XS' => '1.23', + 'Locale::Codes' => '3.16', + 'Locale::Codes::Country'=> '3.16', + 'Locale::Codes::Currency'=> '3.16', + 'Locale::Codes::Language'=> '3.16', + 'Locale::Codes::Script' => '3.16', + 'Locale::Constants' => '3.16', + 'Locale::Country' => '3.16', + 'Locale::Currency' => '3.16', + 'Locale::Language' => '3.16', + 'Locale::Maketext' => '1.19', + 'Locale::Maketext::Guts'=> '1.17', + 'Locale::Maketext::GutsLoader'=> '1.17', + 'Locale::Maketext::Simple'=> '0.21', + 'Locale::Script' => '3.16', + 'Log::Message' => '0.04', + 'Log::Message::Config' => '0.04', + 'Log::Message::Handlers'=> '0.04', + 'Log::Message::Item' => '0.04', + 'Log::Message::Simple' => '0.08', + 'MIME::Base64' => '3.13', + 'MIME::QuotedPrint' => '3.13', + 'Math::BigFloat' => '1.993', + 'Math::BigFloat::Trace' => '0.01', + 'Math::BigInt' => '1.994', + 'Math::BigInt::Calc' => '1.993', + 'Math::BigInt::CalcEmu' => '1.993', + 'Math::BigInt::FastCalc'=> '0.28', + 'Math::BigInt::Trace' => '0.01', + 'Math::BigRat' => '0.26_02', + 'Math::Complex' => '1.56', + 'Math::Trig' => '1.2', + 'Memoize' => '1.02', + 'Memoize::AnyDBM_File' => '1.02', + 'Memoize::Expire' => '1.02', + 'Memoize::ExpireFile' => '1.02', + 'Memoize::ExpireTest' => '1.02', + 'Memoize::NDBM_File' => '1.02', + 'Memoize::SDBM_File' => '1.02', + 'Memoize::Storable' => '1.02', + 'Module::Build' => '0.3800', + 'Module::Build::Base' => '0.3800', + 'Module::Build::Compat' => '0.3800', + 'Module::Build::Config' => '0.3800', + 'Module::Build::ConfigData'=> undef, + 'Module::Build::Cookbook'=> '0.3800', + 'Module::Build::Dumper' => '0.3800', + 'Module::Build::ModuleInfo'=> '0.3800', + 'Module::Build::Notes' => '0.3800', + 'Module::Build::PPMMaker'=> '0.3800', + 'Module::Build::Platform::Amiga'=> '0.3800', + 'Module::Build::Platform::Default'=> '0.3800', + 'Module::Build::Platform::EBCDIC'=> '0.3800', + 'Module::Build::Platform::MPEiX'=> '0.3800', + 'Module::Build::Platform::MacOS'=> '0.3800', + 'Module::Build::Platform::RiscOS'=> '0.3800', + 'Module::Build::Platform::Unix'=> '0.3800', + 'Module::Build::Platform::VMS'=> '0.3800', + 'Module::Build::Platform::VOS'=> '0.3800', + 'Module::Build::Platform::Windows'=> '0.3800', + 'Module::Build::Platform::aix'=> '0.3800', + 'Module::Build::Platform::cygwin'=> '0.3800', + 'Module::Build::Platform::darwin'=> '0.3800', + 'Module::Build::Platform::os2'=> '0.3800', + 'Module::Build::PodParser'=> '0.3800', + 'Module::Build::Version'=> '0.87', + 'Module::Build::YAML' => '1.41', + 'Module::CoreList' => '2.49_02', + 'Module::Load' => '0.18', + 'Module::Load::Conditional'=> '0.44', + 'Module::Loaded' => '0.06', + 'Module::Metadata' => '1.000004', + 'Module::Pluggable' => '3.9', + 'Module::Pluggable::Object'=> '3.9', + 'Moped::Msg' => '0.01', + 'NDBM_File' => '1.12', + 'NEXT' => '0.65', + 'Net::Cmd' => '2.29', + 'Net::Config' => '1.11', + 'Net::Domain' => '2.20', + 'Net::FTP' => '2.77', + 'Net::FTP::A' => '1.18', + 'Net::FTP::E' => '0.01', + 'Net::FTP::I' => '1.12', + 'Net::FTP::L' => '0.01', + 'Net::FTP::dataconn' => '0.11', + 'Net::NNTP' => '2.24', + 'Net::Netrc' => '2.12', + 'Net::POP3' => '2.29', + 'Net::Ping' => '2.38', + 'Net::SMTP' => '2.31', + 'Net::Time' => '2.10', + 'Net::hostent' => '1.01', + 'Net::netent' => '1.00', + 'Net::protoent' => '1.00', + 'Net::servent' => '1.01', + 'O' => '1.01', + 'ODBM_File' => '1.10', + 'Object::Accessor' => '0.38', + 'Opcode' => '1.18', + 'POSIX' => '1.24', + 'Package::Constants' => '0.02', + 'Params::Check' => '0.28', + 'Parse::CPAN::Meta' => '1.4401', + 'Perl::OSType' => '1.002', + 'PerlIO' => '1.07', + 'PerlIO::encoding' => '0.14', + 'PerlIO::scalar' => '0.11_01', + 'PerlIO::via' => '0.11', + 'PerlIO::via::QuotedPrint'=> '0.06', + 'Pod::Checker' => '1.45', + 'Pod::Escapes' => '1.04', + 'Pod::Find' => '1.35', + 'Pod::Functions' => '1.04', + 'Pod::Html' => '1.11', + 'Pod::InputObjects' => '1.31', + 'Pod::LaTeX' => '0.59', + 'Pod::Man' => '2.25', + 'Pod::ParseLink' => '1.10', + 'Pod::ParseUtils' => '1.36', + 'Pod::Parser' => '1.37', + 'Pod::Perldoc' => '3.15_04', + 'Pod::Perldoc::BaseTo' => undef, + 'Pod::Perldoc::GetOptsOO'=> undef, + 'Pod::Perldoc::ToChecker'=> undef, + 'Pod::Perldoc::ToMan' => undef, + 'Pod::Perldoc::ToNroff' => undef, + 'Pod::Perldoc::ToPod' => undef, + 'Pod::Perldoc::ToRtf' => undef, + 'Pod::Perldoc::ToText' => undef, + 'Pod::Perldoc::ToTk' => undef, + 'Pod::Perldoc::ToXml' => undef, + 'Pod::PlainText' => '2.04', + 'Pod::Select' => '1.36', + 'Pod::Simple' => '3.16', + 'Pod::Simple::BlackBox' => '3.16', + 'Pod::Simple::Checker' => '3.16', + 'Pod::Simple::Debug' => '3.16', + 'Pod::Simple::DumpAsText'=> '3.16', + 'Pod::Simple::DumpAsXML'=> '3.16', + 'Pod::Simple::HTML' => '3.16', + 'Pod::Simple::HTMLBatch'=> '3.16', + 'Pod::Simple::HTMLLegacy'=> '5.01', + 'Pod::Simple::LinkSection'=> '3.16', + 'Pod::Simple::Methody' => '3.16', + 'Pod::Simple::Progress' => '3.16', + 'Pod::Simple::PullParser'=> '3.16', + 'Pod::Simple::PullParserEndToken'=> '3.16', + 'Pod::Simple::PullParserStartToken'=> '3.16', + 'Pod::Simple::PullParserTextToken'=> '3.16', + 'Pod::Simple::PullParserToken'=> '3.16', + 'Pod::Simple::RTF' => '3.16', + 'Pod::Simple::Search' => '3.16', + 'Pod::Simple::SimpleTree'=> '3.16', + 'Pod::Simple::Text' => '3.16', + 'Pod::Simple::TextContent'=> '3.16', + 'Pod::Simple::TiedOutFH'=> '3.16', + 'Pod::Simple::Transcode'=> '3.16', + 'Pod::Simple::TranscodeDumb'=> '3.16', + 'Pod::Simple::TranscodeSmart'=> '3.16', + 'Pod::Simple::XHTML' => '3.16', + 'Pod::Simple::XMLOutStream'=> '3.16', + 'Pod::Text' => '3.15', + 'Pod::Text::Color' => '2.06', + 'Pod::Text::Overstrike' => '2.04', + 'Pod::Text::Termcap' => '2.06', + 'Pod::Usage' => '1.36', + 'SDBM_File' => '1.09', + 'Safe' => '2.29', + 'Scalar::Util' => '1.23', + 'Scalar::Util::PP' => '1.23', + 'Search::Dict' => '1.03', + 'SelectSaver' => '1.02', + 'SelfLoader' => '1.18', + 'Shell' => '0.72_01', + 'Socket' => '1.94', + 'Storable' => '2.27', + 'Symbol' => '1.07', + 'Sys::Hostname' => '1.16', + 'Sys::Syslog' => '0.27', + 'Sys::Syslog::win32::Win32'=> undef, + 'TAP::Base' => '3.23', + 'TAP::Formatter::Base' => '3.23', + 'TAP::Formatter::Color' => '3.23', + 'TAP::Formatter::Console'=> '3.23', + 'TAP::Formatter::Console::ParallelSession'=> '3.23', + 'TAP::Formatter::Console::Session'=> '3.23', + 'TAP::Formatter::File' => '3.23', + 'TAP::Formatter::File::Session'=> '3.23', + 'TAP::Formatter::Session'=> '3.23', + 'TAP::Harness' => '3.23', + 'TAP::Object' => '3.23', + 'TAP::Parser' => '3.23', + 'TAP::Parser::Aggregator'=> '3.23', + 'TAP::Parser::Grammar' => '3.23', + 'TAP::Parser::Iterator' => '3.23', + 'TAP::Parser::Iterator::Array'=> '3.23', + 'TAP::Parser::Iterator::Process'=> '3.23', + 'TAP::Parser::Iterator::Stream'=> '3.23', + 'TAP::Parser::IteratorFactory'=> '3.23', + 'TAP::Parser::Multiplexer'=> '3.23', + 'TAP::Parser::Result' => '3.23', + 'TAP::Parser::Result::Bailout'=> '3.23', + 'TAP::Parser::Result::Comment'=> '3.23', + 'TAP::Parser::Result::Plan'=> '3.23', + 'TAP::Parser::Result::Pragma'=> '3.23', + 'TAP::Parser::Result::Test'=> '3.23', + 'TAP::Parser::Result::Unknown'=> '3.23', + 'TAP::Parser::Result::Version'=> '3.23', + 'TAP::Parser::Result::YAML'=> '3.23', + 'TAP::Parser::ResultFactory'=> '3.23', + 'TAP::Parser::Scheduler'=> '3.23', + 'TAP::Parser::Scheduler::Job'=> '3.23', + 'TAP::Parser::Scheduler::Spinner'=> '3.23', + 'TAP::Parser::Source' => '3.23', + 'TAP::Parser::SourceHandler'=> '3.23', + 'TAP::Parser::SourceHandler::Executable'=> '3.23', + 'TAP::Parser::SourceHandler::File'=> '3.23', + 'TAP::Parser::SourceHandler::Handle'=> '3.23', + 'TAP::Parser::SourceHandler::Perl'=> '3.23', + 'TAP::Parser::SourceHandler::RawTAP'=> '3.23', + 'TAP::Parser::Utils' => '3.23', + 'TAP::Parser::YAMLish::Reader'=> '3.23', + 'TAP::Parser::YAMLish::Writer'=> '3.23', + 'Term::ANSIColor' => '3.00', + 'Term::Cap' => '1.12', + 'Term::Complete' => '1.402', + 'Term::ReadLine' => '1.07', + 'Term::UI' => '0.26', + 'Term::UI::History' => undef, + 'Test' => '1.25_02', + 'Test::Builder' => '0.98', + 'Test::Builder::Module' => '0.98', + 'Test::Builder::Tester' => '1.22', + 'Test::Builder::Tester::Color'=> '1.22', + 'Test::Harness' => '3.23', + 'Test::More' => '0.98', + 'Test::Simple' => '0.98', + 'Text::Abbrev' => '1.01', + 'Text::Balanced' => '2.02', + 'Text::ParseWords' => '3.27', + 'Text::Soundex' => '3.03_01', + 'Text::Tabs' => '2009.0305', + 'Text::Wrap' => '2009.0305', + 'Thread' => '3.02', + 'Thread::Queue' => '2.12', + 'Thread::Semaphore' => '2.12', + 'Tie::Array' => '1.04', + 'Tie::File' => '0.97_02', + 'Tie::Handle' => '4.2', + 'Tie::Hash' => '1.04', + 'Tie::Hash::NamedCapture'=> '0.08', + 'Tie::Memoize' => '1.1', + 'Tie::RefHash' => '1.39', + 'Tie::Scalar' => '1.02', + 'Tie::StdHandle' => '4.2', + 'Tie::SubstrHash' => '1.00', + 'Time::HiRes' => '1.9721_01', + 'Time::Local' => '1.2000', + 'Time::Piece' => '1.20_01', + 'Time::Piece::Seconds' => undef, + 'Time::Seconds' => undef, + 'Time::gmtime' => '1.03', + 'Time::localtime' => '1.02', + 'Time::tm' => '1.00', + 'UNIVERSAL' => '1.08', + 'Unicode' => '6.0.0', + 'Unicode::Collate' => '0.73', + 'Unicode::Collate::CJK::Big5'=> '0.65', + 'Unicode::Collate::CJK::GB2312'=> '0.65', + 'Unicode::Collate::CJK::JISX0208'=> '0.64', + 'Unicode::Collate::CJK::Korean'=> '0.66', + 'Unicode::Collate::CJK::Pinyin'=> '0.65', + 'Unicode::Collate::CJK::Stroke'=> '0.65', + 'Unicode::Collate::Locale'=> '0.73', + 'Unicode::Normalize' => '1.10', + 'Unicode::UCD' => '0.32', + 'User::grent' => '1.01', + 'User::pwent' => '1.00', + 'VMS::DCLsym' => '1.05', + 'VMS::Filespec' => '1.12', + 'VMS::Stdio' => '2.4', + 'Version::Requirements' => '0.101020', + 'Win32' => '0.44', + 'Win32API::File' => '0.1101', + 'Win32API::File::ExtUtils::Myconst2perl'=> '1', + 'Win32CORE' => '0.02', + 'XS::APItest' => '0.28', + 'XS::Typemap' => '0.05', + 'XSLoader' => '0.13', + 'XSLoader::XSLoader' => '0.13', + 'attributes' => '0.14', + 'autodie' => '2.1001', + 'autodie::exception' => '2.1001', + 'autodie::exception::system'=> '2.1001', + 'autodie::hints' => '2.1001', + 'autouse' => '1.06', + 'base' => '2.16', + 'bigint' => '0.27', + 'bignum' => '0.27', + 'bigrat' => '0.28', + 'blib' => '1.06', + 'bytes' => '1.04', + 'charnames' => '1.18', + 'constant' => '1.21', + 'deprecate' => '0.02', + 'diagnostics' => '1.22', + 'encoding' => '2.6_01', + 'encoding::warnings' => '0.11', + 'feature' => '1.20', + 'fields' => '2.15', + 'filetest' => '1.02', + 'if' => '0.0601', + 'inc::latest' => '0.3800', + 'integer' => '1.00', + 'less' => '0.03', + 'lib' => '0.63', + 'locale' => '1.00', + 'mro' => '1.07', + 'open' => '1.08', + 'ops' => '1.02', + 'overload' => '1.13', + 'overload::numbers' => undef, + 'overloading' => '0.01', + 'parent' => '0.225', + 're' => '0.18', + 'sigtrap' => '1.05', + 'sort' => '2.01', + 'strict' => '1.04', + 'subs' => '1.00', + 'threads' => '1.83', + 'threads::shared' => '1.37', + 'utf8' => '1.09', + 'vars' => '1.02', + 'version' => '0.88', + 'vmsish' => '1.02', + 'warnings' => '1.12', + 'warnings::register' => '1.02', + }, + 5.015003 => { + 'AnyDBM_File' => '1.01', + 'App::Cpan' => '1.5701', + 'App::Prove' => '3.23', + 'App::Prove::State' => '3.23', + 'App::Prove::State::Result'=> '3.23', + 'App::Prove::State::Result::Test'=> '3.23', + 'Archive::Extract' => '0.56', + 'Archive::Tar' => '1.78', + 'Archive::Tar::Constant'=> '1.78', + 'Archive::Tar::File' => '1.78', + 'Attribute::Handlers' => '0.93', + 'AutoLoader' => '5.71', + 'AutoSplit' => '1.06', + 'B' => '1.32', + 'B::Concise' => '0.86', + 'B::Debug' => '1.16', + 'B::Deparse' => '1.08', + 'B::Lint' => '1.13', + 'B::Lint::Debug' => '1.12', + 'B::Showlex' => '1.03', + 'B::Terse' => '1.06', + 'B::Xref' => '1.03', + 'Benchmark' => '1.13', + 'CGI' => '3.55', + 'CGI::Apache' => '1.01', + 'CGI::Carp' => '3.51', + 'CGI::Cookie' => '1.30', + 'CGI::Fast' => '1.08', + 'CGI::Pretty' => '3.46', + 'CGI::Push' => '1.05', + 'CGI::Switch' => '1.01', + 'CGI::Util' => '3.53', + 'CPAN' => '1.9800', + 'CPAN::Author' => '5.5001', + 'CPAN::Bundle' => '5.5', + 'CPAN::CacheMgr' => '5.5001', + 'CPAN::Complete' => '5.5', + 'CPAN::Debug' => '5.5001', + 'CPAN::DeferredCode' => '5.50', + 'CPAN::Distribution' => '1.9602', + 'CPAN::Distroprefs' => '6', + 'CPAN::Distrostatus' => '5.5', + 'CPAN::Exception::RecursiveDependency'=> '5.5', + 'CPAN::Exception::blocked_urllist'=> '1.001', + 'CPAN::Exception::yaml_not_installed'=> '5.5', + 'CPAN::Exception::yaml_process_error'=> '5.5', + 'CPAN::FTP' => '5.5005', + 'CPAN::FTP::netrc' => '1.01', + 'CPAN::FirstTime' => '5.5303', + 'CPAN::HTTP::Client' => '1.9600', + 'CPAN::HTTP::Credentials'=> '1.9600', + 'CPAN::HandleConfig' => '5.5003', + 'CPAN::Index' => '1.9600', + 'CPAN::InfoObj' => '5.5', + 'CPAN::Kwalify' => '5.50', + 'CPAN::LWP::UserAgent' => '1.9600', + 'CPAN::Meta' => '2.112621', + 'CPAN::Meta::Converter' => '2.112621', + 'CPAN::Meta::Feature' => '2.112621', + 'CPAN::Meta::History' => '2.112621', + 'CPAN::Meta::Prereqs' => '2.112621', + 'CPAN::Meta::Spec' => '2.112621', + 'CPAN::Meta::Validator' => '2.112621', + 'CPAN::Meta::YAML' => '0.004', + 'CPAN::Mirrors' => '1.9600', + 'CPAN::Module' => '5.5001', + 'CPAN::Nox' => '5.50', + 'CPAN::Prompt' => '5.5', + 'CPAN::Queue' => '5.5001', + 'CPAN::Shell' => '5.5002', + 'CPAN::Tarzip' => '5.5011', + 'CPAN::URL' => '5.5', + 'CPAN::Version' => '5.5001', + 'CPANPLUS' => '0.9111', + 'CPANPLUS::Backend' => undef, + 'CPANPLUS::Backend::RV' => undef, + 'CPANPLUS::Config' => undef, + 'CPANPLUS::Configure' => undef, + 'CPANPLUS::Configure::Setup'=> undef, + 'CPANPLUS::Dist' => undef, + 'CPANPLUS::Dist::Autobundle'=> undef, + 'CPANPLUS::Dist::Base' => undef, + 'CPANPLUS::Dist::Build' => '0.58', + 'CPANPLUS::Dist::Build::Constants'=> '0.58', + 'CPANPLUS::Dist::MM' => undef, + 'CPANPLUS::Dist::Sample'=> undef, + 'CPANPLUS::Error' => undef, + 'CPANPLUS::Internals' => '0.9111', + 'CPANPLUS::Internals::Constants'=> undef, + 'CPANPLUS::Internals::Constants::Report'=> undef, + 'CPANPLUS::Internals::Extract'=> undef, + 'CPANPLUS::Internals::Fetch'=> undef, + 'CPANPLUS::Internals::Report'=> undef, + 'CPANPLUS::Internals::Search'=> undef, + 'CPANPLUS::Internals::Source'=> undef, + 'CPANPLUS::Internals::Source::Memory'=> undef, + 'CPANPLUS::Internals::Source::SQLite'=> undef, + 'CPANPLUS::Internals::Source::SQLite::Tie'=> undef, + 'CPANPLUS::Internals::Utils'=> undef, + 'CPANPLUS::Internals::Utils::Autoflush'=> undef, + 'CPANPLUS::Module' => undef, + 'CPANPLUS::Module::Author'=> undef, + 'CPANPLUS::Module::Author::Fake'=> undef, + 'CPANPLUS::Module::Checksums'=> undef, + 'CPANPLUS::Module::Fake'=> undef, + 'CPANPLUS::Module::Signature'=> undef, + 'CPANPLUS::Selfupdate' => undef, + 'CPANPLUS::Shell' => undef, + 'CPANPLUS::Shell::Classic'=> '0.0562', + 'CPANPLUS::Shell::Default'=> '0.9111', + 'CPANPLUS::Shell::Default::Plugins::CustomSource'=> undef, + 'CPANPLUS::Shell::Default::Plugins::Remote'=> undef, + 'CPANPLUS::Shell::Default::Plugins::Source'=> undef, + 'Carp' => '1.23', + 'Carp::Heavy' => '1.23', + 'Class::Struct' => '0.63', + 'Compress::Raw::Bzip2' => '2.037', + 'Compress::Raw::Zlib' => '2.037', + 'Compress::Zlib' => '2.037', + 'Config' => undef, + 'Config::Extensions' => '0.01', + 'Cwd' => '3.37', + 'DB' => '1.03', + 'DBM_Filter' => '0.04', + 'DBM_Filter::compress' => '0.02', + 'DBM_Filter::encode' => '0.02', + 'DBM_Filter::int32' => '0.02', + 'DBM_Filter::null' => '0.02', + 'DBM_Filter::utf8' => '0.02', + 'DB_File' => '1.824', + 'Data::Dumper' => '2.134', + 'Devel::InnerPackage' => '0.3', + 'Devel::PPPort' => '3.20', + 'Devel::Peek' => '1.08', + 'Devel::SelfStubber' => '1.05', + 'Digest' => '1.16', + 'Digest::MD5' => '2.51', + 'Digest::SHA' => '5.62', + 'Digest::base' => '1.16', + 'Digest::file' => '1.16', + 'DirHandle' => '1.04', + 'Dumpvalue' => '1.16', + 'DynaLoader' => '1.13', + 'Encode' => '2.44', + 'Encode::Alias' => '2.15', + 'Encode::Byte' => '2.04', + 'Encode::CJKConstants' => '2.02', + 'Encode::CN' => '2.03', + 'Encode::CN::HZ' => '2.05', + 'Encode::Config' => '2.05', + 'Encode::EBCDIC' => '2.02', + 'Encode::Encoder' => '2.02', + 'Encode::Encoding' => '2.05', + 'Encode::GSM0338' => '2.01', + 'Encode::Guess' => '2.05', + 'Encode::JP' => '2.04', + 'Encode::JP::H2Z' => '2.02', + 'Encode::JP::JIS7' => '2.04', + 'Encode::KR' => '2.03', + 'Encode::KR::2022_KR' => '2.02', + 'Encode::MIME::Header' => '2.13', + 'Encode::MIME::Header::ISO_2022_JP'=> '1.03', + 'Encode::MIME::Name' => '1.01', + 'Encode::Symbol' => '2.02', + 'Encode::TW' => '2.03', + 'Encode::Unicode' => '2.07', + 'Encode::Unicode::UTF7' => '2.05', + 'English' => '1.04', + 'Env' => '1.03', + 'Errno' => '1.14', + 'Exporter' => '5.65', + 'Exporter::Heavy' => '5.65', + 'ExtUtils::CBuilder' => '0.280204', + 'ExtUtils::CBuilder::Base'=> '0.280204', + 'ExtUtils::CBuilder::Platform::Unix'=> '0.280203', + 'ExtUtils::CBuilder::Platform::VMS'=> '0.280203', + 'ExtUtils::CBuilder::Platform::Windows'=> '0.280203', + 'ExtUtils::CBuilder::Platform::Windows::BCC'=> '0.280203', + 'ExtUtils::CBuilder::Platform::Windows::GCC'=> '0.280203', + 'ExtUtils::CBuilder::Platform::Windows::MSVC'=> '0.280203', + 'ExtUtils::CBuilder::Platform::aix'=> '0.280203', + 'ExtUtils::CBuilder::Platform::cygwin'=> '0.280203', + 'ExtUtils::CBuilder::Platform::darwin'=> '0.280203', + 'ExtUtils::CBuilder::Platform::dec_osf'=> '0.280203', + 'ExtUtils::CBuilder::Platform::os2'=> '0.280203', + 'ExtUtils::Command' => '1.17', + 'ExtUtils::Command::MM' => '6.59', + 'ExtUtils::Constant' => '0.23', + 'ExtUtils::Constant::Base'=> '0.05', + 'ExtUtils::Constant::ProxySubs'=> '0.08', + 'ExtUtils::Constant::Utils'=> '0.03', + 'ExtUtils::Constant::XS'=> '0.03', + 'ExtUtils::Embed' => '1.30', + 'ExtUtils::Install' => '1.57', + 'ExtUtils::Installed' => '1.999002', + 'ExtUtils::Liblist' => '6.59', + 'ExtUtils::Liblist::Kid'=> '6.59', + 'ExtUtils::MM' => '6.59', + 'ExtUtils::MM_AIX' => '6.59', + 'ExtUtils::MM_Any' => '6.59', + 'ExtUtils::MM_BeOS' => '6.59', + 'ExtUtils::MM_Cygwin' => '6.59', + 'ExtUtils::MM_DOS' => '6.59', + 'ExtUtils::MM_Darwin' => '6.59', + 'ExtUtils::MM_MacOS' => '6.59', + 'ExtUtils::MM_NW5' => '6.59', + 'ExtUtils::MM_OS2' => '6.59', + 'ExtUtils::MM_QNX' => '6.59', + 'ExtUtils::MM_UWIN' => '6.59', + 'ExtUtils::MM_Unix' => '6.59', + 'ExtUtils::MM_VMS' => '6.59', + 'ExtUtils::MM_VOS' => '6.59', + 'ExtUtils::MM_Win32' => '6.59', + 'ExtUtils::MM_Win95' => '6.59', + 'ExtUtils::MY' => '6.59', + 'ExtUtils::MakeMaker' => '6.59', + 'ExtUtils::MakeMaker::Config'=> '6.59', + 'ExtUtils::Manifest' => '1.60', + 'ExtUtils::Miniperl' => undef, + 'ExtUtils::Mkbootstrap' => '6.59', + 'ExtUtils::Mksymlists' => '6.59', + 'ExtUtils::Packlist' => '1.44', + 'ExtUtils::ParseXS' => '3.04_04', + 'ExtUtils::ParseXS::Constants'=> '3.04_04', + 'ExtUtils::ParseXS::CountLines'=> '3.04_04', + 'ExtUtils::ParseXS::Utilities'=> '3.04_04', + 'ExtUtils::Typemaps' => '1.02', + 'ExtUtils::Typemaps::InputMap'=> undef, + 'ExtUtils::Typemaps::OutputMap'=> undef, + 'ExtUtils::Typemaps::Type'=> '0.05', + 'ExtUtils::XSSymSet' => '1.2', + 'ExtUtils::testlib' => '6.59', + 'Fatal' => '2.10', + 'Fcntl' => '1.11', + 'File::Basename' => '2.83', + 'File::CheckTree' => '4.41', + 'File::Compare' => '1.1006', + 'File::Copy' => '2.21', + 'File::DosGlob' => '1.04', + 'File::Fetch' => '0.32', + 'File::Find' => '1.20', + 'File::Glob' => '1.13', + 'File::GlobMapper' => '1.000', + 'File::Path' => '2.08_01', + 'File::Spec' => '3.34', + 'File::Spec::Cygwin' => '3.33', + 'File::Spec::Epoc' => '3.33', + 'File::Spec::Functions' => '3.33', + 'File::Spec::Mac' => '3.35', + 'File::Spec::OS2' => '3.33', + 'File::Spec::Unix' => '3.34', + 'File::Spec::VMS' => '3.35', + 'File::Spec::Win32' => '3.35', + 'File::Temp' => '0.22', + 'File::stat' => '1.05', + 'FileCache' => '1.08', + 'FileHandle' => '2.02', + 'Filter::Simple' => '0.88', + 'Filter::Util::Call' => '1.39', + 'FindBin' => '1.51', + 'GDBM_File' => '1.14', + 'Getopt::Long' => '2.38', + 'Getopt::Std' => '1.06', + 'HTTP::Tiny' => '0.013', + 'Hash::Util' => '0.11', + 'Hash::Util::FieldHash' => '1.10', + 'I18N::Collate' => '1.02', + 'I18N::LangTags' => '0.37', + 'I18N::LangTags::Detect'=> '1.05', + 'I18N::LangTags::List' => '0.35_01', + 'I18N::Langinfo' => '0.08_02', + 'IO' => '1.25_06', + 'IO::Compress::Adapter::Bzip2'=> '2.037', + 'IO::Compress::Adapter::Deflate'=> '2.037', + 'IO::Compress::Adapter::Identity'=> '2.037', + 'IO::Compress::Base' => '2.037', + 'IO::Compress::Base::Common'=> '2.037', + 'IO::Compress::Bzip2' => '2.037', + 'IO::Compress::Deflate' => '2.037', + 'IO::Compress::Gzip' => '2.037', + 'IO::Compress::Gzip::Constants'=> '2.037', + 'IO::Compress::RawDeflate'=> '2.037', + 'IO::Compress::Zip' => '2.037', + 'IO::Compress::Zip::Constants'=> '2.037', + 'IO::Compress::Zlib::Constants'=> '2.037', + 'IO::Compress::Zlib::Extra'=> '2.037', + 'IO::Dir' => '1.08', + 'IO::File' => '1.15', + 'IO::Handle' => '1.33', + 'IO::Pipe' => '1.14', + 'IO::Poll' => '0.08', + 'IO::Seekable' => '1.10', + 'IO::Select' => '1.20', + 'IO::Socket' => '1.33', + 'IO::Socket::INET' => '1.32', + 'IO::Socket::UNIX' => '1.23', + 'IO::Uncompress::Adapter::Bunzip2'=> '2.037', + 'IO::Uncompress::Adapter::Identity'=> '2.037', + 'IO::Uncompress::Adapter::Inflate'=> '2.037', + 'IO::Uncompress::AnyInflate'=> '2.037', + 'IO::Uncompress::AnyUncompress'=> '2.037', + 'IO::Uncompress::Base' => '2.037', + 'IO::Uncompress::Bunzip2'=> '2.037', + 'IO::Uncompress::Gunzip'=> '2.037', + 'IO::Uncompress::Inflate'=> '2.037', + 'IO::Uncompress::RawInflate'=> '2.037', + 'IO::Uncompress::Unzip' => '2.037', + 'IO::Zlib' => '1.10', + 'IPC::Cmd' => '0.72', + 'IPC::Msg' => '2.03', + 'IPC::Open2' => '1.04', + 'IPC::Open3' => '1.12', + 'IPC::Semaphore' => '2.03', + 'IPC::SharedMem' => '2.03', + 'IPC::SysV' => '2.03', + 'JSON::PP' => '2.27200', + 'JSON::PP::Boolean' => undef, + 'List::Util' => '1.23', + 'List::Util::PP' => '1.23', + 'List::Util::XS' => '1.23', + 'Locale::Codes' => '3.18', + 'Locale::Codes::Constants'=> '3.18', + 'Locale::Codes::Country'=> '3.18', + 'Locale::Codes::Country_Codes'=> '3.18', + 'Locale::Codes::Currency'=> '3.18', + 'Locale::Codes::Currency_Codes'=> '3.18', + 'Locale::Codes::LangExt'=> '3.18', + 'Locale::Codes::LangExt_Codes'=> '3.18', + 'Locale::Codes::LangVar'=> '3.18', + 'Locale::Codes::LangVar_Codes'=> '3.18', + 'Locale::Codes::Language'=> '3.18', + 'Locale::Codes::Language_Codes'=> '3.18', + 'Locale::Codes::Script' => '3.18', + 'Locale::Codes::Script_Codes'=> '3.18', + 'Locale::Country' => '3.18', + 'Locale::Currency' => '3.18', + 'Locale::Language' => '3.18', + 'Locale::Maketext' => '1.19', + 'Locale::Maketext::Guts'=> '1.17', + 'Locale::Maketext::GutsLoader'=> '1.17', + 'Locale::Maketext::Simple'=> '0.21', + 'Locale::Script' => '3.18', + 'Log::Message' => '0.04', + 'Log::Message::Config' => '0.04', + 'Log::Message::Handlers'=> '0.04', + 'Log::Message::Item' => '0.04', + 'Log::Message::Simple' => '0.08', + 'MIME::Base64' => '3.13', + 'MIME::QuotedPrint' => '3.13', + 'Math::BigFloat' => '1.997', + 'Math::BigFloat::Trace' => '0.29', + 'Math::BigInt' => '1.997', + 'Math::BigInt::Calc' => '1.997', + 'Math::BigInt::CalcEmu' => '1.997', + 'Math::BigInt::FastCalc'=> '0.30', + 'Math::BigInt::Trace' => '0.29', + 'Math::BigRat' => '0.2603', + 'Math::Complex' => '1.58', + 'Math::Trig' => '1.22', + 'Memoize' => '1.02', + 'Memoize::AnyDBM_File' => '1.02', + 'Memoize::Expire' => '1.02', + 'Memoize::ExpireFile' => '1.02', + 'Memoize::ExpireTest' => '1.02', + 'Memoize::NDBM_File' => '1.02', + 'Memoize::SDBM_File' => '1.02', + 'Memoize::Storable' => '1.02', + 'Module::Build' => '0.39_01', + 'Module::Build::Base' => '0.39_01', + 'Module::Build::Compat' => '0.39_01', + 'Module::Build::Config' => '0.39_01', + 'Module::Build::ConfigData'=> undef, + 'Module::Build::Cookbook'=> '0.39_01', + 'Module::Build::Dumper' => '0.39_01', + 'Module::Build::ModuleInfo'=> '0.39_01', + 'Module::Build::Notes' => '0.39_01', + 'Module::Build::PPMMaker'=> '0.39_01', + 'Module::Build::Platform::Amiga'=> '0.39_01', + 'Module::Build::Platform::Default'=> '0.39_01', + 'Module::Build::Platform::EBCDIC'=> '0.39_01', + 'Module::Build::Platform::MPEiX'=> '0.39_01', + 'Module::Build::Platform::MacOS'=> '0.39_01', + 'Module::Build::Platform::RiscOS'=> '0.39_01', + 'Module::Build::Platform::Unix'=> '0.39_01', + 'Module::Build::Platform::VMS'=> '0.39_01', + 'Module::Build::Platform::VOS'=> '0.39_01', + 'Module::Build::Platform::Windows'=> '0.39_01', + 'Module::Build::Platform::aix'=> '0.39_01', + 'Module::Build::Platform::cygwin'=> '0.39_01', + 'Module::Build::Platform::darwin'=> '0.39_01', + 'Module::Build::Platform::os2'=> '0.39_01', + 'Module::Build::PodParser'=> '0.39_01', + 'Module::Build::Version'=> '0.87', + 'Module::Build::YAML' => '1.41', + 'Module::CoreList' => '2.56', + 'Module::Load' => '0.20', + 'Module::Load::Conditional'=> '0.46', + 'Module::Loaded' => '0.06', + 'Module::Metadata' => '1.000007', + 'Module::Pluggable' => '3.9', + 'Module::Pluggable::Object'=> '3.9', + 'Moped::Msg' => '0.01', + 'NDBM_File' => '1.12', + 'NEXT' => '0.65', + 'Net::Cmd' => '2.29', + 'Net::Config' => '1.11', + 'Net::Domain' => '2.20', + 'Net::FTP' => '2.77', + 'Net::FTP::A' => '1.18', + 'Net::FTP::E' => '0.01', + 'Net::FTP::I' => '1.12', + 'Net::FTP::L' => '0.01', + 'Net::FTP::dataconn' => '0.11', + 'Net::NNTP' => '2.24', + 'Net::Netrc' => '2.12', + 'Net::POP3' => '2.29', + 'Net::Ping' => '2.38', + 'Net::SMTP' => '2.31', + 'Net::Time' => '2.10', + 'Net::hostent' => '1.01', + 'Net::netent' => '1.00', + 'Net::protoent' => '1.00', + 'Net::servent' => '1.01', + 'O' => '1.01', + 'ODBM_File' => '1.12', + 'Object::Accessor' => '0.42', + 'Opcode' => '1.20', + 'POSIX' => '1.26', + 'Package::Constants' => '0.02', + 'Params::Check' => '0.32', + 'Parse::CPAN::Meta' => '1.4401', + 'Perl::OSType' => '1.002', + 'PerlIO' => '1.07', + 'PerlIO::encoding' => '0.15', + 'PerlIO::scalar' => '0.12', + 'PerlIO::via' => '0.12', + 'PerlIO::via::QuotedPrint'=> '0.06', + 'Pod::Checker' => '1.45', + 'Pod::Escapes' => '1.04', + 'Pod::Find' => '1.35', + 'Pod::Functions' => '1.04', + 'Pod::Html' => '1.11', + 'Pod::InputObjects' => '1.31', + 'Pod::LaTeX' => '0.59', + 'Pod::Man' => '2.25', + 'Pod::ParseLink' => '1.10', + 'Pod::ParseUtils' => '1.36', + 'Pod::Parser' => '1.37', + 'Pod::Perldoc' => '3.15_07', + 'Pod::Perldoc::BaseTo' => undef, + 'Pod::Perldoc::GetOptsOO'=> undef, + 'Pod::Perldoc::ToChecker'=> undef, + 'Pod::Perldoc::ToMan' => undef, + 'Pod::Perldoc::ToNroff' => undef, + 'Pod::Perldoc::ToPod' => undef, + 'Pod::Perldoc::ToRtf' => undef, + 'Pod::Perldoc::ToText' => undef, + 'Pod::Perldoc::ToTk' => undef, + 'Pod::Perldoc::ToXml' => undef, + 'Pod::PlainText' => '2.04', + 'Pod::Select' => '1.36', + 'Pod::Simple' => '3.19', + 'Pod::Simple::BlackBox' => '3.19', + 'Pod::Simple::Checker' => '3.19', + 'Pod::Simple::Debug' => '3.19', + 'Pod::Simple::DumpAsText'=> '3.19', + 'Pod::Simple::DumpAsXML'=> '3.19', + 'Pod::Simple::HTML' => '3.19', + 'Pod::Simple::HTMLBatch'=> '3.19', + 'Pod::Simple::HTMLLegacy'=> '5.01', + 'Pod::Simple::LinkSection'=> '3.19', + 'Pod::Simple::Methody' => '3.19', + 'Pod::Simple::Progress' => '3.19', + 'Pod::Simple::PullParser'=> '3.19', + 'Pod::Simple::PullParserEndToken'=> '3.19', + 'Pod::Simple::PullParserStartToken'=> '3.19', + 'Pod::Simple::PullParserTextToken'=> '3.19', + 'Pod::Simple::PullParserToken'=> '3.19', + 'Pod::Simple::RTF' => '3.19', + 'Pod::Simple::Search' => '3.19', + 'Pod::Simple::SimpleTree'=> '3.19', + 'Pod::Simple::Text' => '3.19', + 'Pod::Simple::TextContent'=> '3.19', + 'Pod::Simple::TiedOutFH'=> '3.19', + 'Pod::Simple::Transcode'=> '3.19', + 'Pod::Simple::TranscodeDumb'=> '3.19', + 'Pod::Simple::TranscodeSmart'=> '3.19', + 'Pod::Simple::XHTML' => '3.19', + 'Pod::Simple::XMLOutStream'=> '3.19', + 'Pod::Text' => '3.15', + 'Pod::Text::Color' => '2.06', + 'Pod::Text::Overstrike' => '2.04', + 'Pod::Text::Termcap' => '2.06', + 'Pod::Usage' => '1.36', + 'SDBM_File' => '1.09', + 'Safe' => '2.29', + 'Scalar::Util' => '1.23', + 'Scalar::Util::PP' => '1.23', + 'Search::Dict' => '1.04', + 'SelectSaver' => '1.02', + 'SelfLoader' => '1.18', + 'Socket' => '1.94_01', + 'Storable' => '2.32', + 'Symbol' => '1.07', + 'Sys::Hostname' => '1.16', + 'Sys::Syslog' => '0.29', + 'Sys::Syslog::Win32' => undef, + 'TAP::Base' => '3.23', + 'TAP::Formatter::Base' => '3.23', + 'TAP::Formatter::Color' => '3.23', + 'TAP::Formatter::Console'=> '3.23', + 'TAP::Formatter::Console::ParallelSession'=> '3.23', + 'TAP::Formatter::Console::Session'=> '3.23', + 'TAP::Formatter::File' => '3.23', + 'TAP::Formatter::File::Session'=> '3.23', + 'TAP::Formatter::Session'=> '3.23', + 'TAP::Harness' => '3.23', + 'TAP::Object' => '3.23', + 'TAP::Parser' => '3.23', + 'TAP::Parser::Aggregator'=> '3.23', + 'TAP::Parser::Grammar' => '3.23', + 'TAP::Parser::Iterator' => '3.23', + 'TAP::Parser::Iterator::Array'=> '3.23', + 'TAP::Parser::Iterator::Process'=> '3.23', + 'TAP::Parser::Iterator::Stream'=> '3.23', + 'TAP::Parser::IteratorFactory'=> '3.23', + 'TAP::Parser::Multiplexer'=> '3.23', + 'TAP::Parser::Result' => '3.23', + 'TAP::Parser::Result::Bailout'=> '3.23', + 'TAP::Parser::Result::Comment'=> '3.23', + 'TAP::Parser::Result::Plan'=> '3.23', + 'TAP::Parser::Result::Pragma'=> '3.23', + 'TAP::Parser::Result::Test'=> '3.23', + 'TAP::Parser::Result::Unknown'=> '3.23', + 'TAP::Parser::Result::Version'=> '3.23', + 'TAP::Parser::Result::YAML'=> '3.23', + 'TAP::Parser::ResultFactory'=> '3.23', + 'TAP::Parser::Scheduler'=> '3.23', + 'TAP::Parser::Scheduler::Job'=> '3.23', + 'TAP::Parser::Scheduler::Spinner'=> '3.23', + 'TAP::Parser::Source' => '3.23', + 'TAP::Parser::SourceHandler'=> '3.23', + 'TAP::Parser::SourceHandler::Executable'=> '3.23', + 'TAP::Parser::SourceHandler::File'=> '3.23', + 'TAP::Parser::SourceHandler::Handle'=> '3.23', + 'TAP::Parser::SourceHandler::Perl'=> '3.23', + 'TAP::Parser::SourceHandler::RawTAP'=> '3.23', + 'TAP::Parser::Utils' => '3.23', + 'TAP::Parser::YAMLish::Reader'=> '3.23', + 'TAP::Parser::YAMLish::Writer'=> '3.23', + 'Term::ANSIColor' => '3.01', + 'Term::Cap' => '1.12', + 'Term::Complete' => '1.402', + 'Term::ReadLine' => '1.07', + 'Term::UI' => '0.26', + 'Term::UI::History' => undef, + 'Test' => '1.25_02', + 'Test::Builder' => '0.98', + 'Test::Builder::Module' => '0.98', + 'Test::Builder::Tester' => '1.22', + 'Test::Builder::Tester::Color'=> '1.22', + 'Test::Harness' => '3.23', + 'Test::More' => '0.98', + 'Test::Simple' => '0.98', + 'Text::Abbrev' => '1.02', + 'Text::Balanced' => '2.02', + 'Text::ParseWords' => '3.27', + 'Text::Soundex' => '3.03_01', + 'Text::Tabs' => '2009.0305', + 'Text::Wrap' => '2009.0305', + 'Thread' => '3.02', + 'Thread::Queue' => '2.12', + 'Thread::Semaphore' => '2.12', + 'Tie::Array' => '1.05', + 'Tie::File' => '0.97_02', + 'Tie::Handle' => '4.2', + 'Tie::Hash' => '1.04', + 'Tie::Hash::NamedCapture'=> '0.08', + 'Tie::Memoize' => '1.1', + 'Tie::RefHash' => '1.39', + 'Tie::Scalar' => '1.02', + 'Tie::StdHandle' => '4.2', + 'Tie::SubstrHash' => '1.00', + 'Time::HiRes' => '1.9724', + 'Time::Local' => '1.2000', + 'Time::Piece' => '1.20_01', + 'Time::Seconds' => undef, + 'Time::gmtime' => '1.03', + 'Time::localtime' => '1.02', + 'Time::tm' => '1.00', + 'UNIVERSAL' => '1.09', + 'Unicode' => '6.0.0', + 'Unicode::Collate' => '0.78', + 'Unicode::Collate::CJK::Big5'=> '0.65', + 'Unicode::Collate::CJK::GB2312'=> '0.65', + 'Unicode::Collate::CJK::JISX0208'=> '0.64', + 'Unicode::Collate::CJK::Korean'=> '0.66', + 'Unicode::Collate::CJK::Pinyin'=> '0.76', + 'Unicode::Collate::CJK::Stroke'=> '0.76', + 'Unicode::Collate::Locale'=> '0.76', + 'Unicode::Normalize' => '1.13', + 'Unicode::UCD' => '0.35', + 'User::grent' => '1.01', + 'User::pwent' => '1.00', + 'VMS::DCLsym' => '1.05', + 'VMS::Filespec' => '1.12', + 'VMS::Stdio' => '2.4', + 'Version::Requirements' => '0.101020', + 'Win32' => '0.44', + 'Win32API::File' => '0.1200', + 'Win32API::File::ExtUtils::Myconst2perl'=> '1', + 'Win32CORE' => '0.02', + 'XS::APItest' => '0.31', + 'XS::Typemap' => '0.05', + 'XSLoader' => '0.16', + 'attributes' => '0.16', + 'autodie' => '2.10', + 'autodie::exception' => '2.10', + 'autodie::exception::system'=> '2.10', + 'autodie::hints' => '2.10', + 'autouse' => '1.06', + 'base' => '2.17', + 'bigint' => '0.29', + 'bignum' => '0.29', + 'bigrat' => '0.29', + 'blib' => '1.06', + 'bytes' => '1.04', + 'charnames' => '1.23', + 'constant' => '1.22', + 'deprecate' => '0.02', + 'diagnostics' => '1.25', + 'encoding' => '2.6_01', + 'encoding::warnings' => '0.11', + 'feature' => '1.22', + 'fields' => '2.16', + 'filetest' => '1.02', + 'if' => '0.0601', + 'inc::latest' => '0.39_01', + 'integer' => '1.00', + 'less' => '0.03', + 'lib' => '0.63', + 'locale' => '1.00', + 'mro' => '1.08', + 'open' => '1.09', + 'ops' => '1.02', + 'overload' => '1.15', + 'overload::numbers' => undef, + 'overloading' => '0.01', + 'parent' => '0.225', + 'perlfaq' => '5.0150034', + 're' => '0.18', + 'sigtrap' => '1.05', + 'sort' => '2.01', + 'strict' => '1.04', + 'subs' => '1.00', + 'threads' => '1.85', + 'threads::shared' => '1.40', + 'utf8' => '1.09', + 'vars' => '1.02', + 'version' => '0.93', + 'vmsish' => '1.03', + 'warnings' => '1.12', + 'warnings::register' => '1.02', + }, +); + +%deprecated = ( + 5.011 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.011001 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.011002 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.011003 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.011004 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.011005 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.012000 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.013000 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.012001 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.013001 => { + 'Shell' => '1', + }, + 5.013002 => { + 'Shell' => '1', + }, + 5.013003 => { + 'Shell' => '1', + }, + 5.013004 => { + 'Shell' => '1', + }, + 5.012002 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.013005 => { + 'Shell' => '1', + }, + 5.013006 => { + 'Shell' => '1', + }, + 5.013007 => { + 'Shell' => '1', + }, + 5.013008 => { + 'Shell' => '1', + }, + 5.012003 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.013009 => { + 'Shell' => '1', + }, + 5.013010 => { + 'Shell' => '1', + }, + 5.013011 => { + 'Shell' => '1', + }, + 5.014000 => { + 'Shell' => '1', + }, + 5.012004 => { + 'Class::ISA' => '1', + 'Pod::Plainer' => '1', + 'Shell' => '1', + 'Switch' => '1', + }, + 5.014001 => { + 'Shell' => '1', + }, + 5.015000 => { + 'Devel::DProf' => '1', + }, + 5.015000 => { + }, + 5.015001 => { + }, + 5.015002 => { + }, + 5.014002 => { + 'Shell' => '1', + }, + 5.015003 => { + }, +); + +%upstream = ( + 'AnyDBM_File' => 'blead', + 'App::Cpan' => 'cpan', + 'App::Prove' => 'cpan', + 'App::Prove::State' => 'cpan', + 'App::Prove::State::Result'=> 'cpan', + 'App::Prove::State::Result::Test'=> 'cpan', + 'Archive::Extract' => 'cpan', + 'Archive::Tar' => 'cpan', + 'Archive::Tar::Constant'=> 'cpan', + 'Archive::Tar::File' => 'cpan', + 'Attribute::Handlers' => 'blead', + 'AutoLoader' => 'cpan', + 'AutoSplit' => 'cpan', + 'B::Concise' => undef, + 'B::Debug' => 'cpan', + 'B::Deparse' => 'blead', + 'B::Lint' => 'blead', + 'B::Lint::Debug' => 'blead', + 'CGI' => 'cpan', + 'CGI::Apache' => 'cpan', + 'CGI::Carp' => 'cpan', + 'CGI::Cookie' => 'cpan', + 'CGI::Fast' => 'cpan', + 'CGI::Pretty' => 'cpan', + 'CGI::Push' => 'cpan', + 'CGI::Switch' => 'cpan', + 'CGI::Util' => 'cpan', + 'CPAN' => 'cpan', + 'CPAN::Author' => 'cpan', + 'CPAN::Bundle' => 'cpan', + 'CPAN::CacheMgr' => 'cpan', + 'CPAN::Complete' => 'cpan', + 'CPAN::Debug' => 'cpan', + 'CPAN::DeferredCode' => 'cpan', + 'CPAN::Distribution' => 'cpan', + 'CPAN::Distroprefs' => 'cpan', + 'CPAN::Distrostatus' => 'cpan', + 'CPAN::Exception::RecursiveDependency'=> 'cpan', + 'CPAN::Exception::blocked_urllist'=> 'cpan', + 'CPAN::Exception::yaml_not_installed'=> 'cpan', + 'CPAN::Exception::yaml_process_error'=> 'cpan', + 'CPAN::FTP' => 'cpan', + 'CPAN::FTP::netrc' => 'cpan', + 'CPAN::FirstTime' => 'cpan', + 'CPAN::HTTP::Client' => 'cpan', + 'CPAN::HTTP::Credentials'=> 'cpan', + 'CPAN::HandleConfig' => 'cpan', + 'CPAN::Index' => 'cpan', + 'CPAN::InfoObj' => 'cpan', + 'CPAN::Kwalify' => 'cpan', + 'CPAN::LWP::UserAgent' => 'cpan', + 'CPAN::Meta' => 'cpan', + 'CPAN::Meta::Converter' => 'cpan', + 'CPAN::Meta::Feature' => 'cpan', + 'CPAN::Meta::History' => 'cpan', + 'CPAN::Meta::Prereqs' => 'cpan', + 'CPAN::Meta::Spec' => 'cpan', + 'CPAN::Meta::Validator' => 'cpan', + 'CPAN::Meta::YAML' => 'cpan', + 'CPAN::Mirrors' => 'cpan', + 'CPAN::Module' => 'cpan', + 'CPAN::Nox' => 'cpan', + 'CPAN::Prompt' => 'cpan', + 'CPAN::Queue' => 'cpan', + 'CPAN::Shell' => 'cpan', + 'CPAN::Tarzip' => 'cpan', + 'CPAN::URL' => 'cpan', + 'CPAN::Version' => 'cpan', + 'CPANPLUS' => 'cpan', + 'CPANPLUS::Backend' => 'cpan', + 'CPANPLUS::Backend::RV' => 'cpan', + 'CPANPLUS::Config' => 'cpan', + 'CPANPLUS::Configure' => 'cpan', + 'CPANPLUS::Configure::Setup'=> 'cpan', + 'CPANPLUS::Dist' => 'cpan', + 'CPANPLUS::Dist::Autobundle'=> 'cpan', + 'CPANPLUS::Dist::Base' => 'cpan', + 'CPANPLUS::Dist::Build' => 'cpan', + 'CPANPLUS::Dist::Build::Constants'=> 'cpan', + 'CPANPLUS::Dist::MM' => 'cpan', + 'CPANPLUS::Dist::Sample'=> 'cpan', + 'CPANPLUS::Error' => 'cpan', + 'CPANPLUS::Internals' => 'cpan', + 'CPANPLUS::Internals::Constants'=> 'cpan', + 'CPANPLUS::Internals::Constants::Report'=> 'cpan', + 'CPANPLUS::Internals::Extract'=> 'cpan', + 'CPANPLUS::Internals::Fetch'=> 'cpan', + 'CPANPLUS::Internals::Report'=> 'cpan', + 'CPANPLUS::Internals::Search'=> 'cpan', + 'CPANPLUS::Internals::Source'=> 'cpan', + 'CPANPLUS::Internals::Source::Memory'=> 'cpan', + 'CPANPLUS::Internals::Source::SQLite'=> 'cpan', + 'CPANPLUS::Internals::Source::SQLite::Tie'=> 'cpan', + 'CPANPLUS::Internals::Utils'=> 'cpan', + 'CPANPLUS::Internals::Utils::Autoflush'=> 'cpan', + 'CPANPLUS::Module' => 'cpan', + 'CPANPLUS::Module::Author'=> 'cpan', + 'CPANPLUS::Module::Author::Fake'=> 'cpan', + 'CPANPLUS::Module::Checksums'=> 'cpan', + 'CPANPLUS::Module::Fake'=> 'cpan', + 'CPANPLUS::Module::Signature'=> 'cpan', + 'CPANPLUS::Selfupdate' => 'cpan', + 'CPANPLUS::Shell' => 'cpan', + 'CPANPLUS::Shell::Classic'=> 'cpan', + 'CPANPLUS::Shell::Default'=> 'cpan', + 'CPANPLUS::Shell::Default::Plugins::CustomSource'=> 'cpan', + 'CPANPLUS::Shell::Default::Plugins::Remote'=> 'cpan', + 'CPANPLUS::Shell::Default::Plugins::Source'=> 'cpan', + 'Carp' => 'blead', + 'Carp::Heavy' => 'blead', + 'Compress::Raw::Bzip2' => 'cpan', + 'Compress::Raw::Zlib' => 'cpan', + 'Compress::Zlib' => 'cpan', + 'Cwd' => 'blead', + 'DB_File' => undef, + 'Devel::InnerPackage' => 'cpan', + 'Devel::PPPort' => 'cpan', + 'Digest' => 'cpan', + 'Digest::MD5' => 'cpan', + 'Digest::SHA' => 'cpan', + 'Digest::base' => 'cpan', + 'Digest::file' => 'cpan', + 'Encode' => 'cpan', + 'Encode::Alias' => 'cpan', + 'Encode::Byte' => 'cpan', + 'Encode::CJKConstants' => 'cpan', + 'Encode::CN' => 'cpan', + 'Encode::CN::HZ' => 'cpan', + 'Encode::Config' => 'cpan', + 'Encode::EBCDIC' => 'cpan', 'Encode::Encoder' => 'cpan', 'Encode::Encoding' => 'cpan', 'Encode::GSM0338' => 'cpan', @@ -28137,7 +29470,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'Test::Harness' => 'cpan', 'Test::More' => 'cpan', 'Test::Simple' => 'cpan', - 'Text::Balanced' => undef, + 'Text::Balanced' => 'cpan', 'Text::ParseWords' => undef, 'Text::Soundex' => undef, 'Text::Tabs' => 'cpan', @@ -28185,11 +29518,10 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'inc::latest' => 'cpan', 'lib' => 'blead', 'parent' => undef, - 'perlfaq' => 'blead', + 'perlfaq' => 'cpan', 'threads' => 'blead', 'threads::shared' => 'blead', 'version' => undef, - 'Version::Requirements' => undef, 'warnings' => undef, 'warnings::register' => undef, ); @@ -28250,7 +29582,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'CPAN::Meta::Prereqs' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta', 'CPAN::Meta::Spec' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta', 'CPAN::Meta::Validator' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta', - 'CPAN::Meta::YAML' => undef, + 'CPAN::Meta::YAML' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta-YAML', 'CPAN::Mirrors' => undef, 'CPAN::Module' => undef, 'CPAN::Nox' => undef, @@ -28300,6 +29632,8 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'CPANPLUS::Shell::Default::Plugins::CustomSource'=> undef, 'CPANPLUS::Shell::Default::Plugins::Remote'=> undef, 'CPANPLUS::Shell::Default::Plugins::Source'=> undef, + 'Carp' => undef, + 'Carp::Heavy' => undef, 'Compress::Raw::Bzip2' => undef, 'Compress::Raw::Zlib' => undef, 'Compress::Zlib' => undef, @@ -28710,11 +30044,10 @@ for my $version ( sort { $a <=> $b } keys %released ) { 'inc::latest' => undef, 'lib' => undef, 'parent' => undef, - 'perlfaq' => undef, + 'perlfaq' => 'https://github.com/perl-doc-cats/perlfaq/issues', 'threads' => undef, 'threads::shared' => undef, 'version' => undef, - 'Version::Requirements' => undef, ); # Create aliases with trailing zeros for $] use diff --git a/dist/Pod-Perldoc/lib/Pod/Perldoc.pm b/dist/Pod-Perldoc/lib/Pod/Perldoc.pm index b8c91812f80..cdfea459ad2 100644 --- a/dist/Pod-Perldoc/lib/Pod/Perldoc.pm +++ b/dist/Pod-Perldoc/lib/Pod/Perldoc.pm @@ -12,7 +12,7 @@ use File::Spec::Functions qw(catfile catdir splitdir); use vars qw($VERSION @Pagers $Bindir $Pod2man $Temp_Files_Created $Temp_File_Lifetime ); -$VERSION = '3.15_06'; +$VERSION = '3.15_07'; #.......................................................................... BEGIN { # Make a DEBUG constant very first thing... @@ -731,6 +731,9 @@ sub grand_search_init { my ($fh, $filename) = File::Temp::tempfile(UNLINK => 1); $fh->print($response->{content}); push @found, $filename; + ($self->{podnames}{$filename} = + m{.*/([^/#?]+)} ? uc $1 : "UNKNOWN") + =~ s/\.P(?:[ML]|OD)\z//; } else { print STDERR "No " . @@ -1141,6 +1144,11 @@ sub render_findings { $self->{'output_is_binary'} = $formatter->can('write_with_binmode') && $formatter->write_with_binmode; + if( $self->{podnames} and exists $self->{podnames}{$file} and + $formatter->can('name') ) { + $formatter->name($self->{podnames}{$file}); + } + my ($out_fh, $out) = $self->new_output_file( ( $formatter->can('output_extension') && $formatter->output_extension ) || undef, diff --git a/dist/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm b/dist/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm index 09b0e817377..f456a2475a2 100644 --- a/dist/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm +++ b/dist/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm @@ -26,6 +26,7 @@ sub fixed { shift->_perldoc_elem('fixed' , @_) } sub fixedbold { shift->_perldoc_elem('fixedbold' , @_) } sub fixeditalic { shift->_perldoc_elem('fixeditalic' , @_) } sub fixedbolditalic { shift->_perldoc_elem('fixedbolditalic', @_) } +sub name { shift->_perldoc_elem('name' , @_) } sub quotes { shift->_perldoc_elem('quotes' , @_) } sub release { shift->_perldoc_elem('release' , @_) } sub section { shift->_perldoc_elem('section' , @_) } diff --git a/dist/Search-Dict/lib/Search/Dict.pm b/dist/Search-Dict/lib/Search/Dict.pm index cbbaf99a50a..5fe6f73b041 100644 --- a/dist/Search-Dict/lib/Search/Dict.pm +++ b/dist/Search-Dict/lib/Search/Dict.pm @@ -4,13 +4,13 @@ require Exporter; use strict; -our $VERSION = '1.03'; +our $VERSION = '1.04'; our @ISA = qw(Exporter); our @EXPORT = qw(look); =head1 NAME -Search::Dict, look - search for key in dictionary file +Search::Dict - look - search for key in dictionary file =head1 SYNOPSIS diff --git a/dist/Storable/Makefile.PL b/dist/Storable/Makefile.PL index e40f5c56d2c..bcfd9e0cff6 100644 --- a/dist/Storable/Makefile.PL +++ b/dist/Storable/Makefile.PL @@ -13,11 +13,14 @@ WriteMakefile( DISTNAME => "Storable", # We now ship this in t/ # PREREQ_PM => { 'Test::More' => '0.41' }, + PREREQ_PM => { XSLoader => 0 }, INSTALLDIRS => $] >= 5.007 ? 'perl' : 'site', VERSION_FROM => 'Storable.pm', - META_MERGE => { resources => + ($ExtUtils::MakeMaker::VERSION > 6.45 ? + (META_MERGE => { resources => { bugtracker => 'http://rt.perl.org/perlbug/' } }, + ) : ()), dist => { SUFFIX => 'gz', COMPRESS => 'gzip -f' }, ); diff --git a/dist/Storable/Storable.pm b/dist/Storable/Storable.pm index 95fe93ce0f0..3e995c396d8 100644 --- a/dist/Storable/Storable.pm +++ b/dist/Storable/Storable.pm @@ -21,7 +21,7 @@ package Storable; @ISA = qw(Exporter); use vars qw($canonical $forgive_me $VERSION); -$VERSION = '2.31'; +$VERSION = '2.32'; BEGIN { if (eval { local $SIG{__DIE__}; require Log::Agent; 1 }) { @@ -69,7 +69,7 @@ sub CLONE { $Storable::downgrade_restricted = 1; $Storable::accept_future_minor = 1; -XSLoader::load 'Storable', $Storable::VERSION; +XSLoader::load('Storable', $Storable::VERSION); # # Determine whether locking is possible, but only when needed. diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs index 8ce0bec9235..38e266db891 100644 --- a/dist/Storable/Storable.xs +++ b/dist/Storable/Storable.xs @@ -22,6 +22,7 @@ #define NEED_vload_module #define NEED_newCONSTSUB #define NEED_newSVpvn_flags +#define NEED_newRV_noinc #include "ppport.h" /* handle old perls */ #endif @@ -49,80 +50,15 @@ * Earlier versions of perl might be used, we can't assume they have the latest! */ -#ifndef PERL_VERSION /* For perls < 5.6 */ -#define PERL_VERSION PATCHLEVEL -#ifndef newRV_noinc -#define newRV_noinc(sv) ((Sv = newRV(sv)), --SvREFCNT(SvRV(Sv)), Sv) -#endif -#if (PATCHLEVEL <= 4) /* Older perls (<= 5.004) lack PL_ namespace */ -#define PL_sv_yes sv_yes -#define PL_sv_no sv_no -#define PL_sv_undef sv_undef -#if (SUBVERSION <= 4) /* 5.004_04 has been reported to lack newSVpvn */ -#define newSVpvn newSVpv -#endif -#endif /* PATCHLEVEL <= 4 */ #ifndef HvSHAREKEYS_off #define HvSHAREKEYS_off(hv) /* Ignore */ #endif -#ifndef AvFILLp /* Older perls (<=5.003) lack AvFILLp */ -#define AvFILLp AvFILL -#endif -typedef double NV; /* Older perls lack the NV type */ -#define IVdf "ld" /* Various printf formats for Perl types */ -#define UVuf "lu" -#define UVof "lo" -#define UVxf "lx" -#define INT2PTR(t,v) (t)(IV)(v) -#define PTR2UV(v) (unsigned long)(v) -#endif /* PERL_VERSION -- perls < 5.6 */ - -#ifndef NVef /* The following were not part of perl 5.6 */ -#if defined(USE_LONG_DOUBLE) && \ - defined(HAS_LONG_DOUBLE) && defined(PERL_PRIfldbl) -#define NVef PERL_PRIeldbl -#define NVff PERL_PRIfldbl -#define NVgf PERL_PRIgldbl -#else -#define NVef "e" -#define NVff "f" -#define NVgf "g" -#endif -#endif /* perl <= 5.8.2 needs this */ #ifndef SvIsCOW # define SvIsCOW(sv) 0 #endif -#ifndef SvRV_set -#define SvRV_set(sv, val) \ - STMT_START { \ - assert(SvTYPE(sv) >= SVt_RV); \ - (((XRV*)SvANY(sv))->xrv_rv = (val)); \ - } STMT_END -#endif - -#ifndef PERL_UNUSED_DECL -# ifdef HASATTRIBUTE -# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) -# define PERL_UNUSED_DECL -# else -# define PERL_UNUSED_DECL __attribute__((unused)) -# endif -# else -# define PERL_UNUSED_DECL -# endif -#endif - -#ifndef dNOOP -#define dNOOP extern int Perl___notused PERL_UNUSED_DECL -#endif - -#ifndef dVAR -#define dVAR dNOOP -#endif - #ifndef HvRITER_set # define HvRITER_set(hv,r) (HvRITER(hv) = r) #endif @@ -137,14 +73,14 @@ typedef double NV; /* Older perls lack the NV type */ # define HvEITER_get HvEITER #endif -#ifndef HvNAME_get -#define HvNAME_get HvNAME -#endif - #ifndef HvPLACEHOLDERS_get # define HvPLACEHOLDERS_get HvPLACEHOLDERS #endif +#ifndef HvTOTALKEYS +# define HvTOTALKEYS(hv) HvKEYS(hv) +#endif + #ifdef DEBUGME #ifndef DASSERT @@ -2290,12 +2226,7 @@ sortcmp(const void *a, const void *b) static int store_hash(pTHX_ stcxt_t *cxt, HV *hv) { dVAR; - I32 len = -#ifdef HAS_RESTRICTED_HASHES - HvTOTALKEYS(hv); -#else - HvKEYS(hv); /* Not HvUSEDKEYS, as 5.6 lacketh it */ -#endif + I32 len = HvTOTALKEYS(hv); I32 i; int ret = 0; I32 riter; @@ -6458,23 +6389,20 @@ SV * sv OUTPUT: RETVAL -bool +void last_op_in_netorder() - CODE: - RETVAL = !!last_op_in_netorder(aTHX); - OUTPUT: - RETVAL - -bool -is_storing() ALIAS: is_storing = ST_STORE is_retrieving = ST_RETRIEVE - CODE: - { - dSTCXT; - - RETVAL = cxt->entry && (cxt->optype & ix) ? TRUE : FALSE; - } - OUTPUT: - RETVAL + PREINIT: + bool result; + PPCODE: + if (ix) { + dSTCXT; + + result = cxt->entry && (cxt->optype & ix) ? TRUE : FALSE; + } else { + result = !!last_op_in_netorder(aTHX); + } + ST(0) = boolSV(result); + XSRETURN(1); diff --git a/dist/Storable/t/code.t b/dist/Storable/t/code.t index 687a6d1e44e..c383142d5aa 100644 --- a/dist/Storable/t/code.t +++ b/dist/Storable/t/code.t @@ -60,7 +60,7 @@ local *FOO; \&Another::Package::foo, # code in another package sub ($$;$) { 0 }, # prototypes sub { print "test\n" }, - \&Test::More::ok, # large scalar + \&Storable::_store, # large scalar ], {"a" => sub { "srt" }, "b" => \&code}, diff --git a/dist/Text-Abbrev/lib/Text/Abbrev.pm b/dist/Text-Abbrev/lib/Text/Abbrev.pm index c6be63bcc60..3c179697f9f 100644 --- a/dist/Text-Abbrev/lib/Text/Abbrev.pm +++ b/dist/Text-Abbrev/lib/Text/Abbrev.pm @@ -2,11 +2,11 @@ package Text::Abbrev; require 5.005; # Probably works on earlier versions too. require Exporter; -our $VERSION = '1.01'; +our $VERSION = '1.02'; =head1 NAME -abbrev - create an abbreviation table from a list +Text::Abbrev - abbrev - create an abbreviation table from a list =head1 SYNOPSIS diff --git a/dist/XSLoader/Makefile.PL b/dist/XSLoader/Makefile.PL index bb92d842536..111d85ad541 100644 --- a/dist/XSLoader/Makefile.PL +++ b/dist/XSLoader/Makefile.PL @@ -34,10 +34,12 @@ my $installdirs = $] < 5.011 ? "perl" : "site"; WriteMakefile( NAME => $PACKAGE, - LICENSE => 'perl', - AUTHOR => 'Sebastien Aperghis-Tramoni ', + ($ExtUtils::MakeMaker::VERSION > 6.30 ? + (LICENSE => 'perl', + AUTHOR => 'Sebastien Aperghis-Tramoni ', + ABSTRACT_FROM => 'XSLoader_pm.PL', + ) : ()), VERSION_FROM => 'XSLoader_pm.PL', - ABSTRACT_FROM => 'XSLoader_pm.PL', INSTALLDIRS => $installdirs, PL_FILES => { 'XSLoader_pm.PL' => 'XSLoader.pm' }, PM => { 'XSLoader.pm' => '$(INST_ARCHLIB)/XSLoader.pm' }, diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL index 64ebcc215db..98a19eaa517 100644 --- a/dist/XSLoader/XSLoader_pm.PL +++ b/dist/XSLoader/XSLoader_pm.PL @@ -8,15 +8,35 @@ print OUT <<'EOT'; package XSLoader; -$VERSION = "0.15"; +$VERSION = "0.16"; #use strict; +package DynaLoader; + +EOT + +# dlutils.c before 5.006 has this: +# +# #ifdef DEBUGGING +# dl_debug = SvIV( perl_get_sv("DynaLoader::dl_debug", 0x04) ); +# #endif +# +# where 0x04 is GV_ADDWARN, which causes a warning to be issued by the call +# into XS below, if DynaLoader.pm hasn't been loaded. +# It was changed to 0 in the commit(s) that added XSLoader to the core +# (9cf41c4d23a47c8b and its parent 9426adcd48655815) +# Hence to backport XSLoader to work silently with earlier DynaLoaders we need +# to ensure that the variable exists: + +print OUT <<'EOT' if $] < 5.006; + # enable debug/trace messages from DynaLoader perl code -# $dl_debug = $ENV{PERL_DL_DEBUG} || 0 unless defined $dl_debug; +$dl_debug = $ENV{PERL_DL_DEBUG} || 0 unless defined $dl_debug; -package DynaLoader; +EOT +print OUT <<'EOT'; # No prizes for guessing why we don't say 'bootstrap DynaLoader;' here. # NOTE: All dl_*.xs (including dl_none.xs) define a dl_error() XSUB boot_DynaLoader('DynaLoader') if defined(&boot_DynaLoader) && diff --git a/dist/base/lib/base.pm b/dist/base/lib/base.pm index 3fd288c350d..19fc8456d23 100644 --- a/dist/base/lib/base.pm +++ b/dist/base/lib/base.pm @@ -2,7 +2,7 @@ package base; use strict 'vars'; use vars qw($VERSION); -$VERSION = '2.17'; +$VERSION = '2.18'; $VERSION = eval $VERSION; # constant.pm is slow @@ -22,12 +22,6 @@ sub has_fields { return( ($fglob && 'GLOB' eq ref($fglob) && *$fglob{HASH}) ? 1 : 0 ); } -sub has_version { - my($base) = shift; - my $vglob = ${$base.'::'}{VERSION}; - return( ($vglob && *$vglob{SCALAR}) ? 1 : 0 ); -} - sub has_attr { my($proto) = shift; my($class) = ref $proto || $proto; @@ -70,7 +64,6 @@ sub import { my $fields_base; my $inheritor = caller(0); - my @isa_classes; my @bases; foreach my $base (@_) { @@ -80,11 +73,8 @@ sub import { next if grep $_->isa($base), ($inheritor, @bases); - if (has_version($base)) { - ${$base.'::VERSION'} = '-1, set by base.pm' - unless defined ${$base.'::VERSION'}; - } - else { + # Following blocks help isolate $SIG{__DIE__} changes + { my $sigdie; { local $SIG{__DIE__}; @@ -105,8 +95,6 @@ ERROR } # Make sure a global $SIG{__DIE__} makes it out of the localization. $SIG{__DIE__} = $sigdie if defined $sigdie; - ${$base.'::VERSION'} = "-1, set by base.pm" - unless defined ${$base.'::VERSION'}; } push @bases, $base; @@ -121,8 +109,6 @@ ERROR } } # Save this until the end so it's all or nothing if the above loop croaks. - push @{"$inheritor\::ISA"}, @isa_classes; - push @{"$inheritor\::ISA"}, @bases; if( defined $fields_base ) { @@ -206,21 +192,21 @@ those modules at the same time. Roughly similar in effect to push @ISA, qw(Foo Bar); } -C employs some heuristics to determine if a module has already been -loaded, if it has it doesn't try again. If C tries to C the -module it will not die if it cannot find the module's file, but will die on any -other error. After all this, should your base class be empty, containing no -symbols, it will die. This is useful for inheriting from classes in the same -file as yourself, like so: +When C tries to C a module, it will not die if it cannot find +the module's file, but will die on any other error. After all this, should +your base class be empty, containing no symbols, C will die. This is +useful for inheriting from classes in the same file as yourself but where +the filename does not match the base module name, like so: + # in Bar.pm package Foo; sub exclaim { "I can have such a thing?!" } - + package Bar; use base "Foo"; -If $VERSION is not detected even after loading it, will define $VERSION -in the base package, setting it to the string C<-1, set by base.pm>. +There is no F, but because C defines a symbol (the C +subroutine), C will not die when the C fails to load F. C will also initialize the fields if one of the base classes has it. Multiple inheritance of fields is B supported, if two or more base classes diff --git a/dist/base/t/base.t b/dist/base/t/base.t index 19a28173412..6fb24ea3082 100644 --- a/dist/base/t/base.t +++ b/dist/base/t/base.t @@ -14,7 +14,7 @@ sub VERSION { 42 } package Test::Version; use base qw(No::Version); -::ok( $No::Version::VERSION =~ /set by base\.pm/, '$VERSION bug' ); +::ok( ! defined $No::Version::VERSION, '$VERSION bug' ); # Test Inverse of $VERSION bug base.pm should not clobber existing $VERSION package Has::Version; diff --git a/dist/threads-shared/lib/threads/shared.pm b/dist/threads-shared/lib/threads/shared.pm index 49fd7c3930c..d4d62b22c70 100644 --- a/dist/threads-shared/lib/threads/shared.pm +++ b/dist/threads-shared/lib/threads/shared.pm @@ -7,7 +7,7 @@ use warnings; use Scalar::Util qw(reftype refaddr blessed); -our $VERSION = '1.39'; +our $VERSION = '1.40'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -187,7 +187,7 @@ threads::shared - Perl extension for sharing data structures between threads =head1 VERSION -This document describes threads::shared version 1.39 +This document describes threads::shared version 1.40 =head1 SYNOPSIS @@ -527,31 +527,10 @@ that the contents of hash-based objects will be lost due to the above mentioned limitation. See F (in the CPAN distribution of this module) for how to create a class that supports object sharing. -When storing shared objects in other shared structures, remove objects from -the structure using C (for arrays and hashes) or C (for arrays) -in order to ensure the object's destructor is called, if needed. - - # Add shared objects to shared hash - my %hsh : shared; - $hsh{'obj1'} = SharedObj->new(); - $hsh{'obj2'} = SharedObj->new(); - $hsh{'obj3'} = SharedObj->new(); - - # Remove object from hash - delete($hsh{'obj1'}); # First object's destructor is called - $hsh{'obj2'} = undef; # Second object's destructor is NOT called - %hsh = (); # Third object's destructor is NOT called - - # Add shared objects to shared array - my @arr : shared; - $arr[0] = SharedObj->new(); - $arr[1] = SharedObj->new(); - $arr[2] = SharedObj->new(); - - # Remove object from array - pop(@arr); # Third object's destructor is called - $arr[1] = undef; # Second object's destructor is NOT called - undef(@arr); # First object's destructor is NOT called +Destructors may not be called on objects if those objects still exist at +global destruction time. If the destructors must be called, make sure +there are no circular references and that nothing is referencing the +objects, before the program ends. Does not support C on arrays. Does not support explicitly changing array lengths via $#array -- use C and C instead. diff --git a/dist/threads-shared/shared.xs b/dist/threads-shared/shared.xs index 13e4a564b43..58afefb7f57 100644 --- a/dist/threads-shared/shared.xs +++ b/dist/threads-shared/shared.xs @@ -661,14 +661,13 @@ Perl_sharedsv_cond_timedwait(perl_cond *cond, perl_mutex *mut, double abs) } -/* Given a shared RV, copy it's value to a private RV, also copying the - * object status of the referent. +/* Given a thingy referenced by a shared RV, copy it's value to a private + * RV, also copying the object status of the referent. * If the private side is already an appropriate RV->SV combination, keep * it if possible. */ STATIC void -S_get_RV(pTHX_ SV *sv, SV *ssv) { - SV *sobj = SvRV(ssv); +S_get_RV(pTHX_ SV *sv, SV *sobj) { SV *obj; if (! (SvROK(sv) && ((obj = SvRV(sv))) && @@ -683,7 +682,7 @@ S_get_RV(pTHX_ SV *sv, SV *ssv) { sv_setsv_nomg(sv, &PL_sv_undef); SvROK_on(sv); } - obj = S_sharedsv_new_private(aTHX_ SvRV(ssv)); + obj = S_sharedsv_new_private(aTHX_ sobj); SvRV_set(sv, obj); } @@ -702,6 +701,16 @@ S_get_RV(pTHX_ SV *sv, SV *ssv) { } } +/* Every caller of S_get_RV needs this incantation (which cannot go inside + S_get_RV itself, as we do not want recursion beyond one level): */ +#define get_RV(sv, sobj) \ + S_get_RV(aTHX_ sv, sobj); \ + /* Look ahead for refs of refs */ \ + if (SvROK(sobj)) { \ + SvROK_on(SvRV(sv)); \ + S_get_RV(aTHX_ SvRV(sv), SvRV(sobj)); \ + } + /* ------------ PERL_MAGIC_shared_scalar(n) functions -------------- */ @@ -715,12 +724,7 @@ sharedsv_scalar_mg_get(pTHX_ SV *sv, MAGIC *mg) ENTER_LOCK; if (SvROK(ssv)) { - S_get_RV(aTHX_ sv, ssv); - /* Look ahead for refs of refs */ - if (SvROK(SvRV(ssv))) { - SvROK_on(SvRV(sv)); - S_get_RV(aTHX_ SvRV(sv), SvRV(ssv)); - } + get_RV(sv, SvRV(ssv)); } else { sv_setsv_nomg(sv, ssv); } @@ -739,6 +743,11 @@ sharedsv_scalar_store(pTHX_ SV *sv, SV *ssv) bool allowed = TRUE; assert(PL_sharedsv_lock.owner == aTHX); + if (!PL_dirty && SvROK(ssv) && SvREFCNT(SvRV(ssv)) == 1) { + SV *sv = sv_newmortal(); + sv_upgrade(sv, SVt_RV); + get_RV(sv, SvRV(ssv)); + } if (SvROK(sv)) { SV *obj = SvRV(sv); SV *sobj = Perl_sharedsv_find(aTHX_ obj); @@ -809,7 +818,15 @@ int sharedsv_scalar_mg_free(pTHX_ SV *sv, MAGIC *mg) { PERL_UNUSED_ARG(sv); + ENTER_LOCK; + if (!PL_dirty + && SvROK((SV *)mg->mg_ptr) && SvREFCNT(SvRV((SV *)mg->mg_ptr)) == 1) { + SV *sv = sv_newmortal(); + sv_upgrade(sv, SVt_RV); + get_RV(sv, SvRV((SV *)mg->mg_ptr)); + } S_sharedsv_dec(aTHX_ (SV*)mg->mg_ptr); + LEAVE_LOCK; return (0); } @@ -898,12 +915,7 @@ sharedsv_elem_mg_FETCH(pTHX_ SV *sv, MAGIC *mg) if (svp) { /* Exists in the array */ if (SvROK(*svp)) { - S_get_RV(aTHX_ sv, *svp); - /* Look ahead for refs of refs */ - if (SvROK(SvRV(*svp))) { - SvROK_on(SvRV(sv)); - S_get_RV(aTHX_ SvRV(sv), SvRV(*svp)); - } + get_RV(sv, SvRV(*svp)); } else { /* $ary->[elem] or $ary->{elem} is a scalar */ Perl_sharedsv_associate(aTHX_ sv, *svp); @@ -1052,13 +1064,29 @@ sharedsv_array_mg_CLEAR(pTHX_ SV *sv, MAGIC *mg) { dTHXc; SV *ssv = (SV *) mg->mg_ptr; + const bool isav = SvTYPE(ssv) == SVt_PVAV; PERL_UNUSED_ARG(sv); SHARED_EDIT; - if (SvTYPE(ssv) == SVt_PVAV) { - av_clear((AV*) ssv); - } else { - hv_clear((HV*) ssv); + if (!PL_dirty) { + SV **svp = isav ? AvARRAY((AV *)ssv) : NULL; + I32 items = isav ? AvFILLp((AV *)ssv) + 1 : 0; + HE *iter; + if (!isav) hv_iterinit((HV *)ssv); + while (isav ? items-- : !!(iter = hv_iternext((HV *)ssv))) { + SV *sv = isav ? *svp++ : HeVAL(iter); + if (!sv) continue; + if ( (SvOBJECT(sv) || (SvROK(sv) && (sv = SvRV(sv)))) + && SvREFCNT(sv) == 1 ) { + SV *tmp = Perl_sv_newmortal(caller_perl); + PERL_SET_CONTEXT((aTHX = caller_perl)); + sv_upgrade(tmp, SVt_RV); + get_RV(tmp, sv); + PERL_SET_CONTEXT((aTHX = PL_sharedsv_space)); + } + } } + if (isav) av_clear((AV*) ssv); + else hv_clear((HV*) ssv); SHARED_RELEASE; return (0); } diff --git a/dist/threads-shared/t/object2.t b/dist/threads-shared/t/object2.t index b1eafd7ec20..f59bad8d278 100644 --- a/dist/threads-shared/t/object2.t +++ b/dist/threads-shared/t/object2.t @@ -17,7 +17,7 @@ use ExtUtils::testlib; BEGIN { $| = 1; - print("1..121\n"); ### Number of tests that will be run ### + print("1..122\n"); ### Number of tests that will be run ### }; use threads; @@ -50,7 +50,7 @@ ok(1, 'Loaded'); ### Start of Testing ### -my $ID = -1; +my $ID :shared = -1; my (@created, @destroyed); { package HashObj; @@ -251,8 +251,6 @@ ok($destroyed[$ID], 'Scalar object removed from undef normal hash'); # Testing with shared array my @shared_ary :shared; -my $TODO = ' # TODO perl #98204'; - # Testing with hash object $shared_ary[0] = HashObj->new(); ok($created[$ID], 'Created hash object in shared array'); @@ -262,20 +260,20 @@ ok($destroyed[$ID], 'Deleted hash object in shared array'); $shared_ary[0] = HashObj->new(); ok($created[$ID], 'Created hash object in shared array'); $shared_ary[0] = undef; -ok($destroyed[$ID], 'Undef hash object in shared array' . $TODO); +ok($destroyed[$ID], 'Undef hash object in shared array'); $shared_ary[0] = HashObj->new(); ok($created[$ID], 'Created hash object in shared array'); $shared_ary[0] = HashObj->new(); ok($created[$ID], 'Created hash object in shared array'); -ok($destroyed[$ID-1], 'Replaced hash object in shared array' . $TODO); +ok($destroyed[$ID-1], 'Replaced hash object in shared array'); @shared_ary = (); -ok($destroyed[$ID], 'Hash object removed from cleared shared array' . $TODO); +ok($destroyed[$ID], 'Hash object removed from cleared shared array'); $shared_ary[0] = HashObj->new(); ok($created[$ID], 'Created hash object in shared array'); undef(@shared_ary); -ok($destroyed[$ID], 'Hash object removed from undef shared array' . $TODO); +ok($destroyed[$ID], 'Hash object removed from undef shared array'); # Testing with array object $shared_ary[0] = AryObj->new(); @@ -286,20 +284,20 @@ ok($destroyed[$ID], 'Deleted array object in shared array'); $shared_ary[0] = AryObj->new(); ok($created[$ID], 'Created array object in shared array'); $shared_ary[0] = undef; -ok($destroyed[$ID], 'Undef array object in shared array' . $TODO); +ok($destroyed[$ID], 'Undef array object in shared array'); $shared_ary[0] = AryObj->new(); ok($created[$ID], 'Created array object in shared array'); $shared_ary[0] = AryObj->new(); ok($created[$ID], 'Created array object in shared array'); -ok($destroyed[$ID-1], 'Replaced array object in shared array' . $TODO); +ok($destroyed[$ID-1], 'Replaced array object in shared array'); @shared_ary = (); -ok($destroyed[$ID], 'Array object removed from cleared shared array' . $TODO); +ok($destroyed[$ID], 'Array object removed from cleared shared array'); $shared_ary[0] = AryObj->new(); ok($created[$ID], 'Created array object in shared array'); undef(@shared_ary); -ok($destroyed[$ID], 'Array object removed from undef shared array' . $TODO); +ok($destroyed[$ID], 'Array object removed from undef shared array'); # Testing with scalar object $shared_ary[0] = SclrObj->new(); @@ -310,20 +308,20 @@ ok($destroyed[$ID], 'Deleted scalar object in shared array'); $shared_ary[0] = SclrObj->new(); ok($created[$ID], 'Created scalar object in shared array'); $shared_ary[0] = undef; -ok($destroyed[$ID], 'Undef scalar object in shared array' . $TODO); +ok($destroyed[$ID], 'Undef scalar object in shared array'); $shared_ary[0] = SclrObj->new(); ok($created[$ID], 'Created scalar object in shared array'); $shared_ary[0] = SclrObj->new(); ok($created[$ID], 'Created scalar object in shared array'); -ok($destroyed[$ID-1], 'Replaced scalar object in shared array' . $TODO); +ok($destroyed[$ID-1], 'Replaced scalar object in shared array'); @shared_ary = (); -ok($destroyed[$ID], 'Scalar object removed from cleared shared array' . $TODO); +ok($destroyed[$ID], 'Scalar object removed from cleared shared array'); $shared_ary[0] = SclrObj->new(); ok($created[$ID], 'Created scalar object in shared array'); undef(@shared_ary); -ok($destroyed[$ID], 'Scalar object removed from undef shared array' . $TODO); +ok($destroyed[$ID], 'Scalar object removed from undef shared array'); # Testing with shared hash my %shared_hash :shared; @@ -337,20 +335,20 @@ ok($destroyed[$ID], 'Deleted hash object in shared hash'); $shared_hash{'obj'} = HashObj->new(); ok($created[$ID], 'Created hash object in shared hash'); $shared_hash{'obj'} = undef; -ok($destroyed[$ID], 'Undef hash object in shared hash' . $TODO); +ok($destroyed[$ID], 'Undef hash object in shared hash'); $shared_hash{'obj'} = HashObj->new(); ok($created[$ID], 'Created hash object in shared hash'); $shared_hash{'obj'} = HashObj->new(); ok($created[$ID], 'Created hash object in shared hash'); -ok($destroyed[$ID-1], 'Replaced hash object in shared hash' . $TODO); +ok($destroyed[$ID-1], 'Replaced hash object in shared hash'); %shared_hash = (); -ok($destroyed[$ID], 'Hash object removed from cleared shared hash' . $TODO); +ok($destroyed[$ID], 'Hash object removed from cleared shared hash'); $shared_hash{'obj'} = HashObj->new(); ok($created[$ID], 'Created hash object in shared hash'); undef(%shared_hash); -ok($destroyed[$ID], 'Hash object removed from undef shared hash' . $TODO); +ok($destroyed[$ID], 'Hash object removed from undef shared hash'); # Testing with array object $shared_hash{'obj'} = AryObj->new(); @@ -361,20 +359,20 @@ ok($destroyed[$ID], 'Deleted array object in shared hash'); $shared_hash{'obj'} = AryObj->new(); ok($created[$ID], 'Created array object in shared hash'); $shared_hash{'obj'} = undef; -ok($destroyed[$ID], 'Undef array object in shared hash' . $TODO); +ok($destroyed[$ID], 'Undef array object in shared hash'); $shared_hash{'obj'} = AryObj->new(); ok($created[$ID], 'Created array object in shared hash'); $shared_hash{'obj'} = AryObj->new(); ok($created[$ID], 'Created array object in shared hash'); -ok($destroyed[$ID-1], 'Replaced array object in shared hash' . $TODO); +ok($destroyed[$ID-1], 'Replaced array object in shared hash'); %shared_hash = (); -ok($destroyed[$ID], 'Array object removed from cleared shared hash' . $TODO); +ok($destroyed[$ID], 'Array object removed from cleared shared hash'); $shared_hash{'obj'} = AryObj->new(); ok($created[$ID], 'Created array object in shared hash'); undef(%shared_hash); -ok($destroyed[$ID], 'Array object removed from undef shared hash' . $TODO); +ok($destroyed[$ID], 'Array object removed from undef shared hash'); # Testing with scalar object $shared_hash{'obj'} = SclrObj->new(); @@ -385,19 +383,27 @@ ok($destroyed[$ID], 'Deleted scalar object in shared hash'); $shared_hash{'obj'} = SclrObj->new(); ok($created[$ID], 'Created scalar object in shared hash'); $shared_hash{'obj'} = undef; -ok($destroyed[$ID], 'Undef scalar object in shared hash' . $TODO); +ok($destroyed[$ID], 'Undef scalar object in shared hash'); $shared_hash{'obj'} = SclrObj->new(); ok($created[$ID], 'Created scalar object in shared hash'); $shared_hash{'obj'} = SclrObj->new(); ok($created[$ID], 'Created scalar object in shared hash'); -ok($destroyed[$ID-1], 'Replaced scalar object in shared hash' . $TODO); +ok($destroyed[$ID-1], 'Replaced scalar object in shared hash'); %shared_hash = (); -ok($destroyed[$ID], 'Scalar object removed from cleared shared hash' . $TODO); +ok($destroyed[$ID], 'Scalar object removed from cleared shared hash'); $shared_hash{'obj'} = SclrObj->new(); ok($created[$ID], 'Created scalar object in shared hash'); undef(%shared_hash); -ok($destroyed[$ID], 'Scalar object removed from undef shared hash' . $TODO); +ok($destroyed[$ID], 'Scalar object removed from undef shared hash'); + +# Testing with shared scalar +{ + my $shared_scalar : shared; + # Use a separate thread to make sure we have no private SV + async { $shared_scalar = SclrObj->new(); }->join(); +} +ok($destroyed[$ID], 'Scalar object removed from shared scalar'); # EOF diff --git a/doio.c b/doio.c index cecc574ba62..022b499f59a 100644 --- a/doio.c +++ b/doio.c @@ -861,10 +861,7 @@ Perl_nextargv(pTHX_ register GV *gv) #ifdef HAS_FCHMOD (void)fchmod(PL_lastfd,PL_filemode); #else -# if !(defined(WIN32) && defined(__BORLANDC__)) - /* Borland runtime creates a readonly file! */ (void)PerlLIO_chmod(PL_oldname,PL_filemode); -# endif #endif if (fileuid != PL_statbuf.st_uid || filegid != PL_statbuf.st_gid) { #ifdef HAS_FCHOWN @@ -1302,12 +1299,7 @@ Perl_my_stat_flags(pTHX_ const U32 flags) const char *s; STRLEN len; PUTBACK; - if (isGV_with_GP(sv)) { - gv = MUTABLE_GV(sv); - goto do_fstat; - } - else if (SvROK(sv) && isGV_with_GP(SvRV(sv))) { - gv = MUTABLE_GV(SvRV(sv)); + if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { goto do_fstat; } else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { @@ -1347,22 +1339,19 @@ Perl_my_lstat_flags(pTHX_ const U32 flags) if (ckWARN(WARN_IO)) { Perl_warner(aTHX_ packWARN(WARN_IO), "Use of -l on filehandle %s", GvENAME(cGVOP_gv)); - return (PL_laststatval = -1); } + return (PL_laststatval = -1); } - else if (PL_laststype != OP_LSTAT - && (PL_op->op_private & OPpFT_STACKED) && ckWARN(WARN_IO)) + else if (PL_op->op_private & OPpFT_STACKED) { + if (PL_laststype != OP_LSTAT) Perl_croak(aTHX_ no_prev_lstat); + return PL_laststatval; + } PL_laststype = OP_LSTAT; PL_statgv = NULL; sv = POPs; PUTBACK; - if (SvROK(sv) && isGV_with_GP(SvRV(sv)) && ckWARN(WARN_IO)) { - Perl_warner(aTHX_ packWARN(WARN_IO), "Use of -l on filehandle %s", - GvENAME((const GV *)SvRV(sv))); - return (PL_laststatval = -1); - } file = SvPV_flags_const_nolen(sv, flags); sv_setpv(PL_statname,file); PL_laststatval = PerlLIO_lstat(file,&PL_statcache); @@ -1619,9 +1608,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) tot = sp - mark; while (++mark <= sp) { GV* gv; - if (isGV_with_GP(*mark)) { - gv = MUTABLE_GV(*mark); - do_fchmod: + if ((gv = MAYBE_DEREF_GV(*mark))) { if (GvIO(gv) && IoIFP(GvIOp(gv))) { #ifdef HAS_FCHMOD APPLY_TAINT_PROPER(); @@ -1635,12 +1622,8 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) tot--; } } - else if (SvROK(*mark) && isGV_with_GP(SvRV(*mark))) { - gv = MUTABLE_GV(SvRV(*mark)); - goto do_fchmod; - } else { - const char *name = SvPV_nolen_const(*mark); + const char *name = SvPV_nomg_const_nolen(*mark); APPLY_TAINT_PROPER(); if (PerlLIO_chmod(name, val)) tot--; @@ -1659,9 +1642,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) tot = sp - mark; while (++mark <= sp) { GV* gv; - if (isGV_with_GP(*mark)) { - gv = MUTABLE_GV(*mark); - do_fchown: + if ((gv = MAYBE_DEREF_GV(*mark))) { if (GvIO(gv) && IoIFP(GvIOp(gv))) { #ifdef HAS_FCHOWN APPLY_TAINT_PROPER(); @@ -1675,12 +1656,8 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) tot--; } } - else if (SvROK(*mark) && isGV_with_GP(SvRV(*mark))) { - gv = MUTABLE_GV(SvRV(*mark)); - goto do_fchown; - } else { - const char *name = SvPV_nolen_const(*mark); + const char *name = SvPV_nomg_const_nolen(*mark); APPLY_TAINT_PROPER(); if (PerlLIO_chown(name, val, val2)) tot--; @@ -1845,9 +1822,7 @@ nothing in the core. tot = sp - mark; while (++mark <= sp) { GV* gv; - if (isGV_with_GP(*mark)) { - gv = MUTABLE_GV(*mark); - do_futimes: + if ((gv = MAYBE_DEREF_GV(*mark))) { if (GvIO(gv) && IoIFP(GvIOp(gv))) { #ifdef HAS_FUTIMES APPLY_TAINT_PROPER(); @@ -1862,12 +1837,8 @@ nothing in the core. tot--; } } - else if (SvROK(*mark) && isGV_with_GP(SvRV(*mark))) { - gv = MUTABLE_GV(SvRV(*mark)); - goto do_futimes; - } else { - const char * const name = SvPV_nolen_const(*mark); + const char * const name = SvPV_nomg_const_nolen(*mark); APPLY_TAINT_PROPER(); #ifdef HAS_FUTIMES if (utimes(name, (struct timeval *)utbufp)) @@ -2304,7 +2275,8 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp) /* suppress warning when reading into undef var (tchrist 3/Mar/00) */ if (! SvOK(mstr)) sv_setpvs(mstr, ""); - SvPV_force_nolen(mstr); + SvUPGRADE(mstr, SVt_PV); + SvPOK_only(mstr); mbuf = SvGROW(mstr, (STRLEN)msize+1); Copy(shm + mpos, mbuf, msize, char); @@ -2400,6 +2372,7 @@ Perl_vms_start_glob #endif #endif /* !CSH */ #endif /* !DOSISH */ + save_hash(gv_fetchpvs("ENV", 0, SVt_PVHV)); (void)do_open(PL_last_in_gv, (char*)SvPVX_const(tmpcmd), SvCUR(tmpcmd), FALSE, O_RDONLY, 0, NULL); fp = IoIFP(io); diff --git a/dosish.h b/dosish.h index 59bf122859b..fe8b16b4326 100644 --- a/dosish.h +++ b/dosish.h @@ -88,12 +88,7 @@ * information. */ #if defined(WIN64) || defined(USE_LARGE_FILES) -# if defined(__BORLANDC__) /* buk */ -# include -# define Stat_t struct stati64 -# else #define Stat_t struct _stati64 -# endif #else #if defined(UNDER_CE) #define Stat_t struct xcestat diff --git a/dump.c b/dump.c index c99532ab58d..9990c8de877 100644 --- a/dump.c +++ b/dump.c @@ -821,7 +821,6 @@ const struct flag_to_name op_const_names[] = { {OPpCONST_SHORTCIRCUIT, ",SHORTCIRCUIT"}, {OPpCONST_STRICT, ",STRICT"}, {OPpCONST_ENTERED, ",ENTERED"}, - {OPpCONST_ARYBASE, ",ARYBASE"}, {OPpCONST_BARE, ",BARE"}, {OPpCONST_WARNING, ",WARNING"} }; @@ -2990,8 +2989,6 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o) sv_catpv(tmpsv, ",BARE"); if (o->op_private & OPpCONST_STRICT) sv_catpv(tmpsv, ",STRICT"); - if (o->op_private & OPpCONST_ARYBASE) - sv_catpv(tmpsv, ",ARYBASE"); if (o->op_private & OPpCONST_WARNING) sv_catpv(tmpsv, ",WARNING"); if (o->op_private & OPpCONST_ENTERED) diff --git a/embed.fnc b/embed.fnc index 4b5f6f780a0..daaf2d8cacb 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1106,7 +1106,6 @@ Ap |void |save_padsv_and_mortalize|PADOFFSET off Ap |void |save_sptr |NN SV** sptr Ap |SV* |save_svref |NN SV** sptr Ap |void |save_pushptr |NULLOK void *const ptr|const int type -: Used by SAVECOPARYBASE() in op.c Ap |void |save_pushi32ptr|const I32 i|NULLOK void *const ptr|const int type : Used by SAVESWITCHSTACK() in pp.c Ap |void |save_pushptrptr|NULLOK void *const ptr1 \ @@ -1756,7 +1755,8 @@ sR |I32 |run_user_filter|int idx|NN SV *buf_sv|int maxlen sR |PMOP* |make_matcher |NN REGEXP* re sR |bool |matcher_matches_sv|NN PMOP* matcher|NN SV* sv s |void |destroy_matcher|NN PMOP* matcher -s |OP* |do_smartmatch |NULLOK HV* seen_this|NULLOK HV* seen_other +s |OP* |do_smartmatch |NULLOK HV* seen_this \ + |NULLOK HV* seen_other|const bool copied #endif #if defined(PERL_IN_PP_HOT_C) diff --git a/embed.h b/embed.h index 120567fe156..0e99ca55929 100644 --- a/embed.h +++ b/embed.h @@ -1404,7 +1404,7 @@ #define adjust_stack_on_leave(a,b,c,d,e) S_adjust_stack_on_leave(aTHX_ a,b,c,d,e) #define check_type_and_open(a) S_check_type_and_open(aTHX_ a) #define destroy_matcher(a) S_destroy_matcher(aTHX_ a) -#define do_smartmatch(a,b) S_do_smartmatch(aTHX_ a,b) +#define do_smartmatch(a,b,c) S_do_smartmatch(aTHX_ a,b,c) #define docatch(a) S_docatch(aTHX_ a) #define doeval(a,b,c,d) S_doeval(aTHX_ a,b,c,d) #define dofindlabel(a,b,c,d) S_dofindlabel(aTHX_ a,b,c,d) diff --git a/epoc/config.sh b/epoc/config.sh index faabef502e9..87dce8aed4a 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -33,8 +33,8 @@ apirevision='' apisubversion='' apiversion='' ar='arm-epoc-pe-ar' -archlib='/usr/lib/perl/5.15.2/epoc' -archlibexp='/usr/lib/perl/5.15.2/epoc' +archlib='/usr/lib/perl/5.15.3/epoc' +archlibexp='/usr/lib/perl/5.15.3/epoc' archname64='' archname='epoc' archobjs='epoc.o epocish.o epoc_stubs.o' @@ -95,6 +95,7 @@ d_PRIi64='undef' d_PRIo64='undef' d_PRIu64='undef' d_PRIx64='undef' +d_SCNfldbl='undef' d__fwalk='undef' d_access='undef' d_accessx='undef' @@ -115,9 +116,11 @@ d_attribute_unused='undef' d_attribute_warn_unused_result='undef' d_bcmp='define' d_bcopy='define' +d_bsd='undef' d_bsdgetpgrp='undef' d_bsdsetpgrp='undef' -d_bsd='undef' +d_builtin_choose_expr='undef' +d_builtin_expect='undef' d_bzero='define' d_c99_variadic_macros='undef' d_casti32='undef' @@ -130,13 +133,13 @@ d_class='undef' d_clearenv='define' d_closedir='undef' d_cmsghdr_s='undef' -d_cmsghdr_s='undef' d_const='define' d_copysignl='undef' d_cplusplus='undef' -d_crypt_r='undef' d_crypt='undef' +d_crypt_r='undef' d_csh='undef' +d_ctermid='undef' d_ctermid_r='undef' d_ctime64='undef' d_ctime_r='undef' @@ -152,20 +155,20 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' -d_drand48proto='define' d_drand48_r='undef' +d_drand48proto='define' d_dup2='undef' d_eaccess='undef' -d_endgrent_r='undef' d_endgrent='undef' +d_endgrent_r='undef' d_endhent='undef' d_endhostent_r='undef' d_endnent='undef' d_endnetent_r='undef' d_endpent='undef' d_endprotoent_r='undef' -d_endpwent_r='undef' d_endpwent='undef' +d_endpwent_r='undef' d_endsent='undef' d_endservent_r='undef' d_eofnblk='define' @@ -174,25 +177,26 @@ d_faststdio='undef' d_fchdir='undef' d_fchmod='undef' d_fchown='undef' -d_fcntl_can_lock='undef' d_fcntl='undef' +d_fcntl_can_lock='undef' d_fd_macros='undef' -d_fds_bits='undef' d_fd_set='define' +d_fds_bits='undef' d_fgetpos='define' -d_finitel='undef' d_finite='undef' +d_finitel='undef' d_flexfnam='define' -d_flockproto='undef' d_flock='undef' +d_flockproto='undef' d_fork='undef' +d_fp_class='undef' d_fpathconf='undef' +d_fpclass='undef' d_fpclassify='undef' d_fpclassl='undef' -d_fp_class='undef' -d_fpclass='undef' d_fpos64_t='undef' d_frexpl='undef' +d_fs_data_s='undef' d_fseeko='undef' d_fsetpos='define' d_fstatfs='define' @@ -204,10 +208,11 @@ d_futimes='undef' d_gdbm_ndbm_h_uses_prototypes='undef' d_gdbmndbm_h_uses_prototypes='undef' d_getaddrinfo='undef' +d_getcwd='define' d_getespwnam='undef' d_getfsstat='undef' -d_getgrent_r='undef' d_getgrent='undef' +d_getgrent_r='undef' d_getgrgid_r='undef' d_getgrnam_r='undef' d_getgrps='undef' @@ -220,8 +225,9 @@ d_gethostbyname_r='undef' d_gethostent_r='undef' d_gethostprotos='define' d_getitimer='undef' -d_getlogin_r='undef' d_getlogin='undef' +d_getlogin_r='undef' +d_getmnt='undef' d_getmntent='undef' d_getnameinfo='undef' d_getnbyaddr='undef' @@ -245,8 +251,8 @@ d_getprotobynumber_r='undef' d_getprotoent_r='undef' d_getprotoprotos='define' d_getprpwnam='undef' -d_getpwent_r='undef' d_getpwent='undef' +d_getpwent_r='undef' d_getpwnam_r='undef' d_getpwuid_r='undef' d_getsbyname='undef' @@ -256,8 +262,8 @@ d_getservbyname_r='undef' d_getservbyport_r='undef' d_getservent_r='undef' d_getservprotos='define' -d_getspnam_r='undef' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='define' d_gmtime64='undef' d_gmtime_r='undef' @@ -266,6 +272,7 @@ d_grpasswd='undef' d_hasmntopt='undef' d_htonl='define' d_ilogbl='undef' +d_inc_version_list='undef' d_index='undef' d_inetaton='define' d_inetntop='undef' @@ -280,11 +287,12 @@ d_isnanl='undef' d_killpg='undef' d_lchown='undef' d_ldbl_dig='undef' +d_libm_lib_version='0' d_link='undef' d_llseek='undef' d_localtime64='undef' -d_localtime_r_needs_tzset='undef' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='undef' d_lockf='undef' d_longdbl='undef' @@ -303,32 +311,36 @@ d_memcpy='define' d_memmove='define' d_memset='define' d_mkdir='define' +d_mkdtemp='undef' d_mkfifo='undef' +d_mkstemp='undef' +d_mkstemps='undef' d_mktime64='undef' d_mktime='define' d_mmap='undef' +d_modfl='undef' d_modfl_pow32_bug='undef' d_modflproto='undef' -d_modfl='undef' d_mprotect='undef' -d_msgctl='undef' +d_msg='undef' d_msg_ctrunc='undef' d_msg_dontroute='undef' -d_msgget='undef' -d_msghdr_s='undef' -d_msghdr_s='undef' d_msg_oob='undef' d_msg_peek='undef' d_msg_proxy='undef' +d_msgctl='undef' +d_msgget='undef' +d_msghdr_s='undef' d_msgrcv='undef' d_msgsnd='undef' -d_msg='undef' d_msync='undef' d_munmap='undef' d_mymalloc='undef' d_ndbm_h_uses_prototypes='undef' d_nice='undef' d_nl_langinfo='undef' +d_nv_preserves_uv='define' +d_nv_zero_is_allbits_zero='undef' d_off64_t='undef' d_old_pthread_create_joinable='undef' d_oldpthreads='undef' @@ -341,7 +353,11 @@ d_phostname='undef' d_pipe='undef' d_poll='undef' d_portable='undef' +d_prctl='undef' +d_prctl_set_name='undef' +d_printf_format_null='undef' d_procselfexe='undef' +d_pseudofork='undef' d_pthread_atfork='undef' d_pthread_attr_setscope='undef' d_pthread_yield='undef' @@ -354,14 +370,13 @@ d_pwgecos='undef' d_pwpasswd='undef' d_pwquota='undef' d_qgcvt='undef' +d_quad='define' d_random_r='undef' d_readdir64_r='undef' d_readdir='define' d_readdir_r='undef' d_readlink='undef' d_readv='undef' -d_readv='undef' -d_recvmsg='undef' d_recvmsg='undef' d_rename='define' d_rewinddir='define' @@ -422,22 +437,29 @@ d_shmctl='undef' d_shmdt='undef' d_shmget='undef' d_sigaction='undef' +d_signbit='undef' d_sigprocmask='undef' d_sigsetjmp='undef' d_sin6_scope_id='undef' +d_sitearch='undef' d_snprintf='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' d_socket='define' +d_socklen_t='undef' d_sockpair='undef' d_socks5_init='undef' +d_sprintf_returns_strlen='undef' +d_sqrtl='undef' d_srand48_r='undef' d_srandom_r='undef' d_sresgproto='undef' d_sresuproto='undef' d_statblks='define' d_statfs='undef' +d_statfs_f_flags='undef' +d_statfs_s='undef' d_statfsflags='define' d_static_inline='undef' d_statvfs='undef' @@ -459,6 +481,8 @@ d_strlcat='undef' d_strlcpy='undef' d_strtod='define' d_strtol='define' +d_strtold='undef' +d_strtoll='undef' d_strtoq='undef' d_strtoul='define' d_strtoull='undef' @@ -492,7 +516,10 @@ d_uname='undef' d_union_semun='undef' d_unordered='undef' d_unsetenv='undef' +d_usleep='undef' d_usleepproto='undef' +d_ustat='undef' +d_vendorarch='undef' d_vendorlib='undef' d_vfork='undef' d_void_closedir='undef' @@ -510,10 +537,14 @@ d_xenix='undef' date='date' db_hashtype='undef' db_prefixtype='undef' +db_version_major='0' +db_version_minor='0' +db_version_patch='0' defvoidused='15' direntrytype='struct dirent' dlext='none' dlsrc='dl_none.xs' +double='undef' doublesize='8' drand01='(rand()/(double)(1U<op_pv, strlen(o->op_pv), SVs_TEMP); #define COP_label(o) CopLABEL(o) -#define COP_arybase(o) CopARYBASE_get(o) MODULE = B PACKAGE = B::COP PREFIX = COP_ @@ -1270,6 +1269,10 @@ COP_stashpv(o) I32 COP_arybase(o) B::COP o + CODE: + RETVAL = 0; + OUTPUT: + RETVAL void COP_warnings(o) diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm index 055166751de..8ab7e001d0c 100644 --- a/ext/B/B/Concise.pm +++ b/ext/B/B/Concise.pm @@ -634,7 +634,7 @@ $priv{$_}{16} = "TARGMY" "exec", "kill", "getppid", "getpgrp", "setpgrp", "getpriority", "setpriority", "time", "sleep"); $priv{$_}{4} = "REVERSED" for ("enteriter", "iter"); -@{$priv{"const"}}{4,8,16,32,64,128} = ("SHORT","STRICT","ENTERED",'$[',"BARE","WARN"); +@{$priv{"const"}}{4,8,16,64,128} = ("SHORT","STRICT","ENTERED","BARE","WARN"); $priv{"flip"}{64} = $priv{"flop"}{64} = "LINENUM"; $priv{"list"}{64} = "GUESSED"; $priv{"delete"}{64} = "SLICE"; @@ -650,7 +650,7 @@ $priv{$_}{2} = "FTACCESS" $priv{"entereval"}{2} = "HAS_HH"; if ($] >= 5.009) { # Stacked filetests are post 5.8.x - $priv{$_}{4} = "FTSTACKED" + @{$priv{$_}}{4,8} = ("FTSTACKED","FTSTACKING") for ("ftrread", "ftrwrite", "ftrexec", "fteread", "ftewrite", "fteexec", "ftis", "fteowned", "ftrowned", "ftzero", "ftsize", "ftmtime", "ftatime", "ftctime", "ftsock", "ftchr", "ftblk", "ftfile", "ftdir", @@ -667,8 +667,8 @@ our %hints; # used to display each COP's op_hints values # strict refs, subs, vars @hints{2,512,1024} = ('$', '&', '*'); -# integers, locale, bytes, arybase -@hints{1,4,8,16,32} = ('i', 'l', 'b', '['); +# integers, locale, bytes +@hints{1,4,8,16} = ('i', 'l', 'b'); # block scope, localise %^H, $^OPEN (in), $^OPEN (out) @hints{256,131072,262144,524288} = ('{','%','<','>'); # overload new integer, float, binary, string, re @@ -856,9 +856,7 @@ sub concise_op { my $ln = $op->line; $loc .= ":$ln"; my($stash, $cseq) = ($op->stash->NAME, $op->cop_seq - $cop_seq_base); - my $arybase = $op->arybase; - $arybase = $arybase ? ' $[=' . $arybase : ""; - $h{arg} = "($label$stash $cseq $loc$arybase)"; + $h{arg} = "($label$stash $cseq $loc)"; if ($show_src) { fill_srclines($pathnm) unless exists $srclines{$pathnm}; # Would love to retain Jim's use of // but this code needs to be @@ -1550,7 +1548,6 @@ string if this is not a COP. Here are the symbols used: i integers l locale b bytes - [ arybase { block scope % localise %^H < open in diff --git a/ext/B/t/concise-xs.t b/ext/B/t/concise-xs.t index c8f1b164943..67b85917014 100644 --- a/ext/B/t/concise-xs.t +++ b/ext/B/t/concise-xs.t @@ -158,7 +158,7 @@ my $testpkgs = { OP_GLOB OP_STRINGIFY OPf_KIDS OPf_MOD OPf_REF OPf_SPECIAL OPf_STACKED OPf_WANT OPf_WANT_LIST OPf_WANT_SCALAR - OPf_WANT_VOID OPpCONST_ARYBASE OPpCONST_BARE OPpCONST_NOVER + OPf_WANT_VOID OPpCONST_BARE OPpCONST_NOVER OPpENTERSUB_AMPER OPpEXISTS_SUB OPpITER_REVERSED OPpLVAL_INTRO OPpOUR_INTRO OPpSLICE OPpSORT_DESCEND OPpSORT_INPLACE OPpSORT_INTEGER OPpSORT_NUMERIC @@ -169,6 +169,7 @@ my $testpkgs = { PMf_MULTILINE PMf_ONCE PMf_SINGLELINE POSTFIX SVf_FAKE SVf_IOK SVf_NOK SVf_POK SVf_ROK SVpad_OUR SVs_RMG SVs_SMG SWAP_CHILDREN OPpPAD_STATE + OPpCONST_ARYBASE /, $] > 5.009 ? ('RXf_SKIPWHITE') : ('PMf_SKIPWHITE'), 'CVf_LOCKED', # This ends up as a constant, pre or post 5.10 ], diff --git a/ext/DynaLoader/dlutils.c b/ext/DynaLoader/dlutils.c index 1ba9a61b487..574ccadc34b 100644 --- a/ext/DynaLoader/dlutils.c +++ b/ext/DynaLoader/dlutils.c @@ -8,6 +8,7 @@ * files when the interpreter exits */ +#define PERL_EUPXS_ALWAYS_EXPORT #ifndef START_MY_CXT /* Some IDEs try compiling this standalone. */ # include "EXTERN.h" # include "perl.h" diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL index 56bc8150023..7cd7a249d2f 100644 --- a/ext/Errno/Errno_pm.PL +++ b/ext/Errno/Errno_pm.PL @@ -2,7 +2,7 @@ use ExtUtils::MakeMaker; use Config; use strict; -our $VERSION = "1.13"; +our $VERSION = "1.14"; my %err = (); my %wsa = (); @@ -184,13 +184,7 @@ sub get_files { die "Cannot exec $cpp"; } - my $pat; - if (($IsMSWin32 || $^O eq 'NetWare') and $Config{cc} =~ /^bcc/i) { - $pat = '^/\*\s+(.+)\s+\d+\s*:\s+\*/'; - } - else { - $pat = '^#\s*(?:line)?\s*\d+\s+"([^"]+)"'; - } + my $pat = '^#\s*(?:line)?\s*\d+\s+"([^"]+)"'; while() { if ($^O eq 'os2' or $IsMSWin32 or $^O eq 'NetWare') { if (/$pat/o) { diff --git a/ext/File-Glob/Glob.xs b/ext/File-Glob/Glob.xs index 5a08a0d0795..91b9f4d5f14 100644 --- a/ext/File-Glob/Glob.xs +++ b/ext/File-Glob/Glob.xs @@ -64,7 +64,7 @@ PPCODE: } /* call glob */ - bzero(&pglob, sizeof(glob_t)); + memset(&pglob, 0, sizeof(glob_t)); retval = bsd_glob(pattern, flags, errfunc, &pglob); GLOB_ERROR = retval; diff --git a/ext/File-Glob/bsd_glob.c b/ext/File-Glob/bsd_glob.c index f891d29c0c0..89d51af64c7 100644 --- a/ext/File-Glob/bsd_glob.c +++ b/ext/File-Glob/bsd_glob.c @@ -457,6 +457,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) /* * handle a plain ~ or ~/ by expanding $HOME * first and then trying the password file + * or $USERPROFILE on DOSISH systems */ if ((h = getenv("HOME")) == NULL) { #ifdef HAS_PASSWD @@ -465,6 +466,14 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) return pattern; else h = pwd->pw_dir; +#elif DOSISH + /* + * When no passwd file, fallback to the USERPROFILE + * environment variable on DOSish systems. + */ + if ((h = getenv("USERPROFILE")) == NULL) { + return pattern; + } #else return pattern; #endif diff --git a/ext/File-Glob/t/basic.t b/ext/File-Glob/t/basic.t index ed8301900f4..c40b1d5de24 100644 --- a/ext/File-Glob/t/basic.t +++ b/ext/File-Glob/t/basic.t @@ -10,7 +10,7 @@ BEGIN { } } use strict; -use Test::More tests => 15; +use Test::More tests => 18; BEGIN {use_ok('File::Glob', ':glob')}; use Cwd (); @@ -68,6 +68,46 @@ SKIP: { is_deeply (\@a, [$home]); } } +# check plain tilde expansion +{ + my $tilde_check = sub { + my @a = bsd_glob('~'); + + if (GLOB_ERROR) { + fail(GLOB_ERROR); + } else { + is_deeply (\@a, [$_[0]], join ' - ', 'tilde expansion', @_ > 1 ? $_[1] : ()); + } + }; + my $passwd_home = eval { (getpwuid($>))[7] }; + + TODO: { + local $TODO = 'directory brackets look like pattern brackets to glob' if $^O eq 'VMS'; + local $ENV{HOME}; + delete $ENV{HOME}; + local $ENV{USERPROFILE}; + delete $ENV{USERPROFILE}; + $tilde_check->(defined $passwd_home ? $passwd_home : q{~}, 'no environment'); + } + + SKIP: { + skip 'MSWin32 only', 1 if $^O ne 'MSWin32'; + local $ENV{HOME}; + delete $ENV{HOME}; + local $ENV{USERPROFILE}; + $ENV{USERPROFILE} = 'sweet win32 home'; + $tilde_check->(defined $passwd_home ? $passwd_home : $ENV{USERPROFILE}, 'USERPROFILE'); + } + + TODO: { + local $TODO = 'directory brackets look like pattern brackets to glob' if $^O eq 'VMS'; + my $home = exists $ENV{HOME} ? $ENV{HOME} + : eval { getpwuid($>); 1 } ? (getpwuid($>))[7] + : $^O eq 'MSWin32' && exists $ENV{USERPROFILE} ? $ENV{USERPROFILE} + : q{~}; + $tilde_check->($home); + } +} # check backslashing # should return a list with one item, and not set ERROR @@ -124,9 +164,11 @@ print "# @a\n"; is_deeply(\@a, [($vms_mode ? 'test.' : 'TEST'), 'a', 'b']); # "~" should expand to $ENV{HOME} -$ENV{HOME} = "sweet home"; -@a = bsd_glob('~', GLOB_TILDE | GLOB_NOMAGIC); -is_deeply(\@a, [$ENV{HOME}]); +{ + local $ENV{HOME} = "sweet home"; + @a = bsd_glob('~', GLOB_TILDE | GLOB_NOMAGIC); + is_deeply(\@a, [$ENV{HOME}]); +} # GLOB_ALPHASORT (default) should sort alphabetically regardless of case mkdir "pteerslo", 0777; diff --git a/ext/IPC-Open3/t/IPC-Open2.t b/ext/IPC-Open3/t/IPC-Open2.t index fecb2096630..e0be5dbf529 100644 --- a/ext/IPC-Open3/t/IPC-Open2.t +++ b/ext/IPC-Open3/t/IPC-Open2.t @@ -4,10 +4,10 @@ use Config; BEGIN { require Test::More; if (!$Config{'d_fork'} - # open2/3 supported on win32 (but not Borland due to CRT bugs) - && (($^O ne 'MSWin32' && $^O ne 'NetWare') || $Config{'cc'} =~ /^bcc/i)) + # open2/3 supported on win32 + && $^O ne 'MSWin32' && $^O ne 'NetWare') { - Test::More->import(skip_all => 'open2/3 not available with MSWin32+Netware+cc=bcc'); + Test::More->import(skip_all => 'open2/3 not available with MSWin32+Netware'); exit 0; } # make warnings fatal diff --git a/ext/IPC-Open3/t/IPC-Open3.t b/ext/IPC-Open3/t/IPC-Open3.t index 0ecb841b138..7b85b825e24 100644 --- a/ext/IPC-Open3/t/IPC-Open3.t +++ b/ext/IPC-Open3/t/IPC-Open3.t @@ -3,8 +3,8 @@ BEGIN { require Config; import Config; if (!$Config{'d_fork'} - # open2/3 supported on win32 (but not Borland due to CRT bugs) - && (($^O ne 'MSWin32' && $^O ne 'NetWare') || $Config{'cc'} =~ /^bcc/i)) + # open2/3 supported on win32 + && $^O ne 'MSWin32' && $^O ne 'NetWare') { print "1..0\n"; exit 0; diff --git a/ext/ODBM_File/ODBM_File.pm b/ext/ODBM_File/ODBM_File.pm index 5c8d10b7344..958232cb7fd 100644 --- a/ext/ODBM_File/ODBM_File.pm +++ b/ext/ODBM_File/ODBM_File.pm @@ -7,7 +7,7 @@ require Tie::Hash; require XSLoader; our @ISA = qw(Tie::Hash); -our $VERSION = "1.11"; +our $VERSION = "1.12"; XSLoader::load(); diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs index 15c17256652..d1ece7ff9be 100644 --- a/ext/ODBM_File/ODBM_File.xs +++ b/ext/ODBM_File/ODBM_File.xs @@ -113,9 +113,9 @@ odbm_TIEHASH(dbtype, filename, flags, mode) dbp = (void*)(dbminit(filename) >= 0 ? &dbmrefcnt : 0); RETVAL = (ODBM_File)safecalloc(1, sizeof(ODBM_File_type)); RETVAL->dbp = dbp ; - ST(0) = sv_mortalcopy(&PL_sv_undef); - sv_setptrobj(ST(0), RETVAL, dbtype); } + OUTPUT: + RETVAL void DESTROY(db) diff --git a/ext/ODBM_File/typemap b/ext/ODBM_File/typemap index d1f16b4d2c9..2612dfda143 100644 --- a/ext/ODBM_File/typemap +++ b/ext/ODBM_File/typemap @@ -57,3 +57,5 @@ T_DATUM_V DBM_ckFilter($arg, filter[fetch_value],\"filter_fetch_value\"); T_GDATUM sv_usepvn($arg, $var.dptr, $var.dsize); +T_PTROBJ + sv_setref_pv($arg, dbtype, (void*)$var); diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 8dc1f5a3083..2737559df5b 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -82,26 +82,6 @@ char *tzname[] = { "" , "" }; #endif #endif -#ifndef PERL_UNUSED_DECL -# ifdef HASATTRIBUTE -# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) -# define PERL_UNUSED_DECL -# else -# define PERL_UNUSED_DECL __attribute__((unused)) -# endif -# else -# define PERL_UNUSED_DECL -# endif -#endif - -#ifndef dNOOP -#define dNOOP extern int Perl___notused PERL_UNUSED_DECL -#endif - -#ifndef dVAR -#define dVAR dNOOP -#endif - #if defined(__VMS) && !defined(__POSIX_SOURCE) # include /* LIB$_INVARG constant */ # include /* prototype for lib$ediv() */ @@ -160,9 +140,6 @@ char *tzname[] = { "" , "" }; # define ttyname(a) (char*)not_here("ttyname") # define sigset_t long # define pid_t long -# ifdef __BORLANDC__ -# define tzname _tzname -# endif # ifdef _MSC_VER # define mode_t short # endif @@ -491,7 +468,45 @@ unsigned long strtoul (const char *, char **, int); #endif #endif -#ifndef HAS_LOCALECONV +#ifdef HAS_LOCALECONV +struct lconv_offset { + const char *name; + size_t offset; +}; + +const struct lconv_offset lconv_strings[] = { + {"decimal_point", offsetof(struct lconv, decimal_point)}, + {"thousands_sep", offsetof(struct lconv, thousands_sep)}, +#ifndef NO_LOCALECONV_GROUPING + {"grouping", offsetof(struct lconv, grouping)}, +#endif + {"int_curr_symbol", offsetof(struct lconv, int_curr_symbol)}, + {"currency_symbol", offsetof(struct lconv, currency_symbol)}, + {"mon_decimal_point", offsetof(struct lconv, mon_decimal_point)}, +#ifndef NO_LOCALECONV_MON_THOUSANDS_SEP + {"mon_thousands_sep", offsetof(struct lconv, mon_thousands_sep)}, +#endif +#ifndef NO_LOCALECONV_MON_GROUPING + {"mon_grouping", offsetof(struct lconv, mon_grouping)}, +#endif + {"positive_sign", offsetof(struct lconv, positive_sign)}, + {"negative_sign", offsetof(struct lconv, negative_sign)}, + {NULL, 0} +}; + +const struct lconv_offset lconv_integers[] = { + {"int_frac_digits", offsetof(struct lconv, int_frac_digits)}, + {"frac_digits", offsetof(struct lconv, frac_digits)}, + {"p_cs_precedes", offsetof(struct lconv, p_cs_precedes)}, + {"p_sep_by_space", offsetof(struct lconv, p_sep_by_space)}, + {"n_cs_precedes", offsetof(struct lconv, n_cs_precedes)}, + {"n_sep_by_space", offsetof(struct lconv, n_sep_by_space)}, + {"p_sign_posn", offsetof(struct lconv, p_sign_posn)}, + {"n_sign_posn", offsetof(struct lconv, n_sign_posn)}, + {NULL, 0} +}; + +#else #define localeconv() not_here("localeconv") #endif @@ -558,6 +573,16 @@ restore_sigmask(pTHX_ SV *osset_sv) (void)sigprocmask(SIG_SETMASK, ossetp, (sigset_t *)0); } +static void * +allocate_struct(pTHX_ SV *rv, const STRLEN size, const char *packname) { + SV *const t = newSVrv(rv, packname); + void *const p = sv_grow(t, size + 1); + + SvCUR_set(t, size); + SvPOK_on(t); + return p; +} + #ifdef WIN32 /* @@ -668,45 +693,118 @@ my_tzset(pTHX) tzset(); } +typedef int (*isfunc_t)(int); +typedef void (*any_dptr_t)(void *); + +/* This needs to be ALIASed in a custom way, hence can't easily be defined as + a regular XSUB. */ +static XSPROTO(is_common); /* prototype to pass -Wmissing-prototypes */ +static XSPROTO(is_common) +{ + dXSARGS; + SV *charstring; + if (items != 1) + croak_xs_usage(cv, "charstring"); + + { + dXSTARG; + STRLEN len; + int RETVAL; + unsigned char *s = (unsigned char *) SvPV(ST(0), len); + unsigned char *e = s + len; + isfunc_t isfunc = (isfunc_t) XSANY.any_dptr; + + for (RETVAL = 1; RETVAL && s < e; s++) + if (!isfunc(*s)) + RETVAL = 0; + XSprePUSH; + PUSHi((IV)RETVAL); + } + XSRETURN(1); +} + +MODULE = POSIX PACKAGE = POSIX + +BOOT: +{ + CV *cv; + const char *file = __FILE__; + + /* Ensure we get the function, not a macro implementation. Like the C89 + standard says we can... */ +#undef isalnum + cv = newXS("POSIX::isalnum", is_common, file); + XSANY.any_dptr = (any_dptr_t) &isalnum; +#undef isalpha + cv = newXS("POSIX::isalpha", is_common, file); + XSANY.any_dptr = (any_dptr_t) &isalpha; +#undef iscntrl + cv = newXS("POSIX::iscntrl", is_common, file); + XSANY.any_dptr = (any_dptr_t) &iscntrl; +#undef isdigit + cv = newXS("POSIX::isdigit", is_common, file); + XSANY.any_dptr = (any_dptr_t) &isdigit; +#undef isgraph + cv = newXS("POSIX::isgraph", is_common, file); + XSANY.any_dptr = (any_dptr_t) &isgraph; +#undef islower + cv = newXS("POSIX::islower", is_common, file); + XSANY.any_dptr = (any_dptr_t) &islower; +#undef isprint + cv = newXS("POSIX::isprint", is_common, file); + XSANY.any_dptr = (any_dptr_t) &isprint; +#undef ispunct + cv = newXS("POSIX::ispunct", is_common, file); + XSANY.any_dptr = (any_dptr_t) &ispunct; +#undef isspace + cv = newXS("POSIX::isspace", is_common, file); + XSANY.any_dptr = (any_dptr_t) &isspace; +#undef isupper + cv = newXS("POSIX::isupper", is_common, file); + XSANY.any_dptr = (any_dptr_t) &isupper; +#undef isxdigit + cv = newXS("POSIX::isxdigit", is_common, file); + XSANY.any_dptr = (any_dptr_t) &isxdigit; +} + MODULE = SigSet PACKAGE = POSIX::SigSet PREFIX = sig -POSIX::SigSet +void new(packname = "POSIX::SigSet", ...) const char * packname CODE: { int i; - Newx(RETVAL, 1, sigset_t); - sigemptyset(RETVAL); + sigset_t *const s + = (sigset_t *) allocate_struct(aTHX_ (ST(0) = sv_newmortal()), + sizeof(sigset_t), + packname); + sigemptyset(s); for (i = 1; i < items; i++) - sigaddset(RETVAL, SvIV(ST(i))); + sigaddset(s, SvIV(ST(i))); + XSRETURN(1); } - OUTPUT: - RETVAL - -void -DESTROY(sigset) - POSIX::SigSet sigset - CODE: - Safefree(sigset); SysRet -sigaddset(sigset, sig) +addset(sigset, sig) POSIX::SigSet sigset int sig + ALIAS: + delset = 1 + CODE: + RETVAL = ix ? sigdelset(sigset, sig) : sigaddset(sigset, sig); + OUTPUT: + RETVAL SysRet -sigdelset(sigset, sig) - POSIX::SigSet sigset - int sig - -SysRet -sigemptyset(sigset) - POSIX::SigSet sigset - -SysRet -sigfillset(sigset) +emptyset(sigset) POSIX::SigSet sigset + ALIAS: + fillset = 1 + CODE: + RETVAL = ix ? sigfillset(sigset) : sigemptyset(sigset); + OUTPUT: + RETVAL int sigismember(sigset, sig) @@ -715,30 +813,24 @@ sigismember(sigset, sig) MODULE = Termios PACKAGE = POSIX::Termios PREFIX = cf -POSIX::Termios +void new(packname = "POSIX::Termios", ...) const char * packname CODE: { #ifdef I_TERMIOS - Newx(RETVAL, 1, struct termios); + void *const p = allocate_struct(aTHX_ (ST(0) = sv_newmortal()), + sizeof(struct termios), packname); + /* The previous implementation stored a pointer to an uninitialised + struct termios. Seems safer to initialise it, particularly as + this implementation exposes the struct to prying from perl-space. + */ + memset(p, 0, 1 + sizeof(struct termios)); + XSRETURN(1); #else not_here("termios"); - RETVAL = 0; #endif } - OUTPUT: - RETVAL - -void -DESTROY(termios_ref) - POSIX::Termios termios_ref - CODE: -#ifdef I_TERMIOS - Safefree(termios_ref); -#else - not_here("termios"); -#endif SysRet getattr(termios_ref, fd = 0) @@ -749,72 +841,59 @@ getattr(termios_ref, fd = 0) OUTPUT: RETVAL +#ifndef TCSANOW +# define TCSANOW 0 +#endif SysRet -setattr(termios_ref, fd = 0, optional_actions = 0) +setattr(termios_ref, fd = 0, optional_actions = TCSANOW) POSIX::Termios termios_ref int fd int optional_actions CODE: + /* The second argument to the call is mandatory, but we'd like to give + it a useful default. 0 isn't valid on all operating systems - on + Solaris (at least) TCSANOW, TCSADRAIN and TCSAFLUSH have the same + values as the equivalent ioctls, TCSETS, TCSETSW and TCSETSF. */ RETVAL = tcsetattr(fd, optional_actions, termios_ref); OUTPUT: RETVAL speed_t -cfgetispeed(termios_ref) - POSIX::Termios termios_ref - -speed_t -cfgetospeed(termios_ref) - POSIX::Termios termios_ref - -tcflag_t -getiflag(termios_ref) - POSIX::Termios termios_ref - CODE: -#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */ - RETVAL = termios_ref->c_iflag; -#else - not_here("getiflag"); - RETVAL = 0; -#endif - OUTPUT: - RETVAL - -tcflag_t -getoflag(termios_ref) +getispeed(termios_ref) POSIX::Termios termios_ref + ALIAS: + getospeed = 1 CODE: -#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */ - RETVAL = termios_ref->c_oflag; -#else - not_here("getoflag"); - RETVAL = 0; -#endif + RETVAL = ix ? cfgetospeed(termios_ref) : cfgetispeed(termios_ref); OUTPUT: RETVAL tcflag_t -getcflag(termios_ref) - POSIX::Termios termios_ref - CODE: -#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */ - RETVAL = termios_ref->c_cflag; -#else - not_here("getcflag"); - RETVAL = 0; -#endif - OUTPUT: - RETVAL - -tcflag_t -getlflag(termios_ref) +getiflag(termios_ref) POSIX::Termios termios_ref + ALIAS: + getoflag = 1 + getcflag = 2 + getlflag = 3 CODE: #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */ - RETVAL = termios_ref->c_lflag; + switch(ix) { + case 0: + RETVAL = termios_ref->c_iflag; + break; + case 1: + RETVAL = termios_ref->c_oflag; + break; + case 2: + RETVAL = termios_ref->c_cflag; + break; + case 3: + RETVAL = termios_ref->c_lflag; + break; + } #else - not_here("getlflag"); - RETVAL = 0; + not_here(GvNAME(CvGV(cv))); + RETVAL = 0; #endif OUTPUT: RETVAL @@ -836,57 +915,43 @@ getcc(termios_ref, ccix) RETVAL SysRet -cfsetispeed(termios_ref, speed) - POSIX::Termios termios_ref - speed_t speed - -SysRet -cfsetospeed(termios_ref, speed) +setispeed(termios_ref, speed) POSIX::Termios termios_ref speed_t speed - -void -setiflag(termios_ref, iflag) - POSIX::Termios termios_ref - tcflag_t iflag - CODE: -#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */ - termios_ref->c_iflag = iflag; -#else - not_here("setiflag"); -#endif - -void -setoflag(termios_ref, oflag) - POSIX::Termios termios_ref - tcflag_t oflag - CODE: -#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */ - termios_ref->c_oflag = oflag; -#else - not_here("setoflag"); -#endif - -void -setcflag(termios_ref, cflag) - POSIX::Termios termios_ref - tcflag_t cflag + ALIAS: + setospeed = 1 CODE: -#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */ - termios_ref->c_cflag = cflag; -#else - not_here("setcflag"); -#endif + RETVAL = ix + ? cfsetospeed(termios_ref, speed) : cfsetispeed(termios_ref, speed); + OUTPUT: + RETVAL void -setlflag(termios_ref, lflag) +setiflag(termios_ref, flag) POSIX::Termios termios_ref - tcflag_t lflag + tcflag_t flag + ALIAS: + setoflag = 1 + setcflag = 2 + setlflag = 3 CODE: #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */ - termios_ref->c_lflag = lflag; + switch(ix) { + case 0: + termios_ref->c_iflag = flag; + break; + case 1: + termios_ref->c_oflag = flag; + break; + case 2: + termios_ref->c_cflag = flag; + break; + case 3: + termios_ref->c_lflag = flag; + break; + } #else - not_here("setlflag"); + not_here(GvNAME(CvGV(cv))); #endif void @@ -972,160 +1037,6 @@ WEXITSTATUS(status) OUTPUT: RETVAL -int -isalnum(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!isalnum(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - -int -isalpha(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!isalpha(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - -int -iscntrl(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!iscntrl(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - -int -isdigit(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!isdigit(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - -int -isgraph(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!isgraph(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - -int -islower(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!islower(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - -int -isprint(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!isprint(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - -int -ispunct(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!ispunct(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - -int -isspace(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!isspace(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - -int -isupper(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!isupper(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - -int -isxdigit(charstring) - SV * charstring - PREINIT: - STRLEN len; - CODE: - unsigned char *s = (unsigned char *) SvPV(charstring, len); - unsigned char *e = s + len; - for (RETVAL = 1; RETVAL && s < e; s++) - if (!isxdigit(*s)) - RETVAL = 0; - OUTPUT: - RETVAL - SysRet open(filename, flags = O_RDONLY, mode = 0666) char * filename @@ -1147,68 +1058,25 @@ localeconv() RETVAL = newHV(); sv_2mortal((SV*)RETVAL); if ((lcbuf = localeconv())) { - /* the strings */ - if (lcbuf->decimal_point && *lcbuf->decimal_point) - (void) hv_store(RETVAL, "decimal_point", 13, - newSVpv(lcbuf->decimal_point, 0), 0); - if (lcbuf->thousands_sep && *lcbuf->thousands_sep) - (void) hv_store(RETVAL, "thousands_sep", 13, - newSVpv(lcbuf->thousands_sep, 0), 0); -#ifndef NO_LOCALECONV_GROUPING - if (lcbuf->grouping && *lcbuf->grouping) - (void) hv_store(RETVAL, "grouping", 8, - newSVpv(lcbuf->grouping, 0), 0); -#endif - if (lcbuf->int_curr_symbol && *lcbuf->int_curr_symbol) - (void) hv_store(RETVAL, "int_curr_symbol", 15, - newSVpv(lcbuf->int_curr_symbol, 0), 0); - if (lcbuf->currency_symbol && *lcbuf->currency_symbol) - (void) hv_store(RETVAL, "currency_symbol", 15, - newSVpv(lcbuf->currency_symbol, 0), 0); - if (lcbuf->mon_decimal_point && *lcbuf->mon_decimal_point) - (void) hv_store(RETVAL, "mon_decimal_point", 17, - newSVpv(lcbuf->mon_decimal_point, 0), 0); -#ifndef NO_LOCALECONV_MON_THOUSANDS_SEP - if (lcbuf->mon_thousands_sep && *lcbuf->mon_thousands_sep) - (void) hv_store(RETVAL, "mon_thousands_sep", 17, - newSVpv(lcbuf->mon_thousands_sep, 0), 0); -#endif -#ifndef NO_LOCALECONV_MON_GROUPING - if (lcbuf->mon_grouping && *lcbuf->mon_grouping) - (void) hv_store(RETVAL, "mon_grouping", 12, - newSVpv(lcbuf->mon_grouping, 0), 0); -#endif - if (lcbuf->positive_sign && *lcbuf->positive_sign) - (void) hv_store(RETVAL, "positive_sign", 13, - newSVpv(lcbuf->positive_sign, 0), 0); - if (lcbuf->negative_sign && *lcbuf->negative_sign) - (void) hv_store(RETVAL, "negative_sign", 13, - newSVpv(lcbuf->negative_sign, 0), 0); - /* the integers */ - if (lcbuf->int_frac_digits != CHAR_MAX) - (void) hv_store(RETVAL, "int_frac_digits", 15, - newSViv(lcbuf->int_frac_digits), 0); - if (lcbuf->frac_digits != CHAR_MAX) - (void) hv_store(RETVAL, "frac_digits", 11, - newSViv(lcbuf->frac_digits), 0); - if (lcbuf->p_cs_precedes != CHAR_MAX) - (void) hv_store(RETVAL, "p_cs_precedes", 13, - newSViv(lcbuf->p_cs_precedes), 0); - if (lcbuf->p_sep_by_space != CHAR_MAX) - (void) hv_store(RETVAL, "p_sep_by_space", 14, - newSViv(lcbuf->p_sep_by_space), 0); - if (lcbuf->n_cs_precedes != CHAR_MAX) - (void) hv_store(RETVAL, "n_cs_precedes", 13, - newSViv(lcbuf->n_cs_precedes), 0); - if (lcbuf->n_sep_by_space != CHAR_MAX) - (void) hv_store(RETVAL, "n_sep_by_space", 14, - newSViv(lcbuf->n_sep_by_space), 0); - if (lcbuf->p_sign_posn != CHAR_MAX) - (void) hv_store(RETVAL, "p_sign_posn", 11, - newSViv(lcbuf->p_sign_posn), 0); - if (lcbuf->n_sign_posn != CHAR_MAX) - (void) hv_store(RETVAL, "n_sign_posn", 11, - newSViv(lcbuf->n_sign_posn), 0); + const struct lconv_offset *strings = lconv_strings; + const struct lconv_offset *integers = lconv_integers; + const char *ptr = (const char *) lcbuf; + + do { + const char *value = *((const char **)(ptr + strings->offset)); + + if (value && *value) + (void) hv_store(RETVAL, strings->name, strlen(strings->name), + newSVpv(value, 0), 0); + } while ((++strings)->name); + + do { + const char value = *((const char *)(ptr + integers->offset)); + + if (value != CHAR_MAX) + (void) hv_store(RETVAL, integers->name, + strlen(integers->name), newSViv(value), 0); + } while ((++integers)->name); } #else localeconv(); /* A stub to call not_here(). */ @@ -1291,26 +1159,50 @@ setlocale(category, locale = 0) NV acos(x) NV x - -NV -asin(x) - NV x - -NV -atan(x) - NV x - -NV -ceil(x) - NV x - -NV -cosh(x) - NV x - -NV -floor(x) - NV x + ALIAS: + asin = 1 + atan = 2 + ceil = 3 + cosh = 4 + floor = 5 + log10 = 6 + sinh = 7 + tan = 8 + tanh = 9 + CODE: + switch (ix) { + case 0: + RETVAL = acos(x); + break; + case 1: + RETVAL = asin(x); + break; + case 2: + RETVAL = atan(x); + break; + case 3: + RETVAL = ceil(x); + break; + case 4: + RETVAL = cosh(x); + break; + case 5: + RETVAL = floor(x); + break; + case 6: + RETVAL = log10(x); + break; + case 7: + RETVAL = sinh(x); + break; + case 8: + RETVAL = tan(x); + break; + default: + RETVAL = tanh(x); + } + OUTPUT: + RETVAL NV fmod(x,y) @@ -1331,10 +1223,6 @@ ldexp(x,exp) NV x int exp -NV -log10(x) - NV x - void modf(x) NV x @@ -1344,18 +1232,6 @@ modf(x) PUSHs(sv_2mortal(newSVnv(Perl_modf(x,&intvar)))); PUSHs(sv_2mortal(newSVnv(intvar))); -NV -sinh(x) - NV x - -NV -tan(x) - NV x - -NV -tanh(x) - NV x - SysRet sigaction(sig, optaction, oldaction = 0) int sig @@ -1459,12 +1335,12 @@ sigaction(sig, optaction, oldaction = 0) /* Get back the mask. */ svp = hv_fetchs(oldaction, "MASK", TRUE); if (sv_isa(*svp, "POSIX::SigSet")) { - IV tmp = SvIV((SV*)SvRV(*svp)); - sigset = INT2PTR(sigset_t*, tmp); + sigset = (sigset_t *) SvPV_nolen(SvRV(*svp)); } else { - Newx(sigset, 1, sigset_t); - sv_setptrobj(*svp, sigset, "POSIX::SigSet"); + sigset = (sigset_t *) allocate_struct(aTHX_ *svp, + sizeof(sigset_t), + "POSIX::SigSet"); } *sigset = oact.sa_mask; @@ -1518,8 +1394,7 @@ sigaction(sig, optaction, oldaction = 0) /* Set up any desired mask. */ svp = hv_fetchs(action, "MASK", FALSE); if (svp && sv_isa(*svp, "POSIX::SigSet")) { - IV tmp = SvIV((SV*)SvRV(*svp)); - sigset = INT2PTR(sigset_t*, tmp); + sigset = (sigset_t *) SvPV_nolen(SvRV(*svp)); act.sa_mask = *sigset; } else @@ -1550,6 +1425,12 @@ sigaction(sig, optaction, oldaction = 0) SysRet sigpending(sigset) POSIX::SigSet sigset + ALIAS: + sigsuspend = 1 + CODE: + RETVAL = ix ? sigsuspend(sigset) : sigpending(sigset); + OUTPUT: + RETVAL SysRet sigprocmask(how, sigset, oldsigset = 0) @@ -1560,8 +1441,7 @@ INIT: if (! SvOK(ST(1))) { sigset = NULL; } else if (sv_isa(ST(1), "POSIX::SigSet")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - sigset = INT2PTR(POSIX__SigSet,tmp); + sigset = (sigset_t *) SvPV_nolen(SvRV(ST(1))); } else { croak("sigset is not of type POSIX::SigSet"); } @@ -1569,28 +1449,15 @@ INIT: if (items < 3 || ! SvOK(ST(2))) { oldsigset = NULL; } else if (sv_isa(ST(2), "POSIX::SigSet")) { - IV tmp = SvIV((SV*)SvRV(ST(2))); - oldsigset = INT2PTR(POSIX__SigSet,tmp); + oldsigset = (sigset_t *) SvPV_nolen(SvRV(ST(2))); } else { croak("oldsigset is not of type POSIX::SigSet"); } -SysRet -sigsuspend(signal_mask) - POSIX::SigSet signal_mask - void _exit(status) int status -SysRet -close(fd) - int fd - -SysRet -dup(fd) - int fd - SysRet dup2(fd1, fd2) int fd1 @@ -1824,34 +1691,45 @@ SysRet mkfifo(filename, mode) char * filename Mode_t mode + ALIAS: + access = 1 CODE: - TAINT_PROPER("mkfifo"); - RETVAL = mkfifo(filename, mode); + if(ix) { + RETVAL = access(filename, mode); + } else { + TAINT_PROPER("mkfifo"); + RETVAL = mkfifo(filename, mode); + } OUTPUT: RETVAL SysRet tcdrain(fd) int fd + ALIAS: + close = 1 + dup = 2 + CODE: + RETVAL = ix == 1 ? close(fd) + : (ix < 1 ? tcdrain(fd) : dup(fd)); + OUTPUT: + RETVAL SysRet tcflow(fd, action) int fd int action + ALIAS: + tcflush = 1 + tcsendbreak = 2 + CODE: + RETVAL = ix == 1 ? tcflush(fd, action) + : (ix < 1 ? tcflow(fd, action) : tcsendbreak(fd, action)); + OUTPUT: + RETVAL - -SysRet -tcflush(fd, queue_selector) - int fd - int queue_selector - -SysRet -tcsendbreak(fd, duration) - int fd - int duration - -char * +void asctime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1) int sec int min @@ -1862,8 +1740,11 @@ asctime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1) int wday int yday int isdst - CODE: + ALIAS: + mktime = 1 + PPCODE: { + dXSTARG; struct tm mytm; init_tm(&mytm); /* XXX workaround - see init_tm() above */ mytm.tm_sec = sec; @@ -1875,10 +1756,20 @@ asctime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1) mytm.tm_wday = wday; mytm.tm_yday = yday; mytm.tm_isdst = isdst; - RETVAL = asctime(&mytm); + if (ix) { + const long result = mktime(&mytm); + if (result == -1) + SvOK_off(TARG); + else if (result == 0) + sv_setpvn(TARG, "0 but true", 10); + else + sv_setiv(TARG, (IV)result); + } else { + sv_setpv(TARG, asctime(&mytm)); + } + ST(0) = TARG; + XSRETURN(1); } - OUTPUT: - RETVAL long clock() @@ -1905,35 +1796,6 @@ difftime(time1, time2) Time_t time1 Time_t time2 -SysRetLong -mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1) - int sec - int min - int hour - int mday - int mon - int year - int wday - int yday - int isdst - CODE: - { - struct tm mytm; - init_tm(&mytm); /* XXX workaround - see init_tm() above */ - mytm.tm_sec = sec; - mytm.tm_min = min; - mytm.tm_hour = hour; - mytm.tm_mday = mday; - mytm.tm_mon = mon; - mytm.tm_year = year; - mytm.tm_wday = wday; - mytm.tm_yday = yday; - mytm.tm_isdst = isdst; - RETVAL = (SysRetLong) mktime(&mytm); - } - OUTPUT: - RETVAL - #XXX: if $xsubpp::WantOptimize is always the default # sv_setpv(TARG, ...) could be used rather than # ST(0) = sv_2mortal(newSVpv(...)) @@ -1974,11 +1836,6 @@ tzname() PUSHs(newSVpvn_flags(tzname[0], strlen(tzname[0]), SVs_TEMP)); PUSHs(newSVpvn_flags(tzname[1], strlen(tzname[1]), SVs_TEMP)); -SysRet -access(filename, mode) - char * filename - Mode_t mode - char * ctermid(s = 0) char * s = 0; diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm index 75785f81e9f..d90794df3eb 100644 --- a/ext/POSIX/lib/POSIX.pm +++ b/ext/POSIX/lib/POSIX.pm @@ -4,7 +4,7 @@ use warnings; our ($AUTOLOAD, %SIGRT); -our $VERSION = '1.25'; +our $VERSION = '1.26'; require XSLoader; @@ -94,7 +94,7 @@ my %replacement = ( setvbuf => 'IO::Handle::setvbuf', siglongjmp => 'die', sigsetjmp => 'eval {}', - srand => \'not supplied, refer to Perl\'s srand documentation', + srand => \'not supplied; refer to Perl\'s srand documentation', sscanf => 'regular expressions', strcat => '.=', strchr => 'index()', @@ -211,7 +211,7 @@ sub AUTOLOAD { unless defined $how; croak "Unimplemented: POSIX::$func() is $$how" if ref $how; croak "Use method $how() instead of POSIX::$func()" if $how =~ /::/; - croak "Unimplemented: POSIX::$func() is C-specific, use $how instead"; + croak "Unimplemented: POSIX::$func() is C-specific: use $how instead"; } constant($func); diff --git a/ext/POSIX/t/math.t b/ext/POSIX/t/math.t index e04cc302c18..bf0c2decc4a 100644 --- a/ext/POSIX/t/math.t +++ b/ext/POSIX/t/math.t @@ -3,17 +3,37 @@ use strict; use POSIX; -use Test::More tests => 14; +use Test::More; # These tests are mainly to make sure that these arithmetic functions # exist and are accessible. They are not meant to be an exhaustive # test for the interface. +sub between { + my ($low, $have, $high, $desc) = @_; + local $Test::Builder::Level = $Test::Builder::Level + 1; + + cmp_ok($have, '>=', $low, $desc); + cmp_ok($have, '<=', $high, $desc); +} + is(acos(1), 0, "Basic acos(1) test"); +between(3.14, acos(-1), 3.15, 'acos(-1)'); +between(1.57, acos(0), 1.58, 'acos(0)'); is(asin(0), 0, "Basic asin(0) test"); +cmp_ok(asin(1), '>', 1.57, "Basic asin(1) test"); +cmp_ok(asin(-1), '<', -1.57, "Basic asin(-1) test"); +cmp_ok(asin(1), '==', -asin(-1), 'asin(1) == -asin(-1)'); is(atan(0), 0, "Basic atan(0) test"); +between(0.785, atan(1), 0.786, 'atan(1)'); +between(-0.786, atan(-1), -0.785, 'atan(-1)'); +cmp_ok(atan(1), '==', -atan(-1), 'atan(1) == -atan(-1)'); is(cosh(0), 1, "Basic cosh(0) test"); +between(1.54, cosh(1), 1.55, 'cosh(1)'); +between(1.54, cosh(-1), 1.55, 'cosh(-1)'); +is(cosh(1), cosh(-1), 'cosh(1) == cosh(-1)'); is(floor(1.23441242), 1, "Basic floor(1.23441242) test"); +is(floor(-1.23441242), -2, "Basic floor(-1.23441242) test"); is(fmod(3.5, 2.0), 1.5, "Basic fmod(3.5, 2.0) test"); is(join(" ", frexp(1)), "0.5 1", "Basic frexp(1) test"); is(ldexp(0,1), 0, "Basic ldexp(0,1) test"); @@ -21,5 +41,15 @@ is(log10(1), 0, "Basic log10(1) test"); is(log10(10), 1, "Basic log10(10) test"); is(join(" ", modf(1.76)), "0.76 1", "Basic modf(1.76) test"); is(sinh(0), 0, "Basic sinh(0) test"); +between(1.17, sinh(1), 1.18, 'sinh(1)'); +between(-1.18, sinh(-1), -1.17, 'sinh(-1)'); is(tan(0), 0, "Basic tan(0) test"); +between(1.55, tan(1), 1.56, 'tan(1)'); +between(1.55, tan(1), 1.56, 'tan(-1)'); +cmp_ok(tan(1), '==', -tan(-1), 'tan(1) == -tan(-1)'); is(tanh(0), 0, "Basic tanh(0) test"); +between(0.76, tanh(1), 0.77, 'tanh(1)'); +between(-0.77, tanh(-1), -0.76, 'tanh(-1)'); +cmp_ok(tanh(1), '==', -tanh(-1), 'tanh(1) == -tanh(-1)'); + +done_testing(); diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t index c60a5ac37da..a5585e0561a 100644 --- a/ext/POSIX/t/posix.t +++ b/ext/POSIX/t/posix.t @@ -8,10 +8,10 @@ BEGIN { } } -use Test::More tests => 66; +use Test::More tests => 106; use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write - errno); + errno localeconv dup dup2 lseek access); use strict 'subs'; sub next_test { @@ -51,8 +51,8 @@ if ($Is_VMS) { } - -ok( $testfd = open("Makefile.PL", O_RDONLY, 0), 'O_RDONLY with open' ); +my $testfd = open("Makefile.PL", O_RDONLY, 0); +like($testfd, qr/\A\d+\z/, 'O_RDONLY with open'); read($testfd, $buffer, 4) if $testfd > 2; is( $buffer, "# Ex", ' with read' ); @@ -64,22 +64,22 @@ TODO: is( $buffer[1], "perl\n", ' read to array element' ); } -write(1,"ok 4\nnot ok 4\n", 5); -next_test(); +my $test = next_test(); +write(1,"ok $test\nnot ok $test\n", 5); SKIP: { skip("no pipe() support on DOS", 2) if $Is_Dos; @fds = POSIX::pipe(); - ok( $fds[0] > $testfd, 'POSIX::pipe' ); + cmp_ok($fds[0], '>', $testfd, 'POSIX::pipe'); CORE::open($reader = \*READER, "<&=".$fds[0]); CORE::open($writer = \*WRITER, ">&=".$fds[1]); - print $writer "ok 6\n"; + my $test = next_test(); + print $writer "ok $test\n"; close $writer; print <$reader>; close $reader; - next_test(); } SKIP: { @@ -144,7 +144,8 @@ SKIP: { skip("_POSIX_OPEN_MAX is inaccurate on MPE", 1) if $Is_MPE; skip("_POSIX_OPEN_MAX undefined ($fds[1])", 1) unless &_POSIX_OPEN_MAX; - ok( &_POSIX_OPEN_MAX >= 16, "The minimum allowed values according to susv2" ); + cmp_ok(&_POSIX_OPEN_MAX, '>=', 16, + "The minimum allowed values according to susv2" ); } @@ -160,13 +161,14 @@ like( getcwd(), qr/$pat/, 'getcwd' ); # Check string conversion functions. SKIP: { - skip("strtod() not present", 1) unless $Config{d_strtod}; + skip("strtod() not present", 2) unless $Config{d_strtod}; $lc = &POSIX::setlocale(&POSIX::LC_NUMERIC, 'C') if $Config{d_setlocale}; # we're just checking that strtod works, not how accurate it is ($n, $x) = &POSIX::strtod('3.14159_OR_SO'); - ok((abs("3.14159" - $n) < 1e-6) && ($x == 6), 'strtod works'); + cmp_ok(abs("3.14159" - $n), '<', 1e-6, 'strtod works'); + is($x, 6, 'strtod works'); &POSIX::setlocale(&POSIX::LC_NUMERIC, $lc) if $Config{d_setlocale}; } @@ -188,14 +190,14 @@ SKIP: { } # Pick up whether we're really able to dynamically load everything. -ok( &POSIX::acos(1.0) == 0.0, 'dynamic loading' ); +cmp_ok(&POSIX::acos(1.0), '==', 0.0, 'dynamic loading'); # This can coredump if struct tm has a timezone field and we # didn't detect it. If this fails, try adding # -DSTRUCT_TM_HASZONE to your cflags when compiling ext/POSIX/POSIX.c. # See ext/POSIX/hints/sunos_4.pl and ext/POSIX/hints/linux.pl -print POSIX::strftime("ok 21 # %H:%M, on %m/%d/%y\n", localtime()); -next_test(); +$test = next_test(); +print POSIX::strftime("ok $test # %H:%M, on %m/%d/%y\n", localtime()); # If that worked, validate the mini_mktime() routine's normalisation of # input fields to strftime(). @@ -297,7 +299,84 @@ ok( POSIX::isprint([]), 'isprint []' ); eval { use strict; POSIX->import("S_ISBLK"); my $x = S_ISBLK }; unlike( $@, qr/Can't use string .* as a symbol ref/, "Can import autoloaded constants" ); - + +SKIP: { + skip("localeconv() not present", 20) unless $Config{d_locconv}; + my $conv = localeconv; + is(ref $conv, 'HASH', 'localconv returns a hash reference'); + + foreach (qw(decimal_point thousands_sep grouping int_curr_symbol + currency_symbol mon_decimal_point mon_thousands_sep + mon_grouping positive_sign negative_sign)) { + SKIP: { + skip("localeconv has no result for $_", 1) + unless exists $conv->{$_}; + unlike(delete $conv->{$_}, qr/\A\z/, + "localeconv returned a non-empty string for $_"); + } + } + + foreach (qw(int_frac_digits frac_digits p_cs_precedes p_sep_by_space + n_cs_precedes n_sep_by_space p_sign_posn n_sign_posn)) { + SKIP: { + skip("localeconv has no result for $_", 1) + unless exists $conv->{$_}; + like(delete $conv->{$_}, qr/\A-?\d+\z/, + "localeconv returned an integer for $_"); + } + } + is_deeply([%$conv], [], 'no unexpected keys returned by localeconv'); +} + +my $fd1 = open("Makefile.PL", O_RDONLY, 0); +like($fd1, qr/\A\d+\z/, 'O_RDONLY with open'); +cmp_ok($fd1, '>', $testfd); +my $fd2 = dup($fd1); +like($fd2, qr/\A\d+\z/, 'dup'); +cmp_ok($fd2, '>', $fd1); +is(POSIX::close($fd1), '0 but true', 'close'); +is(POSIX::close($testfd), '0 but true', 'close'); +$! = 0; +undef $buffer; +is(read($fd1, $buffer, 4), undef, 'read on closed file handle fails'); +cmp_ok($!, '==', POSIX::EBADF); +undef $buffer; +read($fd2, $buffer, 4) if $fd2 > 2; +is($buffer, "# Ex", 'read'); +# The descriptor $testfd was using is now free, and is lower than that which +# $fd1 was using. Hence if dup2() behaves as dup(), we'll know :-) +{ + local $TODO; + $TODO = "dup2's return value is not correct on $^O" + if $Is_W32; + $testfd = dup2($fd2, $fd1); + is($testfd, $fd1, 'dup2'); + undef $buffer; + read($testfd, $buffer, 4) if $testfd > 2; + is($buffer, 'pect', 'read'); + is(lseek($testfd, 0, 0), 0, 'lseek back'); + # The two should share file position: + undef $buffer; + read($fd2, $buffer, 4) if $fd2 > 2; + is($buffer, "# Ex", 'read'); +} + +# The FreeBSD man page warns: +# The access() system call is a potential security hole due to race +# conditions and should never be used. +is(access('Makefile.PL', POSIX::F_OK), '0 but true', 'access'); +is(access('Makefile.PL', POSIX::R_OK), '0 but true', 'access'); +$! = 0; +is(access('no such file', POSIX::F_OK), undef, 'access on missing file'); +cmp_ok($!, '==', POSIX::ENOENT); +is(access('Makefile.PL/nonsense', POSIX::F_OK), undef, + 'access on not-a-directory'); +SKIP: { + skip("$^O is insufficiently POSIX", 1) + if $Is_W32 || $Is_VMS; + cmp_ok($!, '==', POSIX::ENOTDIR); +} + # Check that output is not flushed by _exit. This test should be last # in the file, and is not counted in the total number of tests. if ($^O eq 'vos') { diff --git a/ext/POSIX/t/sigaction.t b/ext/POSIX/t/sigaction.t index 81d699d9206..1d0315f0942 100644 --- a/ext/POSIX/t/sigaction.t +++ b/ext/POSIX/t/sigaction.t @@ -11,7 +11,7 @@ BEGIN{ } } -use Test::More tests => 32; +use Test::More tests => 33; use strict; use vars qw/$bad $bad7 $ok10 $bad18 $ok/; @@ -19,15 +19,15 @@ use vars qw/$bad $bad7 $ok10 $bad18 $ok/; $^W=1; sub IGNORE { - $bad7=1; + ++$bad7; } sub DEFAULT { - $bad18=1; + ++$bad18; } sub foo { - $ok=1; + ++$ok; } my $newaction=POSIX::SigAction->new('::foo', new POSIX::SigSet(SIGUSR1), 0); @@ -37,11 +37,10 @@ my $oldaction=POSIX::SigAction->new('::bar', new POSIX::SigSet(), 0); my $bad; local($SIG{__WARN__})=sub { $bad=1; }; sigaction(SIGHUP, $newaction, $oldaction); - ok(!$bad, "no warnings"); + is($bad, undef, "no warnings"); } -ok($oldaction->{HANDLER} eq 'DEFAULT' || - $oldaction->{HANDLER} eq 'IGNORE', $oldaction->{HANDLER}); +like($oldaction->{HANDLER}, qr/\A(?:DEFAULT|IGNORE)\z/, '$oldaction->{HANDLER}'); is($SIG{HUP}, '::foo'); @@ -59,19 +58,19 @@ SKIP: { $newaction=POSIX::SigAction->new('IGNORE'); sigaction(SIGHUP, $newaction); kill 'HUP', $$; -ok(!$bad, "SIGHUP ignored"); +is($bad, undef, "SIGHUP ignored"); is($SIG{HUP}, 'IGNORE'); sigaction(SIGHUP, POSIX::SigAction->new('DEFAULT')); is($SIG{HUP}, 'DEFAULT'); -$newaction=POSIX::SigAction->new(sub { $ok10=1; }); +$newaction=POSIX::SigAction->new(sub { ++$ok10; }); sigaction(SIGHUP, $newaction); { local($^W)=0; kill 'HUP', $$; } -ok($ok10, "SIGHUP handler called"); +is($ok10, 1, "SIGHUP handler called"); is(ref($SIG{HUP}), 'CODE'); @@ -83,13 +82,14 @@ eval { sigaction(SIGINT, $act); }; kill 'HUP', $$; -ok($ok, "signal mask gets restored after croak"); +is($ok, 1, "signal mask gets restored after croak"); undef $ok; # Make sure the signal mask gets restored after sigaction returns early. my $x=defined sigaction(SIGKILL, $newaction, $oldaction); kill 'HUP', $$; -ok(!$x && $ok, "signal mask gets restored after early return"); +is($x, '', "signal mask gets restored after early return"); +is($ok, 1, "signal mask gets restored after early return"); $SIG{HUP}=sub {}; sigaction(SIGHUP, $newaction, $oldaction); @@ -98,22 +98,23 @@ is(ref($oldaction->{HANDLER}), 'CODE'); eval { sigaction(SIGHUP, undef, $oldaction); }; -ok(!$@, "undef for new action"); +is($@, '', "undef for new action"); eval { sigaction(SIGHUP, 0, $oldaction); }; -ok(!$@, "zero for new action"); +is($@, '', "zero for new action"); eval { sigaction(SIGHUP, bless({},'Class'), $oldaction); }; -ok($@, "any object not good as new action"); +like($@, qr/\Aaction is not of type POSIX::SigAction/, + 'any object not good as new action'); SKIP: { skip("SIGCONT not trappable in $^O", 1) if ($^O eq 'VMS'); - $newaction=POSIX::SigAction->new(sub { $ok10=1; }); + $newaction=POSIX::SigAction->new(sub { ++$ok10; }); if (eval { SIGCONT; 1 }) { sigaction(SIGCONT, POSIX::SigAction->new('DEFAULT')); { @@ -121,7 +122,7 @@ SKIP: { kill 'CONT', $$; } } - ok(!$bad18, "SIGCONT trappable"); + is($bad18, undef, "SIGCONT trappable"); } { @@ -134,7 +135,7 @@ SKIP: { sub hup21 { $hup21++ } sigaction("FOOBAR", $newaction); - ok(1, "no coredump, still alive"); + pass("no coredump, still alive"); $newaction = POSIX::SigAction->new("hup20"); sigaction("SIGHUP", $newaction); @@ -171,7 +172,7 @@ ok($oldaction->safe, "SigAction can be safe"); # And safe signal delivery must work $ok = 0; kill 'HUP', $$; -ok($ok, "safe signal delivery must work"); +is($ok, 1, "safe signal delivery must work"); SKIP: { eval 'use POSIX qw(%SIGRT SIGRTMIN SIGRTMAX); scalar %SIGRT + SIGRTMIN() + SIGRTMAX()'; @@ -179,7 +180,7 @@ SKIP: { || SIGRTMIN() < 0 || SIGRTMAX() < 0 # HP-UX 10.20 exports both as -1 || SIGRTMIN() > $Config{sig_count} # AIX 4.3.3 exports bogus 888 and 999 and skip("no SIGRT signals", 4); - ok(SIGRTMAX() > SIGRTMIN(), "SIGRTMAX > SIGRTMIN"); + cmp_ok(SIGRTMAX(), '>', SIGRTMIN(), "SIGRTMAX > SIGRTMIN"); is(scalar %SIGRT, SIGRTMAX() - SIGRTMIN() + 1, "scalar SIGRT"); my $sigrtmin; my $h = sub { $sigrtmin = 1 }; diff --git a/ext/POSIX/t/sigset.t b/ext/POSIX/t/sigset.t new file mode 100644 index 00000000000..e65e4076b4a --- /dev/null +++ b/ext/POSIX/t/sigset.t @@ -0,0 +1,96 @@ +#!./perl -w + +use strict; +use Test::More; +use Config; + +plan(skip_all => "POSIX is unavailable") + unless $Config{extensions} =~ /\bPOSIX\b/; +plan(skip_all => "sigemptyset is unavailable on $^O") + if $^O eq 'MSWin32' || $^O eq 'NetWare'; + +require POSIX; +POSIX->import(); + +my @signo; +my ($min, $max) = (~0, -1); + +sub expected_signals { + my $sigset = shift; + my $desc = shift; + my %expected; + ++$expected{$_} foreach @_; + + local $Test::Builder::Level = $Test::Builder::Level + 1; + + for my $sig ($min..$max) { + if ($expected{$sig}) { + cmp_ok($sigset->ismember($sig), '==', 1, + "$desc - sig $sig is a member"); + } else { + cmp_ok($sigset->ismember($sig), '==', 0, + "$desc - sig $sig is not a member"); + } + } +} + +foreach (@POSIX::EXPORT) { + next unless /^SIG[A-Z0-9]+$/; + my $val = eval "POSIX::$_"; + next unless defined $val; + $min = $val if $min > $val; + $max = $val if $max < $val; + push @signo, $val; +} + +# Sanity check that we found something: +cmp_ok(scalar @signo, '>=', 6, + 'found at least 6 signals (6 are named in the ANSI C spec)'); + +my $sigset = POSIX::SigSet->new(); +isa_ok($sigset, 'POSIX::SigSet', 'checking the type of the object'); +expected_signals($sigset, 'new object'); + +is($sigset->fillset(), '0 but true', 'fillset'); +# because on some systems, not all integers are valid signals... +# so the only thing we can really be confident about is that all the signals +# with names are going to be present: +foreach (@signo) { + cmp_ok($sigset->ismember($_), '==', 1, "after fillset sig $_ is a member"); +} +is($sigset->emptyset(), '0 but true', 'empyset'); +expected_signals($sigset, 'after emptyset'); + +is($sigset->addset($signo[1]), '0 but true', 'addset'); +expected_signals($sigset, 'after addset', $signo[1]); +is($sigset->addset($signo[2]), '0 but true', 'addset'); +expected_signals($sigset, 'after addset', $signo[1], $signo[2]); +is($sigset->addset($signo[4]), '0 but true', 'addset'); +expected_signals($sigset, 'after addset', $signo[1], $signo[2], $signo[4]); +is($sigset->addset($signo[2]), '0 but true', 'addset'); +expected_signals($sigset, 'after addset', $signo[1], $signo[2], $signo[4]); +is($sigset->delset($signo[4]), '0 but true', 'delset'); +expected_signals($sigset, 'after addset', $signo[1], $signo[2]); +is($sigset->addset($signo[0]), '0 but true', 'addset'); +expected_signals($sigset, 'after addset', $signo[0], $signo[1], $signo[2]); +is($sigset->delset($signo[4]), '0 but true', 'delset'); +expected_signals($sigset, 'after delset', $signo[0], $signo[1], $signo[2]); +is($sigset->delset($signo[1]), '0 but true', 'delset'); +expected_signals($sigset, 'after delset', $signo[0], $signo[2]); +is($sigset->delset($signo[0]), '0 but true', 'delset'); +expected_signals($sigset, 'after addset', $signo[2]); +is($sigset->delset($signo[2]), '0 but true', 'delset'); +expected_signals($sigset, 'empty again'); + +foreach ([$signo[0]], + [$signo[2]], + [$signo[3]], + [@signo[2,3,6]], + ) { + $sigset = POSIX::SigSet->new(@$_); + isa_ok($sigset, 'POSIX::SigSet', 'checking the type of the object'); + local $" = ', '; + expected_signals($sigset, "new(@$_)", @$_); +} + +done_testing(); diff --git a/ext/POSIX/t/sysconf.t b/ext/POSIX/t/sysconf.t index 2dc97629778..8008996b637 100644 --- a/ext/POSIX/t/sysconf.t +++ b/ext/POSIX/t/sysconf.t @@ -9,7 +9,6 @@ BEGIN { use strict; use File::Spec; use POSIX; -use Scalar::Util qw(looks_like_number); sub check(@) { grep { eval "&$_;1" or $@!~/vendor has not defined POSIX macro/ } @_ @@ -54,22 +53,22 @@ my $r; my $TTY = "/dev/tty"; sub _check_and_report { - my ($eval_status, $return_val, $description) = @_; - my $success = defined($return_val) || $! == 0; - is( $eval_status, '', $description ); + my ($sub, $constant, $description) = @_; + $! = 0; + my $return_val = eval {$sub->(eval "$constant()")}; + my $errno = $!; # Grab this before anything else changes it. + is($@, '', $description); SKIP: { skip "terminal constants set errno on QNX", 1 if $^O eq 'nto' and $description =~ $TTY; - ok( $success, "\tchecking that the returned value is defined (" - . (defined($return_val) ? "yes, it's $return_val)" : "it isn't)" - . " or that errno is clear (" - . (!($!+0) ? "it is)" : "it isn't, it's $!)")) - ); + cmp_ok($errno, '==', 0, 'errno should be clear in all cases') + or diag("\$!: $errno"); } SKIP: { skip "constant not implemented on $^O or no limit in effect", 1 if !defined($return_val); - ok( looks_like_number($return_val), "\tchecking that the returned value looks like a number" ); + like($return_val, qr/\A(?:-?[1-9][0-9]*|0 but true)\z/, + 'the returned value should be a signed integer'); } } @@ -80,9 +79,8 @@ SKIP: { 3 * @path_consts; for my $constant (@path_consts) { - $! = 0; - $r = eval { fpathconf( $fd, eval "$constant()" ) }; - _check_and_report( $@, $r, "calling fpathconf($fd, $constant) " ); + _check_and_report(sub { fpathconf($fd, shift) }, $constant, + "calling fpathconf($fd, $constant)"); } POSIX::close($fd); @@ -90,9 +88,8 @@ SKIP: { # testing pathconf() on a non-terminal file for my $constant (@path_consts) { - $! = 0; - $r = eval { pathconf( $testdir, eval "$constant()" ) }; - _check_and_report( $@, $r, qq[calling pathconf("$testdir", $constant)] ); + _check_and_report(sub { pathconf($testdir, shift) }, $constant, + "calling pathconf('$testdir', $constant)"); } SKIP: { @@ -109,17 +106,15 @@ SKIP: { # testing fpathconf() on a terminal file for my $constant (@path_consts_terminal) { - $! = 0; - $r = eval { fpathconf( $fd, eval "$constant()" ) }; - _check_and_report( $@, $r, qq[calling fpathconf($fd, $constant) ($TTY)] ); + _check_and_report(sub { fpathconf($fd, shift) }, $constant, + "calling fpathconf($fd, $constant) ($TTY)"); } close($fd); # testing pathconf() on a terminal file for my $constant (@path_consts_terminal) { - $! = 0; - $r = eval { pathconf( $TTY, eval "$constant()" ) }; - _check_and_report( $@, $r, qq[calling pathconf($TTY, $constant)] ); + _check_and_report(sub { pathconf($TTY, shift) }, $constant, + "calling pathconf($TTY, $constant)"); } } @@ -134,9 +129,8 @@ SKIP: { or skip("could not open $fifo ($!)", 3 * @path_consts_fifo); for my $constant (@path_consts_fifo) { - $! = 0; - $r = eval { fpathconf( $fd, eval "$constant()" ) }; - _check_and_report( $@, $r, "calling fpathconf($fd, $constant) ($fifo)" ); + _check_and_report(sub { fpathconf($fd, shift) }, $constant, + "calling fpathconf($fd, $constant) ($fifo)"); } POSIX::close($fd); @@ -144,9 +138,8 @@ SKIP: { # testing pathconf() on a fifo file for my $constant (@path_consts_fifo) { - $! = 0; - $r = eval { pathconf( $fifo, eval "$constant()" ) }; - _check_and_report( $@, $r, qq[calling pathconf($fifo, $constant)] ); + _check_and_report(sub { pathconf($fifo, shift) }, $constant, + "calling pathconf($fifo, $constant"); } } @@ -163,8 +156,6 @@ SKIP: { } # testing sysconf() for my $constant (@sys_consts) { - $! = 0; - $r = eval { sysconf( eval "$constant()" ) }; - _check_and_report( $@, $r, "calling sysconf($constant)" ); + _check_and_report(sub {sysconf(shift)}, $constant, + "calling sysconf($constant)"); } - diff --git a/ext/POSIX/t/termios.t b/ext/POSIX/t/termios.t index 7c3deb66782..380bee678b7 100644 --- a/ext/POSIX/t/termios.t +++ b/ext/POSIX/t/termios.t @@ -1,66 +1,179 @@ -#!perl -T +#!perl -Tw -BEGIN { - use Config; - use Test::More; - plan skip_all => "POSIX is unavailable" - if $Config{'extensions'} !~ m!\bPOSIX\b!; -} use strict; -use POSIX; +use Config; +use Test::More; + BEGIN { - plan skip_all => "POSIX::Termios not implemented" - if !eval "POSIX::Termios->new;1" - and $@=~/not implemented/; + plan skip_all => "POSIX is unavailable" + if $Config{extensions} !~ m!\bPOSIX\b!; } +use POSIX ':termios_h'; -my @getters = qw(getcflag getiflag getispeed getlflag getoflag getospeed); +plan skip_all => $@ + if !eval "POSIX::Termios->new; 1" && $@ =~ /termios not implemented/; -plan tests => 3 + 2 * (3 + NCCS() + @getters); -my $r; +# A termios struct that we've successfully read from a terminal device: +my $termios; -# create a new object -my $termios = eval { POSIX::Termios->new }; -is( $@, '', "calling POSIX::Termios->new" ); -ok( defined $termios, "\tchecking if the object is defined" ); -isa_ok( $termios, "POSIX::Termios", "\tchecking the type of the object" ); +foreach (undef, qw(STDIN STDOUT STDERR)) { + SKIP: + { + my ($name, $handle); + if (defined $_) { + $name = $_; + $handle = $::{$name}; + } else { + $name = POSIX::ctermid(); + skip("Can't get name of controlling terminal", 4) + unless defined $name; + open $handle, '<', $name or skip("can't open $name: $!", 4); + } -# testing getattr() + skip("$name not a tty", 4) unless -t $handle; -SKIP: { - -t STDIN or skip("STDIN not a tty", 2); - $r = eval { $termios->getattr(0) }; - is( $@, '', "calling getattr(0)" ); - ok( defined $r, "\tchecking if the returned value is defined: $r" ); -} + my $t = eval { POSIX::Termios->new }; + is($@, '', "calling POSIX::Termios->new"); + isa_ok($t, "POSIX::Termios", "checking the type of the object"); -SKIP: { - -t STDOUT or skip("STDOUT not a tty", 2); - $r = eval { $termios->getattr(1) }; - is( $@, '', "calling getattr(1)" ); - ok( defined $r, "\tchecking if the returned value is defined: $r" ); + my $fileno = fileno $handle; + my $r = eval { $t->getattr($fileno) }; + is($@, '', "calling getattr($fileno) for $name"); + if(isnt($r, undef, "returned value ($r) is defined")) { + $termios = $t; + } + } } -SKIP: { - -t STDERR or skip("STDERR not a tty", 2); - $r = eval { $termios->getattr(2) }; - is( $@, '', "calling getattr(2)" ); - ok( defined $r, "\tchecking if the returned value is defined: $r" ); -} +open my $not_a_tty, '<', $^X or die "Can't open $^X: $!"; + +if (defined $termios) { + # testing getcc() + for my $i (0 .. NCCS-1) { + my $r = eval { $termios->getcc($i) }; + is($@, '', "calling getcc($i)"); + like($r, qr/\A-?[0-9]+\z/, 'returns an integer'); + } + for my $i (NCCS, ~0) { + my $r = eval { $termios->getcc($i) }; + like($@, qr/\ABad getcc subscript/, "calling getcc($i)"); + is($r, undef, 'returns undef') + } -# testing getcc() -for my $i (0..NCCS()-1) { - $r = eval { $termios->getcc($i) }; - is( $@, '', "calling getcc($i)" ); - ok( defined $r, "\tchecking if the returned value is defined: $r" ); + for my $method (qw(getcflag getiflag getispeed getlflag getoflag getospeed)) { + my $r = eval { $termios->$method() }; + is($@, '', "calling $method()"); + like($r, qr/\A-?[0-9]+\z/, 'returns an integer'); + } + + $! = 0; + is($termios->setattr(fileno $not_a_tty), undef, + 'setattr on a non tty should fail'); + cmp_ok($!, '==', POSIX::ENOTTY, 'and set errno to ENOTTY'); + + $! = 0; + is($termios->setattr(fileno $not_a_tty, TCSANOW), undef, + 'setattr on a non tty should fail'); + cmp_ok($!, '==', POSIX::ENOTTY, 'and set errno to ENOTTY'); } -# testing getcflag() -for my $method (@getters) { - $r = eval { $termios->$method() }; - is( $@, '', "calling $method()" ); - ok( defined $r, "\tchecking if the returned value is defined: $r" ); +{ + my $t = POSIX::Termios->new(); + isa_ok($t, "POSIX::Termios", "checking the type of the object"); + + # B0 is special + my @baud = (B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, + B2400, B4800, B9600, B19200, B38400); + + # On some platforms (eg Linux-that-I-tested), ispeed and ospeed are both + # "stored" in the same bits of c_cflag (as the man page documents) + # *as well as in struct members* (which you would assume obviates the need + # for using c_cflag), and the get*() functions return the value encoded + # within c_cflag, hence it's not possible to set/get them independently. + foreach my $out (@baud) { + is($t->setispeed(0), '0 but true', "setispeed(0)"); + is($t->setospeed($out), '0 but true', "setospeed($out)"); + is($t->getospeed(), $out, "getospeed() for $out"); + } + foreach my $in (@baud) { + is($t->setospeed(0), '0 but true', "setospeed(0)"); + is($t->setispeed($in), '0 but true', "setispeed($in)"); + is($t->getispeed(), $in, "getispeed() for $in"); + } + + my %state; + my @flags = qw(iflag oflag cflag lflag); + # I'd prefer to use real values per flag, but can only find OPOST in + # POSIX.pm for oflag + my @values = (0, 6, 9, 42); + + # initialise everything + foreach (@flags) { + my $method = 'set' . $_; + $t->$method(0); + $state{$_} = 0; + } + + sub testflags { + my ($flag, $values, @rest) = @_; + $! = 0; + my $method = 'set' . $flag; + foreach (@$values) { + $t->$method($_); + $state{$flag} = $_; + + my $state = join ', ', map {"$_=$state{$_}"} keys %state; + while (my ($flag, $expect) = each %state) { + my $method = 'get' . $flag; + is($t->$method(), $expect, "$method() for $state"); + } + + testflags(@rest) if @rest; + } + } + + testflags(map {($_, \@values)} @flags); + + for my $i (0 .. NCCS-1) { + $t->setcc($i, 0); + } + for my $i (0 .. NCCS-1) { + is($t->getcc($i), 0, "getcc($i)"); + } + my $c = 0; + for my $i (0 .. NCCS-1) { + $t->setcc($i, ++$c); + } + for my $i (reverse 0 .. NCCS-1) { + is($t->getcc($i), $c--, "getcc($i)"); + } + for my $i (reverse 0 .. NCCS-1) { + $t->setcc($i, ++$c); + } + for my $i (0 .. NCCS-1) { + is($t->getcc($i), $c--, "getcc($i)"); + } + } +$! = 0; +is(tcdrain(fileno $not_a_tty), undef, 'tcdrain on a non tty should fail'); +cmp_ok($!, '==', POSIX::ENOTTY, 'and set errno to ENOTTY'); + +$! = 0; +is(tcflow(fileno $not_a_tty, TCOON), undef, 'tcflow on a non tty should fail'); +cmp_ok($!, '==', POSIX::ENOTTY, 'and set errno to ENOTTY'); + +$! = 0; +is(tcflush(fileno $not_a_tty, TCOFLUSH), undef, + 'tcflush on a non tty should fail'); +cmp_ok($!, '==', POSIX::ENOTTY, 'and set errno to ENOTTY'); + +$! = 0; +is(tcsendbreak(fileno $not_a_tty, 0), undef, + 'tcsendbreak on a non tty should fail'); +cmp_ok($!, '==', POSIX::ENOTTY, 'and set errno to ENOTTY'); + +done_testing(); diff --git a/ext/POSIX/t/time.t b/ext/POSIX/t/time.t index 7b8a52ccff1..90b54caa47c 100644 --- a/ext/POSIX/t/time.t +++ b/ext/POSIX/t/time.t @@ -74,7 +74,7 @@ setlocale(LC_TIME, $orig_loc) || die "Cannot setlocale() back to orig: $!"; # and BSD. Cygwin, Win32, and Linux lean the BSD way. So, the tests just # check the basics. like(clock(), qr/\d*/, "clock() returns a numeric value"); -ok(clock() >= 0, "...and it returns something >= 0"); +cmp_ok(clock(), '>=', 0, "...and it returns something >= 0"); SKIP: { skip "No difftime()", 1 if $Config{d_difftime} ne 'define'; diff --git a/ext/POSIX/t/unimplemented.t b/ext/POSIX/t/unimplemented.t index 1e38af7d4a8..2d8f8198319 100644 --- a/ext/POSIX/t/unimplemented.t +++ b/ext/POSIX/t/unimplemented.t @@ -9,14 +9,14 @@ plan(skip_all => "POSIX is unavailable") require POSIX; -foreach ([atexit => 'C-specific, use END {} instead'], +foreach ([atexit => 'C-specific: use END {} instead'], [atof => 'C-specific, stopped'], [atoi => 'C-specific, stopped'], [atol => 'C-specific, stopped'], [bsearch => 'not supplied'], [calloc => 'C-specific, stopped'], [clearerr => \'IO::Handle::clearerr'], - [div => 'C-specific, use /, % and int instead'], + [div => 'C-specific: use /, % and int instead'], [execl => 'C-specific, stopped'], [execle => 'C-specific, stopped'], [execlp => 'C-specific, stopped'], @@ -33,53 +33,53 @@ foreach ([atexit => 'C-specific, use END {} instead'], [fgets => \'IO::Handle::gets'], [fileno => \'IO::Handle::fileno'], [fopen => \'IO::File::open'], - [fprintf => 'C-specific, use printf instead'], - [fputc => 'C-specific, use print instead'], - [fputs => 'C-specific, use print instead'], - [fread => 'C-specific, use read instead'], + [fprintf => 'C-specific: use printf instead'], + [fputc => 'C-specific: use print instead'], + [fputs => 'C-specific: use print instead'], + [fread => 'C-specific: use read instead'], [free => 'C-specific, stopped'], - [freopen => 'C-specific, use open instead'], - [fscanf => 'C-specific, use <> and regular expressions instead'], + [freopen => 'C-specific: use open instead'], + [fscanf => 'C-specific: use <> and regular expressions instead'], [fseek => \'IO::Seekable::seek'], [fsetpos => \'IO::Seekable::setpos'], [fsync => \'IO::Handle::sync'], [ftell => \'IO::Seekable::tell'], - [fwrite => 'C-specific, use print instead'], - [labs => 'C-specific, use abs instead'], - [ldiv => 'C-specific, use /, % and int instead'], - [longjmp => 'C-specific, use die instead'], + [fwrite => 'C-specific: use print instead'], + [labs => 'C-specific: use abs instead'], + [ldiv => 'C-specific: use /, % and int instead'], + [longjmp => 'C-specific: use die instead'], [malloc => 'C-specific, stopped'], - [memchr => 'C-specific, use index() instead'], - [memcmp => 'C-specific, use eq instead'], - [memcpy => 'C-specific, use = instead'], - [memmove => 'C-specific, use = instead'], - [memset => 'C-specific, use x instead'], + [memchr => 'C-specific: use index() instead'], + [memcmp => 'C-specific: use eq instead'], + [memcpy => 'C-specific: use = instead'], + [memmove => 'C-specific: use = instead'], + [memset => 'C-specific: use x instead'], [offsetof => 'C-specific, stopped'], - [putc => 'C-specific, use print instead'], - [putchar => 'C-specific, use print instead'], - [puts => 'C-specific, use print instead'], - [qsort => 'C-specific, use sort instead'], + [putc => 'C-specific: use print instead'], + [putchar => 'C-specific: use print instead'], + [puts => 'C-specific: use print instead'], + [qsort => 'C-specific: use sort instead'], [rand => 'non-portable, use Perl\'s rand instead'], [realloc => 'C-specific, stopped'], - [scanf => 'C-specific, use <> and regular expressions instead'], + [scanf => 'C-specific: use <> and regular expressions instead'], [setbuf => \'IO::Handle::setbuf'], - [setjmp => 'C-specific, use eval {} instead'], + [setjmp => 'C-specific: use eval {} instead'], [setvbuf => \'IO::Handle::setvbuf'], - [siglongjmp => 'C-specific, use die instead'], - [sigsetjmp => 'C-specific, use eval {} instead'], - [srand => 'not supplied, refer to Perl\'s srand documentation'], - [sscanf => 'C-specific, use regular expressions instead'], - [strcat => 'C-specific, use .= instead'], - [strchr => 'C-specific, use index() instead'], - [strcmp => 'C-specific, use eq instead'], - [strcpy => 'C-specific, use = instead'], - [strcspn => 'C-specific, use regular expressions instead'], - [strlen => 'C-specific, use length instead'], - [strncat => 'C-specific, use .= instead'], - [strncmp => 'C-specific, use eq instead'], - [strncpy => 'C-specific, use = instead'], + [siglongjmp => 'C-specific: use die instead'], + [sigsetjmp => 'C-specific: use eval {} instead'], + [srand => 'not supplied; refer to Perl\'s srand documentation'], + [sscanf => 'C-specific: use regular expressions instead'], + [strcat => 'C-specific: use .= instead'], + [strchr => 'C-specific: use index() instead'], + [strcmp => 'C-specific: use eq instead'], + [strcpy => 'C-specific: use = instead'], + [strcspn => 'C-specific: use regular expressions instead'], + [strlen => 'C-specific: use length instead'], + [strncat => 'C-specific: use .= instead'], + [strncmp => 'C-specific: use eq instead'], + [strncpy => 'C-specific: use = instead'], [strpbrk => 'C-specific, stopped'], - [strrchr => 'C-specific, use rindex() instead'], + [strrchr => 'C-specific: use rindex() instead'], [strspn => 'C-specific, stopped'], [strtok => 'C-specific, stopped'], [tmpfile => \'IO::File::new_tmpfile'], diff --git a/ext/POSIX/typemap b/ext/POSIX/typemap index d54d5d11a03..e6a82dc3840 100644 --- a/ext/POSIX/typemap +++ b/ext/POSIX/typemap @@ -11,6 +11,20 @@ fd T_IV speed_t T_IV tcflag_t T_IV cc_t T_IV -POSIX::SigSet T_PTROBJ -POSIX::Termios T_PTROBJ +POSIX::SigSet T_OPAQUEPTROBJ +POSIX::Termios T_OPAQUEPTROBJ POSIX::SigAction T_HVREF + +INPUT +T_OPAQUEPTROBJ + if (SvROK($arg) && sv_derived_from($arg, \"${ntype}\")) { + $var = ($type)SvPV_nolen(SvRV($arg)); + } + else + Perl_croak(aTHX_ \"%s: %s is not of type %s\", + ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]}, + \"$var\", \"$ntype\") + +OUTPUT +T_OPAQUEPTROBJ + sv_setref_pvn($arg, \"${ntype}\", (const char*)$var, sizeof(*$var)); diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index 9b0d53a8b0d..37f7a0e2905 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -2983,6 +2983,14 @@ CODE: OUTPUT: RETVAL +void +stringify(SV *sv) +PREINIT: + const char *pv; +CODE: + pv = SvPV_nolen(sv); + + MODULE = XS::APItest PACKAGE = XS::APItest::Magic PROTOTYPES: DISABLE diff --git a/ext/XS-APItest/t/gotosub.t b/ext/XS-APItest/t/gotosub.t new file mode 100644 index 00000000000..c665aafd5d3 --- /dev/null +++ b/ext/XS-APItest/t/gotosub.t @@ -0,0 +1,17 @@ +#!perl -w + +# Test that goto &xsub provides the right lexical environment. + +use strict; + +use Test::More tests => 1; +use XS::APItest; + +# This sub must remain outside the ‘use warnings’ scope. +sub no_warnings { goto &stringify } + +use warnings; + +$SIG{__WARN__} = sub { like shift, qr\^Use of uninitialized\ }; + +no_warnings(my $x) # undefined variable diff --git a/ext/attributes/attributes.pm b/ext/attributes/attributes.pm index a7c6716f577..5b797f4d6d6 100644 --- a/ext/attributes/attributes.pm +++ b/ext/attributes/attributes.pm @@ -1,6 +1,6 @@ package attributes; -our $VERSION = 0.15; +our $VERSION = 0.16; @EXPORT_OK = qw(get reftype); @EXPORT = (); diff --git a/ext/attributes/attributes.xs b/ext/attributes/attributes.xs index 24f5f6185e9..3900c36d16f 100644 --- a/ext/attributes/attributes.xs +++ b/ext/attributes/attributes.xs @@ -12,7 +12,7 @@ * 'Perilous to us all are the devices of an art deeper than we possess * ourselves.' --Gandalf * - * [p.597 of _The Lord of the Rings_, III/xi: "The Palantr"] + * [p.597 of _The Lord of the Rings_, III/xi: "The Palantír"] */ #define PERL_NO_GET_CONTEXT diff --git a/gv.c b/gv.c index b3b628e24ca..19059bc28f3 100644 --- a/gv.c +++ b/gv.c @@ -16,7 +16,7 @@ * history of Middle-earth and Over-heaven and of the Sundering Seas,' * laughed Pippin. * - * [p.599 of _The Lord of the Rings_, III/xi: "The Palantr"] + * [p.599 of _The Lord of the Rings_, III/xi: "The Palantír"] */ /* @@ -59,11 +59,7 @@ Perl_gv_add_by_type(pTHX_ GV *gv, svtype type) * if it walks like a dirhandle, then let's assume that * this is a dirhandle. */ - what = PL_op->op_type == OP_READDIR || - PL_op->op_type == OP_TELLDIR || - PL_op->op_type == OP_SEEKDIR || - PL_op->op_type == OP_REWINDDIR || - PL_op->op_type == OP_CLOSEDIR ? + what = OP_IS_DIRHOP(PL_op->op_type) ? "dirhandle" : "filehandle"; /* diag_listed_as: Bad symbol for filehandle */ } else if (type == SVt_PVHV) { @@ -378,6 +374,127 @@ S_gv_init_sv(pTHX_ GV *gv, const svtype sv_type) } } +static void core_xsub(pTHX_ CV* cv); + +static GV * +S_maybe_add_coresub(pTHX_ HV * const stash, GV *gv, + const char * const name, const STRLEN len, + const char * const fullname, STRLEN const fullen) +{ + const int code = keyword(name, len, 1); + static const char file[] = __FILE__; + CV *cv, *oldcompcv; + int opnum = 0; + SV *opnumsv; + bool ampable = TRUE; /* &{}-able */ + COP *oldcurcop; + yy_parser *oldparser; + I32 oldsavestack_ix; + + assert(gv || stash); + assert(name); + assert(stash || fullname); + + if (!fullname && !HvENAME(stash)) return NULL; /* pathological case + that would require + inlining newATTRSUB */ + if (code >= 0) return NULL; /* not overridable */ + switch (-code) { + /* no support for \&CORE::infix; + no support for funcs that take labels, as their parsing is + weird */ + case KEY_and: case KEY_cmp: case KEY_CORE: case KEY_dump: + case KEY_eq: case KEY_ge: + case KEY_gt: case KEY_le: case KEY_lt: case KEY_ne: + case KEY_or: case KEY_x: case KEY_xor: + return NULL; + case KEY_chdir: + case KEY_chomp: case KEY_chop: + case KEY_each: case KEY_eof: case KEY_exec: + case KEY_keys: + case KEY_lstat: + case KEY_pop: + case KEY_push: + case KEY_shift: + case KEY_splice: + case KEY_stat: + case KEY_system: + case KEY_truncate: case KEY_unlink: + case KEY_unshift: + case KEY_values: + ampable = FALSE; + } + if (!gv) { + gv = (GV *)newSV(0); + gv_init(gv, stash, name, len, TRUE); + } + if (ampable) { + ENTER; + oldcurcop = PL_curcop; + oldparser = PL_parser; + lex_start(NULL, NULL, 0); + oldcompcv = PL_compcv; + PL_compcv = NULL; /* Prevent start_subparse from setting + CvOUTSIDE. */ + oldsavestack_ix = start_subparse(FALSE,0); + cv = PL_compcv; + } + else { + /* Avoid calling newXS, as it calls us, and things start to + get hairy. */ + cv = MUTABLE_CV(newSV_type(SVt_PVCV)); + GvCV_set(gv,cv); + GvCVGEN(gv) = 0; + mro_method_changed_in(GvSTASH(gv)); + CvISXSUB_on(cv); + CvXSUB(cv) = core_xsub; + } + CvGV_set(cv, gv); /* This stops new ATTRSUB from setting CvFILE + from PL_curcop. */ + (void)gv_fetchfile(file); + CvFILE(cv) = (char *)file; + /* XXX This is inefficient, as doing things this order causes + a prototype check in newATTRSUB. But we have to do + it this order as we need an op number before calling + new ATTRSUB. */ + (void)core_prototype((SV *)cv, name, code, &opnum); + if (stash && (fullname || !fullen)) + (void)hv_store(stash,name,len,(SV *)gv,0); + if (ampable) { + SV *tmpstr; + CvLVALUE_on(cv); + if (!fullname) { + tmpstr = newSVhek(HvENAME_HEK(stash)); + sv_catpvs(tmpstr, "::"); + sv_catpvn(tmpstr,name,len); + } + else tmpstr = newSVpvn_share(fullname,fullen,0); + newATTRSUB(oldsavestack_ix, + newSVOP(OP_CONST, 0, tmpstr), + NULL,NULL, + coresub_op( + opnum + ? newSVuv((UV)opnum) + : newSVpvn(name,len), + code, opnum + ) + ); + assert(GvCV(gv) == cv); + if (opnum != OP_VEC && opnum != OP_SUBSTR) + CvLVALUE_off(cv); /* Now *that* was a neat trick. */ + LEAVE; + PL_parser = oldparser; + PL_curcop = oldcurcop; + PL_compcv = oldcompcv; + } + opnumsv = opnum ? newSVuv((UV)opnum) : (SV *)NULL; + cv_set_call_checker( + cv, Perl_ck_entersub_args_core, opnumsv ? opnumsv : (SV *)cv + ); + SvREFCNT_dec(opnumsv); + return gv; +} + /* =for apidoc gv_fetchmeth @@ -445,6 +562,7 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) gvp = (GV**)hv_fetch(stash, name, len, create); if(gvp) { topgv = *gvp; + have_gv: assert(topgv); if (SvTYPE(topgv) != SVt_PVGV) gv_init(topgv, stash, name, len, TRUE); @@ -465,6 +583,10 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) /* cache indicates no such method definitively */ return 0; } + else if (len > 1 /* shortest is uc */ && HvNAMELEN_get(stash) == 4 + && strnEQ(hvname, "CORE", 4) + && S_maybe_add_coresub(aTHX_ stash,topgv,name,len,0,1)) + goto have_gv; } packlen = HvNAMELEN_get(stash); @@ -494,8 +616,19 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) assert(cstash); gvp = (GV**)hv_fetch(cstash, name, len, 0); - if (!gvp) continue; - candidate = *gvp; + if (!gvp) { + if (len > 1 && HvNAMELEN_get(cstash) == 4) { + const char *hvname = HvNAME(cstash); assert(hvname); + if (strnEQ(hvname, "CORE", 4) + && (candidate = + S_maybe_add_coresub(aTHX_ cstash,NULL,name,len,0,0) + )) + goto have_candidate; + } + continue; + } + else candidate = *gvp; + have_candidate: assert(candidate); if (SvTYPE(candidate) != SVt_PVGV) gv_init(candidate, cstash, name, len, TRUE); if (SvTYPE(candidate) == SVt_PVGV && (cand_cv = GvCV(candidate)) && !GvCVGEN(candidate)) { @@ -1004,7 +1137,8 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, const svtype sv_type) { GV * Perl_gv_fetchsv(pTHX_ SV *name, I32 flags, const svtype sv_type) { STRLEN len; - const char * const nambeg = SvPV_const(name, len); + const char * const nambeg = + SvPV_flags_const(name, len, flags & GV_NO_SVGMAGIC ? 0 : SV_GMAGIC); PERL_ARGS_ASSERT_GV_FETCHSV; return gv_fetchpvn_flags(nambeg, len, flags | SvUTF8(name), sv_type); } @@ -1034,8 +1168,6 @@ S_gv_magicalize_overload(pTHX_ GV *gv) hv_magic(hv, NULL, PERL_MAGIC_overload); } -static void core_xsub(pTHX_ CV* cv); - GV * Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, const svtype sv_type) @@ -1258,7 +1390,10 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, if (addmg) gv = (GV *)newSV(0); else return NULL; } - else gv = *gvp; + else gv = *gvp, addmg = 0; + /* From this point on, addmg means gv has not been inserted in the + symtab yet. */ + if (SvTYPE(gv) == SVt_PVGV) { if (add) { GvMULTI_on(gv); @@ -1334,106 +1469,11 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, if (len > 1 /* shortest is uc */ && HvNAMELEN_get(stash) == 4) { /* Avoid null warning: */ const char * const stashname = HvNAME(stash); assert(stashname); - if (strnEQ(stashname, "CORE", 4)) { - const int code = keyword(name, len, 1); - static const char file[] = __FILE__; - CV *cv, *oldcompcv; - int opnum = 0; - SV *opnumsv; - bool ampable = TRUE; /* &{}-able */ - COP *oldcurcop; - yy_parser *oldparser; - I32 oldsavestack_ix; - - if (code >= 0) goto add_magical_gv; /* not overridable */ - switch (-code) { - /* no support for \&CORE::infix; - no support for funcs that take labels, as their parsing is - weird */ - case KEY_and: case KEY_cmp: case KEY_CORE: case KEY_dump: - case KEY_eq: case KEY_ge: - case KEY_gt: case KEY_le: case KEY_lt: case KEY_ne: - case KEY_or: case KEY_x: case KEY_xor: - goto add_magical_gv; - case KEY_chdir: - case KEY_chomp: case KEY_chop: - case KEY_each: case KEY_eof: case KEY_exec: - case KEY_keys: - case KEY_lstat: - case KEY_pop: - case KEY_push: - case KEY_shift: - case KEY_splice: - case KEY_stat: - case KEY_system: - case KEY_truncate: case KEY_unlink: - case KEY_unshift: - case KEY_values: - ampable = FALSE; - } - if (ampable) { - ENTER; - oldcurcop = PL_curcop; - oldparser = PL_parser; - lex_start(NULL, NULL, 0); - oldcompcv = PL_compcv; - PL_compcv = NULL; /* Prevent start_subparse from setting - CvOUTSIDE. */ - oldsavestack_ix = start_subparse(FALSE,0); - cv = PL_compcv; - } - else { - /* Avoid calling newXS, as it calls us, and things start to - get hairy. */ - cv = MUTABLE_CV(newSV_type(SVt_PVCV)); - GvCV_set(gv,cv); - GvCVGEN(gv) = 0; - mro_method_changed_in(GvSTASH(gv)); - CvISXSUB_on(cv); - CvXSUB(cv) = core_xsub; - } - CvGV_set(cv, gv); /* This stops new ATTRSUB from setting CvFILE - from PL_curcop. */ - (void)gv_fetchfile(file); - CvFILE(cv) = (char *)file; - /* XXX This is inefficient, as doing things this order causes - a prototype check in newATTRSUB. But we have to do - it this order as we need an op number before calling - new ATTRSUB. */ - (void)core_prototype((SV *)cv, name, code, &opnum); - if (ampable) { - if (addmg) { - (void)hv_store(stash,name,len,(SV *)gv,0); - addmg = FALSE; - } - CvLVALUE_on(cv); - newATTRSUB(oldsavestack_ix, - newSVOP( - OP_CONST, 0, - newSVpvn_share(nambeg,full_len,0) - ), - NULL,NULL, - coresub_op( - opnum - ? newSVuv((UV)opnum) - : newSVpvn(name,len), - code, opnum - ) - ); - assert(GvCV(gv) == cv); - if (opnum != OP_VEC && opnum != OP_SUBSTR) - CvLVALUE_off(cv); /* Now *that* was a neat trick. */ - LEAVE; - PL_parser = oldparser; - PL_curcop = oldcurcop; - PL_compcv = oldcompcv; - } - opnumsv = opnum ? newSVuv((UV)opnum) : (SV *)NULL; - cv_set_call_checker( - cv, Perl_ck_entersub_args_core, opnumsv ? opnumsv : (SV *)cv - ); - SvREFCNT_dec(opnumsv); - } + if (strnEQ(stashname, "CORE", 4) + && S_maybe_add_coresub(aTHX_ + addmg ? stash : 0, gv, name, len, nambeg, full_len + )) + addmg = 0; } } else if (len > 1) { diff --git a/gv.h b/gv.h index b9d04e6b58c..6ef1c2b87b8 100644 --- a/gv.h +++ b/gv.h @@ -214,13 +214,15 @@ Return the SV from the GV. #define GV_AUTOLOAD 0x100 /* gv_fetchmethod_flags() should AUTOLOAD */ #define GV_CROAK 0x200 /* gv_fetchmethod_flags() should croak */ #define GV_ADDMG 0x400 /* add if magical */ +#define GV_NO_SVGMAGIC 0x800 /* Skip get-magic on an SV argument; + used only by gv_fetchsv(_nomg) */ /* SVf_UTF8 (more accurately the return value from SvUTF8) is also valid as a flag to gv_fetch_pvn_flags, so ensure it lies outside this range. */ #define GV_NOADD_MASK \ - (SVf_UTF8|GV_NOADD_NOINIT|GV_NOEXPAND|GV_NOTQUAL|GV_ADDMG) + (SVf_UTF8|GV_NOADD_NOINIT|GV_NOEXPAND|GV_NOTQUAL|GV_ADDMG|GV_NO_SVGMAGIC) /* The bit flags that don't cause gv_fetchpv() to add a symbol if not found (with the exception GV_ADDMG, which *might* cause the symbol to be added) */ @@ -228,6 +230,7 @@ Return the SV from the GV. #define gv_fullname3(sv,gv,prefix) gv_fullname4(sv,gv,prefix,TRUE) #define gv_efullname3(sv,gv,prefix) gv_efullname4(sv,gv,prefix,TRUE) #define gv_fetchmethod(stash, name) gv_fetchmethod_autoload(stash, name, TRUE) +#define gv_fetchsv_nomg(n,f,t) gv_fetchsv(n,(f)|GV_NO_SVGMAGIC,t) #define gv_AVadd(gv) gv_add_by_type((gv), SVt_PVAV) #define gv_HVadd(gv) gv_add_by_type((gv), SVt_PVHV) diff --git a/handy.h b/handy.h index b75eafb53fa..5e305121049 100644 --- a/handy.h +++ b/handy.h @@ -70,10 +70,13 @@ Null SV pointer. (No longer available when C is defined.) #define MUTABLE_IO(p) ((IO *)MUTABLE_PTR(p)) #define MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p)) -/* XXX Configure ought to have a test for a boolean type, if I can - just figure out all the headers such a test needs. - Andy Dougherty August 1996 -*/ +#ifdef I_STDBOOL +# include +# ifndef HAS_BOOL +# define HAS_BOOL 1 +# endif +#endif + /* bool is built-in for g++-2.6.3 and later, which might be used for extensions. <_G_config.h> defines _G_HAVE_BOOL, but we can't be sure _G_config.h will be included before this file. _G_config.h diff --git a/hints/catamount.sh b/hints/catamount.sh index 4f9c0fb33b2..7d4159b8b17 100644 --- a/hints/catamount.sh +++ b/hints/catamount.sh @@ -31,11 +31,11 @@ # mkdir -p /opt/perl-catamount # mkdir -p /opt/perl-catamount/include # mkdir -p /opt/perl-catamount/lib -# mkdir -p /opt/perl-catamount/lib/perl5/5.15.2 +# mkdir -p /opt/perl-catamount/lib/perl5/5.15.3 # 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.15.2 +# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.15.3 # cp miniperl perl run.sh cc.sh /opt/perl-catamount/lib # # With the headers and the libperl.a you can embed Perl to your Catamount diff --git a/hints/uwin.sh b/hints/uwin.sh index 9f7eb4eb1f9..0c70b529cbd 100644 --- a/hints/uwin.sh +++ b/hints/uwin.sh @@ -46,8 +46,7 @@ # __UWIN__ added so it could be used in ext/POSIX/POSIX.xs # to protect against either tzname definition. According to Dave Korn -#dgk gcc on uwin also predefined _UWIN as does the borland and digital -#dgk mars compiler. +#dgk gcc on uwin also predefined _UWIN as does the digital mars compiler. #dgk #dgk Only ncc does not define _UWIN and this is intentional. ncc is used #dgk to build binaries that do not require the uwin runtime. diff --git a/hv.c b/hv.c index ccd72fdfe98..6872aaac433 100644 --- a/hv.c +++ b/hv.c @@ -1043,6 +1043,7 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, if (d_flags & G_DISCARD) { sv = HeVAL(entry); + HeVAL(entry) = &PL_sv_placeholder; if (sv) { /* deletion of method from stash */ if (isGV(sv) && isGV_with_GP(sv) && GvCVu(sv) @@ -1051,8 +1052,11 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, SvREFCNT_dec(sv); sv = NULL; } - } else sv = sv_2mortal(HeVAL(entry)); - HeVAL(entry) = &PL_sv_placeholder; + } + else { + sv = sv_2mortal(HeVAL(entry)); + HeVAL(entry) = &PL_sv_placeholder; + } /* * If a restricted hash, rather than really deleting the entry, put diff --git a/lib/.gitignore b/lib/.gitignore index 5998e457cdb..87149deb2b3 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -397,6 +397,7 @@ /parent.pm /perldoc.pod /perlfaq* +/perlglossary.pod /perlxs.pod /perlxstut.pod /re.pm diff --git a/lib/Exporter.pm b/lib/Exporter.pm index a371714e764..701ac5250f6 100644 --- a/lib/Exporter.pm +++ b/lib/Exporter.pm @@ -9,7 +9,7 @@ require 5.006; our $Debug = 0; our $ExportLevel = 0; our $Verbose ||= 0; -our $VERSION = '5.64_03'; +our $VERSION = '5.65'; our (%Cache); sub as_heavy { diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t index 2aece548bfb..269b20ac3a8 100644 --- a/lib/ExtUtils/t/Embed.t +++ b/lib/ExtUtils/t/Embed.t @@ -20,7 +20,6 @@ $| = 1; print "1..9\n"; my $cc = $Config{'cc'}; my $cl = ($^O eq 'MSWin32' && $cc eq 'cl'); -my $borl = ($^O eq 'MSWin32' && $cc eq 'bcc32'); my $skip_exe = $^O eq 'os2' && $Config{ldflags} =~ /(? $exe); } @@ -94,9 +90,6 @@ if ($^O eq 'VMS') { if $^O eq 'os2' and $Config{ldflags} =~ /(? is not default value of zero. - =head1 AUTHOR Nick Ing-Simmons Enik@tiuk.ti.comE diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm index 7e43704f933..31cd4fcc42e 100644 --- a/lib/Unicode/UCD.pm +++ b/lib/Unicode/UCD.pm @@ -6,7 +6,7 @@ no warnings 'surrogate'; # surrogates can be inputs to this use charnames (); use Unicode::Normalize qw(getCombinClass NFD); -our $VERSION = '0.35'; +our $VERSION = '0.36'; use Storable qw(dclone); @@ -467,14 +467,22 @@ sub _read_table ($;$) { my ($start, $end, $value) = / ^ (.+?) \t (.*?) \t (.+?) \s* ( \# .* )? # Optional comment $ /x; - $end = $start if $end eq ""; + my $decimal_start = hex $start; + my $decimal_end = ($end eq "") ? $decimal_start : hex $end; if ($return_hash) { - foreach my $i (hex $start .. hex $end) { + foreach my $i ($decimal_start .. $decimal_end) { $return{$i} = $value; } } + elsif (@return && + $return[-1][1] == $decimal_start - 1 + && $return[-1][2] eq $value) + { + # If this is merely extending the previous range, do just that. + $return[-1]->[1] = $decimal_end; + } else { - push @return, [ hex $start, hex $end, $value ]; + push @return, [ $decimal_start, $decimal_end, $value ]; } } return ($return_hash) ? %return : @return; diff --git a/lib/open.pm b/lib/open.pm index 1bfe0d68330..fd22e1b9e71 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -1,7 +1,7 @@ package open; use warnings; -our $VERSION = '1.08'; +our $VERSION = '1.10'; require 5.008001; # for PerlIO::get_layers() @@ -95,16 +95,22 @@ sub import { } } if ($type eq 'IN') { - _drop_oldenc(*STDIN, @val); + _drop_oldenc(*STDIN, @val) if $std; $in = join(' ', @val); } elsif ($type eq 'OUT') { - _drop_oldenc(*STDOUT, @val); + if ($std) { + _drop_oldenc(*STDOUT, @val); + _drop_oldenc(*STDERR, @val); + } $out = join(' ', @val); } elsif ($type eq 'IO') { - _drop_oldenc(*STDIN, @val); - _drop_oldenc(*STDOUT, @val); + if ($std) { + _drop_oldenc(*STDIN, @val); + _drop_oldenc(*STDOUT, @val); + _drop_oldenc(*STDERR, @val); + } $in = $out = join(' ', @val); } else { @@ -207,7 +213,9 @@ many encodings have several aliases. See L 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. +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 diff --git a/lib/open.t b/lib/open.t index 1bf7dca3777..3a5565d86a0 100644 --- a/lib/open.t +++ b/lib/open.t @@ -4,9 +4,10 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require Config; import Config; + require './test.pl'; } -use Test::More tests => 23; +plan 23; # open::import expects 'open' as its first argument, but it clashes with open() sub import { @@ -185,13 +186,26 @@ SKIP: { eval q[use Encode::Alias;use open ":std", ":locale"]; is($@, '', 'can use :std and :locale'); +} - use open IN => ':non-existent'; - eval { - require Symbol; # Anything that exists but we havn't loaded - }; - like($@, qr/Can't locate Symbol|Recursive call/i, - "test for an endless loop in PerlIO_find_layer"); +{ + local $ENV{PERL_UNICODE}; + delete $ENV{PERL_UNICODE}; + is runperl( + progs => [ + 'use open q\:encoding(UTF-8)\, q-:std-;', + 'use open q\:encoding(UTF-8)\;', + 'if(($_ = ) eq qq-\x{100}\n-) { print qq-stdin ok\n- }', + 'else { print qq-got -, join(q q q, map ord, split//), "\n" }', + 'print STDOUT qq-\x{ff}\n-;', + 'print STDERR qq-\x{ff}\n-;', + ], + stdin => "\xc4\x80\n", + stderr => 1, + ), + "stdin ok\n\xc3\xbf\n\xc3\xbf\n", + "use open without :std does not affect standard handles", + ; } END { diff --git a/locale.c b/locale.c index 4631b868f57..b7a78fbea9d 100644 --- a/locale.c +++ b/locale.c @@ -10,9 +10,9 @@ /* * A Elbereth Gilthoniel, - * silivren penna mriel + * silivren penna míriel * o menel aglar elenath! - * Na-chaered palan-driel + * Na-chaered palan-díriel * o galadhremmin ennorath, * Fanuilos, le linnathon * nef aear, si nef aearon! @@ -28,10 +28,6 @@ #define PERL_IN_LOCALE_C #include "perl.h" -#ifdef I_LOCALE -# include -#endif - #ifdef I_LANGINFO # include #endif @@ -231,8 +227,9 @@ Perl_new_collate(pTHX_ const char *newcoll) const Size_t fa = strxfrm(xbuf, "a", XFRMBUFSIZE); const Size_t fb = strxfrm(xbuf, "ab", XFRMBUFSIZE); const SSize_t mult = fb - fa; - if (mult < 1) - Perl_croak(aTHX_ "strxfrm() gets absurd"); + if (mult < 1 && !(fa == 0 && fb == 0)) + Perl_croak(aTHX_ "panic: strxfrm() gets absurd - a => %"UVuf", ab => %"UVuf, + (UV) fa, (UV) fb); PL_collxfrm_base = (fa > (Size_t)mult) ? (fa - mult) : 0; PL_collxfrm_mult = mult; } diff --git a/makedef.pl b/makedef.pl index b648a655811..1a44d1bd58e 100644 --- a/makedef.pl +++ b/makedef.pl @@ -965,9 +965,6 @@ sub readvar { win32_getchar win32_putchar )); - if ($ARGS{CCTYPE} eq "BORLAND") { - try_symbols('_matherr'); - } } elsif ($ARGS{PLATFORM} eq 'vms') { try_symbols(qw( @@ -1305,7 +1302,7 @@ sub readvar { print "LIBRARY $dll\n"; # The DESCRIPTION module definition file statement is not supported # by VC7 onwards. - if ($ARGS{CCTYPE} =~ /^(?:MSVC60|GCC|BORLAND)$/) { + if ($ARGS{CCTYPE} =~ /^(?:MSVC60|GCC)$/) { print "DESCRIPTION 'Perl interpreter'\n"; } print "EXPORTS\n"; @@ -1349,7 +1346,6 @@ sub readvar { foreach my $symbol (sort keys %export) { if ($ARGS{PLATFORM} =~ /^win(?:32|ce)$/) { - $symbol = "_$symbol" if $ARGS{CCTYPE} eq 'BORLAND'; print "\t$symbol\n"; } elsif ($ARGS{PLATFORM} eq 'os2') { diff --git a/malloc.c b/malloc.c index 3c2923aa0c2..64613ee05d9 100644 --- a/malloc.c +++ b/malloc.c @@ -5,7 +5,7 @@ /* * 'The Chamber of Records,' said Gimli. 'I guess that is where we now stand.' * - * [p.321 of _The Lord of the Rings_, II/v: "The Bridge of Khazad-Dm"] + * [p.321 of _The Lord of the Rings_, II/v: "The Bridge of Khazad-Dûm"] */ /* This file contains Perl's own implementation of the malloc library. diff --git a/mg.c b/mg.c index c07c78b4f0e..232db2cff77 100644 --- a/mg.c +++ b/mg.c @@ -1032,9 +1032,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) } break; case '^': - if (!isGV_with_GP(PL_defoutgv)) - s = ""; - else if (GvIOp(PL_defoutgv)) + if (GvIOp(PL_defoutgv)) s = IoTOP_NAME(GvIOp(PL_defoutgv)); if (s) sv_setpv(sv,s); @@ -1044,9 +1042,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) } break; case '~': - if (!isGV_with_GP(PL_defoutgv)) - s = ""; - else if (GvIOp(PL_defoutgv)) + if (GvIOp(PL_defoutgv)) s = IoFMT_NAME(GvIOp(PL_defoutgv)); if (!s) s = GvENAME(PL_defoutgv); @@ -1069,7 +1065,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) case '/': break; case '[': - sv_setiv(sv, (IV)CopARYBASE_get(PL_curcop)); + sv_setiv(sv, 0); break; case '|': if (GvIO(PL_defoutgv)) @@ -2018,7 +2014,7 @@ Perl_magic_getarylen(pTHX_ SV *sv, const MAGIC *mg) PERL_ARGS_ASSERT_MAGIC_GETARYLEN; if (obj) { - sv_setiv(sv, AvFILL(obj) + CopARYBASE_get(PL_curcop)); + sv_setiv(sv, AvFILL(obj)); } else { SvOK_off(sv); } @@ -2034,7 +2030,7 @@ Perl_magic_setarylen(pTHX_ SV *sv, MAGIC *mg) PERL_ARGS_ASSERT_MAGIC_SETARYLEN; if (obj) { - av_fill(obj, SvIV(sv) - CopARYBASE_get(PL_curcop)); + av_fill(obj, SvIV(sv)); } else { Perl_ck_warner(aTHX_ packWARN(WARN_MISC), "Attempt to set length of freed array"); @@ -2082,7 +2078,7 @@ Perl_magic_getpos(pTHX_ SV *sv, MAGIC *mg) I32 i = found->mg_len; if (DO_UTF8(lsv)) sv_pos_b2u(lsv, &i); - sv_setiv(sv, i + CopARYBASE_get(PL_curcop)); + sv_setiv(sv, i); return 0; } } @@ -2123,7 +2119,7 @@ Perl_magic_setpos(pTHX_ SV *sv, MAGIC *mg) } len = SvPOK(lsv) ? SvCUR(lsv) : sv_len(lsv); - pos = SvIV(sv) - CopARYBASE_get(PL_curcop); + pos = SvIV(sv); if (DO_UTF8(lsv)) { ulen = sv_len_utf8(lsv); @@ -2669,33 +2665,25 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) IoLINES(GvIOp(PL_last_in_gv)) = SvIV(sv); break; case '^': - if (isGV_with_GP(PL_defoutgv)) { - Safefree(IoTOP_NAME(GvIOp(PL_defoutgv))); - s = IoTOP_NAME(GvIOp(PL_defoutgv)) = savesvpv(sv); - IoTOP_GV(GvIOp(PL_defoutgv)) = gv_fetchsv(sv, GV_ADD, SVt_PVIO); - } + Safefree(IoTOP_NAME(GvIOp(PL_defoutgv))); + s = IoTOP_NAME(GvIOp(PL_defoutgv)) = savesvpv(sv); + IoTOP_GV(GvIOp(PL_defoutgv)) = gv_fetchsv(sv, GV_ADD, SVt_PVIO); break; case '~': - if (isGV_with_GP(PL_defoutgv)) { - Safefree(IoFMT_NAME(GvIOp(PL_defoutgv))); - s = IoFMT_NAME(GvIOp(PL_defoutgv)) = savesvpv(sv); - IoFMT_GV(GvIOp(PL_defoutgv)) = gv_fetchsv(sv, GV_ADD, SVt_PVIO); - } + Safefree(IoFMT_NAME(GvIOp(PL_defoutgv))); + s = IoFMT_NAME(GvIOp(PL_defoutgv)) = savesvpv(sv); + IoFMT_GV(GvIOp(PL_defoutgv)) = gv_fetchsv(sv, GV_ADD, SVt_PVIO); break; case '=': - if (isGV_with_GP(PL_defoutgv)) - IoPAGE_LEN(GvIOp(PL_defoutgv)) = (SvIV(sv)); + IoPAGE_LEN(GvIOp(PL_defoutgv)) = (SvIV(sv)); break; case '-': - if (isGV_with_GP(PL_defoutgv)) { - IoLINES_LEFT(GvIOp(PL_defoutgv)) = (SvIV(sv)); - if (IoLINES_LEFT(GvIOp(PL_defoutgv)) < 0L) + IoLINES_LEFT(GvIOp(PL_defoutgv)) = (SvIV(sv)); + if (IoLINES_LEFT(GvIOp(PL_defoutgv)) < 0L) IoLINES_LEFT(GvIOp(PL_defoutgv)) = 0L; - } break; case '%': - if (isGV_with_GP(PL_defoutgv)) - IoPAGE(GvIOp(PL_defoutgv)) = (SvIV(sv)); + IoPAGE(GvIOp(PL_defoutgv)) = (SvIV(sv)); break; case '|': { @@ -2728,7 +2716,8 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) } break; case '[': - CopARYBASE_set(&PL_compiling, SvIV(sv)); + if (SvIV(sv) != 0) + Perl_croak(aTHX_ "Assigning non-zero to $[ is no longer possible"); break; case '?': #ifdef COMPLEX_STATUS diff --git a/mro.c b/mro.c index b7e842d563a..830bea8097c 100644 --- a/mro.c +++ b/mro.c @@ -379,7 +379,7 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level) /* =for apidoc mro_get_linear_isa -Returns the mro linearisation for the give stash. By default, this +Returns the mro linearisation for the given stash. By default, this will be whatever C returns unless some other MRO is in effect for the stash. The return value is a read-only AV*. diff --git a/op.c b/op.c index 39e3eb0e919..8f0858583db 100644 --- a/op.c +++ b/op.c @@ -1170,8 +1170,6 @@ Perl_scalarvoid(pTHX_ OP *o) } else useless = "a constant (undef)"; - if (o->op_private & OPpCONST_ARYBASE) - useless = NULL; /* don't warn on optimised away booleans, eg * use constant Foo, 5; Foo || print; */ if (cSVOPo->op_private & OPpCONST_SHORTCIRCUIT) @@ -1732,24 +1730,6 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags) localize = 0; PL_modcount++; return o; - case OP_CONST: - if (!(o->op_private & OPpCONST_ARYBASE)) - goto nomod; - localize = 0; - if (PL_eval_start && PL_eval_start->op_type == OP_CONST) { - CopARYBASE_set(&PL_compiling, - (I32)SvIV(cSVOPx(PL_eval_start)->op_sv)); - PL_eval_start = 0; - } - else if (!type) { - SAVECOPARYBASE(&PL_compiling); - CopARYBASE_set(&PL_compiling, 0); - } - else if (type == OP_REFGEN) - goto nomod; - else - Perl_croak(aTHX_ "That use of $[ is unsupported"); - break; case OP_STUB: if ((o->op_flags & OPf_PARENS) || PL_madskills) break; @@ -5015,18 +4995,7 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right) bool maybe_common_vars = TRUE; PL_modcount = 0; - /* Grandfathering $[ assignment here. Bletch.*/ - /* Only simple assignments like C<< ($[) = 1 >> are allowed */ - PL_eval_start = (left->op_type == OP_CONST) ? right : NULL; left = op_lvalue(left, OP_AASSIGN); - if (PL_eval_start) - PL_eval_start = 0; - else if (left->op_type == OP_CONST) { - deprecate("assignment to $["); - /* FIXME for MAD */ - /* Result of assignment is always 1 (or we'd be dead already) */ - return newSVOP(OP_CONST, 0, newSViv(1)); - } curop = list(force_list(left)); o = newBINOP(OP_AASSIGN, flags, list(force_list(right)), curop); o->op_private = (U8)(0 | (flags >> 8)); @@ -5168,19 +5137,8 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right) scalar(right)); } else { - PL_eval_start = right; /* Grandfathering $[ assignment here. Bletch.*/ o = newBINOP(OP_SASSIGN, flags, scalar(right), op_lvalue(scalar(left), OP_SASSIGN) ); - if (PL_eval_start) - PL_eval_start = 0; - else { - if (!PL_madskills) { /* assignment to $[ is ignored when making a mad dump */ - deprecate("assignment to $["); - op_free(o); - o = newSVOP(OP_CONST, 0, newSViv(CopARYBASE_get(&PL_compiling))); - o->op_private |= OPpCONST_ARYBASE; - } - } } return o; } @@ -5228,9 +5186,6 @@ Perl_newSTATEOP(pTHX_ I32 flags, char *label, OP *o) cop->op_next = (OP*)cop; cop->cop_seq = seq; - /* CopARYBASE is now "virtual", in that it's stored as a flag bit in - CopHINTS and a possible value in cop_hints_hash, so no need to copy it. - */ cop->cop_warnings = DUP_WARNINGS(PL_curcop->cop_warnings); CopHINTHASH_set(cop, cophh_copy(CopHINTHASH_get(PL_curcop))); if (label) { @@ -7260,14 +7215,6 @@ Perl_ck_bitop(pTHX_ OP *o) PERL_ARGS_ASSERT_CK_BITOP; -#define OP_IS_NUMCOMPARE(op) \ - ((op) == OP_LT || (op) == OP_I_LT || \ - (op) == OP_GT || (op) == OP_I_GT || \ - (op) == OP_LE || (op) == OP_I_LE || \ - (op) == OP_GE || (op) == OP_I_GE || \ - (op) == OP_EQ || (op) == OP_I_EQ || \ - (op) == OP_NE || (op) == OP_I_NE || \ - (op) == OP_NCMP || (op) == OP_I_NCMP) o->op_private = (U8)(PL_hints & HINT_INTEGER); if (!(o->op_flags & OPf_STACKED) /* Not an assignment */ && (o->op_type == OP_BIT_OR @@ -9292,10 +9239,9 @@ Perl_ck_entersub_args_core(pTHX_ OP *entersubop, GV *namegv, SV *protosv) PERL_ARGS_ASSERT_CK_ENTERSUB_ARGS_CORE; if (!opnum) { - OP *prev, *cvop; + OP *cvop; if (!aop->op_sibling) aop = cUNOPx(aop)->op_first; - prev = aop; aop = aop->op_sibling; for (cvop = aop; cvop->op_sibling; cvop = cvop->op_sibling) ; if (PL_madskills) while (aop != cvop && aop->op_type == OP_STUB) { @@ -9981,9 +9927,7 @@ Perl_rpeep(pTHX_ register OP *o) pop->op_next->op_type == OP_AELEM && !(pop->op_next->op_private & (OPpLVAL_INTRO|OPpLVAL_DEFER|OPpDEREF|OPpMAYBE_LVSUB)) && - (i = SvIV(((SVOP*)pop)->op_sv) - CopARYBASE_get(PL_curcop)) - <= 255 && - i >= 0) + (i = SvIV(((SVOP*)pop)->op_sv)) <= 255 && i >= 0) { GV *gv; if (cSVOPx(pop)->op_private & OPpCONST_STRICT) diff --git a/op.h b/op.h index 903f7cd60c9..6ae8dd94d0c 100644 --- a/op.h +++ b/op.h @@ -244,7 +244,6 @@ Deprecated. Use C instead. #define OPpCONST_SHORTCIRCUIT 4 /* eg the constant 5 in (5 || foo) */ #define OPpCONST_STRICT 8 /* bareword subject to strict 'subs' */ #define OPpCONST_ENTERED 16 /* Has been entered as symbol. */ -#define OPpCONST_ARYBASE 32 /* Was a $[ translated to constant. */ #define OPpCONST_BARE 64 /* Was a bare word (filehandle?). */ #define OPpCONST_WARNING 128 /* Was a $^W translated to constant. */ diff --git a/opcode.h b/opcode.h index de1a42d8c8f..0d0990e4e13 100644 --- a/opcode.h +++ b/opcode.h @@ -22,9 +22,11 @@ #define Perl_pp_chomp Perl_pp_chop #define Perl_pp_schomp Perl_pp_schop #define Perl_pp_i_preinc Perl_pp_preinc -#define Perl_pp_i_predec Perl_pp_predec +#define Perl_pp_predec Perl_pp_preinc +#define Perl_pp_i_predec Perl_pp_preinc #define Perl_pp_i_postinc Perl_pp_postinc -#define Perl_pp_i_postdec Perl_pp_postdec +#define Perl_pp_postdec Perl_pp_postinc +#define Perl_pp_i_postdec Perl_pp_postinc #define Perl_pp_slt Perl_pp_sle #define Perl_pp_sgt Perl_pp_sle #define Perl_pp_sge Perl_pp_sle @@ -967,12 +969,12 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */ Perl_pp_pos, Perl_pp_preinc, Perl_pp_i_preinc, /* implemented by Perl_pp_preinc */ - Perl_pp_predec, - Perl_pp_i_predec, /* implemented by Perl_pp_predec */ + Perl_pp_predec, /* implemented by Perl_pp_preinc */ + Perl_pp_i_predec, /* implemented by Perl_pp_preinc */ Perl_pp_postinc, Perl_pp_i_postinc, /* implemented by Perl_pp_postinc */ - Perl_pp_postdec, - Perl_pp_i_postdec, /* implemented by Perl_pp_postdec */ + Perl_pp_postdec, /* implemented by Perl_pp_postinc */ + Perl_pp_i_postdec, /* implemented by Perl_pp_postinc */ Perl_pp_pow, Perl_pp_multiply, Perl_pp_i_multiply, diff --git a/opnames.h b/opnames.h index 0bb9d816df7..26dfbaaac71 100644 --- a/opnames.h +++ b/opnames.h @@ -391,9 +391,10 @@ typedef enum opcode { #define MAXO 372 -/* the OP_IS_(SOCKET|FILETEST) macros are optimized to a simple range - check because all the member OPs are contiguous in opcode.pl - table. opcode.pl verifies the range contiguity. */ +/* the OP_IS_* macros are optimized to a simple range check because + all the member OPs are contiguous in regen/opcodes table. + opcode.pl verifies the range contiguity, or generates an OR-equals + expression */ #define OP_IS_SOCKET(op) \ ((op) >= OP_SEND && (op) <= OP_GETPEERNAME) @@ -404,4 +405,10 @@ typedef enum opcode { #define OP_IS_FILETEST_ACCESS(op) \ ((op) >= OP_FTRREAD && (op) <= OP_FTEEXEC) +#define OP_IS_NUMCOMPARE(op) \ + ((op) >= OP_LT && (op) <= OP_I_NCMP) + +#define OP_IS_DIRHOP(op) \ + ((op) >= OP_READDIR && (op) <= OP_CLOSEDIR) + /* ex: set ro: */ diff --git a/patchlevel.h b/patchlevel.h index 5c95ad0ebfa..a58cb6b06fe 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -15,7 +15,7 @@ #define PERL_REVISION 5 /* age */ #define PERL_VERSION 15 /* epoch */ -#define PERL_SUBVERSION 2 /* generation */ +#define PERL_SUBVERSION 3 /* generation */ /* The following numbers describe the earliest compatible version of Perl ("compatibility" here being defined as sufficient binary/API @@ -36,7 +36,7 @@ */ #define PERL_API_REVISION 5 #define PERL_API_VERSION 15 -#define PERL_API_SUBVERSION 2 +#define PERL_API_SUBVERSION 3 /* XXX Note: The selection of non-default Configure options, such as -Duselonglong may invalidate these settings. Currently, Configure diff --git a/perl.c b/perl.c index 9ebb3d22687..0b3d9c6723a 100644 --- a/perl.c +++ b/perl.c @@ -13,7 +13,7 @@ /* * A ship then new they built for him * of mithril and of elven-glass - * --from Bilbo's song of Erendil + * --from Bilbo's song of Eärendil * * [p.236 of _The Lord of the Rings_, II/i: "Many Meetings"] */ @@ -38,15 +38,7 @@ #include "nwutil.h" #endif -/* XXX If this causes problems, set i_unistd=undef in the hint file. */ -#ifdef I_UNISTD -#include -#endif - #ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP -# ifdef I_SYS_WAIT -# include -# endif # ifdef I_SYSUIO # include # endif @@ -1389,54 +1381,42 @@ Perl_call_atexit(pTHX_ ATEXIT_t fn, void *ptr) ++PL_exitlistlen; } -#ifdef HAS_PROCSELFEXE -/* This is a function so that we don't hold on to MAXPATHLEN - bytes of stack longer than necessary - */ -STATIC void -S_procself_val(pTHX_ SV *sv, const char *arg0) -{ - char buf[MAXPATHLEN]; - int len = readlink(PROCSELFEXE_PATH, buf, sizeof(buf) - 1); - - /* On Playstation2 Linux V1.0 (kernel 2.2.1) readlink(/proc/self/exe) - includes a spurious NUL which will cause $^X to fail in system - or backticks (this will prevent extensions from being built and - many tests from working). readlink is not meant to add a NUL. - Normal readlink works fine. - */ - if (len > 0 && buf[len-1] == '\0') { - len--; - } - - /* FreeBSD's implementation is acknowledged to be imperfect, sometimes - returning the text "unknown" from the readlink rather than the path - to the executable (or returning an error from the readlink). Any valid - path has a '/' in it somewhere, so use that to validate the result. - See http://www.freebsd.org/cgi/query-pr.cgi?pr=35703 - */ - if (len > 0 && memchr(buf, '/', len)) { - sv_setpvn(sv,buf,len); - } - else { - sv_setpv(sv,arg0); - } -} -#endif /* HAS_PROCSELFEXE */ - STATIC void S_set_caret_X(pTHX) { dVAR; GV* tmpgv = gv_fetchpvs("\030", GV_ADD|GV_NOTQUAL, SVt_PV); /* $^X */ if (tmpgv) { -#ifdef HAS_PROCSELFEXE - S_procself_val(aTHX_ GvSV(tmpgv), PL_origargv[0]); -#else -#ifdef OS2 - sv_setpv(GvSVn(tmpgv), os2_execname(aTHX)); + SV *const caret_x = GvSV(tmpgv); +#if defined(OS2) + sv_setpv(caret_x, os2_execname(aTHX)); #else - sv_setpv(GvSVn(tmpgv),PL_origargv[0]); -#endif +# ifdef HAS_PROCSELFEXE + char buf[MAXPATHLEN]; + int len = readlink(PROCSELFEXE_PATH, buf, sizeof(buf) - 1); + + /* On Playstation2 Linux V1.0 (kernel 2.2.1) readlink(/proc/self/exe) + includes a spurious NUL which will cause $^X to fail in system + or backticks (this will prevent extensions from being built and + many tests from working). readlink is not meant to add a NUL. + Normal readlink works fine. + */ + if (len > 0 && buf[len-1] == '\0') { + len--; + } + + /* FreeBSD's implementation is acknowledged to be imperfect, sometimes + returning the text "unknown" from the readlink rather than the path + to the executable (or returning an error from the readlink). Any + valid path has a '/' in it somewhere, so use that to validate the + result. See http://www.freebsd.org/cgi/query-pr.cgi?pr=35703 + */ + if (len > 0 && memchr(buf, '/', len)) { + sv_setpvn(caret_x, buf, len); + return; + } +# endif + /* Fallback to this: */ + sv_setpv(caret_x, PL_origargv[0]); #endif } } @@ -1659,6 +1639,9 @@ S_Internals_V(pTHX_ CV *cv) # ifdef DEBUGGING " DEBUGGING" # endif +# ifdef HOMEGROWN_POSIX_SIGNALS + " HOMEGROWN_POSIX_SIGNALS" +# endif # ifdef NO_MATHOMS " NO_MATHOMS" # endif diff --git a/perl.h b/perl.h index c87fd790f23..a6679b6f336 100644 --- a/perl.h +++ b/perl.h @@ -4822,7 +4822,6 @@ typedef enum { #define HINT_STRICT_REFS 0x00000002 /* strict pragma */ #define HINT_LOCALE 0x00000004 /* locale pragma */ #define HINT_BYTES 0x00000008 /* bytes pragma */ -#define HINT_ARYBASE 0x00000010 /* $[ is non-zero */ /* Note: 20,40,80 used for NATIVE_HINTS */ /* currently defined by vms/vmsish.h */ diff --git a/perlio.c b/perlio.c index e42a78fc286..79c6fdf2ded 100644 --- a/perlio.c +++ b/perlio.c @@ -155,23 +155,6 @@ perlsio_binmode(FILE *fp, int iotype, int mode) #else if (PerlLIO_setmode(fileno(fp), mode) != -1) { #endif -# if defined(WIN32) && defined(__BORLANDC__) - /* - * The translation mode of the stream is maintained independent -of - * the translation mode of the fd in the Borland RTL (heavy - * digging through their runtime sources reveal). User has to -set - * the mode explicitly for the stream (though they don't -document - * this anywhere). GSAR 97-5-24 - */ - fseek(fp, 0L, 0); - if (mode & O_BINARY) - fp->flags |= _F_BIN; - else - fp->flags &= ~_F_BIN; -# endif return 1; } else @@ -468,13 +451,6 @@ PerlIO_findFILE(PerlIO *pio) #include "perliol.h" -/* - * We _MUST_ have if we are using lseek() and may have large - * files - */ -#ifdef I_UNISTD -#include -#endif #ifdef HAS_MMAP #include #endif @@ -2587,8 +2563,10 @@ S_perlio_async_run(pTHX_ PerlIO* f) { SAVEDESTRUCTOR_X(S_lockcnt_dec, (void*)f); PerlIO_lockcnt(f)++; PERL_ASYNC_CHECK(); - if ( !(PerlIOBase(f)->flags & PERLIO_F_CLEARED) ) + if ( !(PerlIOBase(f)->flags & PERLIO_F_CLEARED) ) { + LEAVE; return 0; + } /* we've just run some perl-level code that could have done * anything, including closing the file or clearing this layer. * If so, free any lower layers that have already been @@ -2600,6 +2578,7 @@ S_perlio_async_run(pTHX_ PerlIO* f) { *f = l->next; Safefree(l); } + LEAVE; return 1; } @@ -3241,9 +3220,7 @@ PerlIOStdio_invalidate_fileno(pTHX_ FILE *f) f->_file = -1; return 1; # elif defined(WIN32) -# if defined(__BORLANDC__) - f->fd = PerlLIO_dup(fileno(f)); -# elif defined(UNDER_CE) +# if defined(UNDER_CE) /* WIN_CE does not have access to FILE internals, it hardly has FILE structure at all */ diff --git a/plan9/config.plan9 b/plan9/config.plan9 index 5fa14d40610..ae5683b55f9 100644 --- a/plan9/config.plan9 +++ b/plan9/config.plan9 @@ -3385,8 +3385,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "/sys/lib/perl/5.15.2" /**/ -#define PRIVLIB_EXP "/sys/lib/perl/5.15.2" /**/ +#define PRIVLIB "/sys/lib/perl/5.15.3" /**/ +#define PRIVLIB_EXP "/sys/lib/perl/5.15.3" /**/ /* PTRSIZE: * This symbol contains the size of a pointer, so that the C preprocessor @@ -3513,9 +3513,9 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "/sys/lib/perl/5.15.2/site_perl" /**/ -#define SITELIB_EXP "/sys/lib/perl/5.15.2/site_perl" /**/ -#define SITELIB_STEM "/sys/lib/perl/5.15.2/site_perl" /**/ +#define SITELIB "/sys/lib/perl/5.15.3/site_perl" /**/ +#define SITELIB_EXP "/sys/lib/perl/5.15.3/site_perl" /**/ +#define SITELIB_STEM "/sys/lib/perl/5.15.3/site_perl" /**/ /* Size_t_size: * This symbol holds the size of a Size_t in bytes. diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index 98daaa69891..2f7e9381156 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -32,12 +32,12 @@ alignbytes='4' ansi2knr='' aphostname='/bin/uname -n' api_revision='5' -api_subversion='2' +api_subversion='3' api_version='15' -api_versionstring='5.15.2' +api_versionstring='5.15.3' ar='ar' -archlib='/sys/lib/perl5/5.15.2/386' -archlibexp='/sys/lib/perl5/5.15.2/386' +archlib='/sys/lib/perl5/5.15.3/386' +archlibexp='/sys/lib/perl5/5.15.3/386' archname64='' archname='386' archobjs='' @@ -122,9 +122,9 @@ d_attribute_unused='undef' d_attribute_warn_unused_result='undef' d_bcmp='define' d_bcopy='define' +d_bsd='undef' d_bsdgetpgrp='undef' d_bsdsetpgrp='undef' -d_bsd='undef' d_builtin_choose_expr='undef' d_builtin_expect='undef' d_bzero='define' @@ -142,11 +142,11 @@ d_cmsghdr_s='undef' d_const='define' d_copysignl='undef' d_cplusplus='undef' -d_crypt_r='undef' d_crypt='undef' +d_crypt_r='undef' d_csh='undef' -d_ctermid_r='undef' d_ctermid='undef' +d_ctermid_r='undef' d_ctime64='undef' d_ctime_r='undef' d_cuserid='define' @@ -161,8 +161,8 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' -d_drand48proto='undef' d_drand48_r='undef' +d_drand48proto='undef' d_dup2='define' d_eaccess='undef' d_endgrent='define' @@ -183,23 +183,23 @@ d_faststdio='undef' d_fchdir='undef' d_fchmod='define' d_fchown='undef' -d_fcntl_can_lock='undef' d_fcntl='define' +d_fcntl_can_lock='undef' d_fd_macros='undef' -d_fds_bits='undef' d_fd_set='undef' +d_fds_bits='undef' d_fgetpos='define' -d_finitel='undef' d_finite='undef' +d_finitel='undef' d_flexfnam='define' -d_flockproto='undef' d_flock='undef' +d_flockproto='undef' d_fork='define' +d_fp_class='undef' d_fpathconf='define' +d_fpclass='undef' d_fpclassify='undef' d_fpclassl='undef' -d_fp_class='undef' -d_fpclass='undef' d_fpos64_t='undef' d_frexpl='undef' d_fs_data_s='undef' @@ -233,8 +233,8 @@ d_gethostprotos='undef' d_getitimer='undef' d_getlogin='define' d_getlogin_r='undef' -d_getmntent='undef' d_getmnt='undef' +d_getmntent='undef' d_getnameinfo='undef' d_getnbyaddr='undef' d_getnbyname='undef' @@ -268,8 +268,8 @@ d_getservbyname_r='undef' d_getservbyport_r='undef' d_getservent_r='undef' d_getservprotos='undef' -d_getspnam_r='undef' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='define' d_gmtime64='undef' d_gmtime_r='undef' @@ -287,16 +287,16 @@ d_int64_t='define' d_isascii='undef' d_isfinite='undef' d_isinf='undef' -d_isnanl='undef' d_isnan='undef' +d_isnanl='undef' d_killpg='undef' d_lchown='undef' d_ldbl_dig='define' d_libm_lib_version='0' d_link='define' d_localtime64='undef' -d_localtime_r_needs_tzset='undef' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='undef' d_longdbl='define' @@ -317,26 +317,26 @@ d_memset='define' d_mkdir='define' d_mkdtemp='undef' d_mkfifo='define' -d_mkstemps='undef' d_mkstemp='undef' +d_mkstemps='undef' d_mktime64='undef' d_mktime='define' d_mmap='undef' +d_modfl='undef' d_modfl_pow32_bug='undef' d_modflproto='undef' -d_modfl='undef' d_mprotect='undef' -d_msgctl='undef' +d_msg='undef' d_msg_ctrunc='undef' d_msg_dontroute='undef' -d_msgget='undef' -d_msghdr_s='undef' d_msg_oob='undef' d_msg_peek='undef' d_msg_proxy='undef' +d_msgctl='undef' +d_msgget='undef' +d_msghdr_s='undef' d_msgrcv='undef' d_msgsnd='undef' -d_msg='undef' d_msync='undef' d_munmap='undef' d_mymalloc='define' @@ -670,6 +670,7 @@ i_sgtty='undef' i_shadow='undef' i_socks='undef' i_stdarg='define' +i_stdbool='undef' i_stddef='define' i_stdlib='define' i_string='define' @@ -718,17 +719,17 @@ inc_version_list=' ' inc_version_list_init='0' incpath='' inews='' -installarchlib='/sys/lib/perl/5.15.2/386' +installarchlib='/sys/lib/perl/5.15.3/386' installbin='/usr/bin' installman1dir='/sys/man/1pub' installman3dir='/sys/man/2pub' installprefix='/usr' installprefixexp='/usr' -installprivlib='/sys/lib/perl/5.15.2' +installprivlib='/sys/lib/perl/5.15.3' installscript='/usr/bin' -installsitearch='/sys/lib/perl/5.15.2/site_perl/386' +installsitearch='/sys/lib/perl/5.15.3/site_perl/386' installsitebin='/usr/bin' -installsitelib='/sys/lib/perl/5.15.2/site_perl' +installsitelib='/sys/lib/perl/5.15.3/site_perl' installstyle='lib/perl5' installusrbinperl='undef' installvendorarch='' @@ -813,8 +814,8 @@ nroff='nroff' nvEUformat='"E"' nvFUformat='"F"' nvGUformat='"G"' -nv_preserves_uv_bits='31' nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' +nv_preserves_uv_bits='31' nveformat='"e"' nvfformat='"f"' nvgformat='"g"' @@ -848,8 +849,8 @@ pmake='' pr='' prefix='/usr' prefixexp='/usr' -privlib='/sys/lib/perl/5.15.2' -privlibexp='/sys/lib/perl/5.15.2' +privlib='/sys/lib/perl/5.15.3' +privlibexp='/sys/lib/perl/5.15.3' procselfexe='' prototype='define' ptrsize='4' @@ -914,13 +915,13 @@ sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 0' sig_size='50' signal_t='void' -sitearch='/sys/lib/perl/5.15.2/site_perl/386' +sitearch='/sys/lib/perl/5.15.3/site_perl/386' sitearchexp='/sys/lib/perl/site_perl/386' sitebin='/usr/bin' sitebinexp='/usr/bin' -sitelib='/sys/lib/perl/5.15.2/site_perl' -sitelib_stem='/sys/lib/perl/5.15.2/site_perl' -sitelibexp='/sys/lib/perl/5.15.2/site_perl' +sitelib='/sys/lib/perl/5.15.3/site_perl' +sitelib_stem='/sys/lib/perl/5.15.3/site_perl' +sitelibexp='/sys/lib/perl/5.15.3/site_perl' siteprefix='/usr' siteprefixexp='/usr' sizesize='4' @@ -938,6 +939,8 @@ srand48_r_proto='0' srandom_r_proto='0' src='.' ssizetype='ssize_t' +st_ino_sign='1' +st_ino_size='4' startperl='#!/bin/perl' startsh='#!/bin/sh' static_ext='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call IO List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Collate Unicode/Normalize attributes re threads threads/shared Encode/Byte Encode/CN Encode/EBCDIC Encode/JP Encode/KR Encode/Symbol Encode/TW Encode/Unicode' @@ -948,12 +951,10 @@ stdio_cnt='((fp)->_cnt)' stdio_filbuf='' stdio_ptr='((fp)->_ptr)' stdio_stream_array='' -st_ino_sign='1' -st_ino_size='4' strerror_r_proto='0' strings='/sys/include/ape/string.h' submit='' -subversion='2' +subversion='3' sysman='/sys/man/1pub' tail='' tar='' @@ -1031,8 +1032,8 @@ vendorlib_stem='' vendorlibexp='' vendorprefix='' vendorprefixexp='' -version='5.15.2' -version_patchlevel_string='version 15 subversion 2' +version='5.15.3' +version_patchlevel_string='version 15 subversion 3' versiononly='undef' vi='' voidflags='15' @@ -1047,9 +1048,9 @@ config_args='' config_argc=0 PERL_REVISION=5 PERL_VERSION=15 -PERL_SUBVERSION=2 +PERL_SUBVERSION=3 PERL_API_REVISION=5 PERL_API_VERSION=15 -PERL_API_SUBVERSION=2 +PERL_API_SUBVERSION=3 PERL_PATCHLEVEL= PERL_CONFIG_SH=true diff --git a/plan9/mkfile b/plan9/mkfile index 2d7b4bf0138..8f086b04404 100644 --- a/plan9/mkfile +++ b/plan9/mkfile @@ -20,7 +20,7 @@ perlshr = $archlib/CORE/libperlshr.a installman1dir = /sys/man/1 installman3dir = /sys/man/2 -podnames = perl perlbook perlboot perlbot perldata perldebtut perldiag perldsc perlform perlfunc perlipc perllexwarn perllol perlmod perlmodlib perlmodinstall perlnewmod perlop perlopentut perlpacktut perlpod perlport perlrequick perlretut perlref perlreftut perlrequick perlrun perlsec perlstyle perlsub perlsyn perltie perltoc perltooc perltoot perltrap perlutil perlunifaq perluniintro perlvar +podnames = perl perlbook perldata perldebtut perldiag perldsc perlform perlfunc perlipc perllexwarn perllol perlmod perlmodlib perlmodinstall perlnewmod perlop perlootut perlopentut perlpacktut perlpod perlport perlrequick perlretut perlref perlreftut perlrequick perlrun perlsec perlstyle perlsub perlsyn perltie perltrap perlutil perlunifaq perluniintro perlvar faqpodnames = perlfaq perlfaq1 perlfaq2 perlfaq3 perlfaq4 perlfaq5 perlfaq6 perlfaq7 perlfaq8 perlfaq9 advpodnames = perlapi perlapio perlcall perlclib perlcompile perldebguts perldbmfilter perldebug perldelta perldiag perlebcdic perlembed perlfilter perlfork perlguts perlhack perlintern perliol perllocale perlnumber perlobj perlpodspec perlre perlthrtut perltodo perlunicode perlxs perlxs perlxstut archpodnames = perlaix perlamiga perlbeos perlbs2000 perlce perlcygwin perldgux perldos perlepoc perlfreebsd perlhpux perlhurd perlirix perlmacos perlmpeix perlnetware perlos2 perlos390 perlos400 perlplan9 perlqnx perlsolaris perltru64 perluts perlvmesa perlvms perlvos perlwin32 diff --git a/pod.lst b/pod.lst index b4c62fb75ce..1e60c7901c9 100644 --- a/pod.lst +++ b/pod.lst @@ -20,10 +20,7 @@ h Tutorials perlrequick Perl regular expressions quick start perlretut Perl regular expressions tutorial - perlboot Perl OO tutorial for beginners - perltoot Perl OO tutorial, part 1 - perltooc Perl OO tutorial, part 2 - perlbot Perl OO tricks and examples + perlootut Perl OO tutorial for beginners perlperf Perl Performance and Optimization Techniques @@ -101,7 +98,7 @@ g perlmodlib Perl modules: how to write and use perldtrace Perl's support for DTrace - perlglossary Perl Glossary + cpan/perlfaq/lib/perlglossary Perl Glossary h Internals and C Language Interface @@ -139,43 +136,21 @@ h Miscellaneous perlhist Perl history records perldelta Perl changes since previous version + perl5154delta Perl changes in version 5.15.4 perl5153delta Perl changes in version 5.15.3 perl5152delta Perl changes in version 5.15.2 perl5151delta Perl changes in version 5.15.1 perl5150delta Perl changes in version 5.15.0 + perl5142delta Perl changes in version 5.14.2 perl5141delta Perl changes in version 5.14.1 perl5140delta Perl changes in version 5.14.0 - perl51311delta Perl changes in version 5.13.11 - perl51310delta Perl changes in version 5.13.10 - perl5139delta Perl changes in version 5.13.9 - perl5138delta Perl changes in version 5.13.8 - perl5137delta Perl changes in version 5.13.7 - perl5136delta Perl changes in version 5.13.6 - perl5135delta Perl changes in version 5.13.5 - perl5134delta Perl changes in version 5.13.4 - perl5133delta Perl changes in version 5.13.3 - perl5132delta Perl changes in version 5.13.2 - perl5131delta Perl changes in version 5.13.1 - perl5130delta Perl changes in version 5.13.0 perl5124delta Perl changes in version 5.12.4 perl5123delta Perl changes in version 5.12.3 perl5122delta Perl changes in version 5.12.2 perl5121delta Perl changes in version 5.12.1 perl5120delta Perl changes in version 5.12.0 - perl5115delta Perl changes in version 5.11.5 - perl5114delta Perl changes in version 5.11.4 - perl5113delta Perl changes in version 5.11.3 - perl5112delta Perl changes in version 5.11.2 - perl5111delta Perl changes in version 5.11.1 - perl5110delta Perl changes in version 5.11.0 perl5101delta Perl changes in version 5.10.1 perl5100delta Perl changes in version 5.10.0 - perl595delta Perl changes in version 5.9.5 - perl594delta Perl changes in version 5.9.4 - perl593delta Perl changes in version 5.9.3 - perl592delta Perl changes in version 5.9.2 - perl591delta Perl changes in version 5.9.1 - perl590delta Perl changes in version 5.9.0 perl589delta Perl changes in version 5.8.9 perl588delta Perl changes in version 5.8.8 perl587delta Perl changes in version 5.8.7 @@ -186,10 +161,6 @@ h Miscellaneous perl582delta Perl changes in version 5.8.2 perl581delta Perl changes in version 5.8.1 perl58delta Perl changes in version 5.8.0 - perl573delta Perl changes in version 5.7.3 - perl572delta Perl changes in version 5.7.2 - perl571delta Perl changes in version 5.7.1 - perl570delta Perl changes in version 5.7.0 perl561delta Perl changes in version 5.6.1 perl56delta Perl changes in version 5.6 perl5005delta Perl changes in version 5.005 @@ -244,6 +215,13 @@ r perlvmesa Perl notes for VM/ESA r perlvos Perl notes for Stratus VOS r perlwin32 Perl notes for Windows +oh Stubs for Deleted Documents + + perlboot + perlbot + perltooc + perltoot + aoh Auxiliary Documentation ao a2p diff --git a/pod/.gitignore b/pod/.gitignore index 430154e2c13..a207aeb08b7 100644 --- a/pod/.gitignore +++ b/pod/.gitignore @@ -58,7 +58,7 @@ /podselect.bat # generated -/perl5153delta.pod +/perl5154delta.pod /perlapi.pod /perlintern.pod *.html diff --git a/pod/buildtoc b/pod/buildtoc index 68f75b3e24a..96163c4f909 100644 --- a/pod/buildtoc +++ b/pod/buildtoc @@ -199,6 +199,12 @@ close $master; my (@cpanpods, %cpanpods, %cpanpods_short); my (%our_pods); + # These are stub files for deleted documents. We don't want them to show up + # in perl.pod, they just exist so that if someone types "perldoc perltoot" + # they get some sort of pointer to the new docs. + my %ignoredpods + = map { ( "$_.pod" => 1 ) } qw( perlboot perlbot perltooc perltoot ); + # Convert these to a list of filenames. foreach (keys %Pods, keys %Readmepods) { $our_pods{"$_.pod"}++; @@ -257,7 +263,7 @@ close $master; push @inconsistent, "$0: $i exists but is unknown by ../MANIFEST\n" if !$manipods{$i} && !$manireadmes{$i} && !$Copies{$i} && !$Generated{$i} && !$cpanpods{$i}; push @inconsistent, "$0: $i exists but is unknown by perl.pod\n" - if !$perlpods{$i} && !exists $Copies{$i} && !$cpanpods{$i}; + if !$perlpods{$i} && !exists $Copies{$i} && !$cpanpods{$i} && !$ignoredpods{$i}; } my %BuildFiles; foreach my $path (values %Build) { diff --git a/pod/perl.pod b/pod/perl.pod index 7b8e6571f25..4f5cd6285d0 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -43,10 +43,7 @@ For ease of access, the Perl manual has been split up into several sections. perlrequick Perl regular expressions quick start perlretut Perl regular expressions tutorial - perlboot Perl OO tutorial for beginners - perltoot Perl OO tutorial, part 1 - perltooc Perl OO tutorial, part 2 - perlbot Perl OO tricks and examples + perlootut Perl OO tutorial for beginners perlperf Perl Performance and Optimization Techniques @@ -162,42 +159,20 @@ For ease of access, the Perl manual has been split up into several sections. perlhist Perl history records perldelta Perl changes since previous version + perl5153delta Perl changes in version 5.15.3 perl5152delta Perl changes in version 5.15.2 perl5151delta Perl changes in version 5.15.1 perl5150delta Perl changes in version 5.15.0 + perl5142delta Perl changes in version 5.14.2 perl5141delta Perl changes in version 5.14.1 perl5140delta Perl changes in version 5.14.0 - perl51311delta Perl changes in version 5.13.11 - perl51310delta Perl changes in version 5.13.10 - perl5139delta Perl changes in version 5.13.9 - perl5138delta Perl changes in version 5.13.8 - perl5137delta Perl changes in version 5.13.7 - perl5136delta Perl changes in version 5.13.6 - perl5135delta Perl changes in version 5.13.5 - perl5134delta Perl changes in version 5.13.4 - perl5133delta Perl changes in version 5.13.3 - perl5132delta Perl changes in version 5.13.2 - perl5131delta Perl changes in version 5.13.1 - perl5130delta Perl changes in version 5.13.0 perl5124delta Perl changes in version 5.12.4 perl5123delta Perl changes in version 5.12.3 perl5122delta Perl changes in version 5.12.2 perl5121delta Perl changes in version 5.12.1 perl5120delta Perl changes in version 5.12.0 - perl5115delta Perl changes in version 5.11.5 - perl5114delta Perl changes in version 5.11.4 - perl5113delta Perl changes in version 5.11.3 - perl5112delta Perl changes in version 5.11.2 - perl5111delta Perl changes in version 5.11.1 - perl5110delta Perl changes in version 5.11.0 perl5101delta Perl changes in version 5.10.1 perl5100delta Perl changes in version 5.10.0 - perl595delta Perl changes in version 5.9.5 - perl594delta Perl changes in version 5.9.4 - perl593delta Perl changes in version 5.9.3 - perl592delta Perl changes in version 5.9.2 - perl591delta Perl changes in version 5.9.1 - perl590delta Perl changes in version 5.9.0 perl589delta Perl changes in version 5.8.9 perl588delta Perl changes in version 5.8.8 perl587delta Perl changes in version 5.8.7 @@ -208,10 +183,6 @@ For ease of access, the Perl manual has been split up into several sections. perl582delta Perl changes in version 5.8.2 perl581delta Perl changes in version 5.8.1 perl58delta Perl changes in version 5.8.0 - perl573delta Perl changes in version 5.7.3 - perl572delta Perl changes in version 5.7.2 - perl571delta Perl changes in version 5.7.1 - perl570delta Perl changes in version 5.7.0 perl561delta Perl changes in version 5.6.1 perl56delta Perl changes in version 5.6 perl5005delta Perl changes in version 5.005 @@ -266,6 +237,13 @@ For ease of access, the Perl manual has been split up into several sections. perlvos Perl notes for Stratus VOS perlwin32 Perl notes for Windows +=head2 Stubs for Deleted Documents + + perlboot + perlbot + perltooc + perltoot + On a Unix-like system, these documentation files will usually also be available as manpages for use with the F program. @@ -347,8 +325,7 @@ Described in L, L, L, and L. object-oriented programming -Described in L, L, L, L, -and L. +Described in L and L. =item * diff --git a/pod/perl5110delta.pod b/pod/perl5110delta.pod deleted file mode 100644 index 9c815f92ea6..00000000000 --- a/pod/perl5110delta.pod +++ /dev/null @@ -1,1623 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5110delta - what is new for perl v5.11.0 - -=head1 DESCRIPTION - -This document describes differences between the 5.10.0 release and -the 5.11.0 development release. - -=head1 Incompatible Changes - -=head2 Unicode interpretation of \w, \d, \s, and the POSIX character classes redefined. - -Previous versions of Perl tried to map POSIX style character class definitions onto -Unicode property names so that patterns would "dwim" when matches were made against latin-1 or -unicode strings. This proved to be a mistake, breaking character class negation, causing -forward compatibility problems (as Unicode keeps updating their property definitions and adding -new characters), and other problems. - -Therefore we have now defined a new set of artificial "unicode" property names which will be -used to do unicode matching of patterns using POSIX style character classes and perl short-form -escape character classes like \w and \d. - -The key change here is that \d will no longer match every digit in the unicode standard -(there are thousands) nor will \w match every word character in the standard, instead they -will match precisely their POSIX or Perl definition. - -Those needing to match based on Unicode properties can continue to do so by using the \p{} syntax -to match whichever property they like, including the new artificial definitions. - -B This is a backwards incompatible no-warning change in behaviour. If you are upgrading -and you process large volumes of text look for POSIX and Perl style character classes and -change them to the relevant property name (by removing the word 'Posix' from the current name). - -The following table maps the POSIX character class names, the escapes and the old and new -Unicode property mappings: - - POSIX Esc Class New-Property ! Old-Property - ----------------------------------------------+------------- - alnum [0-9A-Za-z] IsPosixAlnum ! IsAlnum - alpha [A-Za-z] IsPosixAlpha ! IsAlpha - ascii [\000-\177] IsASCII = IsASCII - blank [\011 ] IsPosixBlank ! - cntrl [\0-\37\177] IsPosixCntrl ! IsCntrl - digit \d [0-9] IsPosixDigit ! IsDigit - graph [!-~] IsPosixGraph ! IsGraph - lower [a-z] IsPosixLower ! IsLower - print [ -~] IsPosixPrint ! IsPrint - punct [!-/:-@[-`{-~] IsPosixPunct ! IsPunct - space [\11-\15 ] IsPosixSpace ! IsSpace - \s [\11\12\14\15 ] IsPerlSpace ! IsSpacePerl - upper [A-Z] IsPosixUpper ! IsUpper - word \w [0-9A-Z_a-z] IsPerlWord ! IsWord - xdigit [0-9A-Fa-f] IsXDigit = IsXDigit - -If you wish to build perl with the old mapping you may do so by setting - - #define PERL_LEGACY_UNICODE_CHARCLASS_MAPPINGS 1 - -in regcomp.h, and then setting - - PERL_TEST_LEGACY_POSIX_CC - -to true your environment when testing. - - -=head2 @INC reorganization - -In @INC, ARCHLIB and PRIVLIB now occur after after the current version's -site_perl and vendor_perl. - -=head2 Switch statement changes - -The handling of complex expressions by the C/C switch -statement has been enhanced. These enhancements are also available in -5.10.1 and subsequent 5.10 releases. There are two new cases where C now -interprets its argument as a boolean, instead of an expression to be used -in a smart match: - -=over 4 - -=item flip-flop operators - -The C<..> and C<...> flip-flop operators are now evaluated in boolean -context, following their usual semantics; see L. - -Note that, as in perl 5.10.0, C will not work to test -whether a given value is an integer between 1 and 10; you should use -C instead (note the array reference). - -However, contrary to 5.10.0, evaluating the flip-flop operators in boolean -context ensures it can now be useful in a C, notably for -implementing bistable conditions, like in: - - when (/^=begin/ .. /^=end/) { - # do something - } - -=item defined-or operator - -A compound expression involving the defined-or operator, as in -C, will be treated as boolean if the first -expression is boolean. (This just extends the existing rule that applies -to the regular or operator, as in C.) - -=back - -The next section details more changes brought to the semantics to -the smart match operator, that naturally also modify the behaviour -of the switch statements where smart matching is implicitly used. -These changers were also made for the 5.10.1 release, and will remain in -subsequent 5.10 releases. - -=head2 Smart match changes - -=head3 Changes to type-based dispatch - -The smart match operator C<~~> is no longer commutative. The behaviour of -a smart match now depends primarily on the type of its right hand -argument. Moreover, its semantics have been adjusted for greater -consistency or usefulness in several cases. While the general backwards -compatibility is maintained, several changes must be noted: - -=over 4 - -=item * - -Code references with an empty prototype are no longer treated specially. -They are passed an argument like the other code references (even if they -choose to ignore it). - -=item * - -C<%hash ~~ sub {}> and C<@array ~~ sub {}> now test that the subroutine -returns a true value for each key of the hash (or element of the -array), instead of passing the whole hash or array as a reference to -the subroutine. - -=item * - -Due to the commutativity breakage, code references are no longer -treated specially when appearing on the left of the C<~~> operator, -but like any vulgar scalar. - -=item * - -C is always false (since C can't be a key in a -hash). No implicit conversion to C<""> is done (as was the case in perl -5.10.0). - -=item * - -C<$scalar ~~ @array> now always distributes the smart match across the -elements of the array. It's true if one element in @array verifies -C<$scalar ~~ $element>. This is a generalization of the old behaviour -that tested whether the array contained the scalar. - -=back - -The full dispatch table for the smart match operator is given in -L. - -=head3 Smart match and overloading - -According to the rule of dispatch based on the rightmost argument type, -when an object overloading C<~~> appears on the right side of the -operator, the overload routine will always be called (with a 3rd argument -set to a true value, see L.) However, when the object will -appear on the left, the overload routine will be called only when the -rightmost argument is a simple scalar. This way distributivity of smart match -across arrays is not broken, as well as the other behaviours with complex -types (coderefs, hashes, regexes). Thus, writers of overloading routines -for smart match mostly need to worry only with comparing against a scalar, -and possibly with stringification overloading; the other common cases -will be automatically handled consistently. - -C<~~> will now refuse to work on objects that do not overload it (in order -to avoid relying on the object's underlying structure). (However, if the -object overloads the stringification or the numification operators, and -if overload fallback is active, it will be used instead, as usual.) - -=head2 Labels can't be keywords - -Labels used as targets for the C, C, C or C -statements cannot be keywords anymore. This restriction will prevent -potential confusion between the C and C syntaxes: -for example, a statement like C would jump to a label whose -name would be the return value of C, (usually 1), instead of a -label named C. Moreover, the other control flow statements -would just ignore any keyword passed to them as a label name. Since -such labels cannot be defined anymore, this kind of error will be -avoided. - -=head2 Other incompatible changes - -=over 4 - -=item * - -The semantics of C have changed slightly. -See L<"Modules and Pragmata"> for more information. - -=item * - -It is now a run-time error to use the smart match operator C<~~> -with an object that has no overload defined for it. (This way -C<~~> will not break encapsulation by matching against the -object's internal representation as a reference.) - -=item * - -The version control system used for the development of the perl -interpreter has been switched from Perforce to git. This is mainly an -internal issue that only affects people actively working on the perl core; -but it may have minor external visibility, for example in some of details -of the output of C. See L for more information. - -=item * - -The internal structure of the C directory in the perl source has -been reorganised. In general, a module C whose source was -stored under F is now located under F. Also, -nearly all dual-life modules have been moved from F to F. This -is purely a source tarball change, and should make no difference to the -compilation or installation of perl, unless you have a very customised build -process that explicitly relies on this structure, or which hard-codes the -C F parameter. Specifically, this change does not by -default alter the location of any files in the final installation. - -=item * - -As part of the C 2.x to 3.x upgrade, the experimental -C module has been removed. -See L for more details. - -=item * - -As part of the C upgrade, the -C and C modules -have been removed from this distribution. - -=item * - -C no longer contains the C<%:patchlevel> hash. - -=item * - -This one is actually a change introduced in 5.10.0, but it was missed -from that release's perldelta, so it is mentioned here instead. - -A bugfix related to the handling of the C modifier and C resulted -in a change of behaviour between 5.8.x and 5.10.0: - - # matches in 5.8.x, doesn't match in 5.10.0 - $re = qr/^bar/; "foo\nbar" =~ /$re/m; - -=item * - -C now returns undef. - -=item * - -Unsupported private C API functions are now declared "static" to prevent -leakage to Perl's public API. - -=item * - -To support the bootstrapping process, F no longer builds with -UTF-8 support in the regexp engine. - -This allows a build to complete with PERL_UNICODE set and a UTF-8 locale. -Without this there's a bootstrapping problem, as miniperl can't load the UTF-8 -components of the regexp engine, because they're not yet built. - -=item * - -F's @INC is now restricted to just -I..., the split of $ENV{PERL5LIB}, and "." - -=item * - -A space or a newline is now required after a C<"#line XXX"> directive. - -=item * - -Tied filehandles now have an additional method EOF which provides the EOF type - -=item * - -To better match all other flow control statements, C may no longer be used as an attribute. - -=back - -=head1 Core Enhancements - -=head2 Unicode Character Database 5.1.0 - -The copy of the Unicode Character Database included in Perl 5.11.0 has -been updated to 5.1.0 from 5.0.0. See -L for the -notable changes. - -=head2 A proper interface for pluggable Method Resolution Orders - -As of Perl 5.11.0 there is a new interface for plugging and using method -resolution orders other than the default (linear depth first search). -The C3 method resolution order added in 5.10.0 has been re-implemented as -a plugin, without changing its Perl-space interface. See L for -more information. - -=head2 The C pragma - -This pragma allows you to lexically disable or enable overloading -for some or all operations. (Yuval Kogman) - -=head2 C<\N> regex escape - -A new regex escape has been added, C<\N>. It will match any character that -is not a newline, independently from the presence or absence of the single -line match modifier C. (If C<\N> is followed by an opening brace and -by a letter, perl will still assume that a Unicode character name is -coming, so compatibility is preserved.) (Rafael Garcia-Suarez) - -=head2 Implicit strictures - -Using the C syntax with a version number greater or equal -to 5.11.0 will also lexically enable strictures just like C -would do (in addition to enabling features.) So, the following: - - use 5.11.0; - -will now imply: - - use strict; - use feature ':5.11'; - -=head2 Parallel tests - -The core distribution can now run its regression tests in parallel on -Unix-like platforms. Instead of running C, set C in -your environment to the number of tests to run in parallel, and run -C. On a Bourne-like shell, this can be done as - - TEST_JOBS=3 make test_harness # Run 3 tests in parallel - -An environment variable is used, rather than parallel make itself, because -L needs to be able to schedule individual non-conflicting test -scripts itself, and there is no standard interface to C utilities to -interact with their job schedulers. - -Note that currently some test scripts may fail when run in parallel (most -notably C). If necessary run just the failing scripts -again sequentially and see if the failures go away. - -=head2 The C<...> operator - -A new operator, C<...>, nicknamed the Yada Yada operator, has been added. -It is intended to mark placeholder code, that is not yet implemented. -See L. (chromatic) - -=head2 DTrace support - -Some support for DTrace has been added. See "DTrace support" in F. - -=head2 Support for C in CPAN module metadata - -Both C and C now support the C keyword -in the F metadata file included in most recent CPAN distributions. -This allows distribution authors to specify configuration prerequisites that -must be installed before running F or F. - -See the documentation for C or C for more -on how to specify C when creating a distribution for CPAN. - -=head2 C is now more flexible - -The C function can now operate on arrays. - -=head2 Y2038 compliance - -Perl's core time-related functions are now Y2038 compliant. (With 29 -years to spare!) - -=head2 C<$,> flexibility - -The variable C<$,> may now be tied. - -=head2 // in where clauses - -// now behaves like || in when clauses - -=head2 Enabling warnings from your shell environment - -You can now set C<-W> from the C environment variable - -=head2 C - -C now allows you to locally delete a hash entry. - -=head2 New support for Abstract namespace sockets - -Abstract namespace sockets are Linux-specific socket type that live in -AF_UNIX family, slightly abusing it to be able to use arbitrary -character arrays as addresses: They start with nul byte and are not -terminated by nul byte, but with the length passed to the socket() -system call. - -=head1 Modules and Pragmata - -=head2 Dual-lifed modules moved - -Dual-lifed modules maintained primarily in the Perl core now live in dist/. -Dual-lifed modules maintained primarily on CPAN now live in cpan/ - -In previous releases of Perl, it was customary to enumerate all module -changes in this section of the C file. From 5.11.0 forward -only notable updates (such as new or deprecated modules ) will be -listed in this section. For a complete reference to the versions of -modules shipped in a given release of perl, please see L. - -=head2 New Modules and Pragmata - -=over 4 - -=item C - -This is a new lexically-scoped alternative for the C module. -The bundled version is 2.06_01. Note that in this release, using a string -eval when C is in effect can cause the autodie behaviour to leak -into the surrounding scope. See L for more details. - -=item C - -This has been added to the core (version 2.020). - -=item C - -This pragma establishes an ISA relationship with base classes at compile -time. It provides the key feature of C without the feature creep. - -=item C - -This has been added to the core (version 1.39). - -=back - -=head2 Pragmata Changes - -=over 4 - -=item C - -See L pragma"> above. - -=item C - -The C pragma has been removed. It had been marked as deprecated since -5.6.0. - -=item C - -The Unicode F database file has been added. This has the -effect of adding some extra C<\N> character names that formerly wouldn't -have been recognised; for example, C<"\N{LATIN CAPITAL LETTER GHA}">. - -=item C - -The meaning of the C<:5.10> and C<:5.10.X> feature bundles has -changed slightly. The last component, if any (i.e. C) is simply ignored. -This is predicated on the assumption that new features will not, in -general, be added to maintenance releases. So C<:5.10> and C<:5.10.X> -have identical effect. This is a change to the behaviour documented for -5.10.0. - -=item C - -Upgraded from version 1.00 to 1.01. Performance for single inheritance is 40% -faster - see L below. - -C is now implemented as an XS extension. The documented interface has not -changed. Code relying on the implementation detail that some C -methods happened to be available at all times gets to "keep both pieces". - -=back - -=head2 Updated Modules - -=over 4 - -=item C - -Upgraded from version 6.42 to 6.55_02. - -Note that C and C -have been removed from this distribution. - -=item C - -Upgraded from version 2.64 to 3.17. - -Note that one side-effect of the 2.x to 3.x upgrade is that the -experimental C module (and its supporting -C, C, C and C modules) have been -removed. If you still need this, then they are available in the -(unmaintained) C distribution on CPAN. - -=item C - -Upgraded from version 1.04 to 1.05. - -C<< UNIVERSAL-Eimport() >> is now deprecated. - -=back - -=head1 Utility Changes - -=over 4 - -=item F - -Now looks in C too, which is a recent addition to gcc's -search path. - -=item F - -No longer incorrectly treats enum values like macros (Daniel Burr). - -Now handles C++ style constants (C) properly in enums. (A patch from -Rainer Weikusat was used; Daniel Burr also proposed a similar fix). - -=item F - -C subroutines now work under the debugger. - -The debugger now correctly handles proxy constant subroutines, and -subroutine stubs. - -=item F - -F now uses C<%Module::CoreList::bug_tracker> to print out upstream bug -tracker URLs. - -Where the user names a module that their bug report is about, and we know the -URL for its upstream bug tracker, provide a message to the user explaining -that the core copies the CPAN version directly, and provide the URL for -reporting the bug directly to upstream. - -=item F - -Perl 5.11.0 added a new utility F, which is a variant of -F, but for sending non-bug-reports to the authors and maintainers -of Perl. Getting nothing but bug reports can become a bit demoralising: -we'll see if this changes things. - -=back - -=head1 New Documentation - -=over 4 - -=item L - -This contains instructions on how to build perl for the Haiku platform. - -=item L - -This describes the new interface for pluggable Method Resolution Orders. - -=item L - -This document, by Richard Foley, provides an introduction to the use of -performance and optimization techniques which can be used with particular -reference to perl programs. - -=item L - -This describes how to access the perl source using the I version -control system. - -=back - -=head1 Changes to Existing Documentation - -The various large F files (which listed every change made to perl -over the last 18 years) have been removed, and replaced by a small file, -also called F, which just explains how that same information may -be extracted from the git version control system. - -The file F has been deleted, as it mainly described -interacting with the old Perforce-based repository, which is now obsolete. -Information still relevant has been moved to L. - -L, L, L and L are now all -generated at build time, rather than being shipped as part of the release. - -=over - -=item * - -Documented -X overloading. - -=item * - -Documented that C treats specially most of the filetest operators - -=item * - -Documented when as a syntax modifier - -=item * - -Eliminated "Old Perl threads tutorial", which describes 5005 threads. - -F is the same material reworked for ithreads. - -=item * - -Correct previous documentation: v-strings are not deprecated - -With version objects, we need them to use MODULE VERSION syntax. This -patch removes the deprecation note. - -=item * - -Added security contact information to L - -=back - -=head1 Performance Enhancements - - -=over 4 - -=item * - -A new internal cache means that C will often be faster. - -=item * - -The implementation of C Method Resolution Order has been optimised - -linearisation for classes with single inheritance is 40% faster. Performance -for multiple inheritance is unchanged. - -=item * - -Under C, the locale-relevant information is now cached on -read-only values, such as the list returned by C. This makes -operations such as C in the scope of C much -faster. - -=item * - -Empty C methods are no longer called. - -=item * - -Faster C - -=item * - -Speed up C on empty hash - -=back - -=head1 Installation and Configuration Improvements - -=head2 F reorganisation - -The layout of directories in F has been revised. Specifically, all -extensions are now flat, and at the top level, with C in pathnames -replaced by C<->, so that F is now F, -etc. The names of the extensions as specified to F, and as -reported by C<%Config::Config> under the keys C, -C, C and C have not changed, and -still use C. Hence this change will not have any affect once perl is -installed. C has been split out from being part of C, and -C is now an extension in its own right. - -Nearly all dual-life modules have been moved from F to F, and will -now appear as known C. This will made no difference to the -structure of an installed perl, nor will the modules installed differ, -unless you run F with options to specify an exact list of -extensions to build. In this case, you will rapidly become aware that you -need to add to your list, because various modules needed to complete the -build, such as C, have now become extensions, and -without them the build will fail well before it attempts to run the -regression tests. - -=head2 Configuration improvements - -If C and C are the same, then they are only added to -C<@INC> once. - -C<$Config{usedevel}> and the C-level C are now defined if -perl is built with C<-Dusedevel>. - -F will enable use of C<-fstack-protector>, to provide protection -against stack-smashing attacks, if the compiler supports it. - -F will now determine the correct prototypes for re-entrant -functions, and for C, if you are using a C++ compiler rather -than a C compiler. - -On Unix, if you build from a tree containing a git repository, the -configuration process will note the commit hash you have checked out, for -display in the output of C and C. Unpushed local commits -are automatically added to the list of local patches displayed by -C. - -=head2 Compilation improvements - -As part of the flattening of F, all extensions on all platforms are -built by F. This replaces the Unix-specific -F, VMS-specific F and Win32-specific -F. - -=head2 Platform Specific Changes - -=over 4 - -=item AIX - -Removed F for AIX 5L and 6.1. Only C was used from F. - -Removed F for AIX 5L and 6.1. The F is delivered as an -optional package with the AIX Toolbox. Unfortunately the 64 bit version -is broken. - -Hints changes mean that AIX 4.2 should work again. - -=item Cygwin - -On Cygwin we now strip the last number from the DLL. This has been the -behaviour in the cygwin.com build for years. The hints files have been -updated. - -=item DomainOS - -Support for Apollo DomainOS was removed in Perl 5.11.0 - -=item FreeBSD - -The hints files now identify the correct threading libraries on FreeBSD 7 -and later. - -=item Irix - -We now work around a bizarre preprocessor bug in the Irix 6.5 compiler: -C unfortunately goes into K&R mode, but C doesn't. - -=item Haiku - -Patches from the Haiku maintainers have been merged in. Perl should now -build on Haiku. - -=item MachTen - -Support for Tenon Intersystems MachTen Unix layer for MacOS Classic was -removed in Perl 5.11.0 - -=item MiNT - -Support for Atari MiNT was removed in Perl 5.11.0. - -=item MirOS BSD - -Perl should now build on MirOS BSD. - -=item NetBSD - -Hints now supports versions 5.*. - -=item Stratus VOS - -Various changes from Stratus have been merged in. - -=item Symbian - -There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK. - -=item Win32 - -Improved message window handling means that C and C messages -will no longer be dropped under race conditions. - -=item VMS - -Reads from the in-memory temporary files of C used to fail -if C<$/> was set to a numeric reference (to indicate record-style reads). -This is now fixed. - -VMS now supports C. - -Many improvements and cleanups have been made to the VMS file name handling -and conversion code. - -Enabling the C logical name now encodes a POSIX exit -status in a VMS condition value for better interaction with GNV's bash -shell and other utilities that depend on POSIX exit values. See -L for details. - -C now detects Unix compatibility mode on VMS. - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -C<-I> on shebang line now adds directories in front of @INC -as documented, and as does C<-I> when specified on the command-line. - -=item * - -C is now fatal when called on non-numeric process identifiers. -Previously, an 'undef' process identifier would be interpreted as a request to -kill process "0", which would terminate the current process group on POSIX -systems. Since process identifiers are always integers, killing a non-numeric -process is now fatal. - -=item * - -5.10.0 inadvertently disabled an optimisation, which caused a measurable -performance drop in list assignment, such as is often used to assign -function parameters from C<@_>. The optimisation has been re-instated, and -the performance regression fixed. - -=item * - -Fixed memory leak on C [RT #53038]. - -=item * - -Some potential coredumps in PerlIO fixed [RT #57322,54828]. - -=item * - -The debugger now works with lvalue subroutines. - -=item * - -The debugger's C command was broken on modules that defined constants -[RT #61222]. - -=item * - -C and string complement could return tainted values for untainted -arguments [RT #59998]. - -=item * - -The C<-i>I<.suffix> command-line switch now recreates the file using -restricted permissions, before changing its mode to match the original -file. This eliminates a potential race condition [RT #60904]. - -=item * - -On some Unix systems, the value in C<$?> would not have the top bit set -(C<$? & 128>) even if the child core dumped. - -=item * - -Under some circumstances, C<$^R> could incorrectly become undefined -[RT #57042]. - -=item * - -In the XS API, various hash functions, when passed a pre-computed hash where -the key is UTF-8, might result in an incorrect lookup. - -=item * - -XS code including F before F gave a compile-time error -[RT #57176]. - -=item * - -C<< $object-Eisa('Foo') >> would report false if the package C didn't -exist, even if the object's C<@ISA> contained C. - -=item * - -Various bugs in the new-to 5.10.0 mro code, triggered by manipulating -C<@ISA>, have been found and fixed. - -=item * - -Bitwise operations on references could crash the interpreter, e.g. -C<$x=\$y; $x |= "foo"> [RT #54956]. - -=item * - -Patterns including alternation might be sensitive to the internal UTF-8 -representation, e.g. - - my $byte = chr(192); - my $utf8 = chr(192); utf8::upgrade($utf8); - $utf8 =~ /$byte|X}/i; # failed in 5.10.0 - -=item * - -Within UTF8-encoded Perl source files (i.e. where C is in -effect), double-quoted literal strings could be corrupted where a C<\xNN>, -C<\0NNN> or C<\N{}> is followed by a literal character with ordinal value -greater than 255 [RT #59908]. - -=item * - -C failed to correctly deparse various constructs: -C [RT #62428], C [RT #62488], -C [RT #62484]. - -=item * - -Using C with no arguments could corrupt the perl stack. - -=item * - -The block form of C is now specifically trappable by C and -C. Previously it was erroneously treated like string C. - -=item * - -In 5.10.0, the two characters C<[~> were sometimes parsed as the smart -match operator (C<~~>) [RT #63854]. - -=item * - -In 5.10.0, the C<*> quantifier in patterns was sometimes treated as -C<{0,32767}> [RT #60034, #60464]. For example, this match would fail: - - ("ab" x 32768) =~ /^(ab)*$/ - -=item * - -C was limited to a 32 bit segment size on a 64 bit OS [RT #63924]. - -=item * - -Using C or C to exit a C block no longer produces a -spurious warning like the following: - - Exiting given via last at foo.pl line 123 - -=item * - -On Windows, C<'.\foo'> and C<'..\foo'> were treated differently than -C<'./foo'> and C<'../foo'> by C and C [RT #63492]. - -=item * - -Assigning a format to a glob could corrupt the format; e.g.: - - *bar=*foo{FORMAT}; # foo format now bad - -=item * - -Attempting to coerce a typeglob to a string or number could cause an -assertion failure. The correct error message is now generated, -C>. - -=item * - -Under C, C<-x> was using the wrong access mode. This -has been fixed [RT #49003]. - -=item * - -C on a tied scalar that returned a Unicode value would not be -correct the first time. This has been fixed. - -=item * - -Using an array C inside in array C could SEGV. This has been -fixed. [RT #51636] - -=item * - -A race condition inside C has been identified and -fixed. This used to cause various threading issues, including SEGVs. - -=item * - -In C, the use of C<()> groups in scalar context was internally -placing a list on the interpreter's stack, which manifested in various -ways, including SEGVs. This is now fixed [RT #50256]. - -=item * - -Magic was called twice in C, C<\&$x>, C and C. -These have all been fixed. - -=item * - -A 5.10.0 optimisation to clear the temporary stack within the implicit -loop of C has been reverted, as it turned out to be the cause of -obscure bugs in seemingly unrelated parts of the interpreter [commit -ef0d4e17921ee3de]. - -=item * - -The line numbers for warnings inside C are now correct. - -=item * - -The C<..> operator now works correctly with ranges whose ends are at or -close to the values of the smallest and largest integers. - -=item * - -C could lead to segmentation faults on some platforms. -This has been fixed [RT #54828]. - -=item * - -An off-by-one error meant that C was effectively being -executed as C. This has been fixed [RT #53746]. - -=item * - -Various leaks associated with named captures in regexes have been fixed -[RT #57024]. - -=item * - -A weak reference to a hash would leak. This was affecting C -[RT #56908]. - -=item * - -Using (?|) in a regex could cause a segfault [RT #59734]. - -=item * - -Use of a UTF-8 C within a closure could cause a segfault [RT #61520]. - -=item * - -Calling C or otherwise upgrading an SV could result in an -unaligned 64-bit access on the SPARC architecture [RT #60574]. - -=item * - -In the 5.10.0 release, C would incorrectly list -C<5.10.*> after C<5.8.*>; this affected the C<@INC> search order -[RT #67628]. - -=item * - -In 5.10.0, C returned a non-tainted value -[RT #52552]. - -=item * - -In 5.10.0, C and C could produce the fatal error -C when printing UTF-8 strings -[RT #62666]. - -=item * - -In the 5.10.0 release, a dynamically created C method might be -missed (method cache issue) [RT #60220,60232]. - -=item * - -In the 5.10.0 release, a combination of C and C could -cause a memory leak [RT #63110]. - -=item * - -C<-C> on the shebang (C<#!>) line is once more permitted if it is also -specified on the command line. C<-C> on the shebang line used to be a -silent no-op I it was not also on the command line, so perl 5.10.0 -disallowed it, which broke some scripts. Now perl checks whether it is -also on the command line and only dies if it is not [RT #67880]. - -=item * - -In 5.10.0, certain types of re-entrant regular expression could crash, -or cause the following assertion failure [RT #60508]: - - Assertion rx->sublen >= (s - rx->subbeg) + i failed - -=item * - -Previously missing files from Unicode 5.1 Character Database are now included. - -=item * - -C is now honored when opening an anonymous temporary file - -=back - -=head1 New or Changed Diagnostics - -=over 4 - -=item C - -This new fatal error occurs when the C routine C was -passed a position that is not within the scalar's string buffer. This -could be caused by buggy XS code, and at this point recovery is not -possible. - -=item C - -This warning has been removed. In general, it only got produced in -conjunction with other warnings, and removing it allowed an ISA lookup -optimisation to be added. - -=item C - -This warning has been removed. - -=item C - -It is now possible to change the depth threshold for this warning from the -default of 100, by recompiling the F binary, setting the C -pre-processor macro C to the desired value. - -=back - -=head1 Changed Internals - -=over 4 - -=item * - -TODO: C is gone. RVs are now stored in IVs - -=item * - -TODO: REGEXPs are first class - -=item * - -TODO: OOK is reworked, such that an OOKed scalar is PV not PVIV - -=item * - -The J.R.R. Tolkien quotes at the head of C source file have been checked and -proper citations added, thanks to a patch from Tom Christiansen. - -=item * - -C now accepts a null first argument. In addition, a full audit -was made of the "not NULL" compiler annotations, and those for several -other internal functions were corrected. - -=item * - -New macros C, C, C, C -have been added to formalise the temporary saving of the C -variable. - -=item * - -The function C has been added to augment -C. - -=item * - -The function C has been added, equivalent to -C followed by C. - -=item * - -The function C has been added, equivalent to -C and then performing the action relevant to the flag. - -Two flag bits are currently supported. - -=over 4 - -=item C - -This will call C for you. (Note that this does not convert an -sequence of ISO 8859-1 characters to UTF-8). A wrapper, C -is available for this. - -=item C - -Call C on the new SV. - -=back - -There is also a wrapper that takes constant strings, C. - -=item * - -The function C has been added as a wrapper to -C. - -=item * - -The functions C and C are now -exported. - -=item * - -C has been exterminated from the core code, replaced by local STRLEN -temporaries, or C<*_nolen()> calls. Either approach is faster than C, -which is a pointer deference into the interpreter structure under ithreads, -and a global variable otherwise. - -=item * - -C used to leave freed memory accessible via C on -the scalar. It now updates the linked list to remove each piece of magic -as it is freed. - -=item * - -Under ithreads, the regex in C is now reference counted. This -eliminates a lot of hackish workarounds to cope with it not being reference -counted. - -=item * - -C would sometimes incorrectly turn on C. -This has been fixed. - -=item * - -The I IV and NV flags are now not set if the string value has -trailing "garbage". This behaviour is consistent with not setting the -public IV or NV flags if the value is out of range for the type. - -=item * - -SV allocation tracing has been added to the diagnostics enabled by C<-Dm>. -The tracing can alternatively output via the C mechanism, if -that was enabled when the F binary was compiled. - -=item * - -Smartmatch resolution tracing has been added as a new diagnostic. Use C<-DM> to -enable it. - -=item * - -A new debugging flag C<-DB> now dumps subroutine definitions, leaving -C<-Dx> for its original purpose of dumping syntax trees. - -=item * - -Uses of C, C, C, C, C etc have been -replaced by C in the core code, and non-dual-life modules, as C -is clearer to those unfamiliar with the core code. - -=item * - -A macro C has been added, which on (non-pedantic) gcc will -not cast away C, returning a C. Macros C, -C etc build on this, casting to C etc without -casting away C. This allows proper compile-time auditing of -C correctness in the core, and helped picked up some errors (now -fixed). - -=item * - -Macros C and C have been added, for pushing SVs on the -stack and mortalizing them. - -=item * - -Use of the private structure C has changed slightly. Nothing -outside the core should be accessing this directly anyway. - -=item * - -A new tool, F has been added, that allows you -to view how a C preprocessor macro would be expanded when compiled. -This is handy when trying to decode the macro hell that is the perl -guts. - -=back - -=head1 New Tests - -Many modules updated from CPAN incorporate new tests. - -Several tests that have the potential to hang forever if they fail now -incorporate a "watchdog" functionality that will kill them after a timeout, -which helps ensure that C and C run to -completion automatically. (Jerry Hedden). - -Some core-specific tests have been added: - -=over 4 - -=item t/comp/retainedlines.t - -Check that the debugger can retain source lines from C. - -=item t/io/perlio_fail.t - -Check that bad layers fail. - -=item t/io/perlio_leaks.t - -Check that PerlIO layers are not leaking. - -=item t/io/perlio_open.t - -Check that certain special forms of open work. - -=item t/io/perlio.t - -General PerlIO tests. - -=item t/io/pvbm.t - -Check that there is no unexpected interaction between the internal types -C and C. - -=item t/mro/package_aliases.t - -Check that mro works properly in the presence of aliased packages. - -=item t/op/dbm.t - -Tests for C and C. - -=item t/op/index_thr.t - -Tests for the interaction of C and threads. - -=item t/op/pat_thr.t - -Tests for the interaction of esoteric patterns and threads. - -=item t/op/qr_gc.t - -Test that C doesn't leak. - -=item t/op/reg_email_thr.t - -Tests for the interaction of regex recursion and threads. - -=item t/op/regexp_qr_embed_thr.t - -Tests for the interaction of patterns with embedded C and threads. - -=item t/op/regexp_unicode_prop.t - -Tests for Unicode properties in regular expressions. - -=item t/op/regexp_unicode_prop_thr.t - -Tests for the interaction of Unicode properties and threads. - -=item t/op/reg_nc_tie.t - -Test the tied methods of C. - -=item t/op/reg_posixcc.t - -Check that POSIX character classes behave consistently. - -=item t/op/re.t - -Check that exportable C functions in F work. - -=item t/op/setpgrpstack.t - -Check that C works. - -=item t/op/substr_thr.t - -Tests for the interaction of C and threads. - -=item t/op/upgrade.t - -Check that upgrading and assigning scalars works. - -=item t/uni/lex_utf8.t - -Check that Unicode in the lexer works. - -=item t/uni/tie.t - -Check that Unicode and C work. - -=back - -=head1 Known Problems - -This is a list of some significant unfixed bugs, which are regressions -from either 5.10.0 or 5.8.x. - -=over 4 - -=item * - -C misbehaves in the presence of a lexical C<$_> -(typically introduced by C or implicitly by C). The variable -which gets set for each iteration is the package variable C<$_>, not the -lexical C<$_> [RT #67694]. - -A similar issue may occur in other modules that provide functions which -take a block as their first argument, like - - foo { ... $_ ...} list - -=item * - -The C pragma may generate a run-time error when a regex is -interpolated [RT #56444]: - - use charnames ':full'; - my $r1 = qr/\N{THAI CHARACTER SARA I}/; - "foo" =~ $r1; # okay - "foo" =~ /$r1+/; # runtime error - -A workaround is to generate the character outside of the regex: - - my $a = "\N{THAI CHARACTER SARA I}"; - my $r1 = qr/$a/; - -=item * - -Some regexes may run much more slowly when run in a child thread compared -with the thread the pattern was compiled into [RT #55600]. - -=back - -=head1 Deprecations - -The following items are now deprecated. - -=over 4 - -=item * - -C is buggy and should be avoided. From perl 5.11.0 onwards, it is -intended that any use of the core version of this module will emit a -warning, and that the module will eventually be removed from the core -(probably in perl 5.14.0). See L for its -replacement. - -=item * - -The following modules will be removed from the core distribution in a future -release, and should be installed from CPAN instead. Distributions on CPAN -which require these should add them to their prerequisites. The core versions -of these modules warnings will issue a deprecation warning. - -=over - -=item * - -C - -=item * - -C - -=item * - -C - -=back - -Currently support to install from CPAN without a I is C in CPAN -and CPANPLUS. This will be addressed before 5.12.0 ships. - -=item * - -C has been removed. It used to provide a mechanism to -emulate setuid permission bits on systems that don't support it properly. - -=item * - -Deprecate assignment to $[ - -=item * - -Remove attrs, which has been deprecated since 1999/10/02. - -=item * - -Deprecate use of the attribute :locked on subroutines. - -=item * - -Deprecate using "locked" with the attributes pragma. - -=item * - -Deprecate using "unique" with the attributes pragma. - -=item * - -warn if ++ or -- are unable to change the value because it's beyond the limit of representation - -This uses a new warnings category: "imprecision". - -=item * - -Make lc/uc/lcfirst/ucfirst warn when passed undef. - -=item * - -Show constant in "Useless use of a constant in void context" - -=item * - -Make the new warning report undef constants as undef - -=item * - -Add a new warning, "Prototype after '%s'" - -=item * - -Tweak the "Illegal character in prototype" warning so it's more precise when reporting illegal characters after _ - -=item * - -Unintended interpolation of $\ in regex - -=item * - -Make overflow warnings in gmtime/localtime only occur when warnings are on - -=item * - -Improve mro merging error messages. - -They are now very similar to those produced by Algorithm::C3. - -=item * - -Amelioration of the error message "Unrecognized character %s in column %d" - -Changes the error message to "Unrecognized character %s; marked by E-- -HERE after %sE-- HERE near column %d". This should make it a little -simpler to spot and correct the suspicious character. - -=item * - -Explicitly point to $. when it causes an uninitialized warning for ranges in scalar context - -=item * - -Deprecated numerous Perl 4-era libraries: - -F, F, F, F, F, -F, F, F, F, F, -F, F, F, F, -F, F, F, F, F, -F, F, F, F, F, -F, F, F, F, and -F are all now deprecated. Using them will incur a warning. - -=back - -=head1 Acknowledgements - -Some of the work in this release was funded by a TPF grant funded by -Dijkmat BV, The Netherlands. - -Steffen Mueller and David Golden in particular helped getting CPAN modules -polished and synchronised with their in-core equivalents. - -Craig Berry was tireless in getting maint to run under VMS, no matter how -many times we broke it for him. - -The other core committers contributed most of the changes, and applied most -of the patches sent in by the hundreds of contributors listed in F. - -Much of the work of categorizing changes in this perldelta file was contributed -by the following porters using changelogger.bestpractical.com: - -Nicholas Clark, leon, shawn, alexm, rjbs, rafl, Pedro Melo, brunorc, -anonymous, ☄, Tom Hukins, anonymous, Jesse, dagolden, Moritz Onken, -Mark Fowler, chorny, anonymous, tmtm - -Finally, thanks to Larry Wall, without whom none of this would be -necessary. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut - - diff --git a/pod/perl5111delta.pod b/pod/perl5111delta.pod deleted file mode 100644 index e3e70dce61d..00000000000 --- a/pod/perl5111delta.pod +++ /dev/null @@ -1,365 +0,0 @@ -=head1 NAME - -perl5111delta - what is new for perl v5.11.1 - -=head1 DESCRIPTION - -This document describes differences between the 5.11.0 release and -the 5.11.1 release. - -=head1 Incompatible Changes - -=over - -=item * - -The boolkeys op moved to the group of hash ops. This breaks binary compatibility. - -=item * - -C<\s> C<\w> and C<\d> once again have the semantics they had in Perl 5.8.x. - - -=back - -=head1 Core Enhancements - -=head2 Add C syntax - -This new syntax allows a module author to set the $VERSION of a namespace -when the namespace is declared with 'package'. It eliminates the need -for C and similar constructs. E.g. - - package Foo::Bar 1.23; - # $Foo::Bar::VERSION == 1.23 - -There are several advantages to this: - -=over - -=item * - -C<$VERSION> is parsed in I the same way as C - -=item * - -C<$VERSION> is set at compile time - -=item * - -Eliminates C<$VERSION = ...> and C clutter - -=item * - -As it requires VERSION to be a numeric literal or v-string -literal, it can be statically parsed by toolchain modules -without C the way MM-Eparse_version does for C<$VERSION = ...> - -=item * - -Alpha versions with underscores do not need to be quoted; static -parsing will preserve the underscore, but during compilation, Perl -will remove underscores as it does for all numeric literals - -It does not break old code with only C, but code that uses -C will need to be restricted to perl 5.11.X or newer -This is analogous to the change to C from two-args to three-args. -Users requiring the latest Perl will benefit, and perhaps N years from -now it will become standard practice when Perl 5.12 is targeted the way -that 5.6 is today. - -=back - -=head1 Modules and Pragmata - -=head2 Updated Modules - -=over 4 - -=item * - -Upgrade to Test-Simple 0.94 - -=item * - -Upgrade to Storable 2.21 - -=item * - -Upgrade to Pod-Simple 3.08 - -=item * - -Upgrade to Parse-CPAN-Meta 1.40 - -=item * - -Upgrade to ExtUtils-Manifest 1.57 - -=item * - -Upgrade to ExtUtils-CBuilder 0.260301 - -=item * - -Upgrade to CGI.pm-3.48 - -=item * - -Upgrade CPANPLUS to CPAN version 0.89_02 - -=item * - -Upgrade to threads::shared 1.32 - -=item * - -Upgrade ExtUtils::ParseXS to 2.21 - -=item * - -Upgrade File::Path to 2.08 (and add taint.t test) - -=item * - -Upgrade Module::CoreList to 2.20 - -=item * - -Updated Object::Accessor to0.36 - -=back - -=head1 New Documentation - -=over 4 - -=item * - -L extends the "Social contract about contributed modules" into -the beginnings of a document on Perl porting policies. - -=back - -=head1 Changes to Existing Documentation - -=over - -=item Documentation for C<$1> in perlvar.pod clarified - -=back - -=head1 Performance Enhancements - -=over 4 - -=item C has been optimized to be faster than C - -=back - -=head1 Platform Specific Notes - -=over 4 - -=item Darwin (Mac OS X) - -=over 4 - -=item * - -Skip testing the be_BY.CP1131 locale on Darwin 10 (Mac OS X 10.6), -as it's still buggy. - -=item * - -Correct infelicities in the regexp used to identify buggy locales -on Darwin 8 and 9 (Mac OS X 10.4 and 10.5, respectively). - -=back - -=item DragonFly BSD - -=over 4 - -=item * - -Fix thread library selection [perl #69686] - -=back - -=item Win32 - -=over 4 - -=item * - -Initial support for mingw64 is now available - -=item * - -Various bits of Perl's build infrastructure are no longer converted to win32 line endings at release time. If this hurts you, please speak up. - -=back - - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -Perl now properly returns a syntax error instead of segfaulting -if C, C or C is used without an argument - -=item * - -C now fails properly if called without an argument and when no previous file was read - -C now returns C<-1>, and sets errno to C, thus restoring the 5.8.x behaviour - -=item * - -overload no longer implicitly unsets fallback on repeated 'use overload' lines - -=item * - -POSIX::strftime() can now handle Unicode characters in the format string. - -=item * - -The Windows select() implementation now supports all empty Cs more correctly. - -=back - -=head1 New or Changed Diagnostics - -=over 4 - -=item * - -The 'syntax' category was removed from 5 warnings that should only be in 'deprecated'. - -=item * - -Three fatal pack/unpack error messages have been normalized to "panic: %s" - -=item * - -"Unicode character is illegal" has been rephrased to be more accurate - -It now reads C and the -perldiag documentation has been expanded a bit. - -=item * - -Perl now defaults to issuing a warning if a deprecated language feature is used. - -To disable this feature in a given lexical scope, you should use C For information about which language features -are deprecated and explanations of various deprecation warnings, please -see L - -=back - -=head1 Testing - -=over 4 - -=item * - -Significant cleanups to core tests to ensure that language and -interpreter features are not used before they're tested. - -=item * - -C now runs a number of important pre-commit checks which might be of use to anyone working on the Perl core. - -=item * - -F automatically checks the well-formedness of -POD found in all .pl, .pm and .pod files in the F, other than in -dual-lifed modules which are primarily maintained outside the Perl core. - -=item * - -F now tests that all files listed in MANIFEST are present. - -=back - -=head1 Known Problems - -=over 4 - -=item Untriaged test crashes on Windows 2000 - -Several porters have reported mysterious crashes when Perl's entire test suite is run after a build on certain Windows 2000 systems. When run by hand, the individual tests reportedly work fine. - -=item Known test failures on VMS - -Perl 5.11.1 fails a small set of core and CPAN tests as of this release. -With luck, that'll be sorted out for 5.11.2 - -=back - -=head1 Errata for 5.11.0 - -=over - -=item The Perl 5.11.0 release notes incorrectly described 'delete local' - -=back - -=head1 Acknowledgements - -Perl 5.11.1 represents approximately 3 weeks development since Perl 5.11.0 -contains 22,000 lines of changes across 396 files from 26 authors and committers: - -Abigail, Alex Vandiver, brian d foy, Chris Williams, Craig A. Berry, -David Fifield, David Golden, demerphq, Eric Brine, Geoffrey T. Dairiki, -George Greer, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, Jesse Vincent, -Josh ben Jore, Max Maischein, Nicholas Clark, Rafael Garcia-Suarez, -Simon Schubert, Sisyphus, Smylers, Steve Hay, Steve Peters, Vincent Pit -and Yves Orton. - -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. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5112delta.pod b/pod/perl5112delta.pod deleted file mode 100644 index 3d6b7e3bcb6..00000000000 --- a/pod/perl5112delta.pod +++ /dev/null @@ -1,349 +0,0 @@ -=head1 NAME - -perl5112delta - what is new for perl v5.11.2 - -=head1 DESCRIPTION - -This document describes differences between the 5.11.1 release and the -5.11.2 release. - -=head1 Core Enhancements - -=head2 qr overloading - -It is now possible to overload the C operator, that is, -conversion to regexp, like it was already possible to overload -conversion to boolean, string or number of objects. It is invoked when -an object appears on the right hand side of the C<=~> operator, or when -it is interpolated into a regexp. See L. - -=head2 Pluggable keywords - -Extension modules can now cleanly hook into the Perl parser to define -new kinds of keyword-headed expression and compound statement. The -syntax following the keyword is defined entirely by the extension. This -allow a completely non-Perl sublanguage to be parsed inline, with the -right ops cleanly generated. This feature is currently considered -experimental. - -See L for the mechanism. The Perl core -source distribution also includes a new module -L, which implements reverse Polish notation -arithmetic via pluggable keywords. This module is mainly used for test -purposes, and is not normally installed, but also serves as an example -of how to use the new mechanism. - -=head2 APIs for more internals - -The lowest layers of the lexer and parts of the pad system now have C -APIs available to XS extensions. These are necessary to support proper -use of pluggable keywords, but have other uses too. The new APIs are -experimental, and only cover a small proportion of what would be -necessary to take full advantage of the core's facilities in these -areas. It is intended that the Perl 5.13 development cycle will see the -addition of a full range of clean, supported interfaces. - -=head2 Overridable function lookup - -Where an extension module hooks the creation of rv2cv ops to modify the -subroutine lookup process, this now works correctly for bareword -subroutine calls. This means that prototypes on subroutines referenced -this way will be processed correctly. (Previously bareword subroutine -names were initially looked up, for parsing purposes, by an unhookable -mechanism, so extensions could only properly influence subroutine names -that appeared with an C<&> sigil.) - -=head1 Modules and Pragmata - -=head2 New Modules and Pragmata - -=over 4 - -=item C - -Preserves legacy behaviors or enable new non-default behaviors. -Currently the only behaviour concerns semantics for the 128 characters -on ASCII systems that have the 8th bit set. - -=back - -=head2 Pragmata Changes - -=over 4 - -=item C - -Supports %.0f formatting internally. - -=item C - -Allow overloading of 'qr'. - -=back - -=head2 Updated Modules - -=over 4 - -=item C - -Optimize reversing an array in-place, avoid using defined %hash in core -code and tests. - -=item C - -Teach B::Deparse about in-place reverse. - -=item C - -Refine Carp caller() fix and add tests. - -=item C - -Updated to 2.022. - -=item C - -Updated to 0.89_09. - -=item C - -Updated to 2.38. - -=item C - -Updated to 0.27. - -=item C - -Add EXISTS and DELETE methods to Env.pm. - -=item C - -Updated to 0.22. - -=item C - -Correctly document export of I18N::Langinfo. - -=item C - -In I18N::LangTags::Detect, avoid using defined @array and defined -%hash. - -=item C - -Updated to 2.022. - -=item C - -Updated to 0.54. - -=item C - -Updated to 1.22. - -=item C - -In Locale::Maketext, avoid using defined @array and defined %hash. -Convert the odd Locale::Maketext test out from Test to Test::More. - -=item C - -Updated to 0.35_08. - -=item C - -Implemented is_deprecated(). - -=item C - -Updated to 3.10. - -=item C - -Updated to 1.22. - -=item C - -Updated to 2.16. - -=back - -=head1 Utility Changes - -=over 4 - -=item F - -Fixed bugs with the match() operator in list context, remove mention of -$[. - -=back - -=head1 Performance Enhancements - -=over 4 - -=item * - -Reversing an array to itself (as in C<@a = reverse @a>) in void context -now happens in-place and is several orders of magnitude faster than it -used to be. It will also preserve non-existent elements whenever -possible, i.e. for non magical arrays or tied arrays with C and -C methods. - -=back - -=head1 New or Changed Diagnostics - -Several new diagnostics, see L for details. - -=over 4 - -=item C - -=item C - -=item C - -=item C - -=item C - -=item C - -=item C - -=item C - -=back - -One diagnostic has been removed: - -=over 4 - -=item C - -=back - -=head1 Changed Internals - -=over 4 - -=item * - -C has been removed from the public API. Calling it now -generates a deprecation warning, and it will be removed in a future -release. Although listed as part of the API, it was never documented, -and only ever used in F, and prior to 5.10, F. In -core, it has been replaced by a static function. - -=back - -=head1 New Tests - -=over 4 - -=item F - -Test that a bare readdir in while loop sets $_. - -=back - -=head1 Known Problems - -=over 4 - -=item Known test failures on VMS - -Perl 5.11.2 fails a small set of core and CPAN tests as of this -release. With luck, that'll be sorted out for 5.11.3. - -=back - -=head1 Deprecations - -The following items are now deprecated. - -=head2 Use of C<:=> to mean an empty attribute list is now deprecated. - -An accident of Perl's parser meant that these constructions were all -equivalent: - - my $pi := 4; - my $pi : = 4; - my $pi : = 4; - -with the C<:> being treated as the start of an attribute list, which -ends before the C<=>. As whitespace is not significant here, all are -parsed as an empty attribute list, hence all the above are equivalent -to, and better written as - - my $pi = 4; - -because no attribute processing is done for an empty list. - -As is, this meant that C<:=> cannot be used as a new token, without -silently changing the meaning of existing code. Hence that particular -form is now deprecated, and will become a syntax error. If it is -absolutely necessary to have empty attribute lists (for example, -because of a code generator) then avoid the warning by adding a space -before the C<=>. - -=head1 Acknowledgements - -Perl 5.11.2 represents approximately 3 weeks development since Perl -5.11.1 and contains 29,992 lines of changes across 458 files from 38 -authors and committers: - -Abhijit Menon-Sen, Abigail, Ben Morrow, Bo Borgerson, Brad Gilbert, -Bram, Chris Williams, Craig A. Berry, Daniel Frederick Crisman, Dave -Rolsky, David E. Wheeler, David Golden, Eric Brine, Father -Chrysostomos, Frank Wiegand, Gerard Goossen, Gisle Aas, Graham Barr, -Harmen, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, Jesse Vincent, -Karl Williamson, Kevin Ryde, Leon Brocard, Nicholas Clark, Paul -Marquess, Philippe Bruhat, Rafael Garcia-Suarez, Sisyphus, Steffen -Mueller, Steve Hay, Steve Peters, Vincent Pit, Yuval Kogman, Yves -Orton, and Zefram. - -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. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl bug -database at http://rt.perl.org/perlbug/ . There may also be information -at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down to a -tiny but sufficient test case. Your bug report, along with the output -of C, will be sent off to perlbug@perl.org to be analysed by -the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please -send it to perl5-security-report@perl.org. This points to a closed -subscription unarchived mailing list, which includes all the core -committers, who will be able to help -assess the impact of issues, figure out -a resolution, and help co-ordinate the release of patches to mitigate -or fix the problem across all platforms on which Perl is supported. -Please only use this address for security issues in the Perl core, not -for modules independently distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive -details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5113delta.pod b/pod/perl5113delta.pod deleted file mode 100644 index cb0e51359ed..00000000000 --- a/pod/perl5113delta.pod +++ /dev/null @@ -1,559 +0,0 @@ -=head1 NAME - -perl5113delta - what is new for perl v5.11.3 - -=head1 DESCRIPTION - -This document describes differences between the 5.11.2 release and -the 5.11.3 release. - -If you are upgrading from an earlier release such as 5.11.1, first read -the L, which describes differences between 5.11.1 and -5.11.2 - -=head1 Incompatible Changes - -=head2 Filehandles are blessed directly into C, as C is merely a wrapper around C. - -The previous behaviour was to bless Filehandles into L -(an empty proxy class) if it was loaded into memory and otherwise -to bless them into C. - -=head1 Core Enhancements - -=head2 Unicode version - -Perl is shipped with the latest Unicode version, 5.2, dated October 2009. See -L for details about this release -of Unicode. See L for instructions on installing and using -older versions of Unicode. - -=head2 Unicode properties - -Perl can now handle every Unicode character property. A new pod, -L, lists all available non-Unihan character properties. By -default the Unihan properties and certain others (deprecated and Unicode -internal-only ones) are not exposed. See below for more details on -these; there is also a section in the pod listing them, and why they are -not exposed. - -Perl now fully supports the Unicode compound-style of using C<=> and C<:> -in writing regular expressions: C<\p{property=value}> and -C<\p{property:value}> (both of which mean the same thing). - -Perl now fully supports the Unicode loose matching rules for text -between the braces in C<\p{...}> constructs. In addition, Perl also allows -underscores between digits of numbers. - -All the Unicode-defined synonyms for properties and property values are -now accepted. - -C, which matches a Unicode logical character, has been expanded to work -better with various Asian languages. It now is defined as an C. (See L). -Anything matched previously that made sense will continue to be matched. But -in addition: - -=over - -=item * - -C<\X> will now not break apart a C> sequence. - -=item * - -C<\X> will now match a sequence including the C and C characters. - -=item * - -C<\X> will now always match at least one character, including an initial mark. -Marks generally come after a base character, but it is possible in Unicode to -have them in isolation, and C<\X> will now handle that case, for example at the -beginning of a line or after a C. And this is the part where C<\X> -doesn't match the things that it used to that don't make sense. Formerly, for -example, you could have the nonsensical case of an accented LF. - -=item * - -C<\X> will now match a (Korean) Hangul syllable sequence, and the Thai and Lao -exception cases. - -=back - -Otherwise, this change should be transparent for the non-affected languages. - -C<\p{...}> matches using the Canonical_Combining_Class property were -completely broken in previous Perls. This is now fixed. - -In previous Perls, the Unicode C property and a -Perl extension had the same name, which led to neither matching all the -correct values (with more than 100 mistakes in one, and several thousand -in the other). The Perl extension has now been renamed to be -C (short: C). It has the same -meaning as was previously intended, namely the union of all the -non-canonical Decomposition types, with Unicode C being just one of -those. - -C<\p{Uppercase}> and C<\p{Lowercase}> have been brought into line with the -Unicode definitions. This means they each match a few more characters -than previously. - -C<\p{Cntrl}> now matches the same characters as C<\p{Control}>. This means it -no longer will match Private Use (gc=co), Surrogates (gc=cs), nor Format -(gc=cf) code points. The Format code points represent the biggest -possible problem. All but 36 of them are either officially deprecated -or strongly discouraged from being used. Of those 36, likely the most -widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ, WJ, and -similar, plus Bi-directional controls. - -C<\p{Alpha}> now matches the same characters as C<\p{Alphabetic}>. The Perl -definition included a number of things that aren't really alpha (all -marks), while omitting many that were. As a direct consequence, the -definitions of C<\p{Alnum}> and C<\p{Word}> which depend on Alpha also change. - -C<\p{Word}> also now doesn't match certain characters it wasn't supposed -to, such as fractions. - -C<\p{Print}> no longer matches the line control characters: Tab, LF, CR, -FF, VT, and NEL. This brings it in line with the documentation. - -C<\p{Decomposition_Type=Canonical}> now includes the Hangul syllables. - -The Numeric type property has been extended to include the Unihan -characters. - -There is a new Perl extension, the 'Present_In', or simply 'In', -property. This is an extension of the Unicode Age property, but -C<\p{In=5.0}> matches any code point whose usage has been determined -I Unicode version 5.0. The C<\p{Age=5.0}> only matches code points -added in I version 5.0. - -A number of properties did not have the correct values for unassigned -code points. This is now fixed. The affected properties are -Bidi_Class, East_Asian_Width, Joining_Type, Decomposition_Type, -Hangul_Syllable_Type, Numeric_Type, and Line_Break. - -The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties -have been updated to their current Unicode definitions. - -Certain properties that are supposed to be Unicode internal-only were -erroneously exposed by previous Perls. Use of these in regular -expressions will now generate, if enabled, a deprecated warning message. -The properties are: Other_Alphabetic, Other_Default_Ignorable_Code_Point, -Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase, -Other_Math, and Other_Uppercase. - -An installation can now fairly easily change which Unicode properties -Perl understands. As mentioned above, certain properties are by default -turned off. These include all the Unihan properties (which should be -accessible via the CPAN module Unicode::Unihan) and any deprecated or -Unicode internal-only property that Perl has never exposed. - -The generated files in the C directory are now more -clearly marked as being stable, directly usable by applications. -New hash entries in them give the format of the normal entries, -which allows for easier machine parsing. Perl can generate files -in this directory for any property, though most are suppressed. An -installation can choose to change which get written. Instructions -are in L. - -=head2 Regular Expressions - -U+0FFFF is now a legal character in regular expressions. - -=head1 Modules and Pragmata - -=head2 Pragmata Changes - -=over 4 - -=item C - -Upgraded from version 1.19 to 1.20. - -=item C - -This pragma no longer suppresses C warnings. [perl #71204] - -=item C - -Upgraded from 1.13 to 1.14. Added the C feature: - - use feature "unicode_strings"; - -This pragma turns on Unicode semantics for the case-changing operations -(uc/lc/ucfirst/lcfirst) on strings that don't have the internal UTF-8 flag set, -but that contain single-byte characters between 128 and 255. - -=item C - -The experimental C pragma, introduced in 5.11.2, has been removed, -and its functionality replaced by the new feature pragma, C. - -=item C - -Upgraded from version 1.74 to 1.75. - -=item C - -Upgraded from 1.07 to 1.08. Added new C function. - -=back - -=head2 Updated Modules - -=over 4 - -=item C - -Upgraded from version 0.34 to 0.36. - -=item C - -Upgraded from version 1.94_51 to 1.94_5301, which is 1.94_53 on CPAN -plus some local fixes for bleadperl. - -Includes better bzip2 support, improved FirstTime experience with -auto-selection of CPAN mirrors, proper handling of modules removed from the -Perl core, and an updated 'cpan' utility script - -=item C - -Upgraded from version 0.89_09 to 0.90. - -=item C - -Upgraded from version 2.38 to 2.39. - -=item C - -Upgraded from version 6.55_02 to 6.56. Adds new BUILD_REQUIRES key to -indicate build-only prerequisites. Also adds support for -mingw64 and the new "package NAME VERSION" syntax. - -=item C - -Upgraded from version 2.08 to 2.08_01. - -=item C - -Upgraded from version 0.35_09 to 0.36. Compared to 0.35, this version has a -new 'installdeps' action, supports the PERL_MB_OPT environment variable, adds a -'share_dir' property for L support, support the "package NAME -VERSION" syntax and has many other enhancements and bug fixes. The -'passthrough' style of Module::Build::Compat has been deprecated. - -=item C - -Upgraded from version 2.23 to 2.24. - -=item C - -Upgraded from version 1.18 to 1.19. Error codes for C and -C are now available. - -=item C - -Upgraded from version 3.10 to 3.13. - -=item C - -Upgraded from version 2.19 to 2.20. - -=back - -=head1 Utility Changes - -=over 4 - -=item F - -No longer reports "Message sent" when it hasn't actually sent the message - -=back - -=head1 Changes to Existing Documentation - -The Pod specification (L) has been updated to bring the -specification in line with modern usage already supported by most Pod systems. -A parameter string may now follow the format name in a "begin/end" region. -Links to URIs with a text description are now allowed. The usage of -C"section"E> has been marked as deprecated. - -L has been documented in L as a means to get -conditional loading of modules despite the implicit BEGIN block around C. - - - -=head1 Installation and Configuration Improvements - -=head2 Testing improvements - -=over 4 - -=item It's now possible to override C and friends in F - -=back - -=head2 Platform Specific Changes - -=over 4 - -=item Win32 - -=over 4 - -=item * - -Always add a manifest resource to C to specify the C -settings for Windows Vista and later. Without this setting Windows -will treat C as a legacy application and apply various -heuristics like redirecting access to protected file system areas -(like the "Program Files" folder) to the users "VirtualStore" -instead of generating a proper "permission denied" error. - -For VC8 and VC9 this manifest setting is automatically generated by -the compiler/linker (together with the binding information for their -respective runtime libraries); for all other compilers we need to -embed the manifest resource explicitly in the external resource file. - -This change also requests the Microsoft Common-Controls version 6.0 -(themed controls introduced in Windows XP) via the dependency list -in the assembly manifest. For VC8 and VC9 this is specified using the -C linker commandline option instead. - -=back - -=item cygwin - -=over 4 - -=item Enable IPv6 support on cygwin 1.7 and newer - -=back - -=item OpenVMS - -=over 4 - -=item Make -UDEBUGGING the default on VMS for 5.12.0. - -Like it has been everywhere else for ages and ages. Also make -command-line selection of -UDEBUGGING and -DDEBUGGING work in -configure.com; before the only way to turn it off was by saying -no in answer to the interactive question. - -=back - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -Ensure that pp_qr returns a new regexp SV each time. Resolves RT #69852. - -Instead of returning a(nother) reference to the (pre-compiled) regexp in the -optree, use reg_temp_copy() to create a copy of it, and return a reference to -that. This resolves issues about Regexp::DESTROY not being called in a timely -fashion (the original bug tracked by RT #69852), as well as bugs related to -blessing regexps, and of assigning to regexps, as described in correspondence -added to the ticket. - -It transpires that we also need to undo the SvPVX() sharing when ithreads -cloning a Regexp SV, because mother_re is set to NULL, instead of a cloned -copy of the mother_re. This change might fix bugs with regexps and threads in -certain other situations, but as yet neither tests nor bug reports have -indicated any problems, so it might not actually be an edge case that it's -possible to reach. - -=item * - -Several compilation errors and segfaults when perl was built with C<-Dmad> were fixed. - -=item * - -Fixes for lexer API changes in 5.11.2 which broke NYTProf's savesrc option. - -=item * - -F<-t> should only return TRUE for file handles connected to a TTY - -The Microsoft C version of isatty() returns TRUE for all -character mode devices, including the /dev/null style "nul" -device and printers like "lpt1". - -=item * - -Fixed a regression caused by commit fafafbaf which caused a panic during -parameter passing [perl #70171] - -=item * - -On systems which in-place edits without backup files, -i'*' now works as -the documentation says it does [perl #70802] - -=item * - -Saving and restoring magic flags no longer loses readonly flag. - -=item * - -The malformed syntax C (note the missing comma) no longer -causes abrupt and total failure. - -=item * - -Regular expressions compiled with C literals properly set C<$'> when -matching again. - -=item * - -Using named subroutines with C should no longer lead to bus errors [perl -#71076] - -=item * - -Numerous bugfixes catch small issues caused by the recently-added Lexer API. - -=item * - -Smart match against C<@_> sometimes gave false negatives. [perl #71078] - -=item * - -C<$@> may now be assigned a read-only value (without error or busting the stack). - -=item * - -C called recursively from within an active comparison subroutine no -longer causes a bus error if run multiple times. [perl #71076] - -=back - -=head1 New or Changed Diagnostics - -=over 4 - -=item * - -C now warns when called in void context - -=item * - -C-style functions called with too few arguments will now issue the -warning C<"Missing argument in %s"> [perl #71000] - -=back - -=head1 New Tests - -Many modules updated from CPAN incorporate new tests. - -=over 4 - -=item t/comp/final_line_num.t - -See if line numbers are correct at EOF - -=item t/comp/form_scope.t - -See if format scoping works - -=item t/comp/line_debug.t - -See if @{"_<$file"} works - -=item t/op/filetest_t.t - -See if -t file test works - -=item t/op/qr.t - -See if qr works - -=item t/op/utf8cache.t - -Tests malfunctions of utf8 cache - -=item t/re/uniprops.t - -Test unicode \p{} regex constructs - -=back - -=head1 Deprecations - -The following items are now deprecated. - -=over 4 - -=item Use of "goto" to jump into a construct is deprecated - -Using C to jump from an outer scope into an inner -scope is now deprecated. This rare use case was causing -problems in the implementation of scopes. - -=back - -=head1 Acknowledgements - -Perl 5.11.3 represents approximately one month of development since -Perl 5.11.2 and contains 61407 lines of changes across 396 files -from 40 authors and committers: - -Abigail, Alex Davies, Alexandr Ciornii, Andrew Rodland, Andy -Dougherty, Bram, brian d foy, Chip Salzenberg, Chris Williams, Craig -A. Berry, Daniel Frederick Crisman, David Golden, Dennis Kaarsemaker, -Eric Brine, Father Chrysostomos, Gene Sullivan, Gerard Goossen, H. -Merijn Brand, Hugo van der Sanden, Jan Dubois, Jerry D. Hedden, -Jesse Vincent, Jim Cromie, Karl Williamson, Leon Brocard, Max -Maischein, Michael Breen, Moritz Lenz, Nicholas Clark, Rafael -Garcia-Suarez, Reini Urban, Ricardo Signes, Stepan Kasal, Steve -Hay, Steve Peters, Tim Bunce, Tony Cook, Vincent Pit and Zefram. - -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. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut - - diff --git a/pod/perl5114delta.pod b/pod/perl5114delta.pod deleted file mode 100644 index 64ff10b2014..00000000000 --- a/pod/perl5114delta.pod +++ /dev/null @@ -1,279 +0,0 @@ -=head1 NAME - -perl5114delta - what is new for perl v5.11.4 - -=head1 DESCRIPTION - -This document describes differences between the 5.11.3 release and -the 5.11.4 release. - -If you are upgrading from an earlier release such as 5.11.2, first read -L, which describes differences between 5.11.2 and -5.11.3. - -=head1 Incompatible Changes - -=head2 Version number formats - -Acceptable version number formats have been formalized into "strict" and -"lax" rules. C takes a strict version number. C takes a lax version number. C and the -L object constructors take lax version numbers. Providing an -invalid version will result in a fatal error. - -These formats will be documented fully in the L module in a -subsequent release of Perl 5.11. To a first approximation, a "strict" -version number is a positive decimal number (integer or decimal-fraction) -without exponentiation or else a dotted-decimal v-string with a leading 'v' -character and at least three components. A "lax" version number allows -v-strings with fewer than three components or without a leading 'v'. Under -"lax" rules, both decimal and dotted-decimal versions may have a trailing -"alpha" component separated by an underscore character after a fractional -or dotted-decimal component. - -The L module adds C and C -functions to check a scalar against these rules. - -=head1 Core Enhancements - -=head2 Unicode properties - -C<\p{XDigit}> now matches the same characters as C<\p{Hex_Digit}>. This -means that in addition to the characters it currently matches, -C<[A-Fa-f0-9]>, it will also match their fullwidth equivalent forms, for -example U+FF10: FULLWIDTH DIGIT ZERO. - -=head1 Modules and Pragmata - -=head2 Pragmata Changes - -=over 4 - -=item C - -Upgraded from version 0.02 to 0.03. - -This version introduces the C method to allow subclasses of less to -pick where in %^H to store their stash. - -=item C - -Upgraded from version 0.77 to 0.81. - -This version adds support for L as described earlier -in this document and in its own documentation. - -=item C - -Upgraded from version 1.08 to 1.09. - -This version adds the C warning category. See also L for this change. - -=back - -=head2 Updated Modules - -=over 4 - -=item C - -Upgraded from version 0.36 to 0.38. - -=item C - -Upgraded from version 0.93 to 0.94. - -=item C - -Upgraded from version 2.021 to 2.024. - -=item C - -Upgraded from version 2.021 to 2.024. - -=item C - -Upgraded from version 1.94_5301 to 1.94_54. - -=item C - -Upgraded from version 0.22 to 0.24. - -=item C - -Upgraded from version 0.36 to 0.3603. - -=item C - -Upgraded from version 2.20 to 2.21. - -Anonymous coderefs created in Safe containers no longer get bogus -arguments passed to them, fixing RT #72068. - -=back - -=head2 Removed Modules and Pragmata - -=over 4 - -=item C - -Removed from the Perl core. Prior version was 'undef'. - -=back - -=head1 Changes to Existing Documentation - -A significant fraction of the core documentation has been updated to clarify -the behavior of Perl's Unicode handling. - -Much of the remaining core documentation has been reviewed and edited -for clarity, consistent use of language, and to fix the spelling of Tom -Christiansen's name. - -=head2 Configuration improvements - -USE_ATTRIBUTES_FOR_PERLIO is now reported in the compile-time options -listed by the C<-V> switch. - -=head2 Platform Specific Changes - -=over 4 - -=item VMS - -The default pipe buffer size on VMS has been updated to 8192 on 64-bit -systems. - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -Tie::Hash::NamedCapture::* shouldn't abort if passed bad input (RT #71828) - -=item * - -@_ and $_ no longer leak under threads (RT #34342 and #41138, also -#70602, #70974) - -=back - -=head1 New or Changed Diagnostics - -=over 4 - -=item New warning category C - -The two warnings : - - Illegal character in prototype for %s : %s - Prototype after '%c' for %s : %s - -have been moved from the C top-level warnings category into a new -first-level category, C. These two warnings are currently the -only ones emitted during parsing of an invalid/illegal prototype, so one -can now do - - no warnings 'illegalproto'; - -to suppress only those, but not other syntax-related warnings. Warnings where -prototypes are changed, ignored, or not met are still in the C -category as before. (Matt S. Trout) - -=item lvalue attribute ignored after the subroutine has been defined - -This new warning is issued when one attempts to mark a subroutine as -lvalue after it has been defined. - -=back - -=head1 Changed Internals - -=over 4 - -=item * - -Perl_magic_setmglob now knows about globs, fixing RT #71254. - -=back - -=head1 Known Problems - -Perl 5.11.4 is a development release leading up to Perl 5.12.0. -Some notable known problems found in 5.11.4 are listed as dependencies -of RT #69710, the Perl 5 version 12 meta-ticket. - -=head1 Deprecations - -The following items are now deprecated. - -=over 4 - -=item C<< UNIVERSAL-Eimport() >> - -The method C<< UNIVERSAL-Eimport() >> is now deprecated. Attempting to -pass import arguments to a C statement will result in a -deprecation warning. (This is a less noisy version of the full deprecation -warning added in 5.11.0.) - -=back - -=head1 Acknowledgements - -Perl 5.11.4 represents approximately one month of development since -Perl 5.11.3 and contains 17682 lines of changes across 318 files -from 40 authors and committers: - -Abigail, Andy Dougherty, brian d foy, Chris Williams, Craig A. Berry, -David Golden, David Mitchell, Father Chrysostomos, Gerard Goossen, -H.Merijn Brand, Jesse Vincent, Jim Cromie, Josh ben Jore, Karl -Williamson, kmx, Matt S Trout, Nicholas Clark, Niko Tyni, Paul Marquess, -Philip Hazel, Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo -Signes, Shlomi Fish, Tim Bunce, Todd Rinaldo, Tom Christiansen, Tony -Cook, Vincent Pit, and Zefram - -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. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at L. There may also be -information at L, the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analyzed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5115delta.pod b/pod/perl5115delta.pod deleted file mode 100644 index dbed1613bec..00000000000 --- a/pod/perl5115delta.pod +++ /dev/null @@ -1,328 +0,0 @@ -=head1 NAME - -perl5115delta - what is new for perl v5.11.5 - -=head1 DESCRIPTION - -This document describes differences between the 5.11.4 release and -the 5.11.5 release. - -If you are upgrading from an earlier release such as 5.11.3, first read -L, which describes differences between 5.11.3 and -5.11.4. - -=head1 Core Enhancements - -=head2 32-bit limit on substr arguments removed - -The 32-bit limit on C arguments has now been removed. The full range -of the system's signed and unsigned integers is now available for the C -and C arguments. - -=head1 Modules and Pragmata - -=head2 Pragmata Changes - -=over 4 - -=item C - -Upgraded from version 0.81 to 0.82. - -The C and C functions can now be optionally exported to the -caller's namespace and are also now documented. - -Undefined version objects are now uninitialized with zero rather than C. - -=back - -=head2 Updated Modules - -=over 4 - -=item C - -Upgraded from version 1.11 to 1.12. - -=item C - -Upgraded from version 1.94_53 to 1.94_56. - -This resolves RT #72362, in which CPAN was ignoring C, -and RT #72348, in which the command C in the CPAN shell could -cause an exception to be thrown. - -This module is also now built in a less specialized way, which resolves a -problem that caused C after C to fail, fixing RT #72218. - -=item C - -Upgraded from version 0.44 to 0.46. - -This makes the prereq resolving fall back to F<_build/> querying if the -C action fails. - -=item C - -Upgraded from version 3.15_01 to 3.15_02. - -=item C - -Upgraded from version 1.01 to 1.02. - -=item C - -Upgraded from version 2.21 to 2.22. - -This resolves RT #72700, in which an exception thrown from a closure was -getting lost. - -=item C - -Upgraded from version 1.85 to 1.86. - -This makes the new Socket implementation of C consistent with the -existing Socket6 implementation of C, fixing RT #72884. - -=item C - -Upgraded from version 2.2.2 to 2.3.1. - -=back - -=head1 Changes to Existing Documentation - -The syntax C is now documented as valid, as -is the syntax C, -although actually using the latter may not be the best idea for the -readability of your source code. - -=head1 Installation and Configuration Improvements - -=head2 Configuration improvements - -Support for SystemTap's C compatibility layer has been added and an -issue with linking C has been fixed in the process. - -C is now used instead of C for C's new usage of ANSI -escape codes by setting C<$Config{less}> (and thereby C<$Config{pager}>, -which fixes RT #72156. - -USE_PERL_ATOF is now reported in the compile-time options listed by the C<-V> -switch. - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -Arbitrary whitespace is now allowed between C and C in -C statements. (Fixes RT #72432) - -=item * - -A panic caused by trying to load C when the parser is already in -error (e.g. by a missing C under C) is now averted. This -was a regression since Perl 5.10.0. (Fixes RT #72590) - -=item * - -Reading C<$!> no longer causes a SEGV for out of range C values. (Fixes -RT #72850) - -=item * - -A possible SEGV in C has been fixed. This was a regression since -Perl 5.10. - -=item * - -A possible SEGV when freeing a scalar that was upgraded to an C -type from a simple(r) scalar has been fixed. - -=item * - -A type conversion bug in C that caused it to break around C<2**48> -has been fixed. - -=item * - -Interpolating a regex that makes use of the C pragma will no longer -cause a run-time error. (Fixes RT #56444) - -=item * - -Array references assigned to C<*Foo::ISA> now have the necessary magic added -to them to catch any further updates to the new C<@ISA>. (Fixes RT #72866) - -=item * - -Filehandles are now always blessed into C, which, together with -some suitable manipulation of C<@IO::File::ISA>, fixes a breakage introduced -in Perl 5.11.3 by a change that always blessed filehandles into C -rather than checking for C first. - -=item * - -A change in the behaviour of C and C in -Perl 5.10.0 that wasn't documented at the time is now documented in -L. (Fixes RT #62522) - -=item * - -RT #71504 is now fixed by simply skipping the tests that failed on OpenBSD -with ithreads and perlio. - -=back - -=head1 New or Changed Diagnostics - -=over 4 - -=item * - -The fatal error C is now produced if the -C handler returns malformed UTF-8. - -=item * - -If an unresolved named character or sequence was encountered when compiling a -regex pattern then the fatal error C<\\N{NAME} must be resolved by the lexer> -is now produced. This can happen, for example, when using a single-quotish -context like C<$re = '\N{SPACE}'; $re;>. See L for more examples of -how the lexer can get bypassed. - -=item * - -The fatal error C will be produced -if the character constant represented by C<...> is not a valid hexadecimal -number. - -=item * - -The new meaning of C<\N> as C<[^\n]> is not valid in a bracketed character -class, just like C<.> in a character class loses its special meaning, and will -cause the fatal error C<\\N in a character class must be a named character: -\\N{...}>. - -=item * - -The rules on what is legal for the C<...> in C<\N{...}> have been tightened -up so that unless the C<...> begins with an alphabetic character and continues -with a combination of alphanumerics, dashes, spaces, parentheses or colons -then the warning C is -now issued. - -=item * - -The warning C will be -issued if the C handler returns a sequence of characters which -exceeds the limit of the number of characters that can be used. The message -will indicate which characters were used and which were discarded. - -=item * - -Currently, all but the first of the several characters that the C -handler may return are discarded when used in a regular expression pattern -bracketed character class. If this happens then the warning C will be issued. - -=item * - -The warning C will be issued if Perl encounters a C<\N{> but doesn't -find a matching C<}>. In this case Perl doesn't know if it was mistakenly -omitted, or if "match non-newline" followed by "match a C<{>" was desired. -It assumes the latter because that is actually a valid interpretation as -written, unlike the other case. If you meant the former, you need to add the -matching right brace. If you did mean the latter, you can silence this -warning by writing instead C<\N\{>. - -=item * - -C and C called with numbers smaller than they can reliably -handle will now issue the warnings C and -C. - -=back - -=head1 New Tests - -=over 4 - -=item F - -Tests some suitably portable filetest operators to check that they work as -expected, particularly in the light of some internal changes made in how -filehandles are blessed. - -=item F - -Tests that times greater than C<2**63>, which can now be handed to C -and C, do not cause an internal overflow or an excessively long -loop. - -=back - -=head1 Known Problems - -Perl 5.11.5 is a development release leading up to Perl 5.12.0. -Some notable known problems found in 5.11.5 are listed as dependencies -of RT #69710, the Perl 5 version 12 meta-ticket. - -=head1 Acknowledgements - -Perl 5.11.5 represents approximately one month of development since -Perl 5.11.4 and contains 9618 lines of changes across 151 files -from 33 authors and committers: - -Evar ArnfjErE Bjarmason, Abigail, brian d foy, Chris -Williams, David Golden, David Mitchell, Eric Brine, Frank Wiegand, Gisle -Aas, H.Merijn Brand, Jan Dubois, Jesse Vincent, Jim Cromie, John Peacock, -Josh ben Jore, Karl Williamson, Marcus Holland-Moritz, Michael G Schwern, -Nicholas Clark, Offer Kaye, Philippe Bruhat (BooK), Rafael Garcia-Suarez, -Reini Urban, Ricardo Signes, Robin Barker, Slaven Rezic, Steffen Mueller, -Steve Hay, Steve Peters, Tim Bunce, Todd Rinaldo, Tony Cook and -Vincent Pit. - -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. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analyzed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5130delta.pod b/pod/perl5130delta.pod deleted file mode 100644 index d89eeb100c3..00000000000 --- a/pod/perl5130delta.pod +++ /dev/null @@ -1,134 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5130delta - what is new for perl v5.13.0 - -=head1 DESCRIPTION - -This document describes differences between the 5.12.0 release and the -5.13.0 release. - -If you are upgrading from an earlier release such as 5.10.0, first read -L, which describes differences between 5.10.0 and -5.12.0. - -=head1 Core Enhancements - -=head2 "safe signals" optimization - -Signal dispatch has been moved from the runloop into control ops. This -should give a few percent speed increase, and eliminates almost all of -the speed penalty caused by the introduction of "safe signals" in -5.8.0. Signals should still be dispatched within the same statement as -they were previously - if this is not the case, or it is possible to -create uninterruptible loops, this is a bug, and reports are encouraged -of how to recreate such issues. - -=head2 Assignment to C<$0> sets the legacy process name with C on Linux - -On Linux the legacy process name will be set with L, in -addition to altering the POSIX name via C as perl has done -since version 4.000. Now system utilities that read the legacy process -name such as ps, top and killall will recognize the name you set when -assigning to C<$0>. The string you supply will be cut off at 16 bytes, -this is a limitation imposed by Linux. - -=head2 Optimization of shift; and pop; calls without arguments - -Additional two OPs are not added anymore into op tree for shift and pop -calls without argument (when it works on C<@_>). Makes C 5% -faster over C on not threaded perl and 25% faster on threaded. - -=head1 Modules and Pragmata - -=head2 Updated Modules - -=over 4 - -=item CGI - -Updated to version 3.49. - -=item Data::Dumper - -Updated to version 2.126. - -=item MIME::Base64 - -Updated to 3.09. - -=item threads - -Updated to version 1.77 - -=item threads-shared - -Updated to version 1.33 - -=back - -=head1 Installation and Configuration Improvements - -=head2 Platform Specific Changes - -=over 4 - -=item AIX - -Allow building on AIX 4.2. - -=back - -=head1 Acknowledgements - -Perl 5.13.0 represents eight days of development since Perl 5.12.0 and -contains 3,766 lines of changes across 151 files from 29 authors and -committers. - -Thank you to the following for contributing to this release: - -Ævar Arnfjörð Bjarmason, Alex Vandiver, Chris Williams, chromatic, -Craig A. Berry, David Golden, David Mitchell, Eric Brine, Father -Chrysostomos, Florian Ragwitz, Frank Wiegand, Gisle Aas, H.Merijn -Brand, Hugo van der Sanden, Jesse Vincent, Josh ben Jore, Karl -Williamson, Leon Brocard, Michael G Schwern, Michael G. Schwern, Nga -Tang Chan, Nicholas Clark, Niko Tyni, Rafael Garcia-Suarez, Ricardo -Signes, Robin Barker, Slaven Rezic, Steffen Mueller, Zefram. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl bug -database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down to a -tiny but sufficient test case. Your bug report, along with the output -of C, will be sent off to perlbug@perl.org to be analysed by -the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please -send it to perl5-security-report@perl.org. This points to a closed -subscription unarchived mailing list, which includes all the core -committers, who will be able to help -assess the impact of issues, figure out -a resolution, and help co-ordinate the release of patches to mitigate -or fix the problem across all platforms on which Perl is supported. -Please only use this address for security issues in the Perl core, not -for modules independently distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive -details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl51310delta.pod b/pod/perl51310delta.pod deleted file mode 100644 index b4da990847e..00000000000 --- a/pod/perl51310delta.pod +++ /dev/null @@ -1,815 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl51310delta - what is new for perl v5.13.10 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.9 release and -the 5.13.10 release. - -If you are upgrading from an earlier release such as 5.13.8, first read -L, which describes differences between 5.13.8 and -5.13.9. - -=head1 Core Enhancements - -=head2 The new regular expression modifiers available in suffix form - -Various releases of the 5.13.x series have added new regular expression -modifiers, C, C, C, and C. They were only available in -infix form (e.g., C<(?a:...)>) until this release; now they are usable -in suffix form. This change was made too late to change all the -affected documentation, so there are a number of places that erroneously -say these must be used in infix form. - -However, there is an ambiguity with the construct, C. Due -to backward compatibility constraints, in Perl 5.14 only, it will be -resolved as C, that is, as meaning to take the result -of the substitution, and see if it is stringwise less-than-or-equal-to -what follows. In Perl 5.16 and later, it will instead be resolved as -meaning to do the pattern match using the rules of the current locale, -and evaluate the rhs as an expression when doing the substitution. In -5.14, if you want the latter interpretation, you can write "el" instead. - -=head2 Add C<\p{Titlecase}> as a synonym for C<\p{Title}> - -This synonym is added for symmetry with the Unicode property names -C<\p{Uppercase}> and C<\p{Lowercase}>. - -=head2 New regular expression modifier option C - -Doubling the C regular expression modifier increases its effect, -so that in case-insensitive matching, no ASCII character will match a -non-ASCII character. For example, normally, - - 'k' =~ /\N{KELVIN SIGN}/i - -will match; it won't under C. - -=head2 New warnings categories for problematic (non-)Unicode code points. - -Three new warnings subcategories of have been added. These -allow you to turn off warnings for their covered events, while allowing -the other UTF-8 warnings to remain on. The three categories are: -C when UTF-16 surrogates are encountered; -C when Unicode non-character code points are encountered; -and C when code points that are above the legal Unicode -maximum of 0x10FFFF are encountered. - -=head1 Incompatible Changes - -=head2 Most C<\p{}> properties are now immune from case-insensitive matching - -For most Unicode properties, it doesn't make sense to have them match -differently under C case-insensitive matching than not. And doing -so leads to unexpected results and potential security holes. For -example - - m/\p{ASCII_Hex_Digit}+/i - -could previously match non-ASCII characters because of the Unicode -matching rules. There were a number of bugs in this feature until an -earlier release in the 5.13 series. Now this release reverts, and -removes the feature completely except for the few properties where -people have come to expect it, namely the ones where casing is an -integral part of their functionality, such as C and -C, both of which match the exact same code points, -namely those matched by C. Details are in -L. - -User-defined property handlers that need to match differently under -C must change to read the new boolean parameter passed it which is -non-zero if case-insensitive matching is in effect; 0 if not. See -L. - -=head2 regex: \p{} in pattern implies Unicode semantics - -Now, a Unicode property match specified in the pattern will indicate -that the pattern is meant for matching according to Unicode rules -(e40e74f) - -=head2 add GvCV_set() and GvGP_set() macros and change GvGP() - -This allows a future commit to eliminate some backref magic between GV -and CVs, which will require complete control over assignment to the -gp_cv slot. - -If you've been using GvGP() in lvalue context this change will break -your code, you should use GvGP_set() instead. (c43ae56) - -=head2 _swash_inversion_hash is no longer exported as part of the API - -This function shouldn't be called from XS code. (4c2e113) - -=head2 Unreferenced objects in global destruction - -The fix for [perl #36347], which made sure that destructors were called on -unreferenced objects, broke the tests for three CPAN modules, which -apparently rely on the bug. - -To provide more time for fixing them (as this is such a minor bug), we -have reverted the fix until after perl 5.14.0. - -This resolves [perl #82542] and other related tickets. - -=head2 C on shared pipes - -The C function no longer waits for the child process to exit if the -underlying file descriptor is still in use by another thread, to avoid -deadlocks. It returns true in such cases. - -=head1 Deprecations - -=over - -=item Deprecated Modules - -The following modules will be removed from the core distribution in a -future release, and should be installed from CPAN instead. Distributions -on CPAN which require these should add them to their prerequisites. The -core versions of these modules warnings will issue a deprecation warning. - -If you ship a packaged version of Perl, either alone or as part of a -larger system, then you should carefully consider the repercussions of -core module deprecations. You may want to consider shipping your default -build of Perl with packages for some or all deprecated modules which -install into C or C perl library directories. This will -inhibit the deprecation warnings. - -Alternatively, you may want to consider patching F -to provide deprecation warnings specific to your packaging system -or distribution of Perl, consistent with how your packaging system -or distribution manages a staged transition from a release where the -installation of a single package provides the given functionality, to -a later release where the system administrator needs to know to install -multiple packages to get that same functionality. - -You can silence these deprecation warnings by installing the modules -in question from CPAN. To install the latest version of all of them, -just install C. - -=over - -=item L - -We strongly recommend that you install and used L in -preference, as it offers significantly improved profiling and reporting. - -=back - -=back - -=head2 User-defined case-mapping - -This feature is being deprecated due to its many issues, as documented in -L. -It is planned to remove this feature in Perl 5.16. A CPAN module -providing improved functionality is being prepared for release by the -time 5.14 is. - -=head1 Modules and Pragmata - -=head2 New Modules and Pragmata - -=over 4 - -=item * - -C version 2.110440 has been added as a dual-life module. It -provides a standard library to read, interpret and write CPAN distribution -metadata files (e.g. META.json and META.yml) which describes a -distribution, its contents, and the requirements for building it and -installing it. The latest CPAN distribution metadata specification is -included as C and notes on changes in the specification -over time are given in C. - -=item * - -C version 0.101020 has been added as a dual-life -module. It provides a standard library to model and manipulates module -prerequisites and version constraints as defined in the L. - -=back - -=head2 Updated Modules and Pragmata - -=over 4 - -=item * - -C has been upgraded from version 1.27 to 1.28. - -=item * - -C has been upgraded from version 1.19 to 1.20. - -[perl #82854] It now avoids using regular expressions that cause perl to -load its Unicode tables, in order to avoid the 'BEGIN not safe after -errors' error that will ensue if there has been a syntax error. - -=item * - -C has been upgraded from version 3.51 to 3.52 - -=item * - -C has been upgraded from version 1.94_64 to 1.94_65 - -Includes support for META.json and MYMETA.json. - -=item * - -C has been upgraded from version 0.9011 to 0.9101 - -Includes support for META.json and MYMETA.json and a change to -using Digest::SHA for CPAN checksums. - -=item * - -C has been upgraded from version 0.01 to 0.02. - -=item * - -C has been upgraded from version 1.21 to 1.22. - -It now renders pod links slightly better, and has been taught to find -descriptions for messages that share their descriptions with other -messages. - -=item * - -C has been upgraded from version 20080331.00 to 20110217.00. - -Merely loading C now no longer triggers profiling to start. -C and C still behave as before and start -the profiler. - -NOTE: C is deprecated and will be removed from a future -version of Perl. We strongly recommend that you install and use -L instead, as it offers significantly improved -profiling and reporting. - -=item * - -C has been upgraded from version 1.12 to 1.13. - -[perl #84358] It no longer inherits from AutoLoader; hence it no longer -produces weird error messages for unsuccessful method calls on classes that -inherit from DynaLoader. - -=item * - -C has been upgraded from version 1.17 to 1.18. - -It now allows IO::Handle objects (and objects in derived classes) to be -removed from an IO::Select set even if the underlying file descriptor is -closed or invalid. - -=item * - -C has been upgraded from version 0.68 to 0.70 - -=item * - -C has been upgraded from version 0.009 to 0.010 - -=item * - -C has been upgraded from version 1.99_04 to 1.992. - -=item * - -C has been upgraded from version 0.3607 to 0.37_05. - -A notable change is the deprecation of several modules. -Module::Build::Version has been deprecated and Module::Build now relies -directly upon L. Module::Build::ModuleInfo has been deprecated in -favor of a standalone copy of it called L. -Module::Build::YAML has been deprecated in favor of L. - -Module::Build now also generates META.json and MYMETA.json files -in accordance with version 2 of the CPAN distribution metadata specification, -L. The older format META.yml and MYMETA.yml files are -still generated, as well. - -=item * - -C has been upgraded from version 0.40 to 0.44 - -=item * - -C has been upgraded from version 1.000003 to 1.000004. - -=item * - -C has been upgraded from version 1.12 to 1.13. - -The documentation has greatly improved. See L below. - -=item * - -C has been upgraded from version 1.40 to 1.4401. - -The latest Parse::CPAN::Meta can now read YAML or JSON files using -L and L, which are now part of the Perl core. - -=item * - -C has been upgraded from version 0.16 to 0.17. - -It now supports the double-a flag: C - -The C function used to crash when called on a regular expression -belonging to a pluggable engine. Now it has been disabled for those. - -C no longer leaks memory. - -=item * - -C has been upgraded from version 0.24 to 0.26 - -=item * - -C has been upgraded from version 0.68 to 0.72 - -This also sees the switch from using the pure-perl version of this -module to the XS version.` - -=item * - -C has been upgraded from version 1.04 to 1.05. - -Two bugs have been fixed [perl #84086]: - -The symbol table name was lost when tying a hash, due to a thinko in -C. The result was that all tied hashes interacted with the -local symbol table. - -Unless a symbol table name had been explicitly specified in the call -to the constructor, querying the special key ':LOCAL' failed to -identify objects connected to the local symbol table. - -=item * - -Added new function C. This function will return the -numeric value of the string passed it; C if the string in its -entirety has no safe numeric value. - -To be safe, a string must be a single character which has a numeric -value, or consist entirely of characters that match \d, coming from the -same Unicode block of digits. Thus, a mix of Bengali and Western -digits would be considered unsafe, as well as a mix of half- and -full-width digits, but strings consisting entirely of Devanagari digits -or of "Mathematical Bold" digits would would be safe. - -=item * - -C has been upgraded from version 1.94_63 to 1.94_64. - -=back - -=head1 Documentation - -=head2 Changes to Existing Documentation - -=head3 L - -=over 4 - -=item * - -L's documentation has practically undergone a rewrite. It -is now much more straightforward and clear. - -=back - -=head3 L and perlrepository - -=over 4 - -=item * - -The L and perlrepository documents have been heavily edited and -split up into several new documents. - -The L document is now much shorter, and focuses on the Perl 5 -development process and submitting patches to Perl. The technical content has -been moved to several new documents, L, L, -L, and L. This technical content has only been -lightly edited. - -The perlrepository document has been renamed to L. This new document -is just a how-to on using git with the Perl source code. Any other content -that used to be in perlrepository has been moved to perlhack. - -=back - -=head3 L - -=over 4 - -=item * - -The documentation for the C function now contains more examples, -see B (f947627) - -=back - -=head3 L - -=over 4 - -=item * - -Examples in L have been updated to show the use of -L. (9243591) - -=back - -=head3 Miscellaneous - -=over 4 - -=item * - -Many POD related RT bugs and other issues which are too numerous to -enumerate have been solved by Michael Stevens. - -=back - -=head1 Diagnostics - -The following additions or changes have been made to diagnostic output, -including warnings and fatal error messages. For the complete list of -diagnostic messages, see L. - -=head2 New Diagnostics - -=over 4 - -=item "\b{" is deprecated; use "\b\{" instead - -=item "\B{" is deprecated; use "\B\{" instead - -Use of an unescaped "{" immediately following a C<\b> or C<\B> is now -deprecated so as to reserve its use for Perl itself in a future release. - -=item regcomp: Add warning if \p is used under locale. (fb2e24c) - -C<\p> implies Unicode matching rules, which are likely going to be -different than the locale's. - -=item panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries - -This new error is triggered if a destructor called on an object in a -typeglob that is being freed creates a new typeglob entry containing an -object with a destructor that creates a new entry containing an object.... - -=item refcnt: fd %d%s - -This new error only occurs if a internal consistency check fails when a -pipe is about to be closed. - -=back - -=head2 Changes to Existing Diagnostics - -=over 4 - -=item * - -The warning message about regex unrecognized escapes passed through is -changed to include any literal '{' following the 2-char escape. e.g., -"\q{" will include the { in the message as part of the escape -(216bfc0). - -=item * - -C no longer warns (8250589) - -Perl will now no longer produce this warning: - - $ perl -we 'open my $f, ">", \my $x; binmode $f, "scalar"' - Use of uninitialized value in binmode at -e line 1. - -=back - -=head1 Utility Changes - -=head3 L - -=over 4 - -=item * - -[perl #82996] Use the user's from address as return-path in perlbug - -Many systems these days don't have a valid Internet domain name and -perlbug@perl.org does not accept email with a return-path that does -not resolve. Therefore pass the user's address to sendmail so it's -less likely to get stuck in a mail queue somewhere. (019cfd2) - -=back - -=head1 Configuration and Compilation - -=over 4 - -=item * - -make reg_eval_scope.t TODOs consistently fail (daaf7ac) - -Some of the TODO tests in reg_eval_scope.t spuriously passed under -non-threaded builds. Make the tests harder so they always fail. - -Since one of the key bugs in (?{..}) is the trashing of the parent pad, -add some extra lexical vars to the parent scope and check they're still -there at the end. - -=item * - -Stop EU::CBuilder's tests from failing in parallel (cbf59d5) - -It used to use the same paths for temporary files in all tests. This -blew up randomly when the tests were run in parallel. - -=back - -=head1 Testing - -=over 4 - -=item * - -F now skips all tests on a static (-Uusedl) build -of perl. - -=item * - -F now passes on non-Win32 platforms when some -extensions are built statically. - -=back - -=head1 Platform Support - -=head2 Platform-Specific Notes - -=over 4 - -=item Windows - -=over 4 - -=item * - -The C build target now depends on F to allow the -F test to run successfully. - -=back - -=item MirBSD - -=over 4 - -=item * - -[perl #82988] Skip hanging taint.t test on MirBSD 10 (1fb83d0) - -Skip a hanging test under MirBSD that was already being skipped under -OpenBSD. - -=item * - -Previously if you build perl with a shared libperl.so on MirBSD (the -default config), it will work up to the installation; however, once -installed, it will be unable to find libperl. Treat path handling -like in the other BSD dialects. - -=back - -=back - -=head1 Internal Changes - -=over 4 - -=item * - -Fix harmless invalid read in Perl_re_compile() (f6d9469) - -[perl #2460] described a case where electric fence reported an invalid -read. This could be reproduced under valgrind with blead and -e'/x/', -but only on a non-debugging build. - -This was because it was checking for certain pairs of nodes (e.g. BOL + END) -and wasn't allowing for EXACT nodes, which have the string at the next -node position when using a naive NEXTOPER(first). In the non-debugging -build, the nodes aren't initialised to zero, and a 1-char EXACT node isn't -long enough to spill into the type field of the "next node". - -Fix this by only using NEXTOPER(first) when we know the first node is -kosher. - -=item * - -Break out the generated function Perl_keywords() into F, a new file. (26ea9e1) - -As it and Perl_yylex() both need FEATURE_IS_ENABLED, feature_is_enabled() is -no longer static, and the two macro definitions move from toke.c to perl.h - -Previously, one had to cut and paste the output of perl_keywords.pl into the -middle of toke.c, and it was not clear that it was generated code. - -=item * - -A lot of tests have been ported from Test to Test::More, e.g. in -3842ad6. - -=item * - -Increase default PerlIO buffer size. (b83080d) - -The previous default size of a PerlIO buffer (4096 bytes) has been increased -to the larger of 8192 bytes and your local BUFSIZ. Benchmarks show that doubling -this decade-old default increases read and write performance in the neighborhood -of 25% to 50% when using the default layers of perlio on top of unix. To choose -a non-default size, such as to get back the old value or to obtain and even -larger value, configure with: - - ./Configure -Accflags=-DPERLIOBUF_DEFAULT_BUFSIZ=N - -where N is the desired size in bytes; it should probably be a multiple of -your page size. - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -A Unicode C<\p{}> property match in a regular expression pattern will -now force Unicode rules for the rest of the regular expression - -=item * - -[perl #38456] binmode FH, ":crlf" only modifies top crlf layer (7826b36) - -When pushed on top of the stack, crlf will no longer enable crlf layers -lower in the stack. This will prevent unexpected results. - -=item * - -Fix 'raw' layer for RT #80764 (ecfd064) - -Made a ':raw' open do what it advertises to do (first open the file, -then binmode it), instead of leaving off the top layer. - -=item * - -Use PerlIOBase_open for pop, utf8 and bytes layers (c0888ac) - -Three of Perl's builtin PerlIO layers (C<:pop>, C<:utf8> and -C<:bytes>) didn't allow stacking when opening a file. For example -this: - - open FH, '>:pop:perlio', 'some.file' or die $!; - -Would throw an error: "Invalid argument". This has been fixed in this -release. - -=item * - -An issue present since 5.13.1, where s/A/B/ with A utf8 and B -non-utf8, could cause corruption or segfaults has been -fixed. (c95ca9b) - -=item * - -String evals will no longer fail after 2 billion scopes have been -compiled (d1bfb64, 2df5bdd, 0d311cd and 6012dc8) - -=item * - -[perl #81750] When strict 'refs' mode is off, -C<%{...}> in rvalue context returns C if -its argument is undefined. An optimisation introduced in perl 5.12.0 to -make C faster when used as a boolean did not take this into -account, causing C (and C when C<$foo> is -undefined) to be an error, which it should only be in strict mode. - -=item * - -[perl #83194] Combining the vector (%v) flag and dynamic precision would -cause sprintf to confuse the order of its arguments, making it treat the -string as the precision and vice versa. - -=item * - -[perl #77692] Sometimes the UTF8 length cache would not be reset on a value -returned by substr, causing C to give -wrong answers. With C<${^UTF8CACHE}> set to -1, it would produce a 'panic' -error message, too. - -=item * - -During the restoration of a localised typeglob on scope exit, any -destructors called as a result would be able to see the typeglob in an -inconsistent state, containing freed entries, which could result in a -crash. This would affect code like this: - - local *@; - eval { die bless [] }; # puts an object in $@ - sub DESTROY { - local $@; # boom - } - -Now the glob entries are cleared before any destructors are called. This -also means that destructors can vivify entries in the glob. So perl tries -again and, if the entries are re-created too many times, dies with a -'panic: gp_free...' error message. - -=item * - -[perl #78494] When pipes are shared between threads, the C function -(and any implicit close, such as on thread exit) no longer blocks. - -=item * - -Several contexts no longer allow a Unicode character to begin a word -that should never begin words, for an example an accent that must follow -another character previously could precede all other characters. - -=item * - -Case insensitive matching in regular expressions compiled under C now works much more sanely when the pattern and/or target string -are encoded in UTF-8. Previously, under these conditions the localeness -was completely lost. Now, code points above 255 are treated as Unicode, -but code points between 0 and 255 are treated using the current locale -rules, regardless of whether the pattern or string are encoded in UTF-8. -The few case insensitive matches that cross the 255/256 boundary are not -allowed. For example, 0xFF does not caselessly match the character at -0x178, LATIN CAPITAL LETTER Y WITH DIAERESIS, because 0xFF may not be -LATIN SMALL LETTER Y in the current locale, and Perl has no way of -knowing if that character even exists in the locale, much less what code -point it is. - -=back - -=head1 Acknowledgements - -Perl 5.13.10 represents approximately one month of development since -Perl 5.13.9 and contains approximately 63000 lines of changes across -609 files from 38 authors and committers: - -Abigail, Alexander Hartmaier, brian d foy, Charles Bailey, Chip -Salzenberg, Chris 'BinGOs' Williams, Craig A. Berry, Curtis Jewell, -Dave Rolsky, David Golden, David Leadbeater, David Mitchell, David -Wheeler, Father Chrysostomos, Florian Ragwitz, Franz Fasching, George -Greer, H.Merijn Brand, Hongwen Qiu, Hugo van der Sanden, Jay Hannah, -Jesse Vincent, Karl Williamson, Larwan Berke, Leon Timmermans, Michael -Breen, Michael Stevens, Nicholas Clark, Noirin Shirley, Paul Evans, -Peter John Acklam, Ricardo Signes, Robin Barker, Steven Schubiger, Tom -Christiansen, Tony Cook, Zsbán Ambrus and Ævar Arnfjörð Bjarmason - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the L -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl51311delta.pod b/pod/perl51311delta.pod deleted file mode 100644 index 812af75134b..00000000000 --- a/pod/perl51311delta.pod +++ /dev/null @@ -1,514 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl51311delta - what is new for perl v5.13.11 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.10 release and -the 5.13.11 release. - -If you are upgrading from an earlier release such as 5.13.9, first read -L, which describes differences between 5.13.9 and -5.13.10. - -=head1 Security - -=head2 User-defined regular expression properties - -Perl no longer allows a tainted regular expression to invoke a user-defined -property via C<\p{...}> syntax. It simply dies instead [perl #82616]. - -=head1 Incompatible Changes - -=head2 local($_) will strip all magic from $_ - -local() on scalar variables will give them a new value, but keep all -their magic intact. This has proven to be problematic for the default -scalar variable $_, where L recommends that any subroutine -that assigns to $_ should localize it first. This would throw an -exception if $_ is aliased to a read-only variable, and could have -various unintentional side-effects in general. - -Therefore, as an exception to the general rule, local($_) will not -only assign a new value to $_, but also remove all existing magic from -it as well. - -=head2 Passing references to warn() - -An earlier Perl 5.13.x release changed C to leave the reference -unchanged, allowing C<$SIG{__WARN__}> handlers to access the original -reference. But this stopped warnings that were references from having the -file and line number appended even when there was no C<$SIG{__WARN__}> -handler in place. - -Now C checks for the presence of such a handler and, if there is -none, proceeds to stringify the reference and append the file and line -number. This allows simple uses of C for debugging to continue to -work as they did before. - -=head2 fork() emulation will not wait for signalled children - -On Windows parent processes would not terminate until all forked -childred had terminated first. However, C is -inherently unstable on pseudo-processes, and C -might not get delivered if the child if blocked in a system call. - -To avoid the deadlock and still provide a safe mechanism to terminate -the hosting process, Perl will now no longer wait for children that -have been sent a SIGTERM signal. It is up to the parent process to -waitpid() for these children if child clean-up processing must be -allowed to finish. However, it is also the responsibility of the -parent then to avoid the deadlock by making sure the child process -can't be blocked on I/O either. - -See L for more information about the fork() emulation on -Windows. - -=head2 Perl source code is read in text mode on Windows - -Perl scripts used to be read in binary mode on Windows for the benefit -of the ByteLoader module (which is no longer part of core Perl). This -had the side effect of breaking various operations on the DATA filehandle, -including seek()/tell(), and even simply reading from DATA after file handles -have been flushed by a call to system(), backticks, fork() etc. - -The default build options for Windows have been changed to read Perl source -code on Windows in text mode now. Hopefully ByteLoader will be updated on -CPAN to automatically handle this situation. - -=head1 Performance Enhancements - -=over 4 - -=item * - -An earlier optimisation to speed up C and -C assignments caused a bug and was disabled in Perl 5.12.0. - -Now we have found another way to speed up these assignments [perl #82110]. - -=back - -=head1 Modules and Pragmata - -=head2 Updated Modules and Pragmata - -=over 4 - -=item * - -C has been upgraded from version 0.13 to 0.14. - -=item * - -C has been upgraded from version 2.15 to 2.16. - -=item * - -C has been upgraded from version 1.94_65 to 1.9600. - -=item * - -C has been upgraded from version 0.9101 to 0.9103 - -=item * - -C has been upgraded from version 0.52 to 0.54 - -=item * - -C has been downgraded from version 3.37 to 3.36. - -An optimisation that recent core changes have rendered unnecessary has been -reverted. - -=item * - -C has been upgraded from version 20110225.01 to 20110228.00. - -=item * - -C has been upgraded from version 5.50 to 5.61 - -New SHA-512/224 and SHA-512/256 transforms ref. NIST Draft FIPS 180-4 (February 2011) - -=item * - -C has been upgraded from version 1.16 to 1.17. - -=item * - -C has been downgraded from version 2.22 to 2.21. - -An optimisation that recent core changes have rendered unnecessary has been -reverted. - -=item * - -C has been upgraded from version 1.11 to 1.12. - -=item * - -C has been upgraded from version 1.13 to 1.14. - -=item * - -C has been upgraded from version 0.10 to 0.11. - -=item * - -C has been upgraded from version 1.08 to 1.09. - -=item * - -C has been upgraded from version 0.010 to 0.011. - -=item * - -C has been upgraded from version 0.07 to 0.08. - -=item * - -C has been upgraded from version 1.25_03 to 1.25_04. - -=item * - -C has been upgraded from version 2.27103 to 2.27105 - -=item * - -C has been upgraded from version 3.15 to 3.16 - -=item * - -C has been upgraded from version 1.992 to 1.994 - -=item * - -C has been upgraded from version 0.24_02 to 0.28 - -=item * - -C has been upgraded from version 0.37_05 to 0.3800 - -=item * - -C has been upgraded from version 2.45 to 2.46. - -=item * - -C has been upgraded from version 1.06 to 1.07. - -=item * - -C has been upgraded from version 1.11 to 1.12. - -=item * - -C has been upgraded from version 0.224 to 0.225 - -=item * - -C has been upgraded from version 3.15 to 3.16 - -=item * - -C has been upgraded from version 2.26 to 2.27. - -=item * - -C has been upgraded from version 1.15 to 1.16. - -=item * - -C has been upgraded from version 3.22 to 3.23 - -=item * - -C has been upgraded from version 0.97_01 to 0.98 - -=item * - -C has been upgraded from version 0.07 to 0.08. - -Some of the Perl code has been converted to XS for efficiency's sake. - -=item * - -C has been upgraded from version 1.38 to 1.39. - -=item * - -C has been upgraded from version 0.72 to 0.73 - -DUCET has been updated for Unicode 6.0.0 as Collate/allkeys.txt and -the default UCA_Version is 22. - -=item * - -C has been upgraded from version 0.31 to 0.32. -This includes a number of bug fixes: - -=over 4 - -=item charinfo() - -=over 4 - -=item * - -It is now updated to Unicode Version 6 with Corrigendum #8, except, -as with Perl 5.14, the code point at U+1F514 has no name. - -=item * - -The Hangul syllable code points have the correct names, and their -decompositions are always output without requiring L -to be installed. - -=item * - -The CJK (Chinese-Japanese-Korean) code points U+2A700 - U+2B734 -and U+2B740 - 2B81D are now properly handled. - -=item * - -The numeric values are now output for those CJK code points that have them. - -=item * - -The names that are output for code points with multiple aliases are now the -corrected ones. - -=back - -=item charscript() - -This now correctly returns "Unknown" instead of C for the script -of a code point that hasn't been assigned another one. - -=item charblock() - -This now correctly returns "No_Block" instead of C for the block -of a code point that hasn't been assigned to another one. - -=back - -=item * - -C has been upgraded from version 0.04 to 0.05. - -=back - -=head1 Documentation - -=head2 Changes to Existing Documentation - -=head3 L - -=over 4 - -=item * - -Clarified the order in which to check C<$@> and C<$!> after C. -(RT #80626) - -=back - -=head1 Diagnostics - -The following additions or changes have been made to diagnostic output, -including warnings and fatal error messages. For the complete list of -diagnostic messages, see L. - -=head2 New Diagnostics - -=over 4 - -=item * - -Regexp modifier "/%c" may not appear twice - -(F syntax) The regular expression pattern had one of the mutually exclusive -modifiers repeated. Remove all but one of the occurrences. - -=item * - -Regexp modifiers "/%c" and "/%c" are mutually exclusive - -(F syntax) The regular expression pattern had more than one of the mutually -exclusive modifiers. Retain only the modifier that is supposed to be there. - -=item * - -Insecure user-defined property %s - -(F) Perl detected tainted data when trying to compile a regular -expression that contains a call to a user-defined character property -function, i.e. C<\p{IsFoo}> or C<\p{InFoo}>. -See L and L. - -=back - -=head1 Testing - -Many of the tests have been refactored to use testing libraries more -consistently. In some cases test files were created or deleted: - -=over 4 - -=item * - -The tests for C and Unicode have been moved from -F to the new F. - -=item * - -F has been moved to F. - -=item * - -The tests for [perl #72922] have been moved from F to the new -F. - -=item * - -F has been deleted and its only test moved to -F. - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -A fix for a bug in C in 5.13.4 introduced a regression that -meant C did not warn when warnings were enabled. It now -correctly warns [perl #85508]. - -=item * - -The C<(?|...)> regular expression construct no longer crashes if the final -branch has more sets of capturing parentheses than any other branch. This -was fixed in Perl 5.10.1 for the case of a single branch, but that fix did -not take multiple branches into account [perl #84746]. - -=item * - -Accessing an element of a package array with a hard-coded number (as -opposed to an arbitrary expression) would crash if the array did not exist. -Usually the array would be autovivified during compilation, but typeglob -manipulation could remove it, as in these two cases which used to crash: - - *d = *a; print $d[0]; - undef *d; print $d[0]; - -=item * - -C<#line> directives in string evals were not properly updating the arrays -of lines of code (C<< @{"_<..."} >>) that the debugger (or any debugging or -profiling module) uses. In threaded builds, they were not being updated at -all. In non-threaded builds, the line number was ignored, so any change to -the existing line number would cause the lines to be misnumbered -[perl #79442]. - -=item * - -C<$AUTOLOAD> used to remain tainted forever if it ever became tainted. Now -it is correctly untainted if an autoloaded method is called and the method -name was not tainted. - -=item * - -A bug has been fixed in the implementation of C<{...}> quantifiers in -regular expressions that prevented the code block in -C from seeing the C<$2> sometimes -[perl #84294]. - -=item * - -C now dies when passed a tainted scalar for the format. It did -already die for arbitrary expressions, but not for simple scalars -[perl #82250]. - -=item * - -DESTROY methods of objects implementing ties are no longer able to crash by -accessing the tied variable through a weak reference [perl #86328]. - -=item * - -On Windows, calling kill(9, $child) on a pseudo-process created by the fork() -emulation is inherently unstable. It can also be responsible for overriding -the parent process exit code with a value of '9' if the parent terminates -right after killing the child. This condition will now happen a lot less -often than before. - -See also L for a -better way to terminate child processes that avoids deadlocks altogether. - -=item * - -Ensure that the C idiom continues to work as documented. - -A change post-5.12 caused the documented idiom not to work if Errno was loaded -after the C code had been compiled, as the compiler implicitly creates -typeglobs in the Errno symbol table when it builds the optree for the C. - -=back - -=head1 Acknowledgements - -Perl 5.13.11 represents approximately one month of development since Perl -5.13.10 and contains approximately 80,000 lines of changes across 549 files from -31 authors and committers: - -Alastair Douglas, Arvan, Boris Ratner, brian d foy, Chris 'BinGOs' Williams, -Craig A. Berry, David Golden, David Leadbeater, David Mitchell, Father -Chrysostomos, Florian Ragwitz, Jan Dubois, Karl Williamson, Kevin Ryde, Leon -Brocard, Leon Timmermans, Michael Stevens, Michael Witten, Moritz Lenz, Nicholas -Clark, Paul Johnson, Peter John Acklam, Reini Urban, Robin Barker, Steve Hay, -Sullivan Beck, Tony Cook, Vadim Konovalov, Yves Orton, Zefram and Ævar Arnfjörð -Bjarmason - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the L -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5131delta.pod b/pod/perl5131delta.pod deleted file mode 100644 index 71a732a0553..00000000000 --- a/pod/perl5131delta.pod +++ /dev/null @@ -1,288 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5131delta - what is new for perl v5.13.1 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.0 release and -the 5.13.1 release. - -If you are upgrading from an earlier release such as 5.10, first read -L, which describes differences between 5.10 and -5.12. - -=head1 Incompatible Changes - -=head2 "C<\cI>" - -The backslash-c construct was designed as a way of specifying -non-printable characters, but there were no restrictions (on ASCII -platforms) on what the character following the C could be. Now, that -character must be one of the ASCII characters. - -=head2 localised tied hashes, arrays and scalars are no longed tied - -In the following: - - tie @a, ...; - { - local @a; - # here, @a is a now a new, untied array - } - # here, @a refers again to the old, tied array - -The new local array used to be made tied too, which was fairly pointless, -and has now been fixed. This fix could however potentially cause a change -in behaviour of some code. - -=head2 C return values - -Starting from this release, C blocks returns the last evaluated -expression, or an empty list if the block was exited by C. Thus you -can now write: - - my $type = do { - given ($num) { - break when undef; - 'integer' when /^[+-]?[0-9]+$/; - 'float' when /^[+-]?[0-9]+(?:\.[0-9]+)?$/; - 'unknown'; - } - }; - -See L for details. - -=head1 Core Enhancements - -=head2 Exception Handling Reliability - -Several changes have been made to the way C, C, and C<$@> -behave, in order to make them more reliable and consistent. - -When an exception is thrown inside an C, the exception is no -longer at risk of being clobbered by code running during unwinding -(e.g., destructors). Previously, the exception was written into C<$@> -early in the throwing process, and would be overwritten if C was -used internally in the destructor for an object that had to be freed -while exiting from the outer C. Now the exception is written -into C<$@> last thing before exiting the outer C, so the code -running immediately thereafter can rely on the value in C<$@> correctly -corresponding to that C. - -Likewise, a C inside an C will no longer clobber any -exception thrown in its scope. Previously, the restoration of C<$@> upon -unwinding would overwrite any exception being thrown. Now the exception -gets to the C anyway. So C is safe inside an C, -albeit of rather limited use. - -Exceptions thrown from object destructors no longer modify the C<$@> -of the surrounding context. (If the surrounding context was exception -unwinding, this used to be another way to clobber the exception being -thrown. Due to the above change it no longer has that significance, -but there are other situations where C<$@> is significant.) Previously -such an exception was sometimes emitted as a warning, and then either -string-appended to the surrounding C<$@> or completely replaced the -surrounding C<$@>, depending on whether that exception and the surrounding -C<$@> were strings or objects. Now, an exception in this situation is -always emitted as a warning, leaving the surrounding C<$@> untouched. -In addition to object destructors, this also affects any function call -performed by XS code using the C flag. - -C<$@> is also no longer used as an internal temporary variable when -preparing to C. Previously it was internally necessary to put -any exception object (any non-string exception) into C<$@> first, -before it could be used as an exception. (The C API still offers the -old option, so an XS module might still clobber C<$@> in the old way.) -This change together with the foregoing means that, in various places, -C<$@> may be observed to contain its previously-assigned value, rather -than having been overwritten by recent exception-related activity. - -Warnings for C can now be objects, in the same way as exceptions -for C. If an object-based warning gets the default handling, -of writing to standard error, it will of course still be stringified -along the way. But a C<$SIG{__WARN__}> handler will now receive an -object-based warning as an object, where previously it was passed the -result of stringifying the object. - -=head1 Modules and Pragmata - -=head2 Updated Modules - -=over - -=item C - -The implementation of C has been refactored to use about 55% less memory. -There should be no user-visible changes. - -=item Perl 4 C<.pl> libraries - -These historical libraries have been minimally modified to avoid using -C<$[>. This is to prepare them for the deprecation of C<$[>. - -=item C - -A bug has been fixed when deparsing a nextstate op that has both a -change of package (relative to the previous nextstate), or a change of -C<%^H> or other state, and a label. Previously the label was emitted -first, leading to syntactically invalid output because a label is not -permitted immediately before a package declaration, B block, -or some other things. Now the label is emitted last. - -=back - -=head2 Removed Modules and Pragmata - -The following modules have been removed from the core distribution, and if -needed should be installed from CPAN instead. - -=over - -=item C - -=item C - -=item C - -=back - -The removal of C has been deferred until after 5.14, as the -implementation of C shipped with 5.12.0 did not correctly issue the -warning that it was to be removed from core. - -=head1 New Documentation - -=over 4 - -=item perlgpl - -L has been updated to contain GPL version 1, as is included in the -F distributed with perl. - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -Naming a deprecated character in \N{...} will not leak memory. - -=item * - -FETCH is no longer called needlessly on some tied variables. - -=item * - -The trie runtime code should no longer allocate massive amounts of memory, -fixing #74484. - -=back - -=head1 Changed Internals - -=over 4 - -=item * - -The protocol for unwinding the C stack at the last stage of a C -has changed how it identifies the target stack frame. This now uses -a separate variable C, where previously it relied on -the C pointer in the C context frame that -has nominally just been discarded. This change means that code running -during various stages of Perl-level unwinding no longer needs to take -care to avoid destroying the ghost frame. - -=item * - -The format of entries on the scope stack has been changed, resulting in a -reduction of memory usage of about 10%. In particular, the memory used by -the scope stack to record each active lexical variable has been halved. - -=item * - -Memory allocation for pointer tables has been changed. Previously -C allocated memory from the same arena system as C -bodies and Cs, with freed memory remaining bound to those arenas until -interpreter exit. Now it allocates memory from arenas private to the specific -pointer table, and that memory is returned to the system when -C is called. Additionally, allocation and release are both -less CPU intensive. - -=item * - -A new function, Perl_magic_methcall has been added that wraps the setup needed -to call a magic method like FETCH (the existing S_magic_methcall function has -been renamed S_magic_methcall1). - -=back - -=head1 Deprecations - -The following items are now deprecated. - -=over 4 - -=item C - -C is no longer part of Perl's public API. Calling it now -generates a deprecation warning, and it will be removed in a future -release. - -=back - -=head1 Acknowledgements - -Perl 5.13.1 represents thirty days of development since Perl 5.13.0 and -contains 15390 lines of changes across 289 files from 34 authors and -committers. - -Thank you to the following for contributing to this release: - -Ævar Arnfjörð Bjarmason, Arkturuz, Chris 'BinGOs' Williams, Craig A. Berry, -Curtis Jewell, Dan Dascalescu, David Golden, David Mitchell, Father -Chrysostomos, Gene Sullivan, gfx, Gisle Aas, H.Merijn Brand, James E Keenan, -James Mastros, Jan Dubois, Jesse Vincent, Karl Williamson, Leon Brocard, -Lubomir Rintel (GoodData), Nicholas Clark, Philippe Bruhat (BooK), Rafael -Garcia-Suarez, Rainer Tammer, Ricardo Signes, Richard Soderberg, Robin Barker, -Ruslan Zakirov, Steffen Mueller, Todd Rinaldo, Tony Cook, Vincent Pit, Zefram - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5132delta.pod b/pod/perl5132delta.pod deleted file mode 100644 index 29b4c0abe44..00000000000 --- a/pod/perl5132delta.pod +++ /dev/null @@ -1,410 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5132delta - what is new for perl v5.13.2 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.2 release and -the 5.13.1 release. - -If you are upgrading from an earlier release such as 5.10, first read -L, which describes differences between 5.10 and -5.12. - -=head1 Incompatible Changes - -=head2 localised tied scalars are tied again. - -The change in behaviour in 5.13.1 of localising tied scalar values has -been reverted to the existing 5.12.0 and earlier behaviour (the change for -arrays and hashes remains). - -=head2 Naming fixes in Policy_sh.SH may invalidate Policy.sh - -Several long-standing typos and naming confusions in Policy_sh.SH have -been fixed, standardizing on the variable names used in config.sh. - -This will change the behavior of Policy.sh if you happen to have been -accidentally relying on the Policy.sh incorrect behavior. We'd appreciate -feedback from anyone using Policy.sh to be sure nothing is broken by -this change (c1bd23). - -=head2 Stashes are now always defined - -C now always returns true, even when no symbols have yet been -defined in that package. - -This is a side effect of removing a special case kludge in the tokeniser, -added for 5.10.0, to hide side effects of changes to the internal storage of -hashes that to drastically reduce their memory usage overhead. - -Calling defined on a stash has been deprecated since 5.6.0, warned on -lexicals since 5.6.0, and has warned for stashes (and other package -variables) since 5.12.0. C has always exposed an -implementation detail - emptying a hash by deleting all entries from it does -not make C false, hence C is not valid code to -determine whether an arbitrary hash is empty. Instead, use the behaviour -that an empty C<%hash> always returns false in a scalar context. - -=head1 Core Enhancements - -=head2 Non-destructive substitution - -The substitution operator now supports a C option that -copies the input variable, carries out the substitution on -the copy and returns the result. The original remains unmodified. - - my $old = 'cat'; - my $new = $old =~ s/cat/dog/r; - # $old is 'cat' and $new is 'dog' - -This is particularly useful with C. See L for more examples -(4f4d75, 000c65). - -=head2 package block syntax - -A package declaration can now contain a code block, in which case the -declaration is in scope only inside that block. So C -is precisely equivalent to C<{ package Foo; ... }>. It also works with -a version number in the declaration, as in C. -See L (434da3..36f77d, 702646). - -=head2 CLONE_PARAMS structure added to ease correct thread creation - -Modules that create threads should now create C structures -by calling the new function C, and free them with -C. This will ensure compatibility with any future -changes to the internals of the C structure layout, and that -it is correctly allocated and initialised. - -=head2 perl -h no longer recommends -w - -perl -h used to mark the -w option as recommended; since this option is -far less useful than it used to be due to lexical 'use warnings' and since -perl -h is primary a list and brief explanation of the command line switches, -the recommendation has now been removed (60eaec). - -=head1 Modules and Pragmata - -=head2 Updated Modules - -=head3 Locale-Codes 3.13 - -Locale::Country, Locale::Language and Locale::Currency were updated from -3.12 to 3.13 of the Locale-Codes distribution to include locale code changes -(e1137b). - -=head3 Thread-Semaphore 2.11 - -Added new methods -Edown_nb() and -Edown_force() at the suggestion -of Rick Garlick. - -Refactored methods to skip argument validation when no argument is supplied. - -(04febe, f06daa) - -=head3 CPAN.pm 1.94_57 - -=over 4 - -=item * release 1.94_57 - -=item * bugfix: treat modules correctly that are deprecated in perl 5.12. - -=item * bugfix: RT #57482 and #57788 revealed that configure_requires -implicitly assumed build_requires instead of normal requires. (Reported -by Andrew Whatson and Father Chrysostomos respectively) - -=item * testfix: solaris should run the tests without expect because (some?) -solaris have a broken expect - -=item * testfix: run tests with cache_metadata off to prevent spill over -effects from previous test runs - -=back - -(742adb) - -=head3 Hash::Util warning fix - -Hash::Util now enables "no warnings 'uninitialized'" to suppress spurious -warnings from undefined hash values (RT #74280). - -=head3 B::Deparse now handles 'no VERSION' - -The 'no 5.13.2' or similar form is now correctly handled by B::Deparse. - -=head3 IO::Socket doc additions - -getsockopt and setsockopt are now documented. - -=head3 B::Concise updated for OPpDEREF - -B::Concise marks rv2sv, rv2av and rv2hv ops with the new OPpDEREF flag -as "DREFed". - -=head3 File::Copy doc clarification - -An extra stanza was added explaining behaviours when the copy destination -already exists and is a directory. - -=head3 Multiple POD spelling fixes. - -Fixes were made to VMS::DCLsym, mro, Search::Dist, B::t::OptreeCheck -and UNIVERSAL. - -=head1 Changes to Existing Documentation - -=head2 Replace wrong tr/// table in perlebcdic.pod - -perlebcdic.pod contains a helpful table to use in tr/// to convert -between EBCDIC and Latin1/ASCII. Unfortunately, the table was the -inverse of the one it describes, though the code that used the table -worked correctly for the specific example given. - -The table has been changed to its inverse, and the sample code changed -to correspond, as this is easier for the person trying to follow the -instructions since deriving the old table is somewhat more complicated. - -The table has also been changed to hex from octal, as that is more the norm -these days, and the recipes in the pod altered to print out leading -zeros to make all the values the same length, as the table that they can -generate has them (5f26d5). - -=head2 Document tricks for user-defined casing - -perlunicode.pod now contains an explanation of how to override, mangle -and otherwise tweak the way perl handles upper, lower and other case -conversions on unicode data, and how to provide scoped changes to alter -one's own code's behaviour without stomping on anybody else (71648f). - -=head2 Document $# and $* as removed and clarify $#array usage - -$# and $* were both disabled as of perl5 version 10; this release adds -documentation to that effect, a description of the results of continuing -to try and use them, and a note explaining that $# can also function as a -sigil in the $#array form (7f315d2). - -=head2 INSTALL explicitly states the requirement for C89 - -This was already true but it's now Officially Stated For The Record (51eec7). - -=head2 No longer advertise Math::TrulyRandom - -This module hasn't been updated since 1996 so we can't recommend it any more -(83918a). - -=head2 perlfaq synchronised to upstream - -The FAQ has been updated to commit -37550b8f812e591bcd0dd869d61677dac5bda92c from the perlfaq repository -at git@github.com:briandfoy/perlfaq.git - -=head1 Performance Enhancements - -Only allocate entries for @_ on demand - this not only saves memory per -subroutine defined but should hopefully improve COW behaviour (77bac2). - -=head2 Multiple small improvements to threads - -The internal structures of threading now make fewer API calls and fewer -allocations, resulting in noticeably smaller object code. Additionally, -many thread context checks have been deferred so that they're only done -when required (although this is only possible for non-debugging builds). - -=head2 Size optimisations to SV and HV structures - -xhv_fill has been eliminated from struct xpvhv, saving 1 IV per hash and -on some systems will cause struct xpvhv to become cache aligned. To avoid -this memory saving causing a slowdown elsewhere, boolean use of HvFILL -now calls HvTOTALKEYS instead (which is equivalent) - so while the fill -data when actually required is now calculated on demand, the cases when -this needs to be done should be few and far between (f4431c .. fcd245). - -The order of structure elements in SV bodies has changed. Effectively, -the NV slot has swapped location with STASH and MAGIC. As all access to -SV members is via macros, this should be completely transparent. This -change allows the space saving for PVHVs documented above, and may reduce -the memory allocation needed for PVIVs on some architectures. - -=head2 Optimisation of regexp engine string comparison work - -The foldEQ_utf8 API function for case-insensitive comparison of strings (which -is used heavily by the regexp engine) was substantially refactored and -optimised - and its documentation much improved as a free bonus gift -(8b3587, e6226b). - -=head2 Memory consumption improvements to Exporter - -The @EXPORT_FAIL AV is no longer created unless required, hence neither is -the typeglob backing it - this saves about 200 bytes per Exporter using -package that doesn't use this functionality. - -=head1 Installation and Configuration Improvements - -=head2 Compilation improvements - -Fix CCINCDIR and CCLIBDIR for mingw64 cross compiler to correctly be under -$(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME). - -This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and -'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now -set correctly (23ae7f). - -=head1 Selected Bug Fixes - -=over 4 - -=item * Timely cleanup of SVs that are cloned into a new thread but then -discovered to be orphaned (i.e. their owners are -not- cloned) (e42956) - -=item * Don't accidentally clone lexicals in scope within active stack frames in -the parent when creating a child thread (RT #73086) (05d04d). - -=item * Avoid loading feature.pm when 'no 5.13.2;' or similar is -encountered (faee19). - -=item * Trap invalid use of SvIVX on SVt_REGEXP when assertions are on -(e77da3) - -=item * Don't stamp on $DB::single, $DB::trace and $DB::signal if they -already have values when $^P is assigned to (RT #72422) (4c0f30). - -=item * chop now correctly handles perl's extended UTF-8 (RT #73246) (65ab92) - -=item * Defer signal handling when shared SV locks are held to avoid -deadlocks (RT #74868) (65c742). - -=item * glob() no longer crashes when %File::Glob:: is empty and -CORE::GLOBAL::glob isn't present (4984aa). - -=item * perlbug now always permits the sender address to be changed -before sending - if you were having trouble sending bug reports before -now, this should fix it, we hope (e6eb90). - -=item * Overloading now works properly in conjunction with tied -variables. What formerly happened was that most ops checked their -arguments for overloading I checking for magic, so for example -an overloaded object returned by a tied array access would usually be -treated as not overloaded (RT #57012) (6f1401, ed3b9b, 6a5f8c .. 24328f). - -=item * Independently, a bug was fixed that prevented $tied-E() from -always calling FETCH correctly (RT #8438) (7c7501) - -=back - -=head1 Changed Internals - -=over 4 - -=item * The implementation of sv_dup_inc() has changed from a macro to a function. - -=item * - -The C function has been deprecated. It appeared that -its design was insufficient to reliably get the lexical C<$_> at run-time. - -Use the new C function or the C macro instead. -They directly return the right SV representing C<$_>, whether it's lexical -or dynamic (789bd8 .. 03d5bc). - -=item * - -The following new functions or macros have been added to the public API: -C, C, C. - -=item * - -The C macro now calls C. C is now a -noop but should still be used to ensure past and future compatibility. - -=item * - -The ibcmp_* functions have been renamed and are now called foldEQ, -foldEQ_locale and foldEQ_utf8 (e6226b). - -=back - -=head1 Deprecations - -The following items are now deprecated. - -=over 4 - -=item * - -Omitting a space between a regex pattern or pattern modifiers and the following -word is deprecated. For example, C<< m/foo/sand $bar >> will still be parsed -as C<< m/foo/s and $bar >> but will issue a warning. - -=back - -=head1 Platform Specific Notes - -=head2 Recent OpenBSDs now use perl's malloc - -OpenBSD E 3.7 has a new malloc implementation which is mmap based -and as such can release memory back to the OS; however for perl using -this malloc causes a substantial slowdown so we now default to using -perl's malloc instead (RT #75742) (9b58b5). - -=head1 Acknowledgements - -Perl 5.13.2 represents thirty days of development since Perl 5.13.1 (and -two days of waiting around while the release manager remembered where he -left his brain) and contains 3685 lines of changes across 194 files from -30 authors and committers. - -Thank you to the following for contributing to this release: - -Abigail, Andreas J. Koenig, Chas. Owens, Chris 'BinGOs' Williams, -Craig A. Berry, David Caldwell, David Golden, David Mitchell, -Father Chrysostomos, George Greer, H.Merijn Brand, Jerry D. Hedden, -Karl Williamson, Maik Hentsche, Matt S Trout, Nicholas Clark, Rafael -Garcia-Suarez, Ricardo Signes, Salvador Fandino, Salvador Ortiz Garcia, -Shlomi Fish, Sinan Unur, Sisyphus, Slaven Rezic, Sullivan Beck, Tony Cook, -Vincent Pit, Zefram, brian d foy, Ævar Arnfjörð Bjarmason - -Your humble release manager would like to specifically call out -Karl Williamson for making the tests a better place to be, and Shlomi -Fish for a passel of tiny incremental docfixes of the sort that don't get -made often enough. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5133delta.pod b/pod/perl5133delta.pod deleted file mode 100644 index cda95eaa0f6..00000000000 --- a/pod/perl5133delta.pod +++ /dev/null @@ -1,668 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5133delta - what is new for perl v5.13.3 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.3 release and -the 5.13.2 release. - -If you are upgrading from an earlier release such as 5.13.1, first read -L, which describes differences between 5.13.1 and -5.13.2. - -=head1 Core Enhancements - -=head2 \o{...} for octals - -There is a new escape sequence, C<"\o">, in double-quote-like contexts. -It must be followed by braces enclosing an octal number of at least one -digit. It interpolates as the character with an ordinal value equal to -the octal number. This construct allows large octal ordinals beyond the -current max of 0777 to be represented. It also allows you to specify a -character in octal which can safely be concatenated with other regex -snippets and which won't be confused with being a backreference to -a regex capture group. See L. - -=head2 C<\N{I}> and C enhancements - -C<\N{}> and C now know about the abbreviated -character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., as -well as all the customary abbreviations for the C0 and C1 control -characters (such as ACK, BEL, CAN, etc.), as well as a few new variants -in common usage of some C1 full names. - -In the past, it was ineffective to override one of Perl's abbreviations -with your own custom alias. Now it works. - -You can also create a custom alias directly to the ordinal of a -character, known by C<\N{...}>, C, and -C. Previously, an alias had to be to an official -Unicode character name. This made it impossible to create an alias for -a code point that had no name, such as the ones reserved for private -use. So this change allows you to make more effective use of private -use characters. Only if there is no official name will -C return your custom one. - -See L for details on all these changes. - -=head2 Uppercase X/B allowed in hexadecimal/binary literals - -Literals may now use either upper case C<0X...> or C<0B...> prefixes, -in addition to the already supported C<0x...> and C<0b...> -syntax. (RT#76296) (a674e8d, 333f87f) - -C, Ruby, Python and PHP already supported this syntax, and it makes -Perl more internally consistent. A round-trip with C now returns C<16> in addition to C, which worked before. - -=head1 Incompatible Changes - -=head2 \400 - \777 - -Use of C<\400> - C<\777> in regexes in certain circumstances has given -different, anomalous behavior than their use in all other -double-quote-like contexts. Since 5.10.1, a deprecated warning message -has been raised when this happens. Now, all double-quote-like contexts -have the same behavior, namely to be equivalent to C<\x{100}> - -C<\x{1FF}>, with no deprecation warning. Use of these values in the -command line option C<"-0"> retains the current meaning to slurp input -files whole; previously, this was documented only for C<"-0777">. It is -recommended, however, because of various ambiguities, to use the new -C<\o{...}> construct to represent characters in octal. -(fa1639c..f6993e9). - -=head1 Deprecations - -=head2 Omitting a space between a regular expression and subsequent word - -Omitting a space between a regex pattern or pattern modifiers and the -following word is deprecated. Deprecation for regular expression -I was added in Perl 5.13.2. In this release, the deprecation -is extended to regular expression I. For example, -C<< s/foo/bar/sand $bar >> will still be parsed as -C<< s/foo/bar/s and $bar >> but will issue a warning. (aa78b66) - -=head2 Deprecation warning added for deprecated-in-core .pl libs - -This is a mandatory warning, not obeying -X or lexical warning bits. -The warning is modelled on that supplied by deprecate.pm for -deprecated-in-core .pm libraries. It points to the specific CPAN -distribution that contains the .pl libraries. The CPAN version, of -course, does not generate the warning. (0111154) - -=head1 Performance Enhancements - -There are several small optimizations to reduce CPU cache misses in various very -commonly used modules like C and C as well in accessing -file-handles for reading. - -=head1 Modules and Pragmata - -=head2 Updated Modules and Pragmata - -=over 4 - -=item C - -Upgraded from version 2.06_01 to 2.10. - -=item C - -Upgraded from version 1.08 to 1.10. - -C is now significantly faster. (f3227b7) - -=item C - -Upgraded from version 0.62 to 0.63. - -=item C - -Upgraded from version 1.77_02 to 1.77_03. - -=item C - -Upgraded from version 1.33_01 to 1.33_02. - -=item C - -Upgraded from version 1.09 to 1.10. - -Calling C without arguments is now significantly more efficient. -(8452af9) - -=item C - -Upgraded from version 0.38 to 0.42. - -Updates since 0.38 include: a safe print method that guards -Archive::Extract from changes to $\; a fix to the tests when run in core -perl; support for TZ files; and a modification for the lzma logic to favour -IO::Uncompress::Unlzma (d7f8799) - -=item C - -Upgraded from version 1.54 to 1.64. - -Important changes since 1.54 include: compatibility with busybox -implementations of tar; a fix so that C and C -close only handles they opened; and a bug was fixed regarding the exit code -of extract_archive. (afabe0e) - -=item C - -Upgraded from version 0.87 to 0.88. - -=item C - -Upgraded from version 2.024 to 2.027. - -=item C - -Upgraded from version 2.024 to 2.027_01. - -=item C - -Upgraded from version 2.024 to 2.027. - -=item C - -Upgraded from version 0.90 to 0.9007. - -Fixed the shell test to skip if test is not being run under a terminal; -resolved the issue where a prereq on Config would not be recognised as a -core module. (d4e225a) - -=item C - -Upgraded from version 2.39 to 2.40. - -=item C - -Upgraded from version 5.47 to 5.48. - -=item C - -Upgraded from version 5.64_02 to 5.64_03. - -Exporter no longer overrides C<$SIG{__WARN__}> (RT #74472) (9b86bb5) - -=item C - -Upgraded from version 0.27 to 0.2703. - -=item C - -Upgraded from version 1.57 to 1.58. - -=item C - -Upgraded from version 2.2205 to 2.2206. - -=item C - -Upgraded from version 2.19 to 2.20. - -Skips suid tests on a nosuid partition. These tests were being skipped on -OpenBSD, but nosuid partitions can exist on other systems too. Now it just -checks if it can create a suid directory, if not the tests are skipped. -Perl builds without errors in a nosuid /tmp with this patch. (cae9400) - -=item C - -Upgraded from version 0.35 to 0.35_01. - -=item C - -Upgraded from version 0.58 to 0.60. - -=item C - -Upgraded from version 2.01 to 2.03. - -=item C - -Upgraded from version 1.14 to 1.15. - -Locale::Maketext guts have been merged back into the main module (87d86da) -and adds external cache support (ace47d6) - -=item C - -Upgraded from version 0.3603 to 0.3607. - -=item C - -Upgraded from version 2.34 to 2.36. - -=item C - -Upgraded from version 0.16 to 0.18. - -=item C - -Upgraded from version 2.02 to 3.00. - -=item C - -Upgraded from version 3.17 to 3.21. - -The core update from Test-Harness 3.17 to 3.21 fixed some things, but -also L with argument -passing to non-Perl tests. - -=item C - -Upgraded from version 1.9719 to 1.9721. - -=item C - -Upgraded from version 1.15_01 to 1.20_01. - -=item C - -Upgraded from version 0.52_01 to 0.53. - -Includes Unicode Collation Algorithm 18 (74b94a7) - -=item C - -Upgraded from version 1.03 to 1.06. - -=back - -=head1 Documentation - -=head2 New Documentation - -=head3 L - -The Perl 5.12.1 perldelta file was added from the Perl maintenance branch - -=head2 Changes to Existing Documentation - -=head3 General changes - -=over - -=item * - -Octal character escapes in documentation now prefer a three-digit octal -escape or the new C<\o{...}> escape as they have more consistent behavior -in different contexts than other forms. (ce7b6f0) (d8b950d) (e1f120a) - -=item * - -Documentation now standardizes on the term 'capture group' over 'buffer' -in regular expression documentation (c27a5cf) - -=back - -=head3 L - -=over - -=item * - -Added cautionary note about "no VERSION" (e0de7c2) - -=item * - -Added additional notes regarding srand when forking (d460397) - -=back - -=head3 L - -=over 4 - -=item * - -Improved documentation of unusual character escapes (4068718, 9644846) - -=item * - -Clarified how hexadecimal escapes are interpreted, with particular -attention to the treatment of invalid characters (9644846) - -=back - -=head3 L - -=over - -=item * - -Clarified the behavior of the C<-0NNN> switch for C<-0400> or higher (7ba31cb) - -=back - -=head3 L - -=over - -=item * - -Added the policy on compatibility and deprecation along with definitions of -terms like "deprecation" (70e4a83) - -=back - -=head3 L - -=over - -=item * - -Added examples of the perils of not using \g{} when there are more -than nine back-references (9d86067) - -=back - -=head3 L - -=over - -=item * - -Updated some examples for modern Perl style (67d00dd) - -=back - -=head1 Utility Changes - -=head3 L - -=over - -=item * - -The remote terminal works after forking and spawns new sessions - one -for each forked process (11653f7) - -=item * - -Uses the less pager path from Config instead of searching for it (bf320d6) - -=back - -=head1 Configuration and Compilation - -=over 4 - -=item * - -Adjusted 'make test.valgrind' to account for cpan/dist/ext separation -(e07ce2e) - -=back - -=head1 Testing - -=over 4 - -=item * - -F clears PERL5LIB, PERLLIB, PERL5OPT as t/TEST does (a2d3de1) - -=item * - -Many common testing routines were refactored into t/lib/common.pl - -=item * - -Several test files have been modernized to use Test::More - -=back - -=head1 Platform Support - -=head2 Discontinued Platforms - -=over 4 - -=item MacOS Classic - -Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in -December 2004. Vestigial MacOS Classic specific code has now been removed -from other core modules as well (8f8c2a4..c457df0) - -=back - -=head2 Platform-Specific Notes - -=over 4 - -=item Win32 - -t/io/openpid.t now uses the alarm() watchdog strategy for more -robustness (5732108) - -=back - -=head1 Internal Changes - -=over 4 - -=item * - -Under some circumstances, the C field of a CV is now reference -counted. To ensure consistent behaviour, direct assignment to it, for -example C is now a compile-time error. A new macro, -C has been introduced to perform this operation safely. -Note that modification of this field is not part of of the public API, -regardless of this new macro. This change caused some -L in modules that used the private C -field. - -=item * - -It is now possible for XS code to hook into Perl's lexical scope -mechanism at compile time, using the new C -function. See L. - -=item * - -Added C to implement -C (6ad8f25) - -=item * - -Added prototypes for C and C to allow overloading (RT#75902) -(1db4d19) - -=item * - -Adds C to replace C. C and -C call get magic on the stack arg, so create C<_flags()> -variants that allow us to control this. (0d7d409) - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -Some work has been done on the internal pointers that link between symbol -tables (stashes), typeglobs and subroutines. This has the effect that -various edge cases related to deleting stashes or stash entries (e.g. -<%FOO:: = ()>), and complex typeglob or code reference aliasing, will no -longer crash the interpreter. - -=item * - -Fixed readline() when interrupted by signals so it no longer returns -the "same thing" as before or random memory - -=item * - -Fixed a regression of kill() when a match variable is used for the -process ID to kill (RT#75812) (8af710e) - -=item * - -Fixed several subtle bugs in sort() when @_ is accessed within a subroutine -used for sorting (RT#72334) (8f443ca) - -=item * - -Catch yyparse() exceptions in C<< (?{...}) >> (RT#2353) (634d691) - -=item * - -Avoid UTF-8 cache panics with offsets beyond a string (RT #75898) (3e2d381) - -=item * - -Fixed POSIX::strftime memory leak (RT#73520) (c4bc4aa) - -=item * - -Doesn't set strict with C if C is greater than 5.12 -(da8fb5d) - -=item * - -Avoids multiple FETCH/stringify on filetest ops (40c852d) - -=item * - -Fixed issue with string C not detecting taint of overloaded/tied -arguments (RT #75716) (895b760) - -=item * - -Fix potential crashes of string C when evaluating a object with -overloaded stringification by creating a stringified copy when necessary -(3e5c018) - -=item * - -Fixed bug where overloaded stringification could remove tainting -(RT #75716) (a02ec77) - -=item * - -Plugs more memory leaks in vms.c. (9e2bec0) - -=item * - -Fix pthread include error for Time::Piece (e9f284c) - -=back - -=head1 Known Problems - -=over 4 - -=item * - -Bug fixes involving CvGV reference counting break Sub::Name. A -patch has been sent upstream to the maintainer - -=item * - -readline() returns an empty string instead of undef when it is -interrupted by a signal - -=item * - -Test-Harness was updated from 3.17 to 3.21 for this release. A rewrite -in how it handles non-Perl tests (in 3.17_01) broke argument passing to -non-Perl tests with L (RT #59186), and required that non-Perl -tests be run as C instead of C These -issues are being solved upstream, but didn't make it into this release. -They're expected to be fixed in time for perl v5.13.4. (RT #59457) - -=item * - -C now prevents object methods from being called as class methods -(d808b68) - -=back - -=head1 Errata - -=over 4 - -=item * - -Retroactively added the Acknowledgements list to L, -which was excluded in the original release (d1e2db0) - -=back - -=head1 Acknowledgements - -Perl 5.13.3 represents approximately one month of development since Perl -5.13.2, and contains 12,184 lines of changes across 575 files from 104 -authors and committers. - -Thank you to the following for contributing to this release: - -Abhijit Menon-Sen, Abigail, Alex Davies, Alex Vandiver, Alexandr -Ciornii, Andreas J. Koenig, Andrew Rodland, Andy Dougherty, Aristotle -Pagaltzis, Arkturuz, Ben Morrow, Bo Borgerson, Bo Lindbergh, Brad -Gilbert, Bram, Brian Phillips, Chas. Owens, Chip Salzenberg, Chris -Williams, Craig A. Berry, Curtis Jewell, Dan Dascalescu, Daniel -Frederick Crisman, Dave Rolsky, David Caldwell, David E. Wheeler, David -Golden, David Leadbeater, David Mitchell, Dennis Kaarsemaker, Eric -Brine, Father Chrysostomos, Florian Ragwitz, Frank Wiegand, Gene -Sullivan, George Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Graham -Barr, H.Merijn Brand, Harmen, Hugo van der Sanden, James E Keenan, James -Mastros, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Jim Cromie, John -Peacock, Jos Boumans, Josh ben Jore, Karl Williamson, Kevin Ryde, Leon -Brocard, Lubomir Rintel, Maik Hentsche, Marcus Holland-Moritz, Matt -Johnson, Matt S Trout, Max Maischein, Michael Breen, Michael G Schwern, -Moritz Lenz, Nga Tang Chan, Nicholas Clark, Nick Cleaton, Nick Johnston, -Niko Tyni, Offer Kaye, Paul Marquess, Philip Hazel, Philippe Bruhat, -Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes, -Richard Soderberg, Robin Barker, Ruslan Zakirov, Salvador Fandino, -Salvador Ortiz Garcia, Shlomi Fish, Sinan Unur, Sisyphus, Slaven Rezic, -Steffen Mueller, Stepan Kasal, Steve Hay, Steve Peters, Sullivan Beck, -Tim Bunce, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook, -Vincent Pit, Yuval Kogman, Yves Orton, Zefram, brian d foy, chromatic, -kmx, Ævar Arnfjörð Bjarmason - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5134delta.pod b/pod/perl5134delta.pod deleted file mode 100644 index 5db6cfbaf81..00000000000 --- a/pod/perl5134delta.pod +++ /dev/null @@ -1,543 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5134delta - what is new for perl v5.13.4 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.4 release and -the 5.13.3 release. - -If you are upgrading from an earlier release such as 5.13.2, first read -L, which describes differences between 5.13.2 and -5.13.3. - -=head1 Core Enhancements - -=head2 C now returns the seed - -This allows programs that need to have repeatable results to not have to come -up with their own seed generating mechanism. Instead, they can use C -and somehow stash the return for future use. Typical is a test program which -has too many combinations to test comprehensively in the time available to it -each run. It can test a random subset each time, and should there be a failure, -log the seed used for that run so that it can later be used to reproduce the -exact results. - -=head2 C<\N{I}> and C enhancements - -C<\N{}>, C, C now know about every -character in Unicode. Previously, they didn't know about the Hangul syllables -nor a number of CJK (Chinese/Japanese/Korean) characters. - -=head1 Incompatible Changes - -=head2 Declare API incompatibility between blead releases - -Only stable releases (5.10.x, 5.12.x, 5.14.x, ...) guarantee binary -compatibility with each other, while blead releases (5.13.x, 5.15.x, ...) often -break this compatibility. However, prior to perl 5.13.4, all blead releases had -the same C, C, and C, -effectively declaring them as binary compatible, which they weren't. From now -on, blead releases will have a C equal to their -C, explicitly marking them as incompatible with each other. - -Maintenance releases of stable perl versions will continue to make no -intentionally incompatible API changes. - -=head2 Check API compatibility when loading XS modules - -When perl's API changes in incompatible ways (which usually happens between -every major release), XS modules compiled for previous versions of perl will not -work anymore. They will need to be recompiled against the new perl. - -In order to ensure that modules are recompiled, and to prevent users from -accidentally loading modules compiled for old perls into newer ones, the -C macro has been added. That macro, which is called -when loading every newly compiled extension, compares the API version of the -running perl with the version a module has been compiled for and raises an -exception if they don't match. - -=head2 Binary Incompatible with all previous Perls - -Some bit fields have been reordered; therefore, this release will not be binary -compatible with any previous Perl release. - -=head2 Change in the parsing of certain prototypes - -Functions declared with the following prototypes now behave correctly as unary -functions: - -=over 4 - -=item * - -C<*> - -=item * - -C<\sigil> - -=item * - -C<\[...]> - -=item * - -C<;$> - -=item * - -C<;*> - -=item * - -C<;\sigil> - -=item * - -C<;\[...]> - -=back - -Due to this bug fix, functions using the C<(*)>, C<(;$)> and C<(;*)> prototypes -are parsed with higher precedence than before. So in the following example: - - sub foo($); - foo $a < $b; - -the second line is now parsed correctly as C<< foo($a) < $b >>, rather than -C<< foo($a < $b) >>. This happens when one of these operators is used in -an unparenthesised argument: - - < > <= >= lt gt le ge - == != <=> eq ne cmp ~~ - & - | ^ - && - || // - .. ... - ?: - = += -= *= etc. - -=head1 Deprecations - -=head2 List assignment to C<$[> - -After assignment to C<$[> has been deprecated and started to give warnings in -perl version 5.12.0, this version of perl also starts to emit a warning when -assigning to C<$[> in list context. This fixes an oversight in 5.12.0. - -=head1 Performance Enhancements - -=over 4 - -=item * - -Make string appending 100 times faster - -When doing a lot of string appending, perl could end up allocating a lot more -memory than needed in a very inefficient way, if perl was configured to use the -system's C implementation instead of its own. - -C, which is what's being used to allocate more memory if necessary when -appending to a string, has now been taught how to round up the memory it -requests to a certain geometric progression, making it much faster on certain -platforms and configurations. On Win32, it's now about 100 times faster. - -=item * - -For weak references, the common case of just a single weak reference per -referent has been optimised to reduce the storage required. In this case it -saves the equivalent of one small perl array per referent. - -=item * - -C, C, and C now only allocate the parts of the C body -they actually use, saving some space. - -=back - -=head1 Modules and Pragmata - -=head2 New Modules and Pragmata - -This release does not introduce any new modules or pragmata. - -=head2 Updated Modules and Pragmata - -=over 4 - -=item C - -Upgraded from version 1.64 to 1.68. - -Among other things, the new version adds a new option to C to allow safe -creation of tarballs without world-writable files on Windows, allowing those -archives to be uploaded to CPAN. - -=item C - -Upgraded from version 1.11 to 1.12. - -=item C - -Upgraded from version 1.16 to 1.18. - -L now detects incomplete L overrides and -avoids using bogus C<@DB::args>. To provide backtraces, Carp relies on -particular behaviour of the caller built-in. Carp now detects if other code has -overridden this with an incomplete implementation, and modifies its backtrace -accordingly. Previously incomplete overrides would cause incorrect values in -backtraces (best case), or obscure fatal errors (worst case) - -This fixes certain cases of C caused by modules -overriding C incorrectly. - -=item C - -Upgraded from version 2.027 to 2.030. - -=item C - -Upgraded from version 2.027 to 2.030. - -=item C - -Upgraded from version 3.31 to 3.31_01. - -Various issues in L have been fixed. - -=item C - -Upgraded from version 0.03 to 0.04. - -C now defaults to using C<$_> if there is no argument given, just -like the documentation always claimed it did. - -=item C - -Upgraded from version 2.027 to 2.030. - -=item C - -Upgraded from version 2.36 to 2.37. - -Besides listing the updated core modules of this release, it also stops listing -the C module. That module never existed in core. The scripts -generating C confused it with C, which actually -is a core module, since the time of perl 5.8.7. - -=item C - -Upgraded from version 3.21 to 3.22. - -=item C - -Upgraded from version 0.94 to 0.96. - -Among many other things, subtests without a C or C now have an -implicit C added to them. - -=item C - -Upgraded from version 0.53 to 0.56. - -Among other things, it is now using UCA Revision 20 (based on Unicode 5.2.0) and -supports a couple of new locales. - -=item C - -Upgraded from version 1.17 to 1.18. - -=back - -=head2 Removed Modules and Pragmata - -This release does not remove any modules or pragmata. - -=head1 Documentation - -=head2 Changes to Existing Documentation - -=head3 L - -=over 4 - -=item * - -The following existing diagnostics are now documented: - -=over 4 - -=item * - -L - -=item * - -L - -=item * - -L - -=item * - -L - -=item * - -L - -=item * - -L - -=item * - -L - -=back - -=back - -=head3 L - -=over 4 - -=item * - -Documented a L of L -on Win32. - -=back - -=head3 L - -=over 4 - -=item * - -Minor fix to a multiple scalar match example. - -=back - -=head1 Configuration and Compilation - -=over 4 - -=item * - -Compatibility with C compilers has been improved. - -=item * - -On compilers that support it, C<-Wwrite-strings> is now added to cflags by -default. - -=back - -=head1 Testing - -=over 4 - -=item * - -F has been added to test implicit printing of C<$_>. - -=item * - -F has been added to test for restoration of C<$!> when -leaving signal handlers. - -=item * - -F has been added to see if C is only called once -on tied variables. - -=item * - -F has been added to make sure the, previously untested, -L keeps working. - -=item * - -F has been added to test against string corruption in pattern -matches on overloaded objects. This is a TODO test. - -=back - -=head1 Platform Support - -=head2 Platform-Specific Notes - -=over 4 - -=item Win32 - -=over 4 - -=item * - -Fixed a possible hang in F. - -=item * - -Fixed build process for SDK2003SP1 compilers. - -=item * - -When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> will now be set -in C<$Config{ccflags}>. This improves portability when compiling XS extensions -using new compilers, but for a perl compiled with old 32-bit compilers. - -=back - -=back - -=head1 Internal Changes - -=over 4 - -=item Removed C - -The option to define C to expose older 5.005 symbols for backwards -compatibility has been removed. It's use was always discouraged, and MakeMaker -contains a more specific escape hatch: - - perl Makefile.PL POLLUTE=1 - -This can be used for modules that have not been upgraded to 5.6 naming -conventions (and really should be completely obsolete by now). - -=item Added C - -The C define has been added to provide the best-guess -incantation to use for static inline functions, if the C compiler supports -C99-style static inline. If it doesn't, it'll give a plain C. - -C can be used to check if the compiler actually supports -inline functions. - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -A possible memory leak when using L to set -C<@DB::args> has been fixed. - -=item * - -Several memory leaks when loading XS modules were fixed. - -=item * - -A panic in the regular expression optimizer has been fixed (RT#75762). - -=item * - -Assignments to lvalue subroutines now honor copy-on-write behavior again, which -has been broken since version 5.10.0 (RT#75656). - -=item * - -Assignments to glob copies now behave just like assignments to regular globs -(RT#1804). - -=item * - -Within signal handlers, C<$!> is now implicitly localized. - -=item * - -L now honors C<< <> >> overloading on tied -arguments. - -=item * - -L, -L, L, -and L could, when used in combination -with lvalues, result in leaking the scalar value they operate on, and cause its -destruction to happen too late. This has now been fixed. - -=item * - -Building with C, which has been broken accidentally in -5.13.3, now works again. - -=back - -=head1 Known Problems - -=over 4 - -=item * - -The changes in L -broke C <= 3.66. A fixed C is available as version -3.67 on CPAN. - -=item * - -The changes in prototype handling break C. A patch has been sent -upstream and will hopefully appear on CPAN soon. - -=back - -=head1 Acknowledgements - -Perl 5.13.4 represents approximately one month of development since Perl 5.13.3, -and contains 91,200 lines of changes across 436 files from 34 authors and -committers. - -Thank you to the following for contributing to this release: - -Abigail, Andy Armstrong, Andy Dougherty, Chas. Owens, Chip Salzenberg, Chris -'BinGOs' Williams, Craig A. Berry, David Cantrell, David Golden, David Mitchell, -Eric Brine, Father Chrysostomos, Florian Ragwitz, George Greer, Gerard Goossen, -H.Merijn Brand, James Mastros, Jan Dubois, Jerry D. Hedden, Joshua ben Jore, -Karl Williamson, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯, Leon Brocard, Lubomir Rintel, Nicholas -Clark, Paul Marquess, Rafael Garcia-Suarez, Reini Urban, Robin Barker, Slaven -Rezic, Steve Peters, Tony Cook, Wolfram Humann, Zefram - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles recently -posted to the comp.lang.perl.misc newsgroup and the perl bug database at -http://rt.perl.org/perlbug/ . There may also be information at -http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B program -included with your release. Be sure to trim your bug down to a tiny but -sufficient test case. Your bug report, along with the output of C, -will be sent off to perlbug@perl.org to be analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send it -to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes all -the core committers, who will be able to -help assess the impact of issues, figure out a resolution, and help co-ordinate -the release of patches to mitigate or fix the problem across all platforms on -which Perl is supported. Please only use this address for security issues in the -Perl core, not for modules independently distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5135delta.pod b/pod/perl5135delta.pod deleted file mode 100644 index 3a1358bad81..00000000000 --- a/pod/perl5135delta.pod +++ /dev/null @@ -1,593 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5135delta - what is new for perl v5.13.5 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.4 release and -the 5.13.5 release. - -If you are upgrading from an earlier release such as 5.13.3, first read -L, which describes differences between 5.13.3 and -5.13.4. - -=head1 Core Enhancements - -=head2 Adjacent pairs of nextstate opcodes are now optimized away - -Previously, in code such as - - use constant DEBUG => 0; - - sub GAK { - warn if DEBUG; - print "stuff\n"; - } - -the ops for C would be folded to a C op (C), but -the C op would remain, resulting in a runtime op dispatch of -C, C, ... - -The execution of a sequence of C ops is indistinguishable from just -the last C op so the peephole optimizer now eliminates the first of -a pair of C ops, except where the first carries a label, since labels -must not be eliminated by the optimizer and label usage isn't conclusively known -at compile time. - -=head2 API function to parse statements - -The C function has been added to allow parsing of a single -complete Perl statement. See L for details. - -=head2 API functions for accessing the runtime hinthash - -A new C API for introspecting the hinthash C<%^H> at runtime has been added. -See C, C, C, -C, and C in L for details. - -=head2 C interface to C - -The C function has been added as an XSUB-writer's equivalent of -C. See L for details. - -=head1 Incompatible Changes - -=head2 Magic variables outside the main package - -In previous versions of Perl, magic variables like C<$!>, C<%SIG>, etc. would -'leak' into other packages. So C<%foo::SIG> could be used to access signals, -C<${"foo::!"}> (with strict mode off) to access C's C, etc. - -This was a bug, or an 'unintentional' feature, which caused various ill effects, -such as signal handlers being wiped when modules were loaded, etc. - -This has been fixed (or the feature has been removed, depending on how you see -it). - -=head2 Smart-matching against array slices - -Previously, the following code resulted in a successful match: - - my @a = qw(a y0 z); - my @b = qw(a x0 z); - @a[0 .. $#b] ~~ @b; - -This odd behaviour has now been fixed -L<[perl #77468]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=77468>. - -=head2 C API changes - -The first argument of the C API function C has changed -from C to C, to better insulate the user from -implementation details. - -This API function was marked as "may change", and likely isn't in use outside -the core. (Neither an unpacked CPAN, nor Google's codesearch, finds any other -references to it.) - -=head1 Deprecations - -=head2 Use of qw(...) as parentheses - -Historically the parser fooled itself into thinking that C literals -were always enclosed in parentheses, and as a result you could sometimes omit -parentheses around them: - - for $x qw(a b c) { ... } - -The parser no longer lies to itself in this way. Wrap the list literal in -parentheses, like: - - for $x (qw(a b c)) { ... } - -=head1 Performance Enhancements - -=over 4 - -=item * - -Scalars containing regular expressions now only allocate the part of the C -body they actually use, saving some space. - -=item * - -Compiling regular expressions has been made faster for the case where upgrading -the regex to utf8 is necessary but that isn't known when the compilation begins. - -=back - -=head1 Modules and Pragmata - -=head2 Updated Modules and Pragmata - -=over 4 - -=item C - -Upgraded from version 0.23 to 0.25. - -=item C - -Upgraded from version 1.05 to 1.06. - -=item C - -Upgraded from version 1.07 to 1.08. - -=item C - -Upgraded from version 1.33_02 to 1.33_03. - -=item C and C - -Upgraded from version 1.10 to 1.11 and from version 1.01 to 1.02 respectively. - -It is now possible to register warning categories other than the names of -packages using C. See L for more information. - -=item C - -Upgraded from version 1.12 to 1.16. - -=item C - -Upgraded from version 0.46 to 0.48. - -=item C - -Upgraded from version 2.126 to 2.128. - -This fixes a crash when using custom sort functions that might cause the stack -to change. - -=item C - -Upgraded from version 2.39 to 2.40. - -=item C - -Upgraded from version 1.12 to 1.13. - -On some platforms with unusual header files, like Win32/gcc using mingw64 -headers, some constants which weren't actually error numbers have been exposed -by C. This has been fixed -L<[perl #77416]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=77416>. - -=item C - -Upgraded from version 6.5601 to 6.57_05. - -=item C - -Upgraded from version 0.84 to 0.85. - -=item C - -Upgraded from version 0.08 to 0.09. - -=item C - -Upgraded from version 1.89_01 to 1.95. - -This fixes, among other things, incorrect results when computing binomial -coefficients -L<[perl #77640]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77640>. - -=item C - -Upgraded from version 0.19 to 0.22. - -=item C - -Upgraded from version 0.24 to 0.26. - -=item C - -Upgraded from version 2.37 to 2.38. - -=item C - -Upgraded from version 0.08 to 0.09. - -=item C - -Upgraded from version 1.19 to 1.20. - -It now includes constants for POSIX signal constants. - -=item C - -Upgraded from version 2.27 to 2.28. - -This fixes a possible infinite loop when looking for coderefs. - -=item C - -Upgraded from version 0.96 to 0.97_01. - -=item C - -Upgraded from version 1.03 to 1.04. - -Calling C<< Tie::Hash-ETIEHASH() >> used to loop forever. Now it Cs. - -=item C - -Upgraded from version 0.56 to 0.59. - -=item C - -Upgraded from version 0.10 to 0.11. - -=back - -=head1 Documentation - -=head2 Changes to Existing Documentation - -=head3 L - -=over 4 - -=item * - -Many of the optree construction functions are now documented. - -=back - -=head3 L - -=over 4 - -=item * - -Expanded to cover many more popular books. - -=back - -=head3 L - -=over 4 - -=item * - -L, L, L, L, L, L, and -L have seen various updates and modernizations. - -=back - -=head1 Diagnostics - -The following additions or changes have been made to diagnostic output, -including warnings and fatal error messages. For the complete list of -diagnostic messages, see L. - -=head2 New Diagnostics - -=over 4 - -=item * - -Parsing code internal error (%s) - -New fatal error produced when parsing code supplied by an extension violated the -parser's API in a detectable way. - -=item * - -Use of qw(...) as parentheses is deprecated - -See L for details. - -=back - -=head2 Changes to Existing Diagnostics - -=over 4 - -=item * - -C and C now produce 'Wide character' warnings when fed a -character outside the byte range if STDERR is a byte-sized handle. - -=back - -=head1 Utility Changes - -=head3 L - -=over 4 - -=item * - -The use of a deprecated C construct has been removed -L<[perl #74404]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=74404>. - -=back - -=head1 Testing - -=over 4 - -=item * - -The new F script tests the Internal::* functions and other -things in F. - -=item * - -A rare race condition in F has been fixed, stopping it -from failing randomly when running tests in parallel. - -=item * - -The new F script tests that magic applied to variables in -the main packages does not affect other packages. - -=back - -=head1 Platform Support - -=head2 Platform-Specific Notes - -=over 4 - -=item VMS - -=over 4 - -=item * - -Make C honour default permissions on VMS. - -When C became the default and C became the default bottom layer, -the most common path for creating files from Perl became C, -which has always explicitly used C<0666> as the permission mask. - -To avoid this, C<0777> is now passed as the permissions to C. In the -VMS CRTL, C<0777> has a special meaning over and above intersecting with the -current umask; specifically, it allows Unix syscalls to preserve native default -permissions. - -=back - -=back - -=head1 Internal Changes - -=over 4 - -=item * - -C and C have been deprecated. - -Those are left from an old implementation of C using C++ objects, -which was removed in Perl 5.8. Nowadays these macros do exactly nothing, so -they shouldn't be used anymore. - -For compatibility, they are still defined for external C code. Only -extensions defining C must be updated now. - -=item * - -C has been added as a convenience macro wrapping -C for literal strings. - -=item * - -The recursive part of the peephole optimizer is now hookable. - -In addition to C, for hooking into the toplevel peephole optimizer, a -C is now available to hook into the optimizer recursing into -side-chains of the optree. - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -A regression introduced in Perl 5.12.0, making -C<< my $x = 3; $x = length(undef) >> result in C<$x> set to C<3> has been -fixed. C<$x> will now be C. - -=item * - -A fatal error in regular expressions when processing UTF-8 data has been fixed -L<[perl #75680]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75680>. - -=item * - -An erroneous regular expression engine optimization that caused regex verbs like -C<*COMMIT> to sometimes be ignored has been removed. - -=item * - -The Perl debugger now also works in taint mode -L<[perl #76872]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76872>. - -=item * - -Several memory leaks in cloning and freeing threaded Perl interpreters have been -fixed L<[perl #77352]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77352>. - -=item * - -A possible string corruption when doing regular expression matches on overloaded -objects has been fixed -L<[perl #77084]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77084>. - -=item * - -Magic applied to variables in the main package no longer affects other packages. -See L above -L<[perl #76138]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76138>. - -=item * - -Opening a glob reference via C<< open $fh, "E", \*glob >> will no longer -cause the glob to be corrupted when the filehandle is printed to. This would -cause perl to crash whenever the glob's contents were accessed -L<[perl #77492]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77492>. - -=item * - -The postincrement and postdecrement operators, C<++> and C<-->, used to cause -leaks when being used on references. This has now been fixed. - -=item * - -A bug when replacing the glob of a loop variable within the loop has been fixed -L<[perl #21469]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=21469>. This -means the following code will no longer crash: - - for $x (...) { - *x = *y; - } - -=item * - -Perl would segfault if the undocumented C functions that used -reference prototypes were called with the C<&foo()> syntax, e.g. -C<&Internals::SvREADONLY(undef)> -L<[perl #77776]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77776>. - -These functions now call C on their arguments before dereferencing them -with C, and we test for this case in F. - -=item * - -When assigning a list with duplicated keys to a hash, the assignment used to -return garbage and/or freed values: - - @a = %h = (list with some duplicate keys); - -This has now been fixed -L<[perl #31865]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=31865>. - -=item * - -An earlier release of the 5.13 series of Perl changed the semantics of opening a -reference to a copy of a glob: - - my $var = *STDOUT; - open my $fh, '>', \$var; - -This was a mistake, and the previous behaviour from Perl 5.10 and 5.12, which is -to treat \$var as a scalar reference, has now been restored. - -=item * - -The regular expression bracketed character class C<[\8\9]> was effectively the -same as C<[89\000]>, incorrectly matching a NULL character. It also gave -incorrect warnings that the C<8> and C<9> were ignored. Now C<[\8\9]> is the -same as C<[89]> and gives legitimate warnings that C<\8> and C<\9> are -unrecognized escape sequences, passed-through. - -=item * - -C and C now respect utf8-encoded scalars -L<[perl #45549]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=45549>. - -=back - -=head1 Known Problems - -=over 4 - -=item * - -The upgrade to Encode-2.40 has caused some tests in the libwww-perl distribution -on CPAN to fail. (Specifically, F tests 33-36 in version -5.836 of that distribution now fail.) - -=item * - -The upgrade to ExtUtils-MakeMaker-6.57_05 has caused some tests in the -Module-Install distribution on CPAN to fail. (Specifically, F<02_mymeta.t> tests -5 and 21, F<18_all_from.t> tests 6 and 15, F<19_authors.t> tests 5, 13, 21 and -29, and F<20_authors_with_special_characters.t> tests 6, 15 and 23 in version -1.00 of that distribution now fail.) - -=back - -=head1 Acknowledgements - -Perl 5.13.5 represents approximately one month of development since -Perl 5.13.4 and contains 74558 lines of changes across 549 files -from 45 authors and committers: - -Abigail, Alexander Alekseev, Aristotle Pagaltzis, Ben Morrow, Bram, brian d foy, -Chas. Owens, Chris 'BinGOs' Williams, Craig A. Berry, Curtis Jewell, Dagfinn -Ilmari Mannsåker, David Golden, David Leadbeater, David Mitchell, Eric Brine, -Father Chrysostomos, Florian Ragwitz, Gisle Aas, Jan Dubois, Jerry D. Hedden, -Jesse Vincent, Jim Cromie, Jirka Hruška, Karl Williamson, Michael G. Schwern, -Nicholas Clark, Paul Johnson, Philippe Bruhat (BooK), Piotr Fusik, Rafael -Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes, Rob Hoelz, Robin -Barker, Steffen Mueller, Steve Hay, Steve Peters, Todd Rinaldo, Tony Cook, -Vincent Pit, Yves Orton, Zefram, Zsbán Ambrus, Ævar Arnfjörð Bjarmason. - -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. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5136delta.pod b/pod/perl5136delta.pod deleted file mode 100644 index a0b02d436e3..00000000000 --- a/pod/perl5136delta.pod +++ /dev/null @@ -1,800 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5136delta - what is new for perl v5.13.6 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.5 release and -the 5.13.6 release. - -If you are upgrading from an earlier release such as 5.13.4, first read -L, which describes differences between 5.13.4 and -5.13.5. - -=head1 Core Enhancements - -=head2 C<(?^...)> regex construct added to signify default modifiers - -A caret (also called a "circumflex accent") C<"^"> immediately following -a C<"(?"> in a regular expression now means that the subexpression is to -not inherit the surrounding modifiers such as C, but to revert to the -Perl defaults. Any modifiers following the caret override the defaults. - -The stringification of regular expressions now uses this -notation. E.g., before, C would be stringified as -C<(?i-xsm:hlagh)>, but now it's stringified as C<(?^i:hlagh)>. - -The main purpose of this is to allow tests that rely on the -stringification to not have to change when new modifiers are added. -See L. - -=head2 C<"d">, C<"l">, and C<"u"> regex modifiers added - -These modifiers are currently only available within a C<(?...)> construct. - -The C<"l"> modifier says to compile the regular expression as if it were -in the scope of C, even if it is not. - -The C<"u"> modifier says to compile the regular expression as if it were -in the scope of a C pragma. - -The C<"d"> modifier is used to override any C and -C pragmas that are in effect at the time -of compiling the regular expression. - -See just below and L. - -=head2 C now applies to some regex matching - -Another chunk of the L is fixed in this -release. Now, regular expressions compiled within the scope of the -"unicode_strings" feature will match the same whether or not the target -string is encoded in utf8, with regard to C<\s>, C<\w>, C<\b>, and their -complements. Work is underway to add the C<[[:posix:]]> character -classes and case sensitive matching to the control of this feature, but -was not complete in time for this dot release. - -=head2 C<\N{...}> now handles Unicode named character sequences - -Unicode has a number of named character sequences, in which particular sequences -of code points are given names. C<\N{...}> now recognizes these. -See L. - -=head2 New function C - -This function is a run-time version of C<\N{...}>, returning the string -of characters whose Unicode name is its parameter. It can handle -Unicode named character sequences, whereas the pre-existing -C cannot, as the latter returns a single code -point. -See L. - -=head2 Reentrant regular expression engine - -It is now safe to use regular expressions within C<(?{...})> and -C<(??{...})> code blocks inside regular expressions. - -These block are still experimental, however, and still have problems with -lexical (C) variables, lexical pragmata and abnormal exiting. - -=head2 Custom per-subroutine check hooks - -XS code in an extension module can now annotate a subroutine (whether -implemented in XS or in Perl) so that nominated XS code will be called -at compile time (specifically as part of op checking) to change the op -tree of that subroutine. The compile-time check function (supplied by -the extension module) can implement argument processing that can't be -expressed as a prototype, generate customised compile-time warnings, -perform constant folding for a pure function, inline a subroutine -consisting of sufficiently simple ops, replace the whole call with a -custom op, and so on. This was previously all possible by hooking the -C op checker, but the new mechanism makes it easy to tie the -hook to a specific subroutine. See L. - -To help in writing custom check hooks, several subtasks within standard -C op checking have been separated out and exposed in the API. - -=head2 Return value of C - -Custom regular expression engines can now determine the return value of -C on an entry of C<%+> or C<%->. - -=head2 C, C work on arrays - -You can now use the C, C, C builtin functions on arrays -(previously you could only use them on hashes). See L for details. -This is actually a change introduced in perl 5.12.0, but it was missed from -that release's perldelta. - -=head1 Incompatible Changes - -=head2 Stringification of regexes has changed - -Default regular expression modifiers are now notated by using -C<(?^...)>. Code relying on the old stringification will fail. The -purpose of this is so that when new modifiers are added, such code will -not have to change (after this one time), as the stringification will -automatically incorporate the new modifiers. - -Code that needs to work properly with both old- and new-style regexes -can avoid the whole issue by using (for Perls since 5.9.5): - - use re qw(regexp_pattern); - my ($pat, $mods) = regexp_pattern($re_ref); - -where C<$re_ref> is a reference to a compiled regular expression. Upon -return, C<$mods> will be a string containing all the non-default -modifiers used when the regular expression was compiled, and C<$pattern> -the actual pattern. - -If the actual stringification is important, or older Perls need to be -supported, you can use something like the following: - - # Accept both old and new-style stringification - my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism'; - -And then use C<$modifiers> instead of C<-xism>. - -=head2 Regular expressions retain their localeness when interpolated - -Regular expressions compiled under C<"use locale"> now retain this when -interpolated into a new regular expression compiled outside a -C<"use locale">, and vice-versa. - -Previously, a regular expression interpolated into another one inherited -the localeness of the surrounding one, losing whatever state it -originally had. This is considered a bug fix, but may trip up code that -has come to rely on the incorrect behavior. - -=head2 Directory handles not copied to threads - -On systems that do not have a C function, newly-created threads no -longer inherit directory handles from their parent threads. Such programs -would probably have crashed anyway -L<[perl #75154]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>. - -=head2 Negation treats strings differently from before - -The unary negation operator C<-> now treats strings that look like numbers -as numbers -L<[perl #57706]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=57706>. - -=head2 Negative zero - -Negative zero (-0.0), when converted to a string, now becomes "0" on all -platforms. It used to become "-0" on some, but "0" on others. - -If you still need to determine whether a zero is negative, use -C or the L module on CPAN. - -=head1 Performance Enhancements - -=over 4 - -=item * - -The bulk of the C module used to be in the perl -core. It has now been moved to an XS module, to reduce the overhead for -programs that do not use C<%+> or C<%->. - -=item * - -Eliminate C accessor functions under ithreads. - -When C was first developed, and interpreter state moved into an -interpreter struct, thread and interpreter local C variables were defined -as macros that called accessor functions, returning the address of the value, -outside of the perl core. The intent was to allow members within the interpreter -struct to change size without breaking binary compatibility, so that bug fixes -could be merged to a maintenance branch that necessitated such a size change. - -However, some non-core code defines C, sometimes intentionally to -bypass this mechanism for speed reasons, sometimes for other reasons but with -the inadvertent side effect of bypassing this mechanism. As some of this code is -widespread in production use, the result is that the core B change the -size of members of the interpreter struct, as it will break such modules -compiled against a previous release on that maintenance branch. The upshot is -that this mechanism is redundant, and well-behaved code is penalised by -it. Hence it can and should be removed. - -=back - -=head1 Modules and Pragmata - -=head2 Updated Modules and Pragmata - -=over 4 - -=item * - -C has been upgraded from version 0.42 to 0.44 - -=item * - -C has been upgraded from version 1.18 to 1.19. - -It no longer autovivifies the C<*CORE::GLOBAL::caller> glob, something it -started doing in 1.18, which was released with perl 5.13.4 -L<[perl #78082]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=78082> - -=item * - -C has been upgraded from version 2.030 to 2.031 - -Updated to use bzip2 1.0.6 - -=item * - -C has been upgraded from version 1.94_57 to 1.94_61 - -=item * - -C has been upgraded from version 2.128 to 2.129. - -C no longer crashes with globs returned by C<*$io_ref> -L<[perl #72332]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72332>. - -=item * - -C has been upgraded from version 2.40 to 2.51. - -It is now safe to use this module in combination with threads. - -=item * - -C has been upgraded from version 1.02 to 1.03. - -It allows patterns containing literal parentheses (they no longer need to -be escaped). On Windows, it no longer adds an extra F<./> to the file names -returned when the pattern is a relative glob with a drive specification, -like F -L<[perl #71712]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71712>. - -=item * - -C has been upgraded from version 1.17 to 1.18. - -It improves handling of backslashes on Windows, so that paths such as -F are no longer generated -L<[perl #71710]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71710>. - -=item * - -C has been upgraded from version 0.05 to 0.06 - -=item * - -C has been upgraded from version 0.60 to 0.64 - -=item * - -C has been upgraded from version 1.06 to 1.07. - -The internal C routine now knows how to handle file descriptors, as -documented, so duplicating STDIN in a child process using its file -descriptor now works -L<[perl #76474]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71710>. - -=item * - -C has been upgraded from version 3.13 to 3.14. - -=item * - -C has been upgraded from version 1.15 to 1.16. - -It fixes an infinite loop in C when -working with tainted values -(L). - -C<< ->maketext >> calls will now backup and restore C<$@> so that error -messages are not suppressed -(L). - -=item * - -C has been upgraded from version 1.95 to 1.97. - -This prevents C from crashing under C -L<[perl #73534]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73534>. - -=item * - -C has been upgraded from version 0.64 to 0.65. - -=item * - -C has been upgraded from version 1.10 to 1.11. - -C can now handle subroutines that are themselves blessed -into overloaded classes -L<[perl #71998]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71998>. - -=item * - -C has been upgraded from version 3.31_01 to 3.34. - -=item * - -C has been upgraded from version 2.3.1 to 2.4.0 - -=item * - -C has been upgraded from version 1.04 to 1.05. - -It no longer tries to modify read-only arguments when generating a -backtrace -L<[perl #72340]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72340>. - -=item * - -C has been upgraded from version 1.77_03 to 1.81_01. - -=item * - -C has been upgrade from version 1.33_03 to 1.34 - -=item * - -C has been upgraded from version 0.59 to 0.63 - -U::C::Locale newly supports locales: ar, be, bg, de__phonebook, hu, hy, kk, mk, nso, om, -tn, vi, hr, ig, ru, sq, se, sr, to and uk - -=item * - -C has been upgraded from version 1.06 to 1.07 - -=item * - -C has been upgraded from version 0.98 to 0.99 - -B::Deparse now properly handles the code that applies a conditional -pattern match against implicit C<$_> as it was fixed in -L<[perl #20444]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=20444>. - -=item * - -C has been upgraded from version 1.10 to 1.11 - -=back - -=head1 Documentation - -=head2 Changes to Existing Documentation - -=head3 L - -=over 4 - -=item * - -The documentation for the C macro was simply wrong in stating that -get-magic is not processed. It has been corrected. - -=back - -=head1 Diagnostics - -The following additions or changes have been made to diagnostic output, -including warnings and fatal error messages. For the complete list of -diagnostic messages, see L. - -=head2 Changes to Existing Diagnostics - -=over 4 - -=item * - -The 'Layer does not match this perl' error message has been replaced with -these more helpful messages: - -=over 4 - -=item * - -PerlIO layer function table size (%d) does not match size expected by this -perl (%d) - -=item * - -PerlIO layer instance size (%d) does not match size expected by this perl -(%d) - -=back - -L<[perl #73754]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73754> - -=back - -=head1 Testing - -=over 4 - -=item * - -The script F has been added, which tests interaction -of threads and directory handles. - -=back - -=head1 Platform Support - -=head2 Platform-Specific Notes - -=over 4 - -=item IRIX - -Conversion of strings to floating-point numbers is now more accurate on -IRIX systems -L<[perl #32380]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=32380>. - -=item Mac OS X - -Early versions of Mac OS X (Darwin) had buggy implementations of the -C, C, C and C functions, so perl -would pretend they did not exist. - -These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and -higher, as they have been fixed -L<[perl #72990]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72990>. - -=item OpenVOS - -perl now builds again with OpenVOS (formerly known as Stratus VOS) -L<[perl #78132]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=78132>. - -=item VMS - -The shortening of symbols longer than 31 characters in the C sources is -now done by the compiler rather than by xsubpp (which could only do so -for generated symbols in XS code). - -=item Windows - -C<$Config{gccversion}> is now set correctly when perl is built using the -mingw64 compiler from L -L<[perl #73754]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73754>. - -The build process proceeds more smoothly with mingw and dmake when -F is in the PATH, due to a C fix. - -=back - -=head1 Internal Changes - -=over 4 - -=item * - -See L, -above. - -=item * - -The C, C, C and -C functions have been added. These are like their -non-_flags counterparts, but allow one to specify whether get-magic is -processed. - -The C, C, C and C functions have -been replaced with wrappers around the new functions. - -=item * - -A new C function has been added. - -This is like C, but it lets the calling code decide whether -get-magic is handled. C is now a macro that calls the new -function. - -=item * - -A new macro, C, has been added. - -This is like C, except that it does not process magic. It uses the -new C function. - -=item * - -C no longer calls C on its second argument (the -source string) if the flags passed to it do not include SV_GMAGIC. So it -now matches the documentation. - -=item * - -A new interface has been added for custom check hooks on subroutines. See -L, above. - -=item * - -List op building functions have been added to the -API. See L, -L, and -L. - -=item * - -The L macro, part of op building that -constructs the execution-order op chain, has been added to the API. - -=item * - -Many functions ending with pvn now have equivalent pv/pvs/sv versions. - -=item * - -The C, C, C and C -functions have been added to the API. - -=item * - -The new API function C parses a sequence of statements, up -to closing brace or EOF. - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -A regular expression match in the right-hand side of a global substitution -(C) that is in the same scope will no longer cause match variables -to have the wrong values on subsequent iterations. This can happen when an -array or hash subscript is interpolated in the right-hand side, as in -C -L<[perl #19078]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=19078>. - -=item * - -Constant-folding used to cause - - $text =~ ( 1 ? /phoo/ : /bear/) - -to turn into - - $text =~ /phoo/ - -at compile time. Now it correctly matches against C<$_> -L<[perl #20444]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=20444>. - -=item * - -Parsing Perl code (either with string C or by loading modules) from -within a C block no longer causes the interpreter to crash -L<[perl #70614]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=70614>. - -=item * - -When C<-d> is used on the shebang (C<#!>) line, the debugger now has access -to the lines of the main program. In the past, this sometimes worked and -sometimes did not, depending on what order things happened to be arranged -in memory -L<[perl #71806]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71806>. - -=item * - -The C or C operator now calls get-magic (e.g., the C -method of a tie) on its left-hand side just once, not twice -L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>. - -=item * - -String comparison (C, C, C, C, C, C and -C) and logical not (C and C) operators no longer call magic -(e.g., tie methods) twice on their operands -L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>. - -This bug was introduced in an earlier 5.13 release, and does not affect -perl 5.12. - -=item * - -When a tied (or other magic) variable is used as, or in, a regular -expression, it no longer has its C method called twice -L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>. - -This bug was introduced in an earlier 5.13 release, and does not affect -perl 5.12. - -=item * - -The C<-C> command line option can now be followed by other options -L<[perl #72434]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72434>. - -=item * - -Assigning a glob to a PVLV used to convert it to a plain string. Now it -works correctly, and a PVLV can hold a glob. This would happen when a -nonexistent hash or array element was passed to a subroutine: - - sub { $_[0] = *foo }->($hash{key}); - # $_[0] would have been the string "*main::foo" - -It also happened when a glob was assigned to, or returned from, an element -of a tied array or hash -L<[perl #36051]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=36051>. - -=item * - -Creating a new thread when directory handles were open used to cause a -crash, because the handles were not cloned, but simply passed to the new -thread, resulting in a double free. - -Now directory handles are cloned properly, on systems that have a C -function. On other systems, new threads simply do not inherit directory -handles from their parent threads -L<[perl #75154]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>. - -=item * - -The regular expression parser no longer hangs when parsing C<\18> and -C<\88>. - -This bug was introduced in version 5.13.5 and did not affect earlier -versions -L<[perl #78058]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78058>. - -=item * - -Subroutine redefinition works once more in the debugger -L<[perl #48332]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=48332>. - -=item * - -The C<&> C<|> C<^> bitwise operators no longer coerce read-only arguments -L<[perl #20661]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=20661>. - -=item * - -Stringifying a scalar containing -0.0 no longer has the affect of turning -false into true -L<[perl #45133]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=45133>. - -=item * - -Aliasing packages by assigning to globs or deleting packages by deleting -their containing stash elements used to have erratic effects on method -resolution, because the internal 'isa' caches were not reset. This has been -fixed. - -=item * - -C with a custom sort routine could crash if too many nested -subroutine calls occurred from within the sort routine -L<[perl #77930]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77930>. - -This bug was introduced in an earlier 5.13 release, and did not affect -perl 5.12. - -=item * - -The C and C C functions now set C<$@> correctly when -there is a syntax error and no C flag, and never set it if the -C flag is present -L<[perl #3719]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=3719>. - -=item * - -Nested C and C blocks no longer leak memory when processing -large lists -L<[perl #48004]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=48004>. - -=item * - -Malformed C objects no longer cause crashes -L<[perl #78286]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78286>. - -=item * - -The interpreter no longer crashes when freeing deeply-nested arrays of -arrays. Hashes have not been fixed yet -L<[perl #44225]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=44225>. - -=item * - -The mechanism for freeing objects in globs used to leave dangling -pointers to freed SVs, meaning Perl users could see corrupted state -during destruction. - -Perl now only frees the affected slots of the GV, rather than freeing -the GV itself. This makes sure that there are no dangling refs or -corrupted state during destruction. - -=item * - -The typeglob C<*,>, which holds the scalar variable C<$,> (output field -separator), had the wrong reference count in child threads. - -=item * - -C now calls set-magic. This means that, for instance, changes made -by C are respected by method calls -L<[perl #78400]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78400>. - -=item * - -C no longer leaks memory -L<[perl #78436]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78436>. - -=item * - -The XS multicall API no longer causes subroutines to lose reference counts -if called via the multicall interface from within those very subroutines. -This affects modules like List::Util. Calling one of its functions with an -active subroutine as the first argument could cause a crash -L<[perl #78070]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78070>. - -=back - -=head1 Errata - -=over 4 - -=item * - -Fixed a typo in L regarding array slices and smart matching - -=back - -=head1 Acknowledgements - -Perl 5.13.6 represents approximately one month of development since Perl -5.13.5 and contains 67920 lines of changes across 566 files from 47 authors -and committers: - -A. Sinan Unur, Aaron Crane, Alex Davies, Ali Polatel, Allen Smith, Andrew Rodland, -Andy Dougherty, Ben Morrow, brian d foy, Casey West, Chip Salzenberg, Chris -'BinGOs' Williams, Craig A. Berry, David Golden, David Mitchell, Eric Brine, -Father Chrysostomos, Florian Ragwitz, George Greer, gregor herrmann, Jan Dubois, -Jerry D. Hedden, Jesse Vincent, Joshua Pritikin, Karl Williamson, kmx, Michael -G Schwern, Mike Kelly, Nicholas Clark, Paul Green, Rafael Garcia-Suarez, Renee -Baecker, Ricardo Signes, Sisyphus, Slaven Rezic, Steffen Müller, Steve Hay, -Sullivan Beck, Tatsuhiko Miyagawa, Todd Rinaldo, Tony Cook, Tye McQueen, Vernon -Lyon, Walt Mankowski, Zefram, Zsbán Ambrus, Ævar Arnfjörð Bjarmason. - -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. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5137delta.pod b/pod/perl5137delta.pod deleted file mode 100644 index 082edb760b4..00000000000 --- a/pod/perl5137delta.pod +++ /dev/null @@ -1,946 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5137delta - what is new for perl v5.13.7 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.6 release and -the 5.13.7 release. - -If you are upgrading from an earlier release such as 5.13.5, first read -L, which describes differences between 5.13.5 and -5.13.6. - -=head1 Core Enhancements - -=head2 Single term prototype - -The C<+> prototype is a special alternative to C<$> that will act like -C<\[@%]> when given a literal array or hash variable, but will otherwise -force scalar context on the argument. This is useful for functions which -should accept either a literal array or an array reference as the argument: - - sub smartpush (+@) { - my $aref = shift; - die "Not an array or arrayref" unless ref $aref eq 'ARRAY'; - push @$aref, @_; - } - -When using the C<+> prototype, your function must check that the argument -is of an acceptable type. - -=head2 C - -The C pragma now has the ability to turn on regular expression flags -till the end of the lexical scope: - - use re '/x'; - "foo" =~ / (.+) /; # /x implied - -See L for details. - -=head2 Statement labels can appear in more places - -Statement labels can now occur before any type of statement or declaration, -such as C. - -=head2 C now applies to more regex matching - -Another chunk of the L is fixed in this -release. Now, regular expressions compiled within the scope of the -"unicode_strings" feature (or under the "u" regex modifier (specifiable -currently only with infix notation C<(?u:...)> or via C) -will match the same whether or not the target string is encoded in utf8, -with regard to C<[[:posix:]]> character classes - -Work is underway to add the case sensitive matching to the control of -this feature, but was not complete in time for this dot release. - -=head2 Array and hash container functions accept references - -All built-in functions that operate directly on array or hash -containers now also accept hard references to arrays or hashes: - - |----------------------------+---------------------------| - | Traditional syntax | Terse syntax | - |----------------------------+---------------------------| - | push @$arrayref, @stuff | push $arrayref, @stuff | - | unshift @$arrayref, @stuff | unshift $arrayref, @stuff | - | pop @$arrayref | pop $arrayref | - | shift @$arrayref | shift $arrayref | - | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 | - | keys %$hashref | keys $hashref | - | keys @$arrayref | keys $arrayref | - | values %$hashref | values $hashref | - | values @$arrayref | values $arrayref | - | ($k,$v) = each %$hashref | ($k,$v) = each $hashref | - | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref | - |----------------------------+---------------------------| - -This allows these built-in functions to act on long dereferencing chains -or on the return value of subroutines without needing to wrap them in -C<@{}> or C<%{}>: - - push @{$obj->tags}, $new_tag; # old way - push $obj->tags, $new_tag; # new way - - for ( keys %{$hoh->{genres}{artists}} ) {...} # old way - for ( keys $hoh->{genres}{artists} ) {...} # new way - -For C, C and C, the reference will auto-vivify -if it is not defined, just as if it were wrapped with C<@{}>. - -Calling C or C directly on a reference gives a substantial -performance improvement over explicit dereferencing. - -For C, C, C, when overloaded dereferencing is -present, the overloaded dereference is used instead of dereferencing the -underlying reftype. Warnings are issued about assumptions made in the -following three ambiguous cases: - - (a) If both %{} and @{} overloading exists, %{} is used - (b) If %{} overloading exists on a blessed arrayref, %{} is used - (c) If @{} overloading exists on a blessed hashref, @{} is used - -=head2 y///r - -The C flag, which was added to C in 5.13.2, has been extended to -the C operator. - -It causes it to perform the substitution on a I of its operand, -returning that copy instead of a character count. - -=head2 New global variable C<${^GLOBAL_PHASE}> - -A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow -introspection of the current phase of the perl interpreter. It's explained in -detail in L and -L. - -=head2 Unicode Version 6.0 is now supported (mostly) - -Perl comes with the Unicode 6.0 data base updated with -L, -with one exception noted below. -See L for details on the new -release. Perl does not support any Unicode provisional properties, -including the new ones for this release, but their database files are -packaged with Perl. - -Unicode 6.0 has chosen to use the name C for the character at U+1F514, -which is a symbol that looks like a bell, and used in Japanese cell -phones. This conflicts with the long-standing Perl usage of having -C mean the ASCII C character, U+0007. In Perl 5.14, -C<\N{BELL}> will continue to mean U+0007, but its use will generate a -deprecated warning message, unless such warnings are turned off. The -new name for U+0007 in Perl will be C, which corresponds nicely -with the existing shorthand sequence for it, C<"\a">. C<\N{BEL}> will -mean U+0007, with no warning given. The character at U+1F514 will not -have a name in 5.14, but can be referred to by C<\N{U+1F514}>. The plan -is that in Perl 5.16, C<\N{BELL}> will refer to U+1F514, and so all code -that uses C<\N{BELL}> should convert by then to using C<\N{ALERT}>, -C<\N{BEL}>, or C<"\a"> instead. - -=head2 Improved support for custom OPs - -Custom ops can now be registered with the new C C -function and the C structure. This will make it easier to add new -properties of custom ops in the future. Two new properties have been added -already, C and C. - -C is one of the OA_*OP constants, and allows L and other -introspection mechanisms to work with custom ops that aren't BASEOPs. -C is a pointer to a function that will be called for ops of this -type from C. - -See L and L for more -detail. - -The old C/C interface is still -supported but discouraged. - -=head1 Incompatible Changes - -=head2 Dereferencing typeglobs - -If you assign a typeglob to a scalar variable: - - $glob = *foo; - -the glob that is copied to C<$glob> is marked with a special flag -indicating that the glob is just a copy. This allows subsequent assignments -to C<$glob> to overwrite the glob. The original glob, however, is -immutable. - -Many Perl operators did not distinguish between these two types of globs. -This would result in strange behaviour in edge cases: C -would do nothing if the last thing assigned to the scalar was a glob -(because it treated it as C, which unties a handle). -Assignment to a glob slot (e.g., C<(*$glob) = \@some_array>) would simply -assign C<\@some_array> to C<$glob>. - -To fix this, the C<*{}> operator (including the C<*foo> and C<*$foo> forms) -has been modified to make a new immutable glob if its operand is a glob -copy. Various operators that make a distinction between globs and scalars -have been modified to treat only immutable globs as globs. - -This causes an incompatible change in code that assigns a glob to the -return value of C<*{}> when that operator was passed a glob copy. Take the -following code, for instance: - - $glob = *foo; - *$glob = *bar; - -The C<*$glob> on the second line returns a new immutable glob. That new -glob is made an alias to C<*bar>. Then it is discarded. So the second -assignment has no effect. - -It also means that C will now tie C<$handle> as a scalar, even -if it has had a glob assigned to it. - -The upside to this incompatible change is that bugs -L<[perl #77496]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77496>, -L<[perl #77502]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77502>, -L<[perl #77508]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77508>, -L<[perl #77688]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77688>, -and -L<[perl #77812]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77812>, -and maybe others, too, have been fixed. - -See L for even -more detail. - -=head2 Clearing stashes - -Stash list assignment C<%foo:: = ()> used to make the stash anonymous -temporarily while it was being emptied. Consequently, any of its -subroutines referenced elsewhere would become anonymous (showing up as -"(unknown)" in C). Now they retain their package names, such that -C will return the original sub name if there is still a reference -to its typeglob, or "foo::__ANON__" otherwise -L<[perl #79208]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79208>. - -=head1 Deprecations - -=head2 C<\N{BELL}> is deprecated - -This is because Unicode is using that name for a different character. -See L for more -explanation. - -=head1 Performance Enhancements - -=over 4 - -=item * - -When an object has many weak references to it, freeing that object -can under some some circumstances take O(N^2) time to free (where N is the -number of references). The number of circumstances has been reduced. -L<[perl #75254]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75254>. - -=back - -=head1 Modules and Pragmata - -=head2 New Modules and Pragmata - -=over 4 - -=item * - -The following modules were added by the C -upgrade from 0.63 to 0.67. See below for details. - -C - -C - -C - -C - -C - -C - -=back - -=head2 Updated Modules and Pragmata - -=over 4 - -=item * - -C has been upgraded from 0.44 to 0.46 - -Resolves an issue with NetBSD-current and its new unzip -executable. - -=item * - -C has been upgraded from 1.68 to 1.72 - -This adds the ptargrep utility for using regular expressions against -the contents of files in a tar archive. - -=item * - -C has been upgraded from 1.24 to 1.26. - -It no longer crashes when taking apart a C containing characters -outside the octet range or compiled in a C scope. - -The size of the shared object has been reduced by about 40%, with no -reduction in functionality. - -=item * - -C has been upgraded from 0.99 to 1.01. - -It fixes deparsing of C followed by a variable with funny characters -(as permitted under the C pragma) -L<[perl #33752]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=33752>. - -=item * - -C has been upgraded from 3.49 to 3.50 - -This provides the following security fixes: the MIME boundary in -multipart_init is now random and improvements to the handling of -newlines embedded in header values. - -The documentation for param_fetch() has been corrected and clarified. - -=item * - -C has been upgraded from 1.94_61 to 1.94_62 - -=item * - -C has been upgraded from 0.9007 to 0.9010 - -Fixes for the SQLite source engine and resolving of issues with the -testsuite when run under local::lib and/or cpanminus - -=item * - -C has been upgraded from 0.48 to 0.50 - -=item * - -C has been upgraded from 2.129 to 2.130_01. - -=item * - -C has been upgraded from 1.10 to 1.11. - -It fixes a buffer overflow when passed a very long file name. - -=item * - -C has been upgraded from 0.22 to 0.23. - -The C helper code generated by C -can now C for missing constants, or generate a complete C -subroutine in XS, allowing simplification of many modules that use it. -(C, C, C, C, C, C) - -C can now optionally push the names of all -constants onto the package's C{@EXPORT_OK}. This has been used to replace -less space-efficient code in C, helping considerably shrink the size of its -shared object. - -=item * - -C has been upgraded from 1.09 to 1.10. - -=item * - -C has been upgraded from 0.24 to 0.28 - -C is now supported for 'http' scheme. - -The C utility is supported on FreeBSD, NetBSD and -Dragonfly BSD for the C and C schemes. - -=item * - -C has been upgraded from 1.09 to 1.10. - -=item * - -C has been upgraded from 1.03 to 1.04. - -The C<-x> and C<-X> file test operators now work correctly under the root -user. - -=item * - -C has been upgraded from 1.11 to 1.12. - -This fixes a memory leak when DBM filters are used. - -=item * - -C has been upgraded from 0.09 to 0.10. - -=item * - -C has been upgraded from 1.05 to 1.06. - -=item * - -C has been upgraded from 0.06 to 0.07. - -=item * - -C has been upgraded from 1.16 to 1.17. - -=item * - -C has been upgraded from 1.97 to 1.99_01. - -=item * - -C has been upgraded from 0.26 to 0.26_01 - -=item * - -C has been upgraded from 0.22 to 0.24_01. - -=item * - -C has been upgraded from 3.09 to 3.10 - -Includes new functions to calculate the length of encoded and decoded -base64 strings. - -=item * - -C has been upgraded from 1.04 to 1.05. - -=item * - -C has been upgraded from 1.09 to 1.10. - -This fixes a memory leak when DBM filters are used. - -=item * - -C has been upgraded from 1.08 to 1.09. - -This fixes a memory leak when DBM filters are used. - -=item * - -C has been upgraded from 1.16 to 1.17. - -=item * - -C has been upgraded from 0.223 to 0.224 - -=item * - -C has been upgraded from 3.14 to 3.15 - -Includes various fixes to C and C handling. - -=item * - -C has been upgraded from 1.21 to 1.22. - -=item * - -C has been upgraded from 0.13 to 0.14, for the sake of the new -C pragma. - -=item * - -C has been upgraded from 2.28 to 2.29. - -It adds C<&version::vxs::VCMP> to the default share. - -=item * - -C has been upgraded from 1.07 to 1.08. - -=item * - -C has been upgraded from 1.17 to 1.18. - -It now works in taint mode -L<[perl #72062]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72062>. - -=item * - -C has been upgraded from 1.90 to 1.91. - -=item * - -C has been upgraded from 2.22 to 2.24 - -Includes performance improvement for overloaded classes. - -=item * - -C has been upgraded from 1.13 to 1.14. - -=item * - -C has been upgraded from 0.63 to 0.67 - -This release newly adds locales C C and C and its variants -( C, C, C, C ). - -Supported UCA_Version 22 for Unicode 6.0.0. - -The following modules have been added: - -C for C which makes -tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering. - -C for C which makes -tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering. - -C which makes tailoring of 6355 kanji -(CJK Unified Ideographs) in the JIS X 0208 order. - -C which makes tailoring of CJK Unified Ideographs -in the order of CLDR's Korean ordering. - -C for C which makes -tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering. - -C for C which makes -tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering. - -=back - -=head1 Documentation - -L reorders the variables and groups them by topic. Each variable -introduced after Perl 5.000 notes the first version in which it is -available. L also has a new section for deprecated variables to -note when they were removed. - -=head2 New Documentation - -=head3 L - -New style guide for POD documentation, -split mostly from the NOTES section of the pod2man man page. - -( This was added to C but was not documented with that release ). - -=head2 Changes to Existing Documentation - -=over - -=item * - -Array and hash slices in scalar context are now documented in L. - -=item * - -L and L have been corrected to state that -C affects formats. - -=back - -=head1 Diagnostics - -=head2 New Diagnostics - -=over 4 - -=item * - -"Using !~ with %s doesn't make sense": This message was actually added in -5.13.2, but was omitted from perldelta. It now applies also to the C -operator, and has been documented. - -=back - -=head1 Utility Changes - -=head3 L - -=over 4 - -=item * - -L is a utility to apply pattern matching to the contents of files -in a tar archive. It comes with C. - -=back - -=head1 Testing - -=over 4 - -=item * - -The new F has been added, which tests that -C<*Foo::ISA = *Bar::ISA> works properly. - -=item * - -F has been added, which tests that C (accessible -at the Perl level via C) is updated properly. - -=item * - -F has been added, which tests that -L<[perl #78586]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78586> -has been fixed (related to line numbers in the debugger). - -=back - -=head1 Platform Support - -=head2 Platform-Specific Notes - -=over 4 - -=item Windows - -Directory handles are now properly cloned when threads are created. In perl -5.13.6, child threads simply stopped inheriting directory handles. In -previous versions, threads would share handles, resulting in crashes. - -Support for building with Visual C++ 2010 is now underway, but is not yet -complete. See F for more details. - -=item VMS - -Record-oriented files (record format variable or variable with fixed control) -opened for write by the perlio layer will now be line buffered to prevent the -introduction of spurious line breaks whenever the perlio buffer fills up. - -=back - -=head1 Internal Changes - -=over 4 - -=item * - -C has been added to the API, but is considered experimental. - -=item * - -A new C function has been added to the API -L<[perl #78222]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78222>. - -=item * - -A new, experimental API has been added for accessing the internal -structure that Perl uses for C<%^H>. See the functions beginning with -C in L. - -=item * - -A stash can now have a list of effective names in addition to its usual -name. The first effective name can be accessed via the C macro, -which is now the recommended name to use in MRO linearisations (C -being a fallback if there is no C). - -These names are added and deleted via C and -C. These two functions are I part of the API. - -=item * - -The way the parser handles labels has been cleaned up and refactored. As a -result, the C constructor function no longer takes a parameter -stating what label is to go in the state op. - -=item * - -The C and C functions no longer accept a line -number as a parameter. - -=item * - -A new C function has been added, for parsing a statement -without a label. - -=item * - -A new C function has been added, that parses a statement -label, separate from statements. - -=item * - -The C macro can now only be used as an rvalue. C -has been added to replace assignment to C. This is to ensure -that backreferences are handled properly. These macros are not part of the -API. - -=item * - -The C and C functions have been added to the API, -but are considered experimental. - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -The C C function added in earlier in the 5.13.x series has been -fixed to work with statements ending with C<}> -L<[perl #78222]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78222>. - -=item * - -The C C function added in 5.13.5 has been fixed to work -when called while an expression is being parsed. - -=item * - -Characters in the Latin-1 non-ASCII range (0x80 to 0xFF) used not to match -themselves if the string happened to be UTF8-encoded internally, the -regular expression was not, and the character in the regular expression was -inside a repeated group (e.g., -C) -L<[perl #78464]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78464>. - -=item * - -The C<(?d)> regular expression construct now overrides a previous C<(?u)> -or C -L<[perl #78508]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78508>. - -=item * - -A memory leak in C, introduced in perl 5.13.6, has been fixed -L<[perl #78488]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78488>. - -=item * - -Various bugs related to typeglob dereferencing have been fixed. See -L, above. - -=item * - -The C function available to XS modules now calls magic before -downgrading the SV, to avoid warnings about wide characters -L<[perl #72398]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72398>. - -=item * - -The C<=> operator used to ignore magic (e.g., tie methods) on its -right-hand side if the scalar happened to hold a typeglob. This could -happen if a typeglob was the last thing returned from or assigned to a tied -scalar -L<[perl #77498]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77498>. - -=item * - -C was ignoring locales when called with constant arguments -L<[perl #78632]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78632>. - -=item * - -A non-ASCII character in the Latin-1 range could match both a Posix -class, such as C<[[:alnum:]]>, and its inverse C<[[:^alnum:]]>. This is -now fixed for regular expressions compiled under the C<"u"> modifier. -See L now applies to more regex matching>. -L<[perl #18281]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=18281>. - -=item * - -Concatenating long strings under C no longer causes perl to -crash -L<[perl #78674]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78674>. - -=item * - -Typeglob assignments would crash if the glob's stash no longer existed, so -long as the glob assigned to was named 'ISA' or the glob on either side of -the assignment contained a subroutine. - -=item * - -Calling C<< ->import >> on a class lacking an import method could corrupt -the stack, resulting in strange behaviour. For instance, - - push @a, "foo", $b = bar->import; - -would assign 'foo' to C<$b> -L<[perl #63790]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=63790>. - -=item * - -Creating an alias to a package when that package had been detached from the -symbol table would result in corrupted isa caches -L<[perl #77358]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77358>. - -=item * - -C<.=> followed by C<< <> >> or C would leak memory if C<$/> -contained characters beyond the octet range and the scalar assigned to -happened to be encoded as UTF8 internally -L<[perl #72246]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72246>. - -=item * - -The C function could crash when called with the MSG_TRUNC flag -L<[perl #75082]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75082>. - -=item * - -Evaluating a simple glob (like C<*a>) was calling get-magic on the glob, -even when its contents were not being used -L<[perl #78580]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78580>. - -This bug was introduced in 5.13.2 and did not affect earlier perl versions. - -=item * - -Matching a Unicode character against an alternation containing characters -that happened to match continuation bytes in the former's UTF8 -representation (C) would cause erroneous -warnings -L<[perl #70998]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=70998>. - -=item * - -C (added in 5.13.2) no longer leaks. - -=item * - -The trie optimisation was not taking empty groups into account, preventing -'foo' from matching C -L<[perl #78356]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78356>. - -=item * - -A pattern containing a C<+> inside a lookahead would sometimes cause an -incorrect match failure in a global match (e.g., C) -L<[perl #68564]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68564>. - -=item * - -Iterating with C over an array returned by an lvalue sub now works -L<[perl #23790]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=23790>. - -=item * - -C<$@> is now localised during calls to C to prevent action at a -distance -L<[perl #78844]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78844>. - -=item * - -C, which is accessible to Perl via C is now -updated properly when packages are deleted or removed from the C<@ISA> of -other classes. This allows many packages to be created and deleted without -causing a memory leak -L<[perl #75176]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75176>. - -=item * - -C and C and C -used not to update the internal isa caches if the -stash or C<@ISA> array had a reference elsewhere. In -fact, C would stop a new C<@Foo::ISA> array from updating -caches. - -=item * - -C<@ISA> arrays can now be shared between classes via -C<*Foo::ISA = \@Bar::ISA> or C<*Foo::ISA = *Bar::ISA> -L<[perl #77238]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77238>. - -=item * - -The parser no longer hangs when encountering certain Unicode characters, -such as U+387 -L<[perl #74022]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=74022>. - -=item * - -C no longer crashes when passed a tainted format picture. It also -taints C<$^A> now if its arguments are tainted -L<[perl #79138]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79138>. - -=item * - -A signal handler called within a signal handler could cause leaks or -double-frees. Now fixed. -L<[perl #76248]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76248>. - -=item * - -When trying to report C, crashes could -occur if the GLOB of the global variable causing the warning has been detached -from its original stash by, for example C. This has been -fixed by disabling the reporting of variable names in the warning in those -cases. - -=back - -=head1 Obituary - -Randy Kobes, creator of the kobesearch alternative to search.cpan.org and -contributor/maintainer to several core Perl toolchain modules, passed away -on September 18, 2010 after a battle with lung cancer. His contributions -to the Perl community will be missed. - -=head1 Acknowledgements - -Perl 5.13.7 represents approximately one month of development since Perl 5.13.6 -and contains 73100 lines of changes across 518 files from 39 authors and committers: - -Abhijit Menon-Sen, Abigail, Ben Morrow, Chas. J. Owens IV, Chris 'BinGOs' Williams, Craig A. Berry, -David Golden, David Mitchell, Father Chrysostomos, Fingle Nark, Florian Ragwitz, George Greer, -Grant McLean, H.Merijn Brand, Ian Goodacre, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Karl Williamson, -Lubomir Rintel, Marty Pauley, Moritz Lenz, Nicholas Clark, Nicolas Kaiser, Niko Tyni, Peter John Acklam, -Rafael Garcia-Suarez, Shlomi Fish, Steffen Mueller, Steve Hay, Tatsuhiko Miyagawa, Tim Bunce, Todd Rinaldo, -Tom Christiansen, Tom Hukins, Tony Cook, Yves Orton, Zefram and brian d foy - -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. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5138delta.pod b/pod/perl5138delta.pod deleted file mode 100644 index 99204c1c545..00000000000 --- a/pod/perl5138delta.pod +++ /dev/null @@ -1,913 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5138delta - what is new for perl v5.13.8 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.7 release and -the 5.13.8 release. - -If you are upgrading from an earlier release such as 5.13.6, first read -L, which describes differences between 5.13.6 and -5.13.7. - -=head1 Core Enhancements - -=head2 C<-d:-foo> calls C - -The syntax C<-dIfoo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>> -equivalent to C<-MDevel::foo=bar>, which expands -internally to C. -F now allows prefixing the module name with C<->, with the same -semantics as C<-M>, I - -=over 4 - -=item C<-d:-foo> - -Equivalent to C<-M-Devel::foo>, expands to -C, calls C<< Devel::foo->unimport() >> -if the method exists. - -=item C<-d:-foo=bar> - -Equivalent to C<-M-Devel::foo=bar>, expands to C, -calls C<< Devel::foo->unimport('bar') >> if the method exists. - -=back - -This is particularly useful to suppresses the default actions of a -C module's C method whilst still loading it for debugging. - -=head2 Filehandle method calls load L on demand - -When a method call on a filehandle would die because the method cannot -be resolved, and L has not been loaded, Perl now loads L -via C and attempts method resolution again: - - open my $fh, ">", $file; - $fh->binmode(":raw"); # loads IO::File and succeeds - -This also works for globs like STDOUT, STDERR and STDIN: - - STDOUT->autoflush(1); - -Because this on-demand load only happens if method resolution fails, the -legacy approach of manually loading an L parent class for partial -method support still works as expected: - - use IO::Handle; - open my $fh, ">", $file; - $fh->autoflush(1); # IO::File not loaded - -=head2 Full functionality for C - -This release provides full functionality for C. Under its scope, all string operations executed and -regular expressions compiled (even if executed outside its scope) have -Unicode semantics. See L. - -This feature avoids most forms of the "Unicode Bug" (See -L for details.) If there is a -possibility that your code will process Unicode strings, you are -B encouraged to use this subpragma to avoid nasty surprises. - -The availability of this should strongly affect the whole tone of -various documents, such as L and L, but this -work has not been done yet. - -=head2 Exception Handling Backcompat Hack - -When an exception is thrown in an C, C<$@> is now set before -unwinding, as well as being set after unwinding as the eval block exits. This -early setting supports code that has historically treated C<$@> during unwinding -as an indicator of whether the unwinding was due to an exception. These modules -had been broken by 5.13.1's change from setting C<$@> early to setting it late. -This double setting arrangement is a stopgap until the reason for unwinding can -be made properly introspectable. C<$@> has never been a reliable indicator of -the reason for unwinding. - -=head2 printf-like functions understand post-1980 size modifiers - -Perl's printf and sprintf operators, and Perl's internal printf replacement -function, now understand the C90 size modifiers "hh" (C), "z" -(C), and "t" (C). Also, when compiled with a C99 -compiler, Perl now understands the size modifier "j" (C). - -So, for example, on any modern machine, C returns '1'. - -=head2 DTrace probes now include package name - -The DTrace probes now include an additional argument (C) which contains -the package the subroutine being entered or left was compiled in. - -For example using the following DTrace script: - - perl$target:::sub-entry - { - printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3)); - } - -and then running: - - perl -e'sub test { }; test' - -DTrace will print: - - main::test - -=head2 Stacked labels - -Multiple statement labels can now appear before a single statement. - -=head1 Incompatible Changes - -=head2 C<:=> is now a syntax error - -Previously C was exactly equivalent to C, -with the C<:> being treated as the start of an attribute list, ending before -the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is now -a syntax error. This will allow the future use of C<:=> as a new token. - -We find no Perl 5 code on CPAN using this construction, outside the core's -tests for it, so we believe that this change will have very little impact on -real-world codebases. - -If it is absolutely necessary to have empty attribute lists (for example, -because of a code generator) then avoid the error by adding a space before -the C<=>. - -=head2 Run-time code block in regular expressions - -Code blocks in regular expressions (C<(?{...})> and C<(??{...})>) used not -to inherit any pragmata (strict, warnings, etc.) if the regular expression -was compiled at run time as happens in cases like these two: - - use re 'eval'; - $foo =~ $bar; # when $bar contains (?{...}) - $foo =~ /$bar(?{ $finished = 1 })/; - -This was a bug, which has now been fixed. But it has the potential to break -any code that was relying on this bug. - -=head1 Deprecations - -=head2 C is deprecated - -C (without the initial m) has been deprecated and now produces -a warning. This is to allow future use of C in new operators. -The match-once functionality is still available in the form of C. - -=head2 C is now deprecated - -The C API function is now deprecated. Searches suggest -that nothing on CPAN is using it, so this should have zero impact. - -It attempted to provide an API to compile code down to an optree, but failed -to bind correctly to lexicals in the enclosing scope. It's not possible to -fix this problem within the constraints of its parameters and return value. - -=head2 Tie functions on scalars holding typeglobs - -Calling a tie function (C, C, C) with a scalar argument -acts on a file handle if the scalar happens to hold a typeglob. - -This is a long-standing bug that will be removed in Perl 5.16, as -there is currently no way to tie the scalar itself when it holds -a typeglob, and no way to untie a scalar that has had a typeglob -assigned to it. - -This bug was fixed in 5.13.7 but, because of the breakage it caused, the -fix has been reverted. Now there is a deprecation warning whenever a tie -function is used on a handle without an explicit C<*>. - -=head1 Modules and Pragmata - -=head2 Updated Modules and Pragmata - -=over 4 - -=item * - -C has been upgraded from version 1.72 to 1.74. - -Skip extracting pax extended headers. - -=item * - -C has been upgraded from version 2.10 to 2.1001. - -Test fix in blead for VMS. - -=item * - -C has been upgraded from version 1.26 to 1.27. - -Avoid compiler warnings. - -=item * - -C has been upgraded from version 0.81 to 0.82. - -It no longer produces mangled output with the C<-tree> option -L<[perl #80632]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80632>. - -=item * - -C has been upgraded from version 1.01 to 1.02. - -Test improvements. - -=item * - -C has been upgraded from version 3.34 to 3.35. - -Avoid compiler warnings. - -=item * - -C has been upgraded from version 2.130_01 to 2.130_02. - -Avoid compiler warnings. - -=item * - -C has been upgraded from version 1.05 to 1.06. - -Avoid compiler warnings. - -Test improvements. - -=item * - -C has been upgraded from version 1.03 to 1.05. - -Whitespace changes. - -=item * - -C has been upgraded from 5.48 to 5.50. - -C now more closely mimics C/C. - -C accepts all POSIX filenames. - -=item * - -C has been upgraded from version 1.14 to 1.15. - -Test improvements. - -=item * - -C has been upgraded from version 1.11 to 1.12. - -Remove obsolete RCS keywords. - -=item * - -C has been upgraded from version 1.01 to 1.02. - -Test improvements. - -=item * - -C has been upgraded from 0.2703 to 0.280201. - -Handle C and C++ compilers separately. - -Preserves exit status on VMS. - -Test improvements. - -=item * - -C has been upgraded from 0.02 to 0.03. - -Refactoring and fixing of backcompat code, preparing for resynchronisation -with CPAN. - -=item * - -C has been upgraded from 1.29 to 1.30. - -Remove obsolete RCS keywords. - -=item * - -C has been upgraded from 2.2207 to 2.2208. - -Avoid compiler warnings. - -=item * - -C has been upgraded from 1.10 to 1.11. - -Avoid compiler warnings. - -Test improvements. - -=item * - -C has been upgraded from 1.18 to 1.19. - -Documentation and test updates for the C feature. -See L>. - -=item * - -C has been upgraded from 4.4 to 4.41. - -Whitespace changes. - -=item * - -C has been upgraded from 1.10 to 1.11. - -Avoid compiler warnings. - -Test improvements. - -=item * - -C has been upgraded from 1.12 to 1.13. - -Test improvements. - -Remove obsolete RCS keywords. - -=item * - -C has been upgraded from 1.06 to 1.07. - -Avoid compiler warnings. - -=item * - -C has been upgraded from 1.01 to 1.02. - -Whitespace changes. - -Test improvements. - -=item * - -C has been upgraded from 0.06 to 0.0601. - -Test improvements. - -=item * - -C has been upgraded from 1.25_02 to 1.25_03. - -Avoid compiler warnings. - -=item * - -C has been upgraded from 0.64 to 0.66. - -Resolves an issue with splitting Win32 command lines. - -Documentation enhancements. - -=item * - -C has been upgraded from 1.07 to 1.08. - -Remove obsolete RCS keywords. - -Test improvements. - -=item * - -C has been upgraded from version 3.14 to 3.15. - -Adds some codes. - -=item * - -C has been upgraded from 1.99_01 to 1.99_02. - -Documentation and comment spelling fixes. - -=item * - -C has been upgraded from version 1.01_03 to 1.02. - -Remove obsolete RCS keywords. - -Whitespace changes. - -=item * - -C has been upgraded from 3.10 to 3.13. - -Now provides C and C functions to process -the base64 scheme for "URL applications". - -=item * - -C has been upgraded from version 1.05 to 1.06. - -C I now take into account that every class inherits -from UNIVERSAL -L<[perl #68654]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68654>. - -=item * - -C has been upgraded from 1.10 to 1.11. - -Remove obsolete RCS keywords. - -Test improvements. - -=item * - -C has been upgraded from 2.36 to 2.37. - -Remove obsolete RCS keywords. - -=item * - -C has been upgraded from 1.09 to 1.10. - -Remove obsolete RCS keywords. - -Test improvements. - -=item * - -C has been upgraded from 1.17 to 1.18. - -Avoid compiler warnings. - -Test improvements. - -=item * - -C has been upgraded from 1.11 to 1.12. - -Avoid a taint problem in use of sprintf. - -Test asymmetric fallback cases -L<[perl #71286]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=71286>. - -=item * - -C has been upgraded from 0.13 to 0.14. - -Avoid compiler warnings. - -Remove obsolete RCS keywords. - -Test improvements. - -=item * - -C has been upgraded from 0.10 to 0.11. - -A C after a C beyond the end of the string no longer thinks it -has data to read -L<[perl #78716]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78716>. - -Avoid compiler warnings. - -=item * - -C has been upgraded from 0.10 to 0.11. - -Avoid compiler warnings. - -=item * - -C has been upgraded from 1.22 to 1.23. - -Avoid compiler warnings. - -=item * - -C has been upgraded from 0.14 to 0.15. - -Enforce that C, C, and C are mutually exclusive. - -=item * - -C has been upgraded from 1.08 to 1.09. - -Avoid compiler warnings. - -Remove obsolete RCS keywords. - -Test improvements. - -=item * - -C has been upgraded from 1.91 to 1.92. - -It has several new functions for handling IPv6 addresses. - -=item * - -C has been upgraded from 2.24 to 2.25. - -This adds support for serialising code references that contain UTF-8 strings -correctly. The Storable minor version number changed as a result, meaning that -Storable users who set C<$Storable::accept_future_minor> to a C value -will see errors (see L for more details). - -Freezing no longer gets confused if the Perl stack gets reallocated -during freezing -L<[perl #80074]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80074>. - -Avoid compiler warnings. - -=item * - -C has been upgraded from 1.81_02 to 1.81_03. - -Avoid compiler warnings. - -=item * - -C has been upgraded from 1.34 to 1.35. - -Avoid compiler warnings. - -=item * - -C has been upgraded from 1.9721 to 1.9721_01. - -Build fix in blead for VMS. - -=item * - -C has been upgraded from 0.67 to 0.6801. - -Documentation clarification. - -Test improvements. - -=item * - -C has been upgraded from 1.07 to 1.08. - -Avoid compiler warnings. - -=item * - -C has been upgraded from 0.29 to 0.30. - -Add info about named sequence alternatives. - -Don't use C. - -=item * - -C has been upgraded from 0.82 to 0.86. - -Modify export logic for C and C. - -Various backcompat fixes. - -=item * - -C has been upgraded from 0.39 to 0.41. - -Add several functions. - -Corrections to names returned by C and -C. - -=item * - -C has been upgraded from 0.26 to 0.27. - -Test new API functions. - -Avoid compiler warnings. - -=back - -=head2 Dual-life Modules and Pragmata - -These modules were formerly distributed only in the Perl core -distribution, and are now dual-lifed (meaning they are now also available -separately on CPAN): - -=over 4 - -=item * - -C - -=item * - -C - -=item * - -C - -=item * - -C - -=item * - -C - -=item * - -C - -=back - -=head1 Diagnostics - -The following additions or changes have been made to diagnostic output, -including warnings and fatal error messages. For the complete list of -diagnostic messages, see L. - -=head2 New Diagnostics - -=over 4 - -=item * - -There is a new "Closure prototype called" error -L<[perl #68560]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68560>. - -=back - -=head2 Changes to Existing Diagnostics - -=over 4 - -=item * - -The "Found = in conditional" warning that is emitted when a constant is -assigned to a variable in a condition is now withheld if the constant is -actually a subroutine or one generated by C, since the value -of the constant may not be known at the time the program is written -L<[perl #77762]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77762>. - -=back - -=head1 Configuration and Compilation - -=over 4 - -=item * - -The C module can now (once again) be included in a static Perl -build. The special-case handling for this situation got broken in Perl -5.11.0, and has now been repaired. - -=back - -=head1 Testing - -=over 4 - -=item * - -Tests for C, C, C, C, -C, C, C, C, C, -and C now use the L framework. - -=back - -=head1 Platform Support - -=head2 Platform-Specific Notes - -=over 4 - -=item NetBSD - -The NetBSD hints file has been changed to make the system's malloc the -default. - -=item Windows - -The option to use an externally-supplied C, or to build with no -C at all, has been removed. Perl supplies its own C -implementation for Windows, and the political situation that required -this part of the distribution to sometimes be omitted is long gone. - -=back - -=head1 Internal Changes - -=over 4 - -=item * - -The L|perlapi/mg_findext> and -L|perlapi/sv_unmagicext> -functions have been added to the API. -They allow extension authors to find and remove magic attached to -scalars based on both the magic type and the magic virtual table, similar to how -C attaches magic of a certain type and with a given virtual table -to a scalar. This eliminates the need for extensions to walk the list of -C pointers of an C to find the magic that belongs to them. - -=item * - -The -L|perlapi/parse_fullexpr>, -L|perlapi/parse_listexpr>, -L|perlapi/parse_termexpr>, and -L|perlapi/parse_arithexpr> -functions have been added to the API. They perform -recursive-descent parsing of expressions at various precedence levels. -They are expected to be used by syntax plugins. - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -C now behaves as documented, rather than behaving -identically to C. Previously, C in a C block -was erroneously executing the C and -C behaviour, which only C was documented to -provide -L<[perl #69050]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=69050>. - -=item * - -C -L<[perl #69050]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=69050>, -C and C no longer leak memory. - -=item * - -C no longer leaks memory on non-threaded builds. - -=item * - -PerlIO no longer crashes when called recursively, e.g., from a signal -handler. Now it just leaks memory -L<[perl #75556]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75556>. - -=item * - -Defining a constant with the same name as one of perl's special blocks -(e.g., INIT) stopped working in 5.12.0, but has now been fixed -L<[perl #78634]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78634>. - -=item * - -A reference to a literal value used as a hash key (C<$hash{\"foo"}>) used -to be stringified, even if the hash was tied -L<[perl #79178]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79178>. - -=item * - -A closure containing an C statement followed by a constant or variable -is no longer treated as a constant -L<[perl #63540]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=63540>. - -=item * - -Calling a closure prototype (what is passed to an attribute handler for a -closure) now results in a "Closure prototype called" error message instead -of a crash -L<[perl #68560]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68560>. - -=item * - -A regular expression optimisation would sometimes cause a match with a -C<{n,m}> quantifier to fail when it should match -L<[perl #79152]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79152>. - -=item * - -What has become known as the "Unicode Bug" is mostly resolved in this release. -Under C, the internal storage format of a -string no longer affects the external semantics. There are two known -exceptions. User-defined case changing functions, which are planned to -be deprecated in 5.14, require utf8-encoded strings to function; and the -character C in regular expression -case-insensitive matching has a somewhat different set of bugs depending -on the internal storage format. Case-insensitive matching of all -characters that have multi-character matches, as this one does, is -problematical in Perl. -L<[perl #58182]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=58182>. - -=item * - -Mentioning a read-only lexical variable from the enclosing scope in a -string C no longer causes the variable to become writable -L<[perl #19135]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=19135>. - -=item * - -C can now be used with attributes. It used to mean the same thing as -C if attributes were present -L<[perl #68658]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68658>. - -=item * - -Expressions like C<< @$a > 3 >> no longer cause C<$a> to be mentioned in -the "Use of uninitialized value in numeric gt" warning when C<$a> is -undefined (since it is not part of the C> expression, but the operand -of the C<@>) -L<[perl #72090]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72090>. - -=item * - -C no longer causes C to return the wrong file name for -the scope that called C and other scopes higher up that had the -same file name -L<[perl #68712]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68712>. - -=item * - -The ref types in the typemap for XS bindings now support magical variables -L<[perl #72684]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72684>. - -=item * - -Match variables (e.g., C<$1>) no longer persist between calls to a sort -subroutine -L<[perl #76026]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76026>. - -=item * - -The C module was returning Cs instead of Cs for C -L<[perl #80622]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80622>. -This was due to a bug in the perl core, not in C itself. - -=item * - -Some numeric operators were converting integers to floating point, -resulting in loss of precision on 64-bit platforms -L<[perl #77456]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77456>. - -=item * - -The fallback behaviour of overloading on binary operators was asymmetric -L<[perl #71286]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=71286>. - -=back - -=head1 Acknowledgements - -Perl 5.13.8 represents approximately one month of development since -Perl 5.13.7 and contains 38715 lines of changes across 546 files from -38 authors and committers. - -Thank you to the following for contributing to this release: - -Abhijit Menon-Sen, Abigail, Andreas KE<0xf6>nig, Ben Morrow, Brad Gilbert, -brian d foy, Chip Salzenberg, Chris 'BinGOs' Williams, Craig A. Berry, -David Golden, David Leadbeater, David Mitchell, Father Chrysostomos, -Florian Ragwitz, Goro Fuji, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, -Jesse Vincent, John Peacock, Karl Williamson, Lukas Mai, Marvin Humphrey, -Max Maischein, Michael Breen, Michael Fig, Nicholas Clark, Nick Cleaton, -Paul Evans, Peter J. Holzer, Peter John Acklam, Rafael Garcia-Suarez, -Reini Urban, Renee Baecker, Ricardo Signes, Tony Cook, Yves Orton, Zefram - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the L -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5139delta.pod b/pod/perl5139delta.pod deleted file mode 100644 index f09e97694ec..00000000000 --- a/pod/perl5139delta.pod +++ /dev/null @@ -1,644 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl5139delta - what is new for perl v5.13.9 - -=head1 DESCRIPTION - -This document describes differences between the 5.13.8 release and -the 5.13.9 release. - -If you are upgrading from an earlier release such as 5.13.7, first read -L, which describes differences between 5.13.7 and -5.13.8. - -=head1 Core Enhancements - -=head2 New regular expression modifier C - -The C regular expression modifier restricts C<\s> to match precisely -the five characters C<[ \f\n\r\t]>, C<\d> to match precisely the 10 -characters C<[0-9]>, C<\w> to match precisely the 63 characters -C<[A-Za-z0-9_]>, and the Posix (C<[[:posix:]]>) character classes to -match only the appropriate ASCII characters. The complements, of -course, match everything but; and C<\b> and C<\B> are correspondingly -affected. Otherwise, C behaves like the C modifier, in that -case-insensitive matching uses Unicode semantics; for example, "k" will -match the Unicode C<\N{KELVIN SIGN}> under C matching, and code -points in the Latin1 range, above ASCII will have Unicode semantics when -it comes to case-insensitive matching. Like its cousins (C, C, -and C), and in spite of the terminology, C in 5.14 will not -actually be able to be used as a suffix at the end of a regular -expression (this restriction is planned to be lifted in 5.16). It must -occur either as an infix modifier, such as C<(?a:...)> or (C<(?a)...>, -or it can be turned on within the lexical scope of C. -Turning on C turns off the other "character set" modifiers. - -=head2 Any unsigned value can be encoded as a character - -With this release, Perl is adopting a model that any unsigned value can -be treated as a code point and encoded internally (as utf8) without -warnings -- not just the code points that are legal in Unicode. -However, unless utf8 warnings have been -explicitly lexically turned off, outputting or performing a -Unicode-defined operation (such as upper-casing) on such a code point -will generate a warning. Attempting to input these using strict rules -(such as with the C<:encoding('UTF-8')> layer) will continue to fail. -Prior to this release the handling was very inconsistent, and incorrect -in places. Also, the Unicode non-characters, some of which previously were -erroneously considered illegal in places by Perl, contrary to the Unicode -standard, are now always legal internally. But inputting or outputting -them will work the same as for the non-legal Unicode code points, as the -Unicode standard says they are illegal for "open interchange". - -=head2 Regular expression debugging output improvement - -Regular expression debugging output (turned on by C) now -uses hexadecimal when escaping non-ASCII characters, instead of octal. - -=head1 Security - -=head2 Restrict \p{IsUserDefined} to In\w+ and Is\w+ - -In L, it says you can -create custom properties by defining subroutines whose names begin with -"In" or "Is". However, perl doesn't actually enforce that naming -restriction, so \p{foo::bar} will call foo::Bar() if it exists. - -This commit finally enforces this convention. Note that this broke a -number of existing tests for properties, since they didn't always use an -Is/In prefix. - -=head1 Incompatible Changes - -=head2 All objects are destroyed - -It used to be possible to prevent a destructor from being called during -global destruction by artificially increasing the reference count of an -object. - -Now such objects I will be destroyed, as a result of a bug fix -L<[perl #81230]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=81230>. - -This has the potential to break some XS modules. (In fact, it break some. -See L, below.) - -=head1 Modules and Pragmata - -=head2 New Modules and Pragmata - -=over 4 - -=item * - -C 0.003 has been added as a dual-life module. It supports a -subset of YAML sufficient for reading and writing META.yml and MYMETA.yml files -included with CPAN distributions or generated by the module installation -toolchain. It should not be used for any other general YAML parsing or -generation task. - -=item * - -C 0.009 has been added as a dual-life module. It is a very -small, simple HTTP/1.1 client designed for simple GET requests and file -mirroring. It has has been added to enable CPAN.pm and CPANPLUS to -"bootstrap" HTTP access to CPAN using pure Perl without relying on external -binaries like F or F. - -=item * - -C 2.27103 has been added as a dual-life module, for the sake of -reading F files in CPAN distributions. - -=item * - -C 1.000003 has been added as a dual-life module. It gathers -package and POD information from Perl module files. It is a standalone module -based on Module::Build::ModuleInfo for use by other module installation -toolchain components. Module::Build::ModuleInfo has been deprecated in -favor of this module instead. - -=item * - -C 1.002 has been added as a dual-life module. It maps Perl -operating system names (e.g. 'dragonfly' or 'MSWin32') to more generic types -with standardized names (e.g. "Unix" or "Windows"). It has been refactored -out of Module::Build and ExtUtils::CBuilder and consolidates such mappings into -a single location for easier maintenance. - -=back - -=head2 Updated Modules and Pragmata - -=over 4 - -=item * - -C has been upgraded from version 0.46 to 0.48 - -=item * - -C has been upgraded from version 1.74 to 1.76 - -=item * - -C has been upgraded from version 3.50 to 3.51 - -Further improvements have been made to guard against newline injections -in headers. - -=item * - -C has been upgraded from version 2.031 to 2.033 - -=item * - -C has been upgraded from version 2.030 to 2.033 - -=item * - -C has been upgraded from version 1.94_62 to 1.94_63 - -=item * - -C has been upgraded from version 0.9010 to 0.9011 - -=item * - -C has been upgraded from version 0.50 to 0.52 - -=item * - -C has been upgraded from version 1.820 to 1.821 - -=item * - -C has been upgraded from version 2.40 to 2.42. -Now, all 66 Unicode non-characters are treated the same way U+FFFF has -always been treated; if it was disallowed, all 66 are disallowed; if it -warned, all 66 warn. - -=item * - -C has been upgraded from version 0.28 to 0.32 - -=item * - -C has been upgraded from version 2.030 to 2.033 - -=item * - -C has been upgraded from version 0.66 to 0.68 - -=item * - -C has been upgraded from version 0.02 to 0.04 - -=item * - -C has been upgraded from version 0.06 to 0.08 - -=item * - -C has been upgraded from version 0.38 to 0.40 - -=item * - -C has been upgraded from version 0.36 to 0.38 - -=item * - -C has been upgraded from version 0.26 to 0.28 - -=item * - -C has been upgraded from version 0.58 to 0.59 - -=item * - -C has been updated with new affordances for IPv6, -including implementations of the C and -C functions, along with related constants. - -=item * - -C has been upgraded from version 0.20 to 0.24 - -=item * - -C has been upgraded from version 2.11 to 2.12. - -=item * - -C has been upgraded from version 2.11 to 2.12. - -=item * - -C has been upgraded from version 1.81_03 to 1.82 - -=item * - -C has been upgraded from version 1.35 to 1.36 - -=item * - -C has been upgraded from version 1.1901_01 to 1.2000. - -=item * - -C has been upgraded from version 1.07 to 1.10 - -=item * - -C has been upgraded from 0.86 to 0.88. - -=item * - -C has been upgraded from version 0.41 to 0.44. - -=back - -=head1 Documentation - -=head2 Changes to Existing Documentation - -=head3 All documentation - -=over - -=item * - -Numerous POD warnings were fixed. - -=item * - -Many, many spelling errors and typographical mistakes were corrected throughout Perl's core. - -=back - -=head3 C - -=over 4 - -=item * - -C was extensively reorganized. - -=back - -=head3 C - -=over 4 - -=item * - -It has now been documented that C returns 0 for an empty string. - -=back - -=head1 Diagnostics - -The following additions or changes have been made to diagnostic output, -including warnings and fatal error messages. For the complete list of -diagnostic messages, see L. - -=head2 New Diagnostics - -=over 4 - -=item * - -Performing an operation requiring Unicode semantics (such as case-folding) -on a Unicode surrogate or a non-Unicode character now triggers a warning: -'Operation "%s" returns its argument for ...'. - -=back - -=head2 Changes to Existing Diagnostics - -=over 4 - -=item * - -Previously, if none of the C, C and -C functions were implemented on a given platform, they would -all die with the message 'Unsupported socket function "gethostent" called', -with analogous messages for C and C. This has been -corrected. - -=back - -=head1 Utility Changes - -=head3 C - -=over 4 - -=item * - -C did not previously generate a From: header, potentially -resulting in dropped mail. Now it does include that header. - -=back - -=head3 C - -=over 4 - -=item * - -F has been modernized and can now be used to test the -well-formedness of F automatically. - -=back - -=head1 Testing - -=over 4 - -=item * - -C has been modernized and now uses C. - -=item * - -A new test script, C, makes sure that filenames and -paths are reasonably portable. - -=item * - -C is now several orders of magnitude faster. - -=item * - -C now tests that the documentation TOC file is current and well-formed. - -=item * - -C now tests the basics of a while loop with minimal dependencies. - -=item * - -C now uses F for better maintainability. - -=item * - -C now tests calls to C without any pattern specified. - -=back - - - -=head1 Platform Support - -=head2 Discontinued Platforms - -=over 4 - -=item Apollo DomainOS - -The last vestiges of support for this platform have been excised from the -Perl distribution. It was officially discontinued in version 5.12.0. It had -not worked for years before that. - -=item MacOS Classic - -The last vestiges of support for this platform have been excised from the -Perl distribution. It was officially discontinued in an earlier version. - -=back - -=head2 Platform-Specific Notes - -=over 4 - -=item Cygwin - -=over - -=item * - -Updated MakeMaker to build man pages on cygwin. - -=item * - -Improved rebase behaviour - -If a dll is updated on cygwin reuse the old imagebase address. -This solves most rebase errors, esp when updating on core dll's. -See L for more information. - -=item * - -Support the standard cyg dll prefix, which is e.g. needed for FFI's. - -=item * - -Updated build hints file - -=back - -=item Solaris - -DTrace is now supported on Solaris. There used to be build failures, but -these have been fixed -L<[perl #73630]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=73630>. - -=back - -=head1 Internal Changes - -=over 4 - -=item * - -The opcode bodies for C and C and for C and C have -been merged. The implementation functions C and -C, never part of the public API, have been merged and moved to -a static function in F. This shrinks the perl binary slightly, and should -not affect any code outside the core (unless it is relying on the order of side -effects when C is passed a I of values). - -=item * - -Some of the flags parameters to the uvuni_to_utf8_flags() and -utf8n_to_uvuni() have changed. This is a result of Perl now allowing -internal storage and manipulation of code points that are problematic -in some situations. Hence, the default actions for these functions has -been complemented to allow these code points. The new flags are -documented in L. Code that requires the problematic code -points to be rejected needs to change to use these flags. Some flag -names are retained for backward source compatibility, though they do -nothing, as they are now the default. However the flags -C, C, C, and -C have been removed, as they stem from a -fundamentally broken model of how the Unicode non-character code points -should be handled, which is now described in -L. See also L. - -=item * - -Certain shared flags in the C and C -structures have been removed. These are: C, -C, and C. Instead there are encodes and -three static in-line functions for accessing the information: -C, C, and C, -which are defined in the places where the original flags were. - -=item * - -A new option has been added to C to dump all characters above -ASCII in hexadecimal. Before, one could get all characters as hexadecimal -or the Latin1 non-ASCII as octal - -=item * - -Generate pp_* prototypes in pp_proto.h, and remove pp.sym - -Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13 -locations that relied on them. - -regen/opcode.pl now generates prototypes for the PP functions directly, into -pp_proto.h. It no longer writes pp.sym, and regen/embed.pl no longer reads -this, removing the only ordering dependency in the regen scripts. opcode.pl -is now responsible for prototypes for pp_* functions. (embed.pl remains -responsible for ck_* functions, reading from regen/opcodes) - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -The handling of Unicode non-characters has changed. -Previously they were mostly considered illegal, except that only one of -the 66 of them was known about in places. The Unicode standard -considers them legal, but forbids the "open interchange" of them. -This is part of the change to allow the internal use of any code point -(see L). Together, these changes resolve -L<# 38722|https://rt.perl.org/rt3/Ticket/Display.html?id=38722>, -L<# 51918|http://rt.perl.org/rt3/Ticket/Display.html?id=51918>, -L<# 51936|http://rt.perl.org/rt3/Ticket/Display.html?id=51936>, -L<# 63446|http://rt.perl.org/rt3/Ticket/Display.html?id=63446> - -=item * - -Sometimes magic (ties, tainted, etc.) attached to variables could cause an -object to last longer than it should, or cause a crash if a tied variable -were freed from within a tie method. These have been fixed -L<[perl #81230]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=81230>. - -=item * - -Most I/O functions were not warning for unopened handles unless the -'closed' and 'unopened' warnings categories were both enabled. Now only -C is necessary to trigger these warnings (as was -always meant to be the case. - -=item * - -C<< EexprE >> always respects overloading now if the expression is -overloaded. - -Due to the way that 'EE as glob' was parsed differently from -'EE as filehandle' from 5.6 onwards, something like C<< E$foo[0]E >> did -not handle overloading, even if C<$foo[0]> was an overloaded object. This -was contrary to the documentation for overload, and meant that C<< EE >> -could not be used as a general overloaded iterator operator. - -=item * - -Destructors on objects were not called during global destruction on objects -that were not referenced by any scalars. This could happen if an array -element were blessed (e.g., C) or if a closure referenced a -blessed variable (C). - -Now there is an extra pass during global destruction to fire destructors on -any objects that might be left after the usual passes that check for -objects referenced by scalars -L<[perl #36347]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=36347>. - -=item * - -A long standing bug has now been fully fixed (partial fixes came in -earlier releases), in which some Latin-1 non-ASCII characters on -ASCII-platforms would match both a character class and its complement, -such as U+00E2 being both in C<\w> and C<\W>, depending on the -UTF-8-ness of the regular expression pattern and target string. -Fixing this did expose some bugs in various modules and tests that -relied on the previous behavior of C<[[:alpha:]]> not ever matching -U+00FF, "LATIN SMALL LETTER Y WITH DIAERESIS", even when it should, in -Unicode mode; now it does match when appropriate. -L<[perl #60156]|http://rt.perl.org/rt3/Ticket/Display.html?id=60156>. - -=back - -=head1 Known Problems - -=over 4 - -=item * - -The fix for [perl #81230] causes test failures for C version 804.029. -This is still being investigated. - -=back - -=head1 Acknowledgements - -Perl 5.13.9 represents approximately one month of development since -Perl 5.13.8 and contains approximately 48000 lines of changes across -809 files from 35 authors and committers: - -Abigail, Ævar Arnfjörð Bjarmason, brian d foy, Chris 'BinGOs' Williams, -Craig A. Berry, David Golden, David Leadbeater, David Mitchell, Father -Chrysostomos, Florian Ragwitz, Gerard Goossen, H.Merijn Brand, Jan -Dubois, Jerry D. Hedden, Jesse Vincent, John Peacock, Karl Williamson, -Leon Timmermans, Michael Parker, Michael Stevens, Nicholas Clark, -Nuno Carvalho, Paul "LeoNerd" Evans, Peter J. Acklam, Peter Martini, -Rainer Tammer, Reini Urban, Renee Baecker, Ricardo Signes, Robin Barker, -Tony Cook, Vadim Konovalov, Vincent Pit, Zefram, and Zsbán Ambrus. - -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. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/perlbug/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the L -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -If the bug you are reporting has security implications, which make it -inappropriate to send to a publicly archived mailing list, then please send -it to perl5-security-report@perl.org. This points to a closed subscription -unarchived mailing list, which includes -all the core committers, who will be able -to help assess the impact of issues, figure out a resolution, and help -co-ordinate the release of patches to mitigate or fix the problem across all -platforms on which Perl is supported. Please only use this address for -security issues in the Perl core, not for modules independently -distributed on CPAN. - -=head1 SEE ALSO - -The F file for an explanation of how to view exhaustive details -on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl5142delta.pod b/pod/perl5142delta.pod new file mode 100644 index 00000000000..3d78ba232bd --- /dev/null +++ b/pod/perl5142delta.pod @@ -0,0 +1,242 @@ +=encoding utf8 + +=head1 NAME + +perl5142delta - what is new for perl v5.14.2 + +=head1 DESCRIPTION + +This document describes differences between the 5.14.1 release and +the 5.14.2 release. + +If you are upgrading from an earlier release such as 5.14.0, first read +L, which describes differences between 5.14.0 and +5.14.1. + +=head1 Core Enhancements + +No changes since 5.14.0. + +=head1 Security + +=head2 C memory error with GLOB_ALTDIRFUNC (CVE-2011-2728). + +Calling C with the unsupported flag GLOB_ALTDIRFUNC would +cause an access violation / segfault. A Perl program that accepts a flags value from +an external source could expose itself to denial of service or arbitrary code +execution attacks. There are no known exploits in the wild. The problem has been +corrected by explicitly disabling all unsupported flags and setting unused function +pointers to null. Bug reported by Clément Lecigne. + +=head2 C decode_xs n-byte heap-overflow (CVE-2011-2939) + +A bug in C could, on certain inputs, cause the heap to overflow. +This problem has been corrected. Bug reported by Robert Zacek. + +=head1 Incompatible Changes + +There are no changes intentionally incompatible with 5.14.0. If any +exist, they are bugs and reports are welcome. + +=head1 Deprecations + +There have been no deprecations since 5.14.0. + +=head1 Modules and Pragmata + +=head2 New Modules and Pragmata + +None + +=head2 Updated Modules and Pragmata + +=over 4 + +=item * + +L has been upgraded from version 1.9600 to version 1.9600_01. + +L has been upgraded from version 1.9602 to 1.9602_01. + +Backported bugfixes from CPAN version 1.9800. Ensures proper +detection of C prerequisites from CPAN Meta files +in the case where C is true. [rt.cpan.org #68835] + +Also ensures that C is only checked in META files, +not MYMETA files, so protect against MYMETA generation that drops +C. + +=item * + +L has been upgraded from version 2.42 to 2.42_01. + +See L. + +=item * + +L has been upgraded from version 1.12 to version 1.13. + +See L. + +=item * + +L has been upgraded from version 0.11 to 0.11_01. + +It fixes a problem with C<< open my $fh, ">", \$scalar >> not working if +C<$scalar> is a copy-on-write scalar. + +=back + +=head2 Removed Modules and Pragmata + +None + +=head1 Platform Support + +=head2 New Platforms + +None + +=head2 Discontinued Platforms + +None + +=head2 Platform-Specific Notes + +=over 4 + +=item HP-UX PA-RISC/64 now supports gcc-4.x + +A fix to correct the socketsize now makes the test suite pass on HP-UX +PA-RISC for 64bitall builds. + +=item Building on OS X 10.7 Lion and Xcode 4 works again + +The build system has been updated to work with the build tools under Mac OS X +10.7. + +=back + +=head1 Bug Fixes + +=over 4 + +=item * + +In @INC filters (subroutines returned by subroutines in @INC), $_ used to +misbehave: If returned from a subroutine, it would not be copied, but the +variable itself would be returned; and freeing $_ (e.g., with C) +would cause perl to crash. This has been fixed [perl #91880]. + +=item * + +Perl 5.10.0 introduced some faulty logic that made "U*" in the middle of +a pack template equivalent to "U0" if the input string was empty. This has +been fixed [perl #90160]. + +=item * + +C no longer leaks memory when called from the DB package if +C<@DB::args> was assigned to after the first call to C. L +was triggering this bug [perl #97010]. + +=item * + +C had a nasty bug that would modify copy-on-write scalars' +string buffers in place (i.e., skipping the copy). This could result in +hashes having two elements with the same key [perl #91834]. + +=item * + +Localising a tied variable used to make it read-only if it contained a +copy-on-write string. + +=item * + +Elements of restricted hashes (see the L pragma) containing +copy-on-write values couldn't be deleted, nor could such hashes be cleared +(C<%hash = ()>). + +=item * + +Locking a hash element that is a glob copy no longer causes subsequent +assignment to it to corrupt the glob. + +=item * + +A panic involving the combination of the regular expression modifiers +C introduced in 5.14.0 and the C<\b> escape sequence has been +fixed [perl #95964]. + +=back + +=head1 Known Problems + +This is a list of some significant unfixed bugs, which are regressions +from 5.12.0. + +=over 4 + +=item * + +C is broken. + +Since perl 5.14.0, building with C<-DPERL_GLOBAL_STRUCT> hasn't been +possible. This means that perl currently doesn't work on any platforms that +require it to be built this way, including Symbian. + +While C now works again on recent development versions of +perl, it actually working on Symbian again hasn't been verified. + +We'd be very interested in hearing from anyone working with Perl on Symbian. + +=back + +=head1 Acknowledgements + +Perl 5.14.2 represents approximately three months of development since +Perl 5.14.1 and contains approximately 1200 lines of changes +across 61 files from 9 authors. + +Perl continues to flourish into its third decade thanks to a vibrant +community of users and developers. The following people are known to +have contributed the improvements that became Perl 5.14.2: + +Craig A. Berry, David Golden, Father Chrysostomos, Florian Ragwitz, H.Merijn +Brand, Karl Williamson, Nicholas Clark, Pau Amma and Ricardo Signes. + +=head1 Reporting Bugs + +If you find what you think is a bug, you might check the articles +recently posted to the comp.lang.perl.misc newsgroup and the perl +bug database at http://rt.perl.org/perlbug/ . There may also be +information at http://www.perl.org/ , the Perl Home Page. + +If you believe you have an unreported bug, please run the L +program included with your release. Be sure to trim your bug down +to a tiny but sufficient test case. Your bug report, along with the +output of C, will be sent off to perlbug@perl.org to be +analysed by the Perl porting team. + +If the bug you are reporting has security implications, which make it +inappropriate to send to a publicly archived mailing list, then please send +it to perl5-security-report@perl.org. This points to a closed subscription +unarchived mailing list, which includes all the core committers, who be able +to help assess the impact of issues, figure out a resolution, and help +co-ordinate the release of patches to mitigate or fix the problem across all +platforms on which Perl is supported. Please only use this address for +security issues in the Perl core, not for modules independently +distributed on CPAN. + +=head1 SEE ALSO + +The F file for an explanation of how to view exhaustive details +on what changed. + +The F file for how to build Perl. + +The F file for general stuff. + +The F and F files for copyright information. + +=cut diff --git a/pod/perl5152delta.pod b/pod/perl5152delta.pod index 629d5010666..a4e09de989c 100644 --- a/pod/perl5152delta.pod +++ b/pod/perl5152delta.pod @@ -1,8 +1,5 @@ =encoding utf8 -=for comment -This has been completed up to perl-5.12.1 - =head1 NAME perl5152delta - what is new for perl v5.15.2 diff --git a/pod/perl5153delta.pod b/pod/perl5153delta.pod new file mode 100644 index 00000000000..59b8b11a1af --- /dev/null +++ b/pod/perl5153delta.pod @@ -0,0 +1,843 @@ +=encoding utf8 + +=head1 NAME + +perl5153delta - what is new for perl v5.15.3 + +=head1 DESCRIPTION + +This document describes differences between the 5.15.2 release and +the 5.15.3 release. + +If you are upgrading from an earlier release such as 5.15.1, first read +L, which describes differences between 5.15.1 and +5.15.2. + +=head1 Notice + +This release includes a rewrite of the perl OO docs which represent +a significant modernization of the OO documentation. All of the old OO +tutorials (perltoot, perlboot, etc.) have been replaced with pointers +to the new docs. + +=head1 Core Enhancements + +=head2 More CORE subs are callable through references + +Perl 5.15.2 introduced subroutines in the CORE namespace. Most of them +could only be called as barewords; i.e., they could be aliased at compile +time and then inlined under new names. + +Almost all of these functions can now be called through references and via +C<&foo()> syntax, bypassing the prototype. See L for a list of the +exceptions. + +=head2 New debugger commands + +The debugger now has C and C commands for disabling +existing breakpoints and reënabling them. See L. + +=head1 Security + +=head2 C memory error with GLOB_ALTDIRFUNC (CVE-2011-2728). + +Calling C with the unsupported flag GLOB_ALTDIRFUNC would +cause an access violation / segfault. A Perl program that accepts a flags value from +an external source could expose itself to denial of service or arbitrary code +execution attacks. There are no known exploits in the wild. The problem has been +corrected by explicitly disabling all unsupported flags and setting unused function +pointers to null. Bug reported by Clément Lecigne. + +=head1 Incompatible Changes + +=head2 $[ has been removed + +The array/string index offsetting mechanism, controlled by the C<$[> magic +variable, has been removed. C<$[> now always reads as zero. Writing a +zero to it is still permitted, but writing a non-zero value causes an +exception. Those hopelessly addicted to FORTRAN-style 1-based indexing +may wish to use the module L, which provides an independent +implementation of the index offsetting concept, or L, +which allows L to be controlled through assignment to C<$[>. + +=head2 User-defined case changing operations. + +This feature was deprecated in Perl 5.14, and has now been removed. +The CPAN module L provides better functionality without +the drawbacks that this feature had, as are detailed in the 5.14 +documentation: +L + +=head2 XSUBs are now 'static' + +XSUB C functions are now 'static', that is, they are not visible from +outside the compilation unit. Users can use the new C +and C macros to pick the desired linking behaviour. +The ordinary C declaration for XSUBs will continue to declare +non-'static' XSUBs for compatibility, but the XS compiler, +C (C) will emit 'static' XSUBs by default. +C's behaviour can be reconfigured from XS using the +C keyword, see L for details. + +=head2 Borland compiler + +All support for the Borland compiler has been dropped. The code had not +worked for a long time anyway. + +=head2 Weakening read-only references + +Weakening read-only references is no longer permitted. It should never +hove worked anyway, and in some cases could result in crashes. + +=head1 Modules and Pragmata + +=head2 Updated Modules and Pragmata + +=over 4 + +=item * + +L has been upgraded from version 1.00 to version 1.01. + +This is only a minor documentation update. + +=item * + +L has been upgraded from version 0.52 to version 0.56. + +Resolved an issue where C executable was present in C on MSWin32 + +=item * + +L has been upgraded from version 1.76 to version 1.78. + +=item * + +L has been upgraded from version 0.15 to version 0.16. + +=item * + +L has been upgraded from version 0.92 to version 0.93. + +=item * + +L has been upgraded from version 1.07 to 1.08. + +It now correctly deparses C<$#{/}> and C. + +=item * + +L has been upgraded from version 1.21 to 1.23. + +L is now a dual life module and several fixes have been make to make +it more portable to older versions of perl. + +=item * + +L has been upgraded from version 2.112150 to version 2.112621. + +=item * + +L has been upgraded from version 0.003 to version 0.004. + +=item * + +L has been upgraded from version 0.9109 to version 0.9111. + +=item * + +L has been upgraded from version 0.56 to version 0.58. + +=item * + +L has been upgraded from version 3.19 to version 3.20. + +=item * + +L has been upgraded from version 1.24 to version 1.25. + +It now strips out CEE...E> formatting codes before displaying +descriptions [perl #94488]. + +=item * + +L has been upgraded from version 2.133 to version 2.134. + +The XS code for sorting hash keys has been simplified slightly. + +=item * + +L has been upgraded from version 5.64_03 to version 5.65. + +=item * + +L has been upgraded from version 3.03_01 to version 3.04_04. + +The handling of C in the generated XS code has been simplified. + +The previously broken "INCLUDE: ... |" functionality has been repaired +(CPAN RT #70213). + +A compatibility-workaround for modules that cannot +live with the new XSUB staticness (see I above) +has been implemented with the C and +C preprocessor defines. + +The compiler warnings when -except option is used with F +have been fixed. + +The XSUB.h changes to make C use C +by default (which were in the 5.15.2 dev release of perl) +have been reverted since too many CPAN modules expect to +be able to refer to XSUBs declared with C. +Instead, C will define a copy of the +C/C macros as necessary going back to +perl 5.10.0. By default, ExtUtils::ParseXS will use +C instead of C. + +Fixed regression for input-typemap override in XS argument +list (CPAN RT #70448). + +C now properly strips trailing semicolons +from inputmaps. These could previously trigger warnings (errors +in strict C89 compilers) due to additional semicolons being +interpreted as empty statements. + +Now detects and throws a warning if there is a C section using +C, but no C section (CPAN RT #69536). + +=item * + +L has been upgraded from version 3.17 to version 3.18. + +The CIA world added non-standard values, so this is no longer used as a source +of data. + +=item * + +L has been upgraded from version 1.12 to version 1.13. + +On Windows, tilde (~) expansion now checks the C environment +variable, after checking C. + +See also L. + +=item * + +L has been upgrade from version 0.87 to 0.88. + +It is now better at detecting the end of a pod section. It always checks +for =cut, instead of checking for =end (if the pod begins with =begin) or +the end of the paragraph (if the pod begins with =for) [perl #92436]. + +It is also better at detecting variables. A method call on a variable is +no longer considered part of the variable name, so strings passed to a +method are now hidden from filters that do not want to deal with strings +[perl #92436]. + +=item * + +L has been upgraded from version 1.25_05 to 1.25_06, and L +from version 1.32 to 1.33. + +Together, these upgrades fix a problem with IO::Handle's C and +C methods. When these methods are called on the special ARGV +handle, the next file is automatically opened, as happens with the built-in +CE> and C functions. But, unlike the built-ins, these +methods were not respecting the caller's use of the L pragma and +applying the approprate I/O layers to the newly-opened file +[rt.cpan.org #66474]. + +=item * + +L has been upgraded from version 1.995 to version 1.997. + +=item * + +L has been upgraded from version 1.996 to version 1.997. + +=item * + +L has been upgraded from version 0.29 to 0.30. + +=item * + +L has been upgraded from version 0.2602 to version 0.2603. + +C on a Math::BigRat object containing -1/2 now creates a +Math::BigInt containing 0, rather than -0. L does not even +support negative zero, so the resulting object was actually malformed +[perl #95530]. + +=item * + +L has been upgraded from version 2.55 to 2.56. + +Updated module for 5.15.3, additionally it was missing a few entries: +L in 5.8.2, L in 5.6.0 and 5.6.1, and L +in 5.12.3. + +=item * + +L has been upgraded from version 1.000005_01 to version 1.000007. + +=item * + +L has been upgraded from version 0.44 to version 0.46. + +=item * + +L has been upgraded from version 1.11 to version 1.12. + +This is only a minor refactoring of the XS code to bring it closer to the +other C modules. + +=item * + +L has been upgraded from version 1.08 to 1.09. + +It no longer turns of layers on standard handles when invoked without the +":std" directive. Similarly, when invoked I the ":std" directive, it +now clears layers on STDERR before applying the new ones, and not just on +STDIN and STDOUT [perl #92728]. + +=item * + +L has been upgraded from version 5.01500302 to version 5.0150034. + +=item * + +L has been upgraded from version 3.15_06 to 3.15_07. + +When rendering a file specified as an HTTP URL, it now use a manpage name +based on the URL, instead of the name of the temporary file. + +=item * + +L has been upgraded from version 3.18 to version 3.19. + +=item * + +L has been upgraded from version 1.24 to version 1.25. + +L no longer uses L. Any code which was relying on this +implementation detail was buggy, and may fail as a result of this change. +The module's Perl code has been considerably simplified, roughly halving +the number of lines, with no change in functionality. The XS code has +been refactored to reduce the size of the shared object by about 12%, +with no change in functionality. More POSIX functions now have tests. + +C now defaults the third argument to C, +instead of 0. On most platforms C is defined as 0, but on some +0 is not a valid parameter, which caused a call with defaults to fail. + +=item * + +L has been upgraded from version 1.03 to 1.04. + +=item * + +L has been upgraded from version 2.31 to version 2.32. + +XS code which duplicates functionality of F has been removed. +Tests should now pass on older versions of L. Storable now +builds and passes tests back to perl 5.004. + +=item * + +L has been upgraded from version 1.01 to 1.02. + +=item * + +L has been upgraded from version 1.83 to 1.85. + +=item * + +L has been upgraded from version 1.38 to 1.40. + +Destructors on shared objects used to be ignored sometimes if the objects +were referenced only by shared data structures. This has been mostly +fixed, but destructors may still be ignored if the objects still exist at +global destruction time [perl #98204]. + +=item * + +L has been upgraded from version 0.34 to version 0.35. + +=item * + +L has been upgraded from version 1.08 to version 1.09. + +=item * + +L has been upgraded from version 0.15 to version 0.16. + +=back + +=head1 Documentation + +=head2 New Documentation + +=head3 L + +This a new OO tutorial. It focuses on basic OO concepts, and then recommends +that readers choose an OO framework from CPAN. + +=head2 Changes to Existing Documentation + +=head3 L + +=over 4 + +=item * + +This document has been rewritten from scratch, and its coverage of various OO +concepts has been expanded. + +=back + +=head3 L + +=over 4 + +=item * + +There is now a standard convention for naming keys in the C<%^H>, +documented under L. + +=back + +=head2 Removed Documentation + +=head3 Old OO Documentation + +All the old OO tutorials, perltoot, perltooc, and perlboot, have been +removed. The perlbot (bag of object tricks) document has been removed as well. + +=head3 Development Deltas + +The old perldelta files for development cycles prior to 5.15 have been +removed. + +=head1 Utility Changes + +=head3 L + +=over 4 + +=item * + +L used to generate code of the form + + unless(defined(&FOO)) { + sub FOO () {42;} + } + +But the subroutine is a compile-time declaration, and is hence unaffected +by the condition. It has now been corrected to emit a string C +around the subroutine [perl #99368]. + +=back + +=head1 Configuration and Compilation + +=over 4 + +=item * + +The file F is no longer needed, and has been removed. It +contained a list of all exported functions, one of the files generated by +F from data in F and F. The code +has been refactored so that the only user of F, F, +now reads F and F directly, removing the need to +store the list of exported functions in an intermediate file. + +As F was never installed, this change will not be visible +outside the build process. + +=back + +=head1 Testing + +=over 4 + +=item * + +F has been added, to run a sanity check on F. +F is not needed on most *nix platforms, but is for Win32, hence +previously was it was possible to inadvertently commit changes that worked +perfectly locally, but broke the build on Win32. + +=item * + +F has been added to test the C function. + +=item * + +Several tests were added in L. + +F added to test C<@EXPORT> and C<@EXPORT_OK>. +F added to see if C works. +F added to test the diagnostics for +unimplemented functions. F added to test the +diagnostics for usage messages. F added to +test the L wrapper subroutines. + +=item * + +F in L tests C +and hints. + +=item * + +F was added to see if SysV shared memory works. + +=item * + +F was added to test C<&foo()> calls for CORE subs. + +=back + +=head1 Platform Support + +=head2 Platform-Specific Notes + +=over 4 + +=item VMS + +Remove unnecessary includes, fix miscellaneous compiler warnings and +close some unclosed comments on F. + +Remove sockadapt layer from the VMS build. + +=back + +=head1 Internal Changes + +=over 4 + +=item * + +The C function has been eliminated and merged with +C. It used to be called to determine whether a GV +should be autovivified in rvalue context. Now it has been replaced with a +new C flag (not part of the API). + +=item * + +Padlists are now marked C; i.e., reference-counted. They have +always been reference-counted, but were not marked real, because F +did its own clean-up, instead of using the usual clean-up code in F. +That caused problems in thread cloning, so now the C flag is on, +but is turned off in F right before the padlist is freed (after +F has done its custom freeing of the pads). + +=item * + +All the C files that make up the Perl core have been converted to UTF-8. + +=back + +=head1 Selected Bug Fixes + +=over 4 + +=item * + +In Perl 5.15.0 C stopped returning true if the C<$$> +variable had not been used yet. This has been fixed. + +=item * + +C, C, etc., used to +return true for most, but not all built-in variables, if +they had not been used yet. Many times that new built-in +variables were added in past versions, this construct was +not taken into account, so this affected C<${^GLOBAL_PHASE}> and +C<${^UTF8CACHE}>, among others. It also used to return false if the +package name was given as well (C<${"::!"}>) and for subroutines in the +CORE package [perl #97978] [perl #97492] [perl #97484]. + +=item * + +Perl 5.10.0 introduced a similar bug: C where "foo" +represents the name of a built-in global variable used to return false if +the variable had never been used before, but only on the I call. +This, too, has been fixed. + +=item * + +Various functions that take a filehandle argument in rvalue context +(C, C, etc.) used to call C multiple times, if it +was a tied variable, and warn twice, if it was C [perl #97482]. + +=item * + +C and similar filehandle functions, when called on built-in global +variables (like C<$+>), used to die if the variable happened to hold the +undefined value, instead of producing the usual "Use of uninitialized +value" warning. + +=item * + +When autovivified file handles were introduced in Perl 5.6.0, C +was inadvertently made to autovivify when called as C (but +not as C$fooE>). It has now been fixed never to autovivify. + +=item * + +C used to call C multiple times, but +now calls it just once. + +=item * + +Some cases of dereferencing a complex expression, such as +C<${ (), $tied } = 1>, used to call C multiple times, but now call +it once. + +=item * + +For a tied variable returning a package name, C<$tied-Emethod> used to +call C multiple times (even up to six!), and sometimes would +fail to call the method, due to memory corruption. + +=item * + +Calling an undefined anonymous subroutine (e.g., what $x holds after +C) used to cause a "Not a CODE reference" error, which +has been corrected to "Undefined subroutine called" [perl #71154]. + +=item * + +Causing C<@DB::args> to be freed between uses of C no longer +results in a crash [perl #93320]. + +=item * + +Since 5.6.0, C<*{ ... }> has been inconsistent in how it treats undefined +values. It would die in strict mode or lvalue context for most undefined +values, but would be treated as the empty string (with a warning) for the +specific scalar return by C (C<&PL_sv_undef> internally). This +has been corrected. C is now treated like other undefined +scalars, as in Perl 5.005. + +=item * + +It used to be possible to free the typeglob of a localised array or hash +(e.g., C), resulting in a crash on scope exit. + +=item * + +C used to be equivalent to C<($foo, setpgrp)>, because +C was ignoring its argument if there was just one. Now it is +equivalent to C. + +=item * + +Assignments like C<*$tied = \&{"..."}> and C<*glob = $tied> now call FETCH +only once. + +=item * + +C, C, C, C, C, C, C and +the filetest ops (C<-r>, C<-x>, etc.) now always call FETCH if passed a tied +variable as the last argument. They used to ignore tiedness if the last +thing return from or assigned to the variable was a typeglob or reference +to a typeglob. + +=item * + +Perl 5.15.1 inadvertently stopped C<*foo =~ s/\*//r> from working, as it +would try to force the *foo glob into a string. This has been fixed +[perl #97954]. + +=item * + +If things were arranged in memory the right way, it was possible for +thread joining to emit "Attempt to free unreferenced scalar" warnings if +C had been used from the C package prior to thread creation, +due to the way pads were reference-counted and cloned [perl #98092]. + +=item * + +CORE:: subs were introduced in the previous development release, but +C did not return true. That has been rectified +[perl #97484]. + +=item * + +Lvalue subroutines were made to autovivify in 5.15.0, but it did not work +in some cases involving an intervening list operator between the +dereference operator and the subroutine call (C<${(), lvsub()}>) +[perl #98184]. + +=item * + +A bug has been fixed that occurs when a tied variable is used as a +subroutine reference: if the last thing assigned to or returned from the +variable was a reference or typeglob, the C<\&$tied> could either crash or +return the wrong subroutine. The reference case is a regression introduced +in Perl 5.10.0. For typeglobs, it has probably never worked till now. + +=item * + +C was not scoping its implicit $_ properly, resulting in memory +leaks or "Variable is not available" warnings [perl #94682]. + +=item * + +C<-l> followed by a bareword no longer "eats" the previous argument to +the list operator in whose argument list it resides. In less convoluted +English: C now actually prints "bar", because C<-l> +on longer eats it. + +=item * + +In 5.14.0, filetest ops (C<-r>, C<-x>, etc.) started calling FETCH on a +tied argument belonging to the previous argument to a list operator, if +called with a bareword argument or no argument at all. This has been +fixed, so C no longer calls FETCH on C<$tied>. + +=item * + +C was not setting the scalar flags correctly when reading from +shared memory, causing the existing cached numeric representation in the +scalar to persist [perl #98480]. + +=item * + +Weakening the first argument to an automatically-invoked C method +could result in erroneous "DESTROY created new reference" errors or +crashes. Now it is an error to weaken a read-only reference. + +=item * + +Under miniperl (used to configure modules when perl itself is built), +C now clears %ENV before calling csh, since the latter croaks on some +systems if it does not like the contents of the LS_COLORS enviroment +variable [perl #98662]. + +=item * + +C<++> and C<--> now work on copies of globs, instead of dying. + +=item * + +The subroutines in the CORE:: namespace that were introduced in the +previous development release run with the lexical hints (strict, warnings) +of the caller, just as though the built-in function had been called. But +this was not the case for C. The CORE sub would end up +running with the lexical hints of the subroutine it replaced, instead of +that subroutine's caller. This has been fixed. + +=item * + +Stacked C<-l> (followed immediately by other filetest operators) did not +work previously; now it does. It is only permitted when the rightmost +filetest op has the special "_" handle for its argument and the most +recent C/C call was an C. + +=item * + +In Perl 5.6, C<-l> followed by anything other than a bareword would treat +its argument as a file name. That was changed in 5.8 for glob references +(C<\*foo>), but not for globs themselves (C<*foo>). C<-l> started +returning C for glob references without setting the last +stat buffer that the "_" handle uses, but only if warnings +were turned on. With warnings off, it was the same as 5.6. +In other words, it was simply buggy and inconsistent. Now the 5.6 +behaviour has been restored. + +=back + +=head1 Known Problems + +=over 4 + +=item * + +We have a failing test in F on i386-netbsd 3.1 + +=item * + +On Solaris, we have two kinds of failure. + +If F is Sun's F, we get an error about a badly formed macro +assignment in the F. That happens when F<./Configure> tries to +make depends. F then exits 0, but further F-ing fails. + +If F is F, F completes, then we get errors related +to F + +=back + +=head1 Acknowledgements + +Perl 5.15.3 represents approximately 2 months of development since Perl 5.15.2 +and contains approximately 160,000 lines of changes across 700 files from 44 +authors. + +Perl continues to flourish into its third decade thanks to a vibrant community +of users and developers. The following people are known to have contributed the +improvements that became Perl 5.15.3: + +Abigail, Alexandr Ciornii, Aristotle Pagaltzis, Chas. Owens, Chip Salzenberg, +Chris 'BinGOs' Williams, Craig A. Berry, Damian Conway, Dave Rolsky, David +Mitchell, Dominic Hargreaves, Douglas Christopher Wilson, Eric Brine, Father +Chrysostomos, Florian Ragwitz, Frederic Briere, George Greer, Gerard Goossen, +H.Merijn Brand, Jerry D. Hedden, Jesse Vincent, Jim Cromie, Karl Williamson, +Keith Thompson, Leo Lapworth, Leon Timmermans, Lukas Mai, Mark Jason Dominus, +Matthew Horsfall, Moritz Lenz, Nicholas Clark, Peter John Acklam, Rafael +Garcia-Suarez, Ricardo Signes, Robin Barker, Shlomi Fish, Steffen Müller, +Stephen Bennett, Stevan Little, Steve Hay, Tony Cook, Vincent Pit, Walt +Mankowski, 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 file in the Perl source distribution. + +=head1 Reporting Bugs + +If you find what you think is a bug, you might check the articles +recently posted to the comp.lang.perl.misc newsgroup and the perl +bug database at http://rt.perl.org/perlbug/ . There may also be +information at http://www.perl.org/ , the Perl Home Page. + +If you believe you have an unreported bug, please run the L +program included with your release. Be sure to trim your bug down +to a tiny but sufficient test case. Your bug report, along with the +output of C, will be sent off to perlbug@perl.org to be +analysed by the Perl porting team. + +If the bug you are reporting has security implications, which make it +inappropriate to send to a publicly archived mailing list, then please send +it to perl5-security-report@perl.org. This points to a closed subscription +unarchived mailing list, which includes +all the core committers, who will be able +to help assess the impact of issues, figure out a resolution, and help +co-ordinate the release of patches to mitigate or fix the problem across all +platforms on which Perl is supported. Please only use this address for +security issues in the Perl core, not for modules independently +distributed on CPAN. + +=head1 SEE ALSO + +The F file for an explanation of how to view exhaustive details +on what changed. + +The F file for how to build Perl. + +The F file for general stuff. + +The F and F files for copyright information. + +=cut diff --git a/pod/perl570delta.pod b/pod/perl570delta.pod deleted file mode 100644 index dcc2f0f1889..00000000000 --- a/pod/perl570delta.pod +++ /dev/null @@ -1,899 +0,0 @@ -=head1 NAME - -perl570delta - what's new for perl v5.7.0 - -=head1 DESCRIPTION - -This document describes differences between the 5.6.0 release and -the 5.7.0 release. - -=head1 Security Vulnerability Closed - -A potential security vulnerability in the optional suidperl component -of Perl has been identified. suidperl is neither built nor installed -by default. As of September the 2nd, 2000, the only known vulnerable -platform is Linux, most likely all Linux distributions. CERT and -various vendors have been alerted about the vulnerability. - -The problem was caused by Perl trying to report a suspected security -exploit attempt using an external program, /bin/mail. On Linux -platforms the /bin/mail program had an undocumented feature which -when combined with suidperl gave access to a root shell, resulting in -a serious compromise instead of reporting the exploit attempt. If you -don't have /bin/mail, or if you have 'safe setuid scripts', or if -suidperl is not installed, you are safe. - -The exploit attempt reporting feature has been completely removed from -the Perl 5.7.0 release, so that particular vulnerability isn't there -anymore. However, further security vulnerabilities are, -unfortunately, always possible. The suidperl code is being reviewed -and if deemed too risky to continue to be supported, it may be -completely removed from future releases. In any case, suidperl should -only be used by security experts who know exactly what they are doing -and why they are using suidperl instead of some other solution such as -sudo ( see http://www.courtesan.com/sudo/ ). - -=head1 Incompatible Changes - -=over 4 - -=item * - -Arrays now always interpolate into double-quoted strings: -constructs like "foo@bar" now always assume C<@bar> is an array, -whether or not the compiler has seen use of C<@bar>. - -=item * - -The semantics of bless(REF, REF) were unclear and until someone proves -it to make some sense, it is forbidden. - -=item * - -A reference to a reference now stringify as "REF(0x81485ec)" instead -of "SCALAR(0x81485ec)" in order to be more consistent with the return -value of ref(). - -=item * - -The very dusty examples in the eg/ directory have been removed. -Suggestions for new shiny examples welcome but the main issue is that -the examples need to be documented, tested and (most importantly) -maintained. - -=item * - -The obsolete chat2 library that should never have been allowed -to escape the laboratory has been decommissioned. - -=item * - -The unimplemented POSIX regex features [[.cc.]] and [[=c=]] are still -recognised but now cause fatal errors. The previous behaviour of -ignoring them by default and warning if requested was unacceptable -since it, in a way, falsely promised that the features could be used. - -=item * - -The (bogus) escape sequences \8 and \9 now give an optional warning -("Unrecognized escape passed through"). There is no need to \-escape -any C<\w> character. - -=item * - -lstat(FILEHANDLE) now gives a warning because the operation makes no sense. -In future releases this may become a fatal error. - -=item * - -The long deprecated uppercase aliases for the string comparison -operators (EQ, NE, LT, LE, GE, GT) have now been removed. - -=item * - -The regular expression captured submatches ($1, $2, ...) are now -more consistently unset if the match fails, instead of leaving false -data lying around in them. - -=item * - -The tr///C and tr///U features have been removed and will not return; -the interface was a mistake. Sorry about that. For similar -functionality, see pack('U0', ...) and pack('C0', ...). - -=back - -=head1 Core Enhancements - -=over 4 - -=item * - -C now works (previously one couldn't pass -in multiple arguments.) - -=item * - -my __PACKAGE__ $obj now works. - -=item * - -C now works even if there is no "sub unimport" in the Module. - -=item * - -The numerical comparison operators return C if either operand -is a NaN. Previously the behaviour was unspecified. - -=item * - -C can now be used to force a string to UTF-8. - -=item * - -prototype(\&) is now available. - -=item * - -There is now an UNTIE method. - -=back - -=head1 Modules and Pragmata - -=head2 New Modules - -=over 4 - -=item * - -File::Temp allows one to create temporary files and directories in an -easy, portable, and secure way. - -=item * - -Storable gives persistence to Perl data structures by allowing the -storage and retrieval of Perl data to and from files in a fast and -compact binary format. - -=back - -=head2 Updated And Improved Modules and Pragmata - -=over 4 - -=item * - -The following independently supported modules have been updated to -newer versions from CPAN: CGI, CPAN, DB_File, File::Spec, Getopt::Long, -the podlators bundle, Pod::LaTeX, Pod::Parser, Term::ANSIColor, Test. - -=item * - -Bug fixes and minor enhancements have been applied to B::Deparse, -Data::Dumper, IO::Poll, IO::Socket::INET, Math::BigFloat, -Math::Complex, Math::Trig, Net::protoent, the re pragma, SelfLoader, -Sys::SysLog, Test::Harness, Text::Wrap, UNIVERSAL, and the warnings -pragma. - -=item * - -The attributes::reftype() now works on tied arguments. - -=item * - -AutoLoader can now be disabled with C, - -=item * - -The English module can now be used without the infamous performance -hit by saying - - use English '-no_performance_hit'; - -(Assuming, of course, that one doesn't need the troublesome variables -C<$`>, C<$&>, or C<$'>.) Also, introduced C<@LAST_MATCH_START> and -C<@LAST_MATCH_END> English aliases for C<@-> and C<@+>. - -=item * - -File::Find now has pre- and post-processing callbacks. It also -correctly changes directories when chasing symbolic links. Callbacks -(naughtily) exiting with "next;" instead of "return;" now work. - -=item * - -File::Glob::glob() renamed to File::Glob::bsd_glob() to avoid -prototype mismatch with CORE::glob(). - -=item * - -IPC::Open3 now allows the use of numeric file descriptors. - -=item * - -use lib now works identically to @INC. Removing directories -with 'no lib' now works. - -=item * - -C<%INC> now localised in a Safe compartment so that use/require work. - -=item * - -The Shell module now has an OO interface. - -=back - -=head1 Utility Changes - -=over 4 - -=item * - -The Emacs perl mode (emacs/cperl-mode.el) has been updated to version -4.31. - -=item * - -Perlbug is now much more robust. It also sends the bug report to -perl.org, not perl.com. - -=item * - -The perlcc utility has been rewritten and its user interface (that is, -command line) is much more like that of the Unix C compiler, cc. - -=item * - -The xsubpp utility for extension writers now understands POD -documentation embedded in the *.xs files. - -=back - -=head1 New Documentation - -=over 4 - -=item * - -perl56delta details the changes between the 5.005 release and the -5.6.0 release. - -=item * - -perldebtut is a Perl debugging tutorial. - -=item * - -perlebcdic contains considerations for running Perl on EBCDIC platforms. -Note that unfortunately EBCDIC platforms that used to supported back in -Perl 5.005 are still unsupported by Perl 5.7.0; the plan, however, is to -bring them back to the fold. - -=item * - -perlnewmod tells about writing and submitting a new module. - -=item * - -perlposix-bc explains using Perl on the POSIX-BC platform -(an EBCDIC mainframe platform). - -=item * - -perlretut is a regular expression tutorial. - -=item * - -perlrequick is a regular expressions quick-start guide. -Yes, much quicker than perlretut. - -=item * - -perlutil explains the command line utilities packaged with the Perl -distribution. - -=back - -=head1 Performance Enhancements - -=over 4 - -=item * - -map() that changes the size of the list should now work faster. - -=item * - -sort() has been changed to use mergesort internally as opposed to the -earlier quicksort. For very small lists this may result in slightly -slower sorting times, but in general the speedup should be at least -20%. Additional bonuses are that the worst case behaviour of sort() -is now better (in computer science terms it now runs in time O(N log N), -as opposed to quicksort's Theta(N**2) worst-case run time behaviour), -and that sort() is now stable (meaning that elements with identical -keys will stay ordered as they were before the sort). - -=back - -=head1 Installation and Configuration Improvements - -=head2 Generic Improvements - -=over 4 - -=item * - -INSTALL now explains how you can configure Perl to use 64-bit -integers even on non-64-bit platforms. - -=item * - -Policy.sh policy change: if you are reusing a Policy.sh file -(see INSTALL) and you use Configure -Dprefix=/foo/bar and in the old -Policy $prefix eq $siteprefix and $prefix eq $vendorprefix, all of -them will now be changed to the new prefix, /foo/bar. (Previously -only $prefix changed.) If you do not like this new behaviour, -specify prefix, siteprefix, and vendorprefix explicitly. - -=item * - -A new optional location for Perl libraries, otherlibdirs, is available. -It can be used for example for vendor add-ons without disturbing Perl's -own library directories. - -=item * - -In many platforms the vendor-supplied 'cc' is too stripped-down to -build Perl (basically, 'cc' doesn't do ANSI C). If this seems -to be the case and 'cc' does not seem to be the GNU C compiler -'gcc', an automatic attempt is made to find and use 'gcc' instead. - -=item * - -gcc needs to closely track the operating system release to avoid -build problems. If Configure finds that gcc was built for a different -operating system release than is running, it now gives a clearly visible -warning that there may be trouble ahead. - -=item * - -If binary compatibility with the 5.005 release is not wanted, Configure -no longer suggests including the 5.005 modules in @INC. - -=item * - -Configure C<-S> can now run non-interactively. - -=item * - -configure.gnu now works with options with whitespace in them. - -=item * - -installperl now outputs everything to STDERR. - -=item * - -$Config{byteorder} is now computed dynamically (this is more robust -with "fat binaries" where an executable image contains binaries for -more than one binary platform.) - -=back - -=head1 Selected Bug Fixes - -=over 4 - -=item * - -Several debugger fixes: exit code now reflects the script exit code, -condition C<"0"> now treated correctly, the C command now checks -line number, the C<$.> no longer gets corrupted, all debugger output now -goes correctly to the socket if RemotePort is set. - -=item * - -C<*foo{FORMAT}> now works. - -=item * - -Lexical warnings now propagating correctly between scopes. - -=item * - -Line renumbering with eval and C<#line> now works. - -=item * - -Fixed numerous memory leaks, especially in eval "". - -=item * - -Modulus of unsigned numbers now works (4063328477 % 65535 used to -return 27406, instead of 27047). - -=item * - -Some "not a number" warnings introduced in 5.6.0 eliminated to be -more compatible with 5.005. Infinity is now recognised as a number. - -=item * - -our() variables will not cause "will not stay shared" warnings. - -=item * - -pack "Z" now correctly terminates the string with "\0". - -=item * - -Fix password routines which in some shadow password platforms -(e.g. HP-UX) caused getpwent() to return every other entry. - -=item * - -printf() no longer resets the numeric locale to "C". - -=item * - -C now parses correctly as C<'a\\b'>. - -=item * - -Printing quads (64-bit integers) with printf/sprintf now works -without the q L ll prefixes (assuming you are on a quad-capable platform). - -=item * - -Regular expressions on references and overloaded scalars now work. - -=item * - -scalar() now forces scalar context even when used in void context. - -=item * - -sort() arguments are now compiled in the right wantarray context -(they were accidentally using the context of the sort() itself). - -=item * - -Changed the POSIX character class C<[[:space:]]> to include the (very -rare) vertical tab character. Added a new POSIX-ish character class -C<[[:blank:]]> which stands for horizontal whitespace (currently, -the space and the tab). - -=item * - -$AUTOLOAD, sort(), lock(), and spawning subprocesses -in multiple threads simultaneously are now thread-safe. - -=item * - -Allow read-only string on left hand side of non-modifying tr///. - -=item * - -Several Unicode fixes (but still not perfect). - -=over 8 - -=item * - -BOMs (byte order marks) in the beginning of Perl files -(scripts, modules) should now be transparently skipped. -UTF-16 (UCS-2) encoded Perl files should now be read correctly. - -=item * - -The character tables have been updated to Unicode 3.0.1. - -=item * - -chr() for values greater than 127 now create utf8 when under use -utf8. - -=item * - -Comparing with utf8 data does not magically upgrade non-utf8 data into -utf8. - -=item * - -C, C, and C now match titlecase. - -=item * - -Concatenation with the C<.> operator or via variable interpolation, -C, C, C, C, the C operator, -substitution with C, single-quoted UTF-8, should now work--in -theory. - -=item * - -The C operator now works I better but is still rather -broken. Note that the C functionality has been removed (but -see pack('U0', ...)). - -=item * - -vec() now refuses to deal with characters >255. - -=item * - -Zero entries were missing from the Unicode classes like C. - -=back - -=item * - -UNIVERSAL::isa no longer caches methods incorrectly. (This broke -the Tk extension with 5.6.0.) - -=back - -=head2 Platform Specific Changes and Fixes - -=over 4 - -=item * - -BSDI 4.* - -Perl now works on post-4.0 BSD/OSes. - -=item * - -All BSDs - -Setting C<$0> now works (as much as possible; see perlvar for details). - -=item * - -Cygwin - -Numerous updates; currently synchronised with Cygwin 1.1.4. - -=item * - -EPOC - -EPOC update after Perl 5.6.0. See README.epoc. - -=item * - -FreeBSD 3.* - -Perl now works on post-3.0 FreeBSDs. - -=item * - -HP-UX - -README.hpux updated; C now almost works. - -=item * - -IRIX - -Numerous compilation flag and hint enhancements; accidental mixing -of 32-bit and 64-bit libraries (a doomed attempt) made much harder. - -=item * - -Linux - -Long doubles should now work (see INSTALL). - -=item * - -Mac OS Classic - -Compilation of the standard Perl distribution in Mac OS Classic should -now work if you have the Metrowerks development environment and the -missing Mac-specific toolkit bits. Contact the macperl mailing list -for details. - -=item * - -MPE/iX - -MPE/iX update after Perl 5.6.0. See README.mpeix. - -=item * - -NetBSD/sparc - -Perl now works on NetBSD/sparc. - -=item * - -OS/2 - -Now works with usethreads (see INSTALL). - -=item * - -Solaris - -64-bitness using the Sun Workshop compiler now works. - -=item * - -Tru64 (aka Digital UNIX, aka DEC OSF/1) - -The operating system version letter now recorded in $Config{osvers}. -Allow compiling with gcc (previously explicitly forbidden). Compiling -with gcc still not recommended because buggy code results, even with -gcc 2.95.2. - -=item * - -Unicos - -Fixed various alignment problems that lead into core dumps either -during build or later; no longer dies on math errors at runtime; -now using full quad integers (64 bits), previously was using -only 46 bit integers for speed. - -=item * - -VMS - -chdir() now works better despite a CRT bug; now works with MULTIPLICITY -(see INSTALL); now works with Perl's malloc. - -=item * - -Windows - -=over 8 - -=item * - -accept() no longer leaks memory. - -=item * - -Better chdir() return value for a non-existent directory. - -=item * - -New %ENV entries now propagate to subprocesses. - -=item * - -$ENV{LIB} now used to search for libs under Visual C. - -=item * - -A failed (pseudo)fork now returns undef and sets errno to EAGAIN. - -=item * - -Allow REG_EXPAND_SZ keys in the registry. - -=item * - -Can now send() from all threads, not just the first one. - -=item * - -Fake signal handling reenabled, bugs and all. - -=item * - -Less stack reserved per thread so that more threads can run -concurrently. (Still 16M per thread.) - -=item * - -C<< File::Spec->tmpdir() >> now prefers C:/temp over /tmp -(works better when perl is running as service). - -=item * - -Better UNC path handling under ithreads. - -=item * - -wait() and waitpid() now work much better. - -=item * - -winsock handle leak fixed. - -=back - -=back - -=head1 New or Changed Diagnostics - -All regular expression compilation error messages are now hopefully -easier to understand both because the error message now comes before -the failed regex and because the point of failure is now clearly -marked. - -The various "opened only for", "on closed", "never opened" warnings -drop the C prefix for filehandles in the C
package, -for example C instead of . - -The "Unrecognized escape" warning has been extended to include C<\8>, -C<\9>, and C<\_>. There is no need to escape any of the C<\w> characters. - -=head1 Changed Internals - -=over 4 - -=item * - -perlapi.pod (a companion to perlguts) now attempts to document the -internal API. - -=item * - -You can now build a really minimal perl called microperl. -Building microperl does not require even running Configure; -C should be enough. Beware: microperl makes -many assumptions, some of which may be too bold; the resulting -executable may crash or otherwise misbehave in wondrous ways. -For careful hackers only. - -=item * - -Added rsignal(), whichsig(), do_join() to the publicised API. - -=item * - -Made possible to propagate customised exceptions via croak()ing. - -=item * - -Added is_utf8_char(), is_utf8_string(), bytes_to_utf8(), and utf8_to_bytes(). - -=item * - -Now xsubs can have attributes just like subs. - -=back - -=head1 Known Problems - -=head2 Unicode Support Still Far From Perfect - -We're working on it. Stay tuned. - -=head2 EBCDIC Still A Lost Platform - -The plan is to bring them back. - -=head2 Building Extensions Can Fail Because Of Largefiles - -Certain extensions like mod_perl and BSD::Resource are known to have -issues with `largefiles', a change brought by Perl 5.6.0 in which file -offsets default to 64 bits wide, where supported. Modules may fail to -compile at all or compile and work incorrectly. Currently there is no -good solution for the problem, but Configure now provides appropriate -non-largefile ccflags, ldflags, libswanted, and libs in the %Config -hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are -having problems can try configuring themselves without the -largefileness. This is admittedly not a clean solution, and the -solution may not even work at all. One potential failure is whether -one can (or, if one can, whether it's a good idea) link together at -all binaries with different ideas about file offsets, all this is -platform-dependent. - -=head2 ftmp-security tests warn 'system possibly insecure' - -Don't panic. Read INSTALL 'make test' section instead. - -=head2 Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX - -If perl is configured with -Duse64bitall, the successful result of the -subtest 10 of lib/posix may arrive before the successful result of the -subtest 9, which confuses the test harness so much that it thinks the -subtest 9 failed. - -=head2 Long Doubles Still Don't Work In Solaris - -The experimental long double support is still very much so in Solaris. -(Other platforms like Linux and Tru64 are beginning to solidify in -this area.) - -=head2 Linux With Sfio Fails op/misc Test 48 - -No known fix. - -=head2 Storable tests fail in some platforms - -If any Storable tests fail the use of Storable is not advisable. - -=over 4 - -=item * - -Many Storable tests fail on AIX configured with 64 bit integers. - -So far unidentified problems break Storable in AIX if Perl is -configured to use 64 bit integers. AIX in 32-bit mode works and -other 64-bit platforms work with Storable. - -=item * - -DOS DJGPP may hang when testing Storable. - -=item * - -st-06compat fails in UNICOS and UNICOS/mk. - -This means that you cannot read old (pre-Storable-0.7) Storable images -made in other platforms. - -=item * - -st-store.t and st-retrieve may fail with Compaq C 6.2 on OpenVMS Alpha 7.2. - -=back - -=head2 Threads Are Still Experimental - -Multithreading is still an experimental feature. Some platforms -emit the following message for lib/thr5005 - - # - # This is a KNOWN FAILURE, and one of the reasons why threading - # is still an experimental feature. It is here to stop people - # from deploying threads in production. ;-) - # - -and another known thread-related warning is - - pragma/overload......Unbalanced saves: 3 more saves than restores - panic: magic_mutexfree during global destruction. - ok - lib/selfloader.......Unbalanced saves: 3 more saves than restores - panic: magic_mutexfree during global destruction. - ok - lib/st-dclone........Unbalanced saves: 3 more saves than restores - panic: magic_mutexfree during global destruction. - ok - -=head2 The Compiler Suite Is Still Experimental - -The compiler suite is slowly getting better but is nowhere near -working order yet. The backend part that has seen perhaps the most -progress is the bytecode compiler. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://bugs.perl.org/ There may also be -information at http://www.perl.com/perl/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -=head1 SEE ALSO - -The F file for exhaustive details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=head1 HISTORY - -Written by Jarkko Hietaniemi >, with many contributions -from The Perl Porters and Perl Users submitting feedback and patches. - -Send omissions or corrections to >. - -=cut diff --git a/pod/perl571delta.pod b/pod/perl571delta.pod deleted file mode 100644 index aa0945d001e..00000000000 --- a/pod/perl571delta.pod +++ /dev/null @@ -1,1075 +0,0 @@ -=head1 NAME - -perl571delta - what's new for perl v5.7.1 - -=head1 DESCRIPTION - -This document describes differences between the 5.7.0 release and the -5.7.1 release. - -(To view the differences between the 5.6.0 release and the 5.7.0 -release, see L.) - -=head1 Security Vulnerability Closed - -(This change was already made in 5.7.0 but bears repeating here.) - -A potential security vulnerability in the optional suidperl component -of Perl was identified in August 2000. suidperl is neither built nor -installed by default. As of April 2001 the only known vulnerable -platform is Linux, most likely all Linux distributions. CERT and -various vendors and distributors have been alerted about the vulnerability. -See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt -for more information. - -The problem was caused by Perl trying to report a suspected security -exploit attempt using an external program, /bin/mail. On Linux -platforms the /bin/mail program had an undocumented feature which -when combined with suidperl gave access to a root shell, resulting in -a serious compromise instead of reporting the exploit attempt. If you -don't have /bin/mail, or if you have 'safe setuid scripts', or if -suidperl is not installed, you are safe. - -The exploit attempt reporting feature has been completely removed from -all the Perl 5.7 releases (and will be gone also from the maintenance -release 5.6.1), so that particular vulnerability isn't there anymore. -However, further security vulnerabilities are, unfortunately, always -possible. The suidperl code is being reviewed and if deemed too risky -to continue to be supported, it may be completely removed from future -releases. In any case, suidperl should only be used by security -experts who know exactly what they are doing and why they are using -suidperl instead of some other solution such as sudo -( see http://www.courtesan.com/sudo/ ). - -=head1 Incompatible Changes - -=over 4 - -=item * - -Although "you shouldn't do that", it was possible to write code that -depends on Perl's hashed key order (Data::Dumper does this). The new -algorithm "One-at-a-Time" produces a different hashed key order. -More details are in L. - -=item * - -The list of filenames from glob() (or <...>) is now by default sorted -alphabetically to be csh-compliant. (bsd_glob() does still sort platform -natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.) - -=back - -=head1 Core Enhancements - -=head2 AUTOLOAD Is Now Lvaluable - -AUTOLOAD is now lvaluable, meaning that you can add the :lvalue attribute -to AUTOLOAD subroutines and you can assign to the AUTOLOAD return value. - -=head2 PerlIO is Now The Default - -=over 4 - -=item * - -IO is now by default done via PerlIO rather than system's "stdio". -PerlIO allows "layers" to be "pushed" onto a file handle to alter the -handle's behaviour. Layers can be specified at open time via 3-arg -form of open: - - open($fh,'>:crlf :utf8', $path) || ... - -or on already opened handles via extended C: - - binmode($fh,':encoding(iso-8859-7)'); - -The built-in layers are: unix (low level read/write), stdio (as in -previous Perls), perlio (re-implementation of stdio buffering in a -portable manner), crlf (does CRLF <=> "\n" translation as on Win32, -but available on any platform). A mmap layer may be available if -platform supports it (mostly Unixes). - -Layers to be applied by default may be specified via the 'open' pragma. - -See L for the effects -of PerlIO on your architecture name. - -=item * - -File handles can be marked as accepting Perl's internal encoding of Unicode -(UTF-8 or UTF-EBCDIC depending on platform) by a pseudo layer ":utf8" : - - open($fh,">:utf8","Uni.txt"); - -Note for EBCDIC users: the pseudo layer ":utf8" is erroneously named -for you since it's not UTF-8 what you will be getting but instead -UTF-EBCDIC. See L, L, and -http://www.unicode.org/unicode/reports/tr16/ for more information. -In future releases this naming may change. - -=item * - -File handles can translate character encodings from/to Perl's internal -Unicode form on read/write via the ":encoding()" layer. - -=item * - -File handles can be opened to "in memory" files held in Perl scalars via: - - open($fh,'>', \$variable) || ... - -=item * - -Anonymous temporary files are available without need to -'use FileHandle' or other module via - - open($fh,"+>", undef) || ... - -That is a literal undef, not an undefined value. - -=item * - -The list form of C is now implemented for pipes (at least on Unix): - - open($fh,"-|", 'cat', '/etc/motd') - -creates a pipe, and runs the equivalent of exec('cat', '/etc/motd') in -the child process. - -=item * - -The following builtin functions are now overridable: chop(), chomp(), -each(), keys(), pop(), push(), shift(), splice(), unshift(). - -=item * - -Formats now support zero-padded decimal fields. - -=item * - -Perl now tries internally to use integer values in numeric conversions -and basic arithmetics (+ - * /) if the arguments are integers, and -tries also to keep the results stored internally as integers. -This change leads into often slightly faster and always less lossy -arithmetics. (Previously Perl always preferred floating point numbers -in its math.) - -=item * - -The printf() and sprintf() now support parameter reordering using the -C<%\d+\$> and C<*\d+\$> syntaxes. For example - - print "%2\$s %1\$s\n", "foo", "bar"; - -will print "bar foo\n"; This feature helps in writing -internationalised software. - -=item * - -Unicode in general should be now much more usable. Unicode can be -used in hash keys, Unicode in regular expressions should work now, -Unicode in tr/// should work now (though tr/// seems to be a -particularly tricky to get right, so you have been warned) - -=item * - -The Unicode Character Database coming with Perl has been upgraded -to Unicode 3.1. For more information, see http://www.unicode.org/ , -and http://www.unicode.org/unicode/reports/tr27/ - -For developers interested in enhancing Perl's Unicode capabilities: -almost all the UCD files are included with the Perl distribution in -the lib/unicode subdirectory. The most notable omission, for space -considerations, is the Unihan database. - -=item * - -The Unicode character classes \p{Blank} and \p{SpacePerl} have been -added. "Blank" is like C isblank(), that is, it contains only -"horizontal whitespace" (the space character is, the newline isn't), -and the "SpacePerl" is the Unicode equivalent of C<\s> (\p{Space} -isn't, since that includes the vertical tabulator character, whereas -C<\s> doesn't.) - -=back - -=head2 Signals Are Now Safe - -Perl used to be fragile in that signals arriving at inopportune moments -could corrupt Perl's internal state. - -=head1 Modules and Pragmata - -=head2 New Modules - -=over 4 - -=item * - -B::Concise, by Stephen McCamant, is a new compiler backend for -walking the Perl syntax tree, printing concise info about ops. -The output is highly customisable. - -See L for more information. - -=item * - -Class::ISA, by Sean Burke, for reporting the search path for a -class's ISA tree, has been added. - -See L for more information. - -=item * - -Cwd has now a split personality: if possible, an extension is used, -(this will hopefully be both faster and more secure and robust) but -if not possible, the familiar Perl library implementation is used. - -=item * - -Digest, a frontend module for calculating digests (checksums), -from Gisle Aas, has been added. - -See L for more information. - -=item * - -Digest::MD5 for calculating MD5 digests (checksums), by Gisle Aas, -has been added. - - use Digest::MD5 'md5_hex'; - - $digest = md5_hex("Thirsty Camel"); - - print $digest, "\n"; # 01d19d9d2045e005c3f1b80e8b164de1 - -NOTE: the MD5 backward compatibility module is deliberately not -included since its use is discouraged. - -See L for more information. - -=item * - -Encode, by Nick Ing-Simmons, provides a mechanism to translate -between different character encodings. Support for Unicode, -ISO-8859-*, ASCII, CP*, KOI8-R, and three variants of EBCDIC are -compiled in to the module. Several other encodings (like Japanese, -Chinese, and MacIntosh encodings) are included and will be loaded at -runtime. - -Any encoding supported by Encode module is also available to the -":encoding()" layer if PerlIO is used. - -See L for more information. - -=item * - -Filter::Simple is an easy-to-use frontend to Filter::Util::Call, -from Damian Conway. - - # in MyFilter.pm: - - package MyFilter; - - use Filter::Simple sub { - while (my ($from, $to) = splice @_, 0, 2) { - s/$from/$to/g; - } - }; - - 1; - - # in user's code: - - use MyFilter qr/red/ => 'green'; - - print "red\n"; # this code is filtered, will print "green\n" - print "bored\n"; # this code is filtered, will print "bogreen\n" - - no MyFilter; - - print "red\n"; # this code is not filtered, will print "red\n" - -See L for more information. - -=item * - -Filter::Util::Call, by Paul Marquess, provides you with the -framework to write I in Perl. For most uses -the frontend Filter::Simple is to be preferred. -See L for more information. - -=item * - -Locale::Constants, Locale::Country, Locale::Currency, and Locale::Language, -from Neil Bowers, have been added. They provide the codes for various -locale standards, such as "fr" for France, "usd" for US Dollar, and -"jp" for Japanese. - - use Locale::Country; - - $country = code2country('jp'); # $country gets 'Japan' - $code = country2code('Norway'); # $code gets 'no' - -See L, L, L, -and L for more information. - -=item * - -MIME::Base64, by Gisle Aas, allows you to encode data in base64. - - use MIME::Base64; - - $encoded = encode_base64('Aladdin:open sesame'); - $decoded = decode_base64($encoded); - - print $encoded, "\n"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ==" - -See L for more information. - -=item * - -MIME::QuotedPrint, by Gisle Aas, allows you to encode data in -quoted-printable encoding. - - use MIME::QuotedPrint; - - $encoded = encode_qp("Smiley in Unicode: \x{263a}"); - $decoded = decode_qp($encoded); - - print $encoded, "\n"; # "Smiley in Unicode: =263A" - -MIME::QuotedPrint has been enhanced to provide the basic methods -necessary to use it with PerlIO::Via as in : - - use MIME::QuotedPrint; - open($fh,">Via(MIME::QuotedPrint)",$path) - -See L for more information. - -=item * - -PerlIO::scalar, by Nick Ing-Simmons, provides the implementation of -IO to "in memory" Perl scalars as discussed above. It also serves as -an example of a loadable layer. Other future possibilities include -PerlIO::array and PerlIO::code. See L for more -information. - -=item * - -PerlIO::Via, by Nick Ing-Simmons, acts as a PerlIO layer and wraps -PerlIO layer functionality provided by a class (typically implemented -in perl code). - - use MIME::QuotedPrint; - open($fh,">Via(MIME::QuotedPrint)",$path) - -This will automatically convert everything output to C<$fh> -to Quoted-Printable. See L for more information. - -=item * - -Pod::Text::Overstrike, by Joe Smith, has been added. -It converts POD data to formatted overstrike text. -See L for more information. - -=item * - -Switch from Damian Conway has been added. Just by saying - - use Switch; - -you have C and C available in Perl. - - use Switch; - - switch ($val) { - - case 1 { print "number 1" } - case "a" { print "string a" } - case [1..10,42] { print "number in list" } - case (@array) { print "number in list" } - case /\w+/ { print "pattern" } - case qr/\w+/ { print "pattern" } - case (%hash) { print "entry in hash" } - case (\%hash) { print "entry in hash" } - case (\&sub) { print "arg to subroutine" } - else { print "previous case not true" } - } - -See L for more information. - -=item * - -Text::Balanced from Damian Conway has been added, for -extracting delimited text sequences from strings. - - use Text::Balanced 'extract_delimited'; - - ($a, $b) = extract_delimited("'never say never', he never said", "'", ''); - -$a will be "'never say never'", $b will be ', he never said'. - -In addition to extract_delimited() there are also extract_bracketed(), -extract_quotelike(), extract_codeblock(), extract_variable(), -extract_tagged(), extract_multiple(), gen_delimited_pat(), and -gen_extract_tagged(). With these you can implement rather advanced -parsing algorithms. See L for more information. - -=item * - -Tie::RefHash::Nestable, by Edward Avis, allows storing hash references -(unlike the standard Tie::RefHash) The module is contained within -Tie::RefHash. - -=item * - -XS::Typemap, by Tim Jenness, is a test extension that exercises XS -typemaps. Nothing gets installed but for extension writers the code -is worth studying. - -=back - -=head2 Updated And Improved Modules and Pragmata - -=over 4 - -=item * - -B::Deparse should be now more robust. It still far from providing a full -round trip for any random piece of Perl code, though, and is under active -development: expect more robustness in 5.7.2. - -=item * - -Class::Struct can now define the classes in compile time. - -=item * - -Math::BigFloat has undergone much fixing, and in addition the fmod() -function now supports modulus operations. - -( The fixed Math::BigFloat module is also available in CPAN for those -who can't upgrade their Perl: http://www.cpan.org/authors/id/J/JP/JPEACOCK/ ) - -=item * - -Devel::Peek now has an interface for the Perl memory statistics -(this works only if you are using perl's malloc, and if you have -compiled with debugging). - -=item * - -IO::Socket has now atmark() method, which returns true if the socket -is positioned at the out-of-band mark. The method is also exportable -as a sockatmark() function. - -=item * - -IO::Socket::INET has support for ReusePort option (if your platform -supports it). The Reuse option now has an alias, ReuseAddr. For clarity -you may want to prefer ReuseAddr. - -=item * - -Net::Ping has been enhanced. There is now "external" protocol which -uses Net::Ping::External module which runs external ping(1) and parses -the output. An alpha version of Net::Ping::External is available in -CPAN and in 5.7.2 the Net::Ping::External may be integrated to Perl. - -=item * - -The C pragma allows layers other than ":raw" and ":crlf" when -using PerlIO. - -=item * - -POSIX::sigaction() is now much more flexible and robust. -You can now install coderef handlers, 'DEFAULT', and 'IGNORE' -handlers, installing new handlers was not atomic. - -=item * - -The Test module has been significantly enhanced. Its use is -greatly recommended for module writers. - -=item * - -The utf8:: name space (as in the pragma) provides various -Perl-callable functions to provide low level access to Perl's -internal Unicode representation. At the moment only length() -has been implemented. - -=back - -The following modules have been upgraded from the versions at CPAN: -CPAN, CGI, DB_File, File::Temp, Getopt::Long, Pod::Man, Pod::Text, -Storable, Text-Tabs+Wrap. - -=head1 Performance Enhancements - -=over 4 - -=item * - -Hashes now use Bob Jenkins "One-at-a-Time" hashing key algorithm -( http://burtleburtle.net/bob/hash/doobs.html ). This algorithm is -reasonably fast while producing a much better spread of values than -the old hashing algorithm (originally by Chris Torek, later tweaked by -Ilya Zakharevich). Hash values output from the algorithm on a hash of -all 3-char printable ASCII keys comes much closer to passing the -DIEHARD random number generation tests. According to perlbench, this -change has not affected the overall speed of Perl. - -=item * - -unshift() should now be noticeably faster. - -=back - -=head1 Utility Changes - -=over 4 - -=item * - -h2xs now produces template README. - -=item * - -s2p has been completely rewritten in Perl. (It is in fact a full -implementation of sed in Perl.) - -=item * - -xsubpp now supports OUT keyword. - -=back - -=head1 New Documentation - -=head2 perlclib - -Internal replacements for standard C library functions. -(Interesting only for extension writers and Perl core hackers.) - -=head2 perliol - -Internals of PerlIO with layers. - -=head2 README.aix - -Documentation on compiling Perl on AIX has been added. AIX has -several different C compilers and getting the right patch level -is essential. On install README.aix will be installed as L. - -=head2 README.bs2000 - -Documentation on compiling Perl on the POSIX-BC platform (an EBCDIC -mainframe environment) has been added. - -This was formerly known as README.posix-bc but the name was considered -to be too confusing (it has nothing to do with the POSIX module or the -POSIX standard). On install README.bs2000 will be installed as L. - -=head2 README.macos - -In perl 5.7.1 (and in the 5.6.1) the MacPerl sources have been -synchronised with the standard Perl sources. To compile MacPerl -some additional steps are required, and this file documents those -steps. On install README.macos will be installed as L. - -=head2 README.mpeix - -The README.mpeix has been podified, which means that this information -about compiling and using Perl on the MPE/iX miniframe platform will -be installed as L. - -=head2 README.solaris - -README.solaris has been created and Solaris wisdom from elsewhere -in the Perl documentation has been collected there. On install -README.solaris will be installed as L. - -=head2 README.vos - -The README.vos has been podified, which means that this information -about compiling and using Perl on the Stratus VOS miniframe platform -will be installed as L. - -=head2 Porting/repository.pod - -Documentation on how to use the Perl source repository has been added. - -=head1 Installation and Configuration Improvements - -=over 4 - -=item * - -Because PerlIO is now the default on most platforms, "-perlio" doesn't -get appended to the $Config{archname} (also known as $^O) anymore. -Instead, if you explicitly choose not to use perlio (Configure command -line option -Uuseperlio), you will get "-stdio" appended. - -=item * - -Another change related to the architecture name is that "-64all" -(-Duse64bitall, or "maximally 64-bit") is appended only if your -pointers are 64 bits wide. (To be exact, the use64bitall is ignored.) - -=item * - -APPLLIB_EXP, a less-know configuration-time definition, has been -documented. It can be used to prepend site-specific directories -to Perl's default search path (@INC), see INSTALL for information. - -=item * - -Building Berkeley DB3 for compatibility modes for DB, NDBM, and ODBM -has been documented in INSTALL. - -=item * - -If you are on IRIX or Tru64 platforms, new profiling/debugging options -have been added, see L for more information about pixie and -Third Degree. - -=back - -=head2 New Or Improved Platforms - -For the list of platforms known to support Perl, -see L. - -=over 4 - -=item * - -AIX dynamic loading should be now better supported. - -=item * - -After a long pause, AmigaOS has been verified to be happy with Perl. - -=item * - -EBCDIC platforms (z/OS, also known as OS/390, POSIX-BC, and VM/ESA) -have been regained. Many test suite tests still fail and the -co-existence of Unicode and EBCDIC isn't quite settled, but the -situation is much better than with Perl 5.6. See L, -L (for POSIX-BC), and L for more information. - -=item * - -Building perl with -Duseithreads or -Duse5005threads now works under -HP-UX 10.20 (previously it only worked under 10.30 or later). You will -need a thread library package installed. See README.hpux. - -=item * - -Mac OS Classic (MacPerl has of course been available since -perl 5.004 but now the source code bases of standard Perl -and MacPerl have been synchronised) - -=item * - -NCR MP-RAS is now supported. - -=item * - -NonStop-UX is now supported. - -=item * - -Amdahl UTS is now supported. - -=item * - -z/OS (formerly known as OS/390, formerly known as MVS OE) has now -support for dynamic loading. This is not selected by default, -however, you must specify -Dusedl in the arguments of Configure. - -=back - -=head2 Generic Improvements - -=over 4 - -=item * - -Configure no longer includes the DBM libraries (dbm, gdbm, db, ndbm) -when building the Perl binary. The only exception to this is SunOS 4.x, -which needs them. - -=item * - -Some new Configure symbols, useful for extension writers: - -=over 8 - -=item d_cmsghdr - -For struct cmsghdr. - -=item d_fcntl_can_lock - -Whether fcntl() can be used for file locking. - -=item d_fsync - -=item d_getitimer - -=item d_getpagsz - -For getpagesize(), though you should prefer POSIX::sysconf(_SC_PAGE_SIZE)) - -=item d_msghdr_s - -For struct msghdr. - -=item need_va_copy - -Whether one needs to use Perl_va_copy() to copy varargs. - -=item d_readv - -=item d_recvmsg - -=item d_sendmsg - -=item sig_size - -The number of elements in an array needed to hold all the available signals. - -=item d_sockatmark - -=item d_strtoq - -=item d_u32align - -Whether one needs to access character data aligned by U32 sized pointers. - -=item d_ualarm - -=item d_usleep - -=back - -=item * - -Removed Configure symbols: the PDP-11 memory model settings: huge, -large, medium, models. - -=item * - -SOCKS support is now much more robust. - -=item * - -If your file system supports symbolic links you can build Perl outside -of the source directory by - - mkdir perl/build/directory - cd perl/build/directory - sh /path/to/perl/source/Configure -Dmksymlinks ... - -This will create in perl/build/directory a tree of symbolic links -pointing to files in /path/to/perl/source. The original files are left -unaffected. After Configure has finished you can just say - - make all test - -and Perl will be built and tested, all in perl/build/directory. - -=back - -=head1 Selected Bug Fixes - -Numerous memory leaks and uninitialized memory accesses have been hunted down. -Most importantly anonymous subs used to leak quite a bit. - -=over 4 - -=item * - -chop(@list) in list context returned the characters chopped in -reverse order. This has been reversed to be in the right order. - -=item * - -The order of DESTROYs has been made more predictable. - -=item * - -mkdir() now ignores trailing slashes in the directory name, -as mandated by POSIX. - -=item * - -Attributes (like :shared) didn't work with our(). - -=item * - -The PERL5OPT environment variable (for passing command line arguments -to Perl) didn't work for more than a single group of options. - -=item * - -The tainting behaviour of sprintf() has been rationalized. It does -not taint the result of floating point formats anymore, making the -behaviour consistent with that of string interpolation. - -=item * - -All but the first argument of the IO syswrite() method are now optional. - -=item * - -Tie::ARRAY SPLICE method was broken. - -=item * - -vec() now tries to work with characters <= 255 when possible, but it leaves -higher character values in place. In that case, if vec() was used to modify -the string, it is no longer considered to be utf8-encoded. - -=back - -=head2 Platform Specific Changes and Fixes - -=over 4 - -=item * - -Linux previously had problems related to sockaddrlen when using -accept(), revcfrom() (in Perl: recv()), getpeername(), and getsockname(). - -=item * - -Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O. - -=item * - -Windows - -=over 8 - -=item * - -Borland C++ v5.5 is now a supported compiler that can build Perl. -However, the generated binaries continue to be incompatible with those -generated by the other supported compilers (GCC and Visual C++). - -=item * - -Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root. -Other bugs in chdir() and Cwd::cwd() have also been fixed. - -=item * - -Duping socket handles with open(F, ">&MYSOCK") now works under Windows 9x. - -=item * - -HTML files will be installed in c:\perl\html instead of c:\perl\lib\pod\html - -=item * - -The makefiles now provide a single switch to bulk-enable all the features -enabled in ActiveState ActivePerl (a popular binary distribution). - -=back - -=back - -=head1 New or Changed Diagnostics - -Two new debugging options have been added: if you have compiled your -Perl with debugging, you can use the -DT and -DR options to trace -tokenising and to add reference counts to displaying variables, -respectively. - -=over 4 - -=item * - -If an attempt to use a (non-blessed) reference as an array index -is made, a warning is given. - -=item * - -C and C (with no values to push or unshift) -now give a warning. This may be a problem for generated and eval'ed -code. - -=back - -=head1 Changed Internals - -=over 4 - -=item * - -Some new APIs: ptr_table_clear(), ptr_table_free(), sv_setref_uv(). -For the full list of the available APIs see L. - -=item * - -dTHR and djSP have been obsoleted; the former removed (because it's -a no-op) and the latter replaced with dSP. - -=item * - -Perl now uses system malloc instead of Perl malloc on all 64-bit -platforms, and even in some not-always-64-bit platforms like AIX, -IRIX, and Solaris. This change breaks backward compatibility but -Perl's malloc has problems with large address spaces and also the -speed of vendors' malloc is generally better in large address space -machines (Perl's malloc is mostly tuned for space). - -=back - -=head1 New Tests - -Many new tests have been added. The most notable is probably the -lib/1_compile: it is very notable because running it takes quite a -long time. It test compiles all the Perl modules in the distribution. -Please be patient. - -=head1 Known Problems - -Note that unlike other sections in this document (which describe -changes since 5.7.0) this section is cumulative containing known -problems for all the 5.7 releases. - -=head2 AIX vac 5.0.0.0 May Produce Buggy Code For Perl - -The AIX C compiler vac version 5.0.0.0 may produce buggy code, -resulting in few random tests failing, but when the failing tests -are run by hand, they succeed. We suggest upgrading to at least -vac version 5.0.1.0, that has been known to compile Perl correctly. -"lslpp -L|grep vac.C" will tell you the vac version. - -=head2 lib/ftmp-security tests warn 'system possibly insecure' - -Don't panic. Read INSTALL 'make test' section instead. - -=head2 lib/io_multihomed Fails In LP64-Configured HP-UX - -The lib/io_multihomed test may hang in HP-UX if Perl has been -configured to be 64-bit. Because other 64-bit platforms do not hang in -this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The -test attempts to create and connect to "multihomed" sockets (sockets -which have multiple IP addresses). - -=head2 Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX - -If perl is configured with -Duse64bitall, the successful result of the -subtest 10 of lib/posix may arrive before the successful result of the -subtest 9, which confuses the test harness so much that it thinks the -subtest 9 failed. - -=head2 lib/b test 19 - -The test fails on various platforms (PA64 and IA64 are known), but the -exact cause is still being investigated. - -=head2 Linux With Sfio Fails op/misc Test 48 - -No known fix. - -=head2 sigaction test 13 in VMS - -The test is known to fail; whether it's because of VMS of because -of faulty test is not known. - -=head2 sprintf tests 129 and 130 - -The op/sprintf tests 129 and 130 are known to fail on some platforms. -Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX. -The failing platforms do not comply with the ANSI C Standard, line -19ff on page 134 of ANSI X3.159 1989 to be exact. (They produce -something else than "1" and "-1" when formatting 0.6 and -0.6 using -the printf format "%.0f", most often they produce "0" and "-0".) - -=head2 Failure of Thread tests - -The subtests 19 and 20 of lib/thr5005.t test are known to fail due to -fundamental problems in the 5.005 threading implementation. These are -not new failures--Perl 5.005_0x has the same bugs, but didn't have -these tests. (Note that support for 5.005-style threading remains -experimental.) - -=head2 Localising a Tied Variable Leaks Memory - - use Tie::Hash; - tie my %tie_hash => 'Tie::StdHash'; - - ... - - local($tie_hash{Foo}) = 1; # leaks - -Code like the above is known to leak memory every time the local() -is executed. - -=head2 Self-tying of Arrays and Hashes Is Forbidden - -Self-tying of arrays and hashes is broken in rather deep and -hard-to-fix ways. As a stop-gap measure to avoid people from getting -frustrated at the mysterious results (core dumps, most often) it is -for now forbidden (you will get a fatal error even from an attempt). - -=head2 Building Extensions Can Fail Because Of Largefiles - -Some extensions like mod_perl are known to have issues with -`largefiles', a change brought by Perl 5.6.0 in which file offsets -default to 64 bits wide, where supported. Modules may fail to compile -at all or compile and work incorrectly. Currently there is no good -solution for the problem, but Configure now provides appropriate -non-largefile ccflags, ldflags, libswanted, and libs in the %Config -hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are -having problems can try configuring themselves without the -largefileness. This is admittedly not a clean solution, and the -solution may not even work at all. One potential failure is whether -one can (or, if one can, whether it's a good idea) link together at -all binaries with different ideas about file offsets, all this is -platform-dependent. - -=head2 The Compiler Suite Is Still Experimental - -The compiler suite is slowly getting better but is nowhere near -working order yet. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://bugs.perl.org/ There may also be -information at http://www.perl.com/perl/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -=head1 SEE ALSO - -The F file for exhaustive details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=head1 HISTORY - -Written by Jarkko Hietaniemi >, with many contributions -from The Perl Porters and Perl Users submitting feedback and patches. - -Send omissions or corrections to >. - -=cut diff --git a/pod/perl572delta.pod b/pod/perl572delta.pod deleted file mode 100644 index c41b0dab847..00000000000 --- a/pod/perl572delta.pod +++ /dev/null @@ -1,831 +0,0 @@ -=head1 NAME - -perl572delta - what's new for perl v5.7.2 - -=head1 DESCRIPTION - -This document describes differences between the 5.7.1 release and the -5.7.2 release. - -(To view the differences between the 5.6.0 release and the 5.7.0 -release, see L. To view the differences between the -5.7.0 release and the 5.7.1 release, see L.) - -=head1 Security Vulnerability Closed - -(This change was already made in 5.7.0 but bears repeating here.) - -A security vulnerability affecting all Perl versions prior to 5.6.1 -was found in August 2000. The vulnerability does not affect default -installations and as far as is known affects only the Linux platform. - -You should upgrade your Perl to 5.6.1 as soon as possible. Patches -for earlier releases exist but using the patches require full -recompilation from the source code anyway, so 5.6.1 is your best -choice. - -See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt -for more information. - -=head1 Incompatible Changes - -=head2 64-bit platforms and malloc - -If your pointers are 64 bits wide, the Perl malloc is no more being -used because it simply does not work with 8-byte pointers. Also, -usually the system malloc on such platforms are much better optimized -for such large memory models than the Perl malloc. - -=head2 AIX Dynaloading - -The AIX dynaloading now uses in AIX releases 4.3 and newer the native -dlopen interface of AIX instead of the old emulated interface. This -change will probably break backward compatibility with compiled -modules. The change was made to make Perl more compliant with other -applications like modperl which are using the AIX native interface. - -=head2 Socket Extension Dynamic in VMS - -The Socket extension is now dynamically loaded instead of being -statically built in. This may or may not be a problem with ancient -TCP/IP stacks of VMS: we do not know since we weren't able to test -Perl in such configurations. - -=head2 Different Definition of the Unicode Character Classes \p{In...} - -As suggested by the Unicode consortium, the Unicode character classes -now prefer I as opposed to I (as defined by Unicode); -in Perl, when the C<\p{In....}> and the C<\p{In....}> regular expression -constructs are used. This has changed the definition of some of those -character classes. - -The difference between scripts and blocks is that scripts are the -glyphs used by a language or a group of languages, while the blocks -are more artificial groupings of 256 characters based on the Unicode -numbering. - -In general this change results in more inclusive Unicode character -classes, but changes to the other direction also do take place: -for example while the script C includes all the Latin -characters and their various diacritic-adorned versions, it -does not include the various punctuation or digits (since they -are not solely C). - -Changes in the character class semantics may have happened if a script -and a block happen to have the same name, for example C. -In such cases the script wins and C<\p{InHebrew}> now means the script -definition of Hebrew. The block definition in still available, -though, by appending C to the name: C<\p{InHebrewBlock}> means -what C<\p{InHebrew}> meant in perl 5.6.0. For the full list -of affected character classes, see L. - -=head2 Deprecations - -The current user-visible implementation of pseudo-hashes (the weird -use of the first array element) is deprecated starting from Perl 5.8.0 -and will be removed in Perl 5.10.0, and the feature will be -implemented differently. Not only is the current interface rather -ugly, but the current implementation slows down normal array and hash -use quite noticeably. The C pragma interface will remain -available. - -The syntaxes C<< @a->[...] >> and C<< @h->{...} >> have now been deprecated. - -The suidperl is also considered to be too much a risk to continue -maintaining and the suidperl code is likely to be removed in a future -release. - -The C syntax (C without an argument has been -deprecated. Its semantics were never that clear and its -implementation even less so. If you have used that feature to -disallow all but fully qualified variables, C instead. - -The chdir(undef) and chdir('') behaviors to match chdir() has been -deprecated. In future versions, chdir(undef) and chdir('') will -simply fail. - -=head1 Core Enhancements - -In general a lot of fixing has happened in the area of Perl's -understanding of numbers, both integer and floating point. Since in -many systems the standard number parsing functions like C -and C seem to have bugs, Perl tries to work around their -deficiencies. This results hopefully in more accurate numbers. - -=over 4 - -=item * - -The rules for allowing underscores (underbars) in numeric constants -have been relaxed and simplified: now you can have an underscore -B. - -=item * - -GMAGIC (right-hand side magic) could in many cases such as string -concatenation be invoked too many times. - -=item * - -Lexicals I: lexicals outside an eval "" weren't resolved -correctly inside a subroutine definition inside the eval "" if they -were not already referenced in the top level of the eval""ed code. - -=item * - -Lexicals II: lexicals leaked at file scope into subroutines that -were declared before the lexicals. - -=item * - -Lvalue subroutines can now return C in list context. - -=item * - -The C and C are now exported. - -=item * - -A new special regular expression variable has been introduced: -C<$^N>, which contains the most-recently closed group (submatch). - -=item * - -L now supports C to change the -file timestamps to the current time. - -=item * - -The Perl parser has been stress tested using both random input and -Markov chain input. - -=item * - -C now works. - -=item * - -VMS now works under PerlIO. - -=item * - -END blocks are now run even if you exit/die in a BEGIN block. -The execution of END blocks is now controlled by -PL_exit_flags & PERL_EXIT_DESTRUCT_END. This enables the new -behaviour for perl embedders. This will default in 5.10. See -L. - -=back - -=head1 Modules and Pragmata - -=head2 New Modules and Distributions - -=over 4 - -=item * - -L - Simpler definition of attribute handlers - -=item * - -L - generate XS code to import C header constants - -=item * - -L - query locale information - -=item * - -L - functions for dealing with RFC3066-style language tags - -=item * - -L - a collection of perl5 modules related to network programming - -Perl installation leaves libnet unconfigured, use F to configure. - -=item * - -L - selection of general-utility list subroutines - -=item * - -L - framework for localization - -=item * - -L - Make your functions faster by trading space for time - -=item * - -L - pseudo-class for method redispatch - -=item * - -L - selection of general-utility scalar subroutines - -=item * - -L - yet another framework for writing test scripts - -=item * - -L - Basic utilities for writing tests - -=item * - -L - high resolution ualarm, usleep, and gettimeofday - -=item * - -L - Object Oriented time objects - -(Previously known as L.) - -=item * - -L - a simple API to convert seconds to other date values - -=item * - -L - Unicode Character Database - -=back - -=head2 Updated And Improved Modules and Pragmata - -=over 4 - -=item * - -L module has been significantly enhanced. It now -can deparse almost all of the standard test suite (so that the -tests still succeed). There is a make target "test.deparse" -for trying this out. - -=item * - -L now assigns the array/hash element if the accessor -is called with an array/hash element as the B argument. - -=item * - -L extension is now (even) faster. - -=item * - -L extension has been updated to version 1.77. - -=item * - -L, L, and L have been rewritten to use the -new-style constant dispatch section (see L). - -=item * - -L is now (again) reentrant. It also has been made -more portable. - -=item * - -L now supports C constant to limit the -size of the returned list of filenames. - -=item * - -L now supports C of zero (usually meaning -that the operating system will make one up.) - -=item * - -The L pragma now supports declaring fully qualified variables. -(Something that C does not and will not support.) - -=back - -=head1 Utility Changes - -=over 4 - -=item * - -The F is now much faster. - -=item * - -L now supports C trigraphs. - -=item * - -L uses the new L module which will affect -newly created extensions that define constants. Since the new code is -more correct (if you have two constants where the first one is a -prefix of the second one, the first constant B gets defined), -less lossy (it uses integers for integer constant, as opposed to the -old code that used floating point numbers even for integer constants), -and slightly faster, you might want to consider regenerating your -extension code (the new scheme makes regenerating easy). -L now also supports C trigraphs. - -=item * - -L has been added to configure the libnet. - -=item * - -The F (and thusly L) now allows specifying -a cache directory. - -=back - -=head1 New Documentation - -=over 4 - -=item * - -L is an article about software localization, -originally published in The Perl Journal #13, republished here with -kind permission. - -=item * - -More README.$PLATFORM files have been converted into pod, which also -means that they also be installed as perl$PLATFORM documentation -files. The new files are L, L, L, -L, L, L, L, L, -and L. - -=item * - -The F and F files have been merged into L. - -=item * - -Use of the F tool to profile Perl has been documented in -L. There is a make target "perl.gprof" for generating a -gprofiled Perl executable. - -=back - -=head1 Installation and Configuration Improvements - -=head2 New Or Improved Platforms - -=over 4 - -=item * - -AIX should now work better with gcc, threads, and 64-bitness. Also the -long doubles support in AIX should be better now. See L. - -=item * - -AtheOS ( http://www.atheos.cx/ ) is a new platform. - -=item * - -DG/UX platform now supports the 5.005-style threads. See L. - -=item * - -DYNIX/ptx platform (a.k.a. dynixptx) is supported at or near osvers 4.5.2. - -=item * - -Several Mac OS (Classic) portability patches have been applied. We -hope to get a fully working port by 5.8.0. (The remaining problems -relate to the changed IO model of Perl.) See L. - -=item * - -Mac OS X (or Darwin) should now be able to build Perl even on HFS+ -filesystems. (The case-insensitivity confused the Perl build process.) - -=item * - -NetWare from Novell is now supported. See L. - -=item * - -The Amdahl UTS Unix mainframe platform is now supported. - -=back - -=head2 Generic Improvements - -=over 4 - -=item * - -In AFS installations one can configure the root of the AFS to be -somewhere else than the default F by using the Configure -parameter C<-Dafsroot=/some/where/else>. - -=item * - -The version of Berkeley DB used when the Perl (and, presumably, the -DB_File extension) was built is now available as -C<@Config{qw(db_version_major db_version_minor db_version_patch)}> -from Perl and as C from C. - -=item * - -The Thread extension is now not built at all under ithreads -(C) because it wouldn't work anyway (the -Thread extension requires being Configured with C<-Duse5005threads>). - -=item * - -The C compiler backend has been so significantly improved -that almost the whole Perl test suite passes after being deparsed. A -make target has been added to help in further testing: C. - -=back - -=head1 Selected Bug Fixes - -=over 5 - -=item * - -The autouse pragma didn't work for Multi::Part::Function::Names. - -=item * - -The behaviour of non-decimal but numeric string constants such as -"0x23" was platform-dependent: in some platforms that was seen as 35, -in some as 0, in some as a floating point number (don't ask). This -was caused by Perl using the operating system libraries in a situation -where the result of the string to number conversion is undefined: now -Perl consistently handles such strings as zero in numeric contexts. - -=item * - -L -R didn't work. - -=item * - -PERL5OPT with embedded spaces didn't work. - -=item * - -L ignored the C constant. - -=back - -=head2 Platform Specific Changes and Fixes - -=over 4 - -=item * - -Some versions of glibc have a broken modfl(). This affects builds -with C<-Duselongdouble>. This version of Perl detects this brokenness -and has a workaround for it. The glibc release 2.2.2 is known to have -fixed the modfl() bug. - -=back - -=head1 New or Changed Diagnostics - -=over 4 - -=item * - -In the regular expression diagnostics the CE HERE> marker -introduced in 5.7.0 has been changed to be C-- HERE> since too -many people found the CE> to be too similar to here-document -starters. - -=item * - -If you try to L a number less than 0 or larger than 255 -using the C<"C"> format you will get an optional warning. Similarly -for the C<"c"> format and a number less than -128 or more than 127. - -=item * - -Certain regex modifiers such as C<(?o)> make sense only if applied to -the entire regex. You will an optional warning if you try to do otherwise. - -=item * - -Using arrays or hashes as references (e.g. C<< %foo->{bar} >> has been -deprecated for a while. Now you will get an optional warning. - -=back - -=head1 Source Code Enhancements - -=head2 MAGIC constants - -The MAGIC constants (e.g. C<'P'>) have been macrofied -(e.g. C) for better source code readability -and maintainability. - -=head2 Better commented code - -F, F, and F have now been extensively commented. - -=head2 Regex pre-/post-compilation items matched up - -The regex compiler now maintains a structure that identifies nodes in -the compiled bytecode with the corresponding syntactic features of the -original regex expression. The information is attached to the new -C member of the C. See L for more -complete information. - -=head2 gcc -Wall - -The C code has been made much more C clean. Some warning -messages still remain, though, so if you are compiling with gcc you -will see some warnings about dubious practices. The warnings are -being worked on. - -=head1 New Tests - -Several new tests have been added, especially for the F subsection. - -The tests are now reported in a different order than in earlier Perls. -(This happens because the test scripts from under t/lib have been moved -to be closer to the library/extension they are testing.) - -=head1 Known Problems - -Note that unlike other sections in this document (which describe -changes since 5.7.0) this section is cumulative containing known -problems for all the 5.7 releases. - -=head2 AIX - -=over 4 - -=item * - -In AIX 4.2 Perl extensions that use C++ functions that use statics -may have problems in that the statics are not getting initialized. -In newer AIX releases this has been solved by linking Perl with -the libC_r library, but unfortunately in AIX 4.2 the said library -has an obscure bug where the various functions related to time -(such as time() and gettimeofday()) return broken values, and -therefore in AIX 4.2 Perl is not linked against the libC_r. - -=item * - -vac 5.0.0.0 May Produce Buggy Code For Perl - -The AIX C compiler vac version 5.0.0.0 may produce buggy code, -resulting in few random tests failing, but when the failing tests -are run by hand, they succeed. We suggest upgrading to at least -vac version 5.0.1.0, that has been known to compile Perl correctly. -"lslpp -L|grep vac.C" will tell you the vac version. - -=back - -=head2 Amiga Perl Invoking Mystery - -One cannot call Perl using the C syntax, that is, C -works, but for example C doesn't. The exact reason is -known but the current suspect is the F library. - -=head2 lib/ftmp-security tests warn 'system possibly insecure' - -Don't panic. Read INSTALL 'make test' section instead. - -=head2 Cygwin intermittent failures of lib/Memoize/t/expire_file 11 and 12 - -The subtests 11 and 12 sometimes fail and sometimes work. - -=head2 HP-UX lib/io_multihomed Fails When LP64-Configured - -The lib/io_multihomed test may hang in HP-UX if Perl has been -configured to be 64-bit. Because other 64-bit platforms do not hang in -this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The -test attempts to create and connect to "multihomed" sockets (sockets -which have multiple IP addresses). - -=head2 HP-UX lib/posix Subtest 9 Fails When LP64-Configured - -If perl is configured with -Duse64bitall, the successful result of the -subtest 10 of lib/posix may arrive before the successful result of the -subtest 9, which confuses the test harness so much that it thinks the -subtest 9 failed. - -=head2 Linux With Sfio Fails op/misc Test 48 - -No known fix. - -=head2 OS/390 - -OS/390 has rather many test failures but the situation is actually -better than it was in 5.6.0, it's just that so many new modules and -tests have been added. - - Failed Test Stat Wstat Total Fail Failed List of Failed - ----------------------------------------------------------------------------- - ../ext/B/Deparse.t 14 1 7.14% 14 - ../ext/B/Showlex.t 1 1 100.00% 1 - ../ext/Encode/Encode/Tcl.t 610 13 2.13% 592 594 596 598 - 600 602 604-610 - ../ext/IO/lib/IO/t/io_unix.t 113 28928 5 3 60.00% 3-5 - ../ext/POSIX/POSIX.t 29 1 3.45% 14 - ../ext/Storable/t/lock.t 255 65280 5 3 60.00% 3-5 - ../lib/locale.t 129 33024 117 19 16.24% 99-117 - ../lib/warnings.t 434 1 0.23% 75 - ../lib/ExtUtils.t 27 1 3.70% 25 - ../lib/Math/BigInt/t/bigintpm.t 1190 1 0.08% 1145 - ../lib/Unicode/UCD.t 81 48 59.26% 1-16 49-64 66-81 - ../lib/User/pwent.t 9 1 11.11% 4 - op/pat.t 660 6 0.91% 242-243 424-425 - 626-627 - op/split.t 0 9 ?? ?? % ?? - op/taint.t 174 3 1.72% 156 162 168 - op/tr.t 70 3 4.29% 50 58-59 - Failed 16/422 test scripts, 96.21% okay. 105/23251 subtests failed, 99.55% okay. - -=head2 op/sprintf tests 129 and 130 - -The op/sprintf tests 129 and 130 are known to fail on some platforms. -Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX. -The failing platforms do not comply with the ANSI C Standard, line -19ff on page 134 of ANSI X3.159 1989 to be exact. (They produce -something other than "1" and "-1" when formatting 0.6 and -0.6 using -the printf format "%.0f", most often they produce "0" and "-0".) - -=head2 Failure of Thread tests - -B - -The following tests are known to fail due to fundamental problems in -the 5.005 threading implementation. These are not new failures--Perl -5.005_0x has the same bugs, but didn't have these tests. - - lib/autouse.t 4 - t/lib/thr5005.t 19-20 - -=head2 UNICOS - -=over 4 - -=item * - -ext/POSIX/sigaction subtests 6 and 13 may fail. - -=item * - -lib/ExtUtils may spuriously claim that subtest 28 failed, -which is interesting since the test only has 27 tests. - -=item * - -Numerous numerical test failures - - op/numconvert 209,210,217,218 - op/override 7 - ext/Time/HiRes/HiRes 9 - lib/Math/BigInt/t/bigintpm 1145 - lib/Math/Trig 25 - -These tests fail because of yet unresolved floating point inaccuracies. - -=back - -=head2 UTS - -There are a few known test failures, see L. - -=head2 VMS - -Rather many tests are failing in VMS but that actually more tests -succeed in VMS than they used to, it's just that there are many, -many more tests than there used to be. - -Here are the known failures from some compiler/platform combinations. - -DEC C V5.3-006 on OpenVMS VAX V6.2 - - [-.ext.list.util.t]tainted..............FAILED on test 3 - [-.ext.posix]sigaction..................FAILED on test 7 - [-.ext.time.hires]hires.................FAILED on test 14 - [-.lib.file.find]taint..................FAILED on test 17 - [-.lib.math.bigint.t]bigintpm...........FAILED on test 1183 - [-.lib.test.simple.t]exit...............FAILED on test 1 - [.lib]vmsish............................FAILED on test 13 - [.op]sprintf............................FAILED on test 12 - Failed 8/399 tests, 91.23% okay. - -DEC C V6.0-001 on OpenVMS Alpha V7.2-1 and -Compaq C V6.2-008 on OpenVMS Alpha V7.1 - - [-.ext.list.util.t]tainted..............FAILED on test 3 - [-.lib.file.find]taint..................FAILED on test 17 - [-.lib.test.simple.t]exit...............FAILED on test 1 - [.lib]vmsish............................FAILED on test 13 - Failed 4/399 tests, 92.48% okay. - -Compaq C V6.4-005 on OpenVMS Alpha 7.2.1 - - [-.ext.b]showlex........................FAILED on test 1 - [-.ext.list.util.t]tainted..............FAILED on test 3 - [-.lib.file.find]taint..................FAILED on test 17 - [-.lib.test.simple.t]exit...............FAILED on test 1 - [.lib]vmsish............................FAILED on test 13 - [.op]misc...............................FAILED on test 49 - Failed 6/401 tests, 92.77% okay. - -=head2 Win32 - -In multi-CPU boxes there are some problems with the I/O buffering: -some output may appear twice. - -=head2 Localising a Tied Variable Leaks Memory - - use Tie::Hash; - tie my %tie_hash => 'Tie::StdHash'; - - ... - - local($tie_hash{Foo}) = 1; # leaks - -Code like the above is known to leak memory every time the local() -is executed. - -=head2 Self-tying of Arrays and Hashes Is Forbidden - -Self-tying of arrays and hashes is broken in rather deep and -hard-to-fix ways. As a stop-gap measure to avoid people from getting -frustrated at the mysterious results (core dumps, most often) it is -for now forbidden (you will get a fatal error even from an attempt). - -=head2 Variable Attributes are not Currently Usable for Tying - -This limitation will hopefully be fixed in future. (Subroutine -attributes work fine for tying, see L). - -=head2 Building Extensions Can Fail Because Of Largefiles - -Some extensions like mod_perl are known to have issues with -`largefiles', a change brought by Perl 5.6.0 in which file offsets -default to 64 bits wide, where supported. Modules may fail to compile -at all or compile and work incorrectly. Currently there is no good -solution for the problem, but Configure now provides appropriate -non-largefile ccflags, ldflags, libswanted, and libs in the %Config -hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are -having problems can try configuring themselves without the -largefileness. This is admittedly not a clean solution, and the -solution may not even work at all. One potential failure is whether -one can (or, if one can, whether it's a good idea) link together at -all binaries with different ideas about file offsets, all this is -platform-dependent. - -=head2 The Compiler Suite Is Still Experimental - -The compiler suite is slowly getting better but is nowhere near -working order yet. - -=head2 The Long Double Support is Still Experimental - -The ability to configure Perl's numbers to use "long doubles", -floating point numbers of hopefully better accuracy, is still -experimental. The implementations of long doubles are not yet -widespread and the existing implementations are not quite mature -or standardised, therefore trying to support them is a rare -and moving target. The gain of more precision may also be offset -by slowdown in computations (more bits to move around, and the -operations are more likely to be executed by less optimised -libraries). - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://bugs.perl.org/ There may also be -information at http://www.perl.com/perl/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -=head1 SEE ALSO - -The F file for exhaustive details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=head1 HISTORY - -Written by Jarkko Hietaniemi >, with many contributions -from The Perl Porters and Perl Users submitting feedback and patches. - -Send omissions or corrections to >. - -=cut diff --git a/pod/perl573delta.pod b/pod/perl573delta.pod deleted file mode 100644 index ddef460c798..00000000000 --- a/pod/perl573delta.pod +++ /dev/null @@ -1,246 +0,0 @@ -=head1 NAME - -perl573delta - what's new for perl v5.7.3 - -=head1 DESCRIPTION - -This document describes differences between the 5.7.2 release and the -5.7.3 release. - -(To view the differences between the 5.6.0 release and the 5.7.0 -release, see L. To view the differences between the -5.7.0 release and the 5.7.1 release, see L. To view -the differences between the 5.7.1 release and the 5.7.2 release, -see L.) - -=head1 Changes - -This is just a selected list of some of the more notable changes. -The numbers refer to the Perl repository change numbers; see -F (or F in Perl 5.8.1). In addition to these -changes, lots of work took place in integrating threads, PerlIO, and -Unicode; general code cleanup; and last but not least porting to -non-Unix lands such as Win32, VMS, Cygwin, DJGPP, VOS, MacOS Classic, -and EBCDIC. - -=over 4 - -=item 11362 - -add LC_MESSAGES to POSIX :locale_h export tag - -=item 11371 - -add DEL to [:cntrl:] - -=item 11375 - -make h2ph understand constants like 1234L and 5678LL - -=item 11405 - -Win32: fix bugs in handling of the virtualized environment - -=item 11410 - -fix a bug in the security taint checking of open() - -=item 11423 - -make perl fork() safe even on platforms that don't have pthread_atfork() - -=item 11459 - -make switching optimization and debugging levels during Perl builds -easier via the OPTIMIZE environment variable - -=item 11475 - -make split()'s unused captures to be undef, not '' - -=item 11485 - -Search::Dict: allow transforming lines before comparing - -=item 11490 - -allow installing extra modules or bundles when building Perl - -=item 11516 - -add -Wall in cflags when compiling with gcc to weed out dubious -C practices - -=item 11541 - -pluggable optimizer - -=item 11549 - -WinCE: integrate the port - -=item 11589 - -Win32: 4-arg select was broken - -=item 11594 - -introduce the perlivp utility for verifying the Perl installation -(IVP = Installation Verification Procedure) - -=item 11623 - -rename lib/unicode to lib/unicore to avoid case-insensitivity problems -with lib/Unicode - -=item 111631 - -remove Time::Piece - -=item 11643 - -document that use utf8 is not the right way most of the time - -=item 11656 - -allow building perl with -DUSE_UTF8_SCRIPTS which makes UTF-8 -the default script encoding (not the default since that would -break all scripts having legacy eight-bit data in them) - -=item 11725 - -division preserving 64-bit integers - -=item 11743 - -document the coderef-in-@INC feature - -=item 11794 - -modulo (%) preserving 64-bit integers - -=item 11825 - -update to Unicode 3.1.1 - -=item 11865 - -add the \[$@%&*] prototype support - -=item 11874 - -oct() and hex() in glorious 64 bit - -=item 11877 - -Class::Struct: allow recursive classes - -=item 11993 - -fix unpack U to be the reverse of pack U - -=item 12056 - -VMS: waitpid enhancements - -=item 12180 - -unpack("Z*Z*", pack("Z*Z*", ..)) was broken - -=item 12243 - -Devel::Peek: display UTF-8 SVs also as \x{...} - -=item 12288 - -Data::Dumper: option to sort hashes - -=item 12542 - -add perlpodspec - -=item 12652 - -threadsafe DynaLoader, re, Opcode, File::Glob, and B - -=item 12756 - -support BeOS better - -=item 12874 - -read-only hashes (user-level interface is Hash::Util) - -=item 13162 - -add Devel::PPPort - -=item 13179 - -add the sort pragma - -=item 13326 - -VMS: fix perl -P - -=item 13358 - -add perlpacktut - -=item 13452 - -SUPER-UX: add hints file - -=item 13575 - -Win32: non-blocking waitpid(-1,WNOHANG) - -=item 13684 - -introduce the -t option for gentler taint checking - -=item 14694 - -add the if pragma - -=item 14832 - -implement IV/UV/NV/long double un/packing with j/J/F/D - -=item 14854 - -document the new taint behaviour of exec LIST and system LIST - -=back - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://bugs.perl.org. There may also be -information at http://www.perl.com/, the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -=head1 SEE ALSO - -The F file for exhaustive details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=head1 HISTORY - -Written by Jarkko Hietaniemi >, with many contributions -from The Perl Porters and Perl Users submitting feedback and patches. - -Send omissions or corrections to >. - -=cut diff --git a/pod/perl590delta.pod b/pod/perl590delta.pod deleted file mode 100644 index a19bf7a0768..00000000000 --- a/pod/perl590delta.pod +++ /dev/null @@ -1,1015 +0,0 @@ -=head1 NAME - -perl590delta - what is new for perl v5.9.0 - -=head1 DESCRIPTION - -This document describes differences between the 5.8.0 release and -the 5.9.0 release. - -=head1 Incompatible Changes - -=head2 Hash Randomisation - -Mainly due to security reasons, the "random ordering" of hashes -has been made even more random. Previously while the order of hash -elements from keys(), values(), and each() was essentially random, -it was still repeatable. Now, however, the order varies between -different runs of Perl. - -B, and the -ordering has already changed several times during the lifetime of -Perl 5. Also, the ordering of hash keys has always been, and -continues to be, affected by the insertion order. - -The added randomness may affect applications. - -One possible scenario is when output of an application has included -hash data. For example, if you have used the Data::Dumper module to -dump data into different files, and then compared the files to see -whether the data has changed, now you will have false positives since -the order in which hashes are dumped will vary. In general the cure -is to sort the keys (or the values); in particular for Data::Dumper to -use the C option. If some particular order is really -important, use tied hashes: for example the Tie::IxHash module -which by default preserves the order in which the hash elements -were added. - -More subtle problem is reliance on the order of "global destruction". -That is what happens at the end of execution: Perl destroys all data -structures, including user data. If your destructors (the DESTROY -subroutines) have assumed any particular ordering to the global -destruction, there might be problems ahead. For example, in a -destructor of one object you cannot assume that objects of any other -class are still available, unless you hold a reference to them. -If the environment variable PERL_DESTRUCT_LEVEL is set to a non-zero -value, or if Perl is exiting a spawned thread, it will also destruct -the ordinary references and the symbol tables that are no longer in use. -You can't call a class method or an ordinary function on a class that -has been collected that way. - -The hash randomisation is certain to reveal hidden assumptions about -some particular ordering of hash elements, and outright bugs: it -revealed a few bugs in the Perl core and core modules. - -To disable the hash randomisation in runtime, set the environment -variable PERL_HASH_SEED to 0 (zero) before running Perl (for more -information see L), or to disable the feature -completely in compile time, compile with C<-DNO_HASH_SEED> (see F). - -See L for the original -rationale behind this change. - -=head2 UTF-8 On Filehandles No Longer Activated By Locale - -In Perl 5.8.0 all filehandles, including the standard filehandles, -were implicitly set to be in Unicode UTF-8 if the locale settings -indicated the use of UTF-8. This feature caused too many problems, -so the feature was turned off and redesigned: see L. - -=head2 Single-number v-strings are no longer v-strings before "=>" - -The version strings or v-strings (see L) -feature introduced in Perl 5.6.0 has been a source of some confusion-- -especially when the user did not want to use it, but Perl thought it -knew better. Especially troublesome has been the feature that before -a "=>" a version string (a "v" followed by digits) has been interpreted -as a v-string instead of a string literal. In other words: - - %h = ( v65 => 42 ); - -has meant since Perl 5.6.0 - - %h = ( 'A' => 42 ); - -(at least in platforms of ASCII progeny) Perl 5.8.1 restored the -more natural interpretation - - %h = ( 'v65' => 42 ); - -The multi-number v-strings like v65.66 and 65.66.67 still continue to -be v-strings in Perl 5.8. - -=head2 (Win32) The -C Switch Has Been Repurposed - -The -C switch has changed in an incompatible way. The old semantics -of this switch only made sense in Win32 and only in the "use utf8" -universe in 5.6.x releases, and do not make sense for the Unicode -implementation in 5.8.0. Since this switch could not have been used -by anyone, it has been repurposed. The behavior that this switch -enabled in 5.6.x releases may be supported in a transparent, -data-dependent fashion in a future release. - -For the new life of this switch, see L<"UTF-8 no longer default under -UTF-8 locales">, and L. - -=head2 (Win32) The /d Switch Of cmd.exe - -Since version 5.8.1, perl uses the /d switch when running the cmd.exe shell -internally for system(), backticks, and when opening pipes to external -programs. The extra switch disables the execution of AutoRun commands -from the registry, which is generally considered undesirable when -running external programs. If you wish to retain compatibility with -the older behavior, set PERL5SHELL in your environment to C. - -=head2 The C<$*> variable has been removed - -C<$*>, which was deprecated in favor of the C and C regexp -modifiers, has been removed. - -=head1 Core Enhancements - -=head2 Assertions - -Perl 5.9.0 has experimental support for assertions. Note that the user -interface is not fully stabilized yet, and it may change until the 5.10.0 -release. A new command-line switch, B<-A>, is used to activate -assertions, which are declared with the C pragma. See -L. - -=head2 Defined-or operators - -A new operator C (defined-or) has been implemented. -The following statement: - - $a // $b - -is merely equivalent to - - defined $a ? $a : $b - -and - - $c //= $d; - -can be used instead of - - $c = $d unless defined $c; - -This operator has the same precedence and associativity as C<||>. -It has a low-precedence counterpart, C, which has the same precedence -and associativity as C. Special care has been taken to ensure that -those operators Do What You Mean while not breaking old code, but some -edge cases involving the empty regular expression may now parse -differently. See L for details. - -=head2 UTF-8 no longer default under UTF-8 locales - -In Perl 5.8.0 many Unicode features were introduced. One of them -was found to be of more nuisance than benefit: the automagic -(and silent) "UTF-8-ification" of filehandles, including the -standard filehandles, if the user's locale settings indicated -use of UTF-8. - -For example, if you had C as your locale, your STDIN and -STDOUT were automatically "UTF-8", in other words an implicit -binmode(..., ":utf8") was made. This meant that trying to print, say, -chr(0xff), ended up printing the bytes 0xc3 0xbf. Hardly what -you had in mind unless you were aware of this feature of Perl 5.8.0. -The problem is that the vast majority of people weren't: for example -in RedHat releases 8 and 9 the B locale setting is UTF-8, so -all RedHat users got UTF-8 filehandles, whether they wanted it or not. -The pain was intensified by the Unicode implementation of Perl 5.8.0 -(still) having nasty bugs, especially related to the use of s/// and -tr///. (Bugs that have been fixed in 5.8.1) - -Therefore a decision was made to backtrack the feature and change it -from implicit silent default to explicit conscious option. The new -Perl command line option C<-C> and its counterpart environment -variable PERL_UNICODE can now be used to control how Perl and Unicode -interact at interfaces like I/O and for example the command line -arguments. See L and L for more -information. - -=head2 Unsafe signals again available - -In Perl 5.8.0 the so-called "safe signals" were introduced. This -means that Perl no longer handles signals immediately but instead -"between opcodes", when it is safe to do so. The earlier immediate -handling easily could corrupt the internal state of Perl, resulting -in mysterious crashes. - -However, the new safer model has its problems too. Because now an -opcode, a basic unit of Perl execution, is never interrupted but -instead let to run to completion, certain operations that can take a -long time now really do take a long time. For example, certain -network operations have their own blocking and timeout mechanisms, and -being able to interrupt them immediately would be nice. - -Therefore perl 5.8.1 introduced a "backdoor" to restore the pre-5.8.0 -(pre-5.7.3, really) signal behaviour. Just set the environment variable -PERL_SIGNALS to C, and the old immediate (and unsafe) -signal handling behaviour returns. See L -and L. - -In completely unrelated news, you can now use safe signals with -POSIX::SigAction. See L. - -=head2 Tied Arrays with Negative Array Indices - -Formerly, the indices passed to C, C, C, and -C methods in tied array class were always non-negative. If -the actual argument was negative, Perl would call FETCHSIZE implicitly -and add the result to the index before passing the result to the tied -array method. This behaviour is now optional. If the tied array class -contains a package variable named C<$NEGATIVE_INDICES> which is set to -a true value, negative values will be passed to C, C, -C, and C unchanged. - -=head2 local ${$x} - -The syntaxes - - local ${$x} - local @{$x} - local %{$x} - -now do localise variables, given that the $x is a valid variable name. - -=head2 Unicode Character Database 4.0.0 - -The copy of the Unicode Character Database included in Perl 5.8 has -been updated to 4.0.0 from 3.2.0. This means for example that the -Unicode character properties are as in Unicode 4.0.0. - -=head2 Miscellaneous Enhancements - -C now defaults to unpacking the C<$_>. - -C in void context is no longer expensive. C is now context -aware, and will not construct a list if called in void context. - -If a socket gets closed by the server while printing to it, the client -now gets a SIGPIPE. While this new feature was not planned, it fell -naturally out of PerlIO changes, and is to be considered an accidental -feature. - -PerlIO::get_layers(FH) returns the names of the PerlIO layers -active on a filehandle. - -PerlIO::via layers can now have an optional UTF8 method to -indicate whether the layer wants to "auto-:utf8" the stream. - -utf8::is_utf8() has been added as a quick way to test whether -a scalar is encoded internally in UTF-8 (Unicode). - -=head1 Modules and Pragmata - -=head2 Updated Modules And Pragmata - -The following modules and pragmata have been updated since Perl 5.8.0: - -=over 4 - -=item base - -=item B::Bytecode - -In much better shape than it used to be. Still far from perfect, but -maybe worth a try. - -=item B::Concise - -=item B::Deparse - -=item Benchmark - -An optional feature, C<:hireswallclock>, now allows for high -resolution wall clock times (uses Time::HiRes). - -=item ByteLoader - -See B::Bytecode. - -=item bytes - -Now has bytes::substr. - -=item CGI - -=item charnames - -One can now have custom character name aliases. - -=item CPAN - -There is now a simple command line frontend to the CPAN.pm -module called F. - -=item Data::Dumper - -A new option, Pair, allows choosing the separator between hash keys -and values. - -=item DB_File - -=item Devel::PPPort - -=item Digest::MD5 - -=item Encode - -Significant updates on the encoding pragma functionality -(tr/// and the DATA filehandle, formats). - -If a filehandle has been marked as to have an encoding, unmappable -characters are detected already during input, not later (when the -corrupted data is being used). - -The ISO 8859-6 conversion table has been corrected (the 0x30..0x39 -erroneously mapped to U+0660..U+0669, instead of U+0030..U+0039). The -GSM 03.38 conversion did not handle escape sequences correctly. The -UTF-7 encoding has been added (making Encode feature-complete with -Unicode::String). - -=item fields - -=item libnet - -=item Math::BigInt - -A lot of bugs have been fixed since v1.60, the version included in Perl -v5.8.0. Especially noteworthy are the bug in Calc that caused div and mod to -fail for some large values, and the fixes to the handling of bad inputs. - -Some new features were added, e.g. the broot() method, you can now pass -parameters to config() to change some settings at runtime, and it is now -possible to trap the creation of NaN and infinity. - -As usual, some optimizations took place and made the math overall a tad -faster. In some cases, quite a lot faster, actually. Especially alternative -libraries like Math::BigInt::GMP benefit from this. In addition, a lot of the -quite clunky routines like fsqrt() and flog() are now much much faster. - -=item MIME::Base64 - -=item NEXT - -Diamond inheritance now works. - -=item Net::Ping - -=item PerlIO::scalar - -Reading from non-string scalars (like the special variables, see -L) now works. - -=item podlators - -=item Pod::LaTeX - -=item PodParsers - -=item Pod::Perldoc - -Complete rewrite. As a side-effect, no longer refuses to startup when -run by root. - -=item Scalar::Util - -New utilities: refaddr, isvstring, looks_like_number, set_prototype. - -=item Storable - -Can now store code references (via B::Deparse, so not foolproof). - -=item strict - -Earlier versions of the strict pragma did not check the parameters -implicitly passed to its "import" (use) and "unimport" (no) routine. -This caused the false idiom such as: - - use strict qw(@ISA); - @ISA = qw(Foo); - -This however (probably) raised the false expectation that the strict -refs, vars and subs were being enforced (and that @ISA was somehow -"declared"). But the strict refs, vars, and subs are B enforced -when using this false idiom. - -Starting from Perl 5.8.1, the above B cause an error to be -raised. This may cause programs which used to execute seemingly -correctly without warnings and errors to fail when run under 5.8.1. -This happens because - - use strict qw(@ISA); - -will now fail with the error: - - Unknown 'strict' tag(s) '@ISA' - -The remedy to this problem is to replace this code with the correct idiom: - - use strict; - use vars qw(@ISA); - @ISA = qw(Foo); - -=item Term::ANSIcolor - -=item Test::Harness - -Now much more picky about extra or missing output from test scripts. - -=item Test::More - -=item Test::Simple - -=item Text::Balanced - -=item Time::HiRes - -Use of nanosleep(), if available, allows mixing subsecond sleeps with -alarms. - -=item threads - -Several fixes, for example for join() problems and memory -leaks. In some platforms (like Linux) that use glibc the minimum memory -footprint of one ithread has been reduced by several hundred kilobytes. - -=item threads::shared - -Many memory leaks have been fixed. - -=item Unicode::Collate - -=item Unicode::Normalize - -=item Win32::GetFolderPath - -=item Win32::GetOSVersion - -Now returns extra information. - -=back - -=head1 Utility Changes - -The C utility now produces a more modern layout: -F instead of F. -Also, the boilerplate test is now called F -instead of F. - -The Perl debugger (F) has now been extensively -documented and bugs found while documenting have been fixed. - -C has been rewritten from scratch to be more robust and -feature rich. - -C works now at least somewhat better, while C -is rather more broken. (The Perl compiler suite as a whole continues -to be experimental.) - -=head1 New Documentation - -perl573delta has been added to list the differences between the -(now quite obsolete) development releases 5.7.2 and 5.7.3. - -perl58delta and perl581delta have been added: these are the perldeltas -of 5.8.0 and 5.8.1, detailing the differences respectively between -5.6.0 and 5.8.0, and between 5.8.0 and 5.8.1. - -perlartistic has been added: it is the Artistic License in pod format, -making it easier for modules to refer to it. - -perlcheat has been added: it is a Perl cheat sheet. - -perlgpl has been added: it is the GNU General Public License in pod -format, making it easier for modules to refer to it. - -perlmacosx has been added to tell about the installation and use -of Perl in Mac OS X. - -perlos400 has been added to tell about the installation and use -of Perl in OS/400 PASE. - -perlreref has been added: it is a regular expressions quick reference. - -=head1 Installation and Configuration Improvements - -The Unix standard Perl location, F, is no longer -overwritten by default if it exists. This change was very prudent -because so many Unix vendors already provide a F, -but simultaneously many system utilities may depend on that -exact version of Perl, so better not to overwrite it. - -One can now specify installation directories for site and vendor man -and HTML pages, and site and vendor scripts. See F. - -One can now specify a destination directory for Perl installation -by specifying the DESTDIR variable for C. (This feature -is slightly different from the previous C.) -See F. - -gcc versions 3.x introduced a new warning that caused a lot of noise -during Perl compilation: C. This warning has now been avoided by -Configure weeding out such directories before the compilation. - -One can now build subsets of Perl core modules by using the -Configure flags C<-Dnoextensions=...> and C<-Donlyextensions=...>, -see F. - -=head2 Platform-specific enhancements - -In Cygwin Perl can now be built with threads (C). -This works with both Cygwin 1.3.22 and Cygwin 1.5.3. - -In newer FreeBSD releases Perl 5.8.0 compilation failed because of -trying to use F, which in FreeBSD is just a dummy file, and -a fatal error to even try to use. Now F is not used. - -Perl is now known to build also in Hitachi HI-UXMPP. - -Perl is now known to build again in LynxOS. - -Mac OS X now installs with Perl version number embedded in -installation directory names for easier upgrading of user-compiled -Perl, and the installation directories in general are more standard. -In other words, the default installation no longer breaks the -Apple-provided Perl. On the other hand, with C -you can now really replace the Apple-supplied Perl (B). - -Mac OS X now builds Perl statically by default. This change was done -mainly for faster startup times. The Apple-provided Perl is still -dynamically linked and shared, and you can enable the sharedness for -your own Perl builds by C. - -Perl has been ported to IBM's OS/400 PASE environment. The best way -to build a Perl for PASE is to use an AIX host as a cross-compilation -environment. See README.os400. - -Yet another cross-compilation option has been added: now Perl builds -on OpenZaurus, an Linux distribution based on Mandrake + Embedix for -the Sharp Zaurus PDA. See the Cross/README file. - -Tru64 when using gcc 3 drops the optimisation for F to C<-O2> -because of gigantic memory use with the default C<-O3>. - -Tru64 can now build Perl with the newer Berkeley DBs. - -Building Perl on WinCE has been much enhanced, see F -and F. - -=head1 Selected Bug Fixes - -=head2 Closures, eval and lexicals - -There have been many fixes in the area of anonymous subs, lexicals and -closures. Although this means that Perl is now more "correct", it is -possible that some existing code will break that happens to rely on -the faulty behaviour. In practice this is unlikely unless your code -contains a very complex nesting of anonymous subs, evals and lexicals. - -=head2 Generic fixes - -If an input filehandle is marked C<:utf8> and Perl sees illegal UTF-8 -coming in when doing C<< >>, if warnings are enabled a warning is -immediately given - instead of being silent about it and Perl being -unhappy about the broken data later. (The C<:encoding(utf8)> layer -also works the same way.) - -binmode(SOCKET, ":utf8") only worked on the input side, not on the -output side of the socket. Now it works both ways. - -For threaded Perls certain system database functions like getpwent() -and getgrent() now grow their result buffer dynamically, instead of -failing. This means that at sites with lots of users and groups the -functions no longer fail by returning only partial results. - -Perl 5.8.0 had accidentally broken the capability for users -to define their own uppercase<->lowercase Unicode mappings -(as advertised by the Camel). This feature has been fixed and -is also documented better. - -In 5.8.0 this - - $some_unicode .= ; - -didn't work correctly but instead corrupted the data. This has now -been fixed. - -Tied methods like FETCH etc. may now safely access tied values, i.e. -resulting in a recursive call to FETCH etc. Remember to break the -recursion, though. - -At startup Perl blocks the SIGFPE signal away since there isn't much -Perl can do about it. Previously this blocking was in effect also for -programs executed from within Perl. Now Perl restores the original -SIGFPE handling routine, whatever it was, before running external -programs. - -Linenumbers in Perl scripts may now be greater than 65536, or 2**16. -(Perl scripts have always been able to be larger than that, it's just -that the linenumber for reported errors and warnings have "wrapped -around".) While scripts that large usually indicate a need to rethink -your code a bit, such Perl scripts do exist, for example as results -from generated code. Now linenumbers can go all the way to -4294967296, or 2**32. - -=head2 Platform-specific fixes - -Linux - -=over 4 - -=item * - -Setting $0 works again (with certain limitations that -Perl cannot do much about: see L) - -=back - -HP-UX - -=over 4 - -=item * - -Setting $0 now works. - -=back - -VMS - -=over 4 - -=item * - -Configuration now tests for the presence of C, and IO::Poll -now uses the vendor-supplied function if detected. - -=item * - -A rare access violation at Perl start-up could occur if the Perl image was -installed with privileges or if there was an identifier with the -subsystem attribute set in the process's rightslist. Either of these -circumstances triggered tainting code that contained a pointer bug. -The faulty pointer arithmetic has been fixed. - -=item * - -The length limit on values (not keys) in the %ENV hash has been raised -from 255 bytes to 32640 bytes (except when the PERL_ENV_TABLES setting -overrides the default use of logical names for %ENV). If it is -necessary to access these long values from outside Perl, be aware that -they are implemented using search list logical names that store the -value in pieces, each 255-byte piece (up to 128 of them) being an -element in the search list. When doing a lookup in %ENV from within -Perl, the elements are combined into a single value. The existing -VMS-specific ability to access individual elements of a search list -logical name via the $ENV{'foo;N'} syntax (where N is the search list -index) is unimpaired. - -=item * - -The piping implementation now uses local rather than global DCL -symbols for inter-process communication. - -=item * - -File::Find could become confused when navigating to a relative -directory whose name collided with a logical name. This problem has -been corrected by adding directory syntax to relative path names, thus -preventing logical name translation. - -=back - -Win32 - -=over 4 - -=item * - -A memory leak in the fork() emulation has been fixed. - -=item * - -The return value of the ioctl() built-in function was accidentally -broken in 5.8.0. This has been corrected. - -=item * - -The internal message loop executed by perl during blocking operations -sometimes interfered with messages that were external to Perl. -This often resulted in blocking operations terminating prematurely or -returning incorrect results, when Perl was executing under environments -that could generate Windows messages. This has been corrected. - -=item * - -Pipes and sockets are now automatically in binary mode. - -=item * - -The four-argument form of select() did not preserve $! (errno) properly -when there were errors in the underlying call. This is now fixed. - -=item * - -The "CR CR LF" problem of has been fixed, binmode(FH, ":crlf") -is now effectively a no-op. - -=back - -=head1 New or Changed Diagnostics - -All the warnings related to pack() and unpack() were made more -informative and consistent. - -=head2 Changed "A thread exited while %d threads were running" - -The old version - - A thread exited while %d other threads were still running - -was misleading because the "other" included also the thread giving -the warning. - -=head2 Removed "Attempt to clear a restricted hash" - -It is not illegal to clear a restricted hash, so the warning -was removed. - -=head2 New "Illegal declaration of anonymous subroutine" - -You must specify the block of code for C. - -=head2 Changed "Invalid range "%s" in transliteration operator" - -The old version - - Invalid [] range "%s" in transliteration operator - -was simply wrong because there are no "[] ranges" in tr///. - -=head2 New "Missing control char name in \c" - -Self-explanatory. - -=head2 New "Newline in left-justified string for %s" - -The padding spaces would appear after the newline, which is -probably not what you had in mind. - -=head2 New "Possible precedence problem on bitwise %c operator" - -If you think this - - $x & $y == 0 - -tests whether the bitwise AND of $x and $y is zero, -you will like this warning. - -=head2 New "read() on %s filehandle %s" - -You cannot read() (or sysread()) from a closed or unopened filehandle. - -=head2 New "Tied variable freed while still in use" - -Something pulled the plug on a live tied variable, Perl plays -safe by bailing out. - -=head2 New "To%s: illegal mapping '%s'" - -An illegal user-defined Unicode casemapping was specified. - -=head2 New "Use of freed value in iteration" - -Something modified the values being iterated over. This is not good. - -=head1 Changed Internals - -These news matter to you only if you either write XS code or like to -know about or hack Perl internals (using Devel::Peek or any of the -C modules counts), or like to run Perl with the C<-D> option. - -The embedding examples of L have been reviewed to be -up to date and consistent: for example, the correct use of -PERL_SYS_INIT3() and PERL_SYS_TERM(). - -Extensive reworking of the pad code (the code responsible -for lexical variables) has been conducted by Dave Mitchell. - -Extensive work on the v-strings by John Peacock. - -UTF-8 length and position cache: to speed up the handling of Unicode -(UTF-8) scalars, a cache was introduced. Potential problems exist if -an extension bypasses the official APIs and directly modifies the PV -of an SV: the UTF-8 cache does not get cleared as it should. - -APIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv, -sv_setsv, are again available. - -Certain Perl core C APIs like cxinc and regatom are no longer -available at all to code outside the Perl core of the Perl core -extensions. This is intentional. They never should have been -available with the shorter names, and if you application depends on -them, you should (be ashamed and) contact perl5-porters to discuss -what are the proper APIs. - -Certain Perl core C APIs like C are no longer available -without their C prefix. If your XS module stops working -because some functions cannot be found, in many cases a simple fix is -to add the C prefix to the function and the thread context -C as the first argument of the function call. This is also how -it should always have been done: letting the Perl_-less forms to leak -from the core was an accident. For cleaner embedding you can also -force this for all APIs by defining at compile time the cpp define -PERL_NO_SHORT_NAMES. - -Perl_save_bool() has been added. - -Regexp objects (those created with C) now have S-magic rather than -R-magic. This fixed regexps of the form /...(??{...;$x})/ to no -longer ignore changes made to $x. The S-magic avoids dropping -the caching optimization and making (??{...}) constructs obscenely -slow (and consequently useless). See also L. -Regexp::Copy was affected by this change. - -The Perl internal debugging macros DEBUG() and DEB() have been renamed -to PERL_DEBUG() and PERL_DEB() to avoid namespace conflicts. - -C<-DL> removed (the leaktest had been broken and unsupported for years, -use alternative debugging mallocs or tools like valgrind and Purify). - -Verbose modifier C added for C<-DXv> and C<-Dsv>, see L. - -=head1 New Tests - -In Perl 5.8.0 there were about 69000 separate tests in about 700 test files, -in Perl 5.9.0 there are about 77000 separate tests in about 780 test files. -The exact numbers depend on the Perl configuration and on the operating -system platform. - -=head1 Known Problems - -The hash randomisation mentioned in L is definitely -problematic: it will wake dormant bugs and shake out bad assumptions. - -Many of the rarer platforms that worked 100% or pretty close to it -with perl 5.8.0 have been left a little bit untended since their -maintainers have been otherwise busy lately, and therefore there will -be more failures on those platforms. Such platforms include Mac OS -Classic, IBM z/OS (and other EBCDIC platforms), and NetWare. The most -common Perl platforms (Unix and Unix-like, Microsoft platforms, and -VMS) have large enough testing and expert population that they are -doing well. - -=head2 Tied hashes in scalar context - -Tied hashes do not currently return anything useful in scalar context, -for example when used as boolean tests: - - if (%tied_hash) { ... } - -The current nonsensical behaviour is always to return false, -regardless of whether the hash is empty or has elements. - -The root cause is that there is no interface for the implementors of -tied hashes to implement the behaviour of a hash in scalar context. - -=head2 Net::Ping 450_service and 510_ping_udp failures - -The subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the -subtest 2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have -an unusual networking setup. For example in the latter case the -test is trying to send a UDP ping to the IP address 127.0.0.1. - -=head2 B::C - -The C-generating compiler backend B::C (the frontend being -C) is even more broken than it used to be because of -the extensive lexical variable changes. (The good news is that -B::Bytecode and ByteLoader are better than they used to be.) - -=head1 Platform Specific Problems - -=head2 EBCDIC Platforms - -IBM z/OS and other EBCDIC platforms continue to be problematic -regarding Unicode support. Many Unicode tests are skipped when -they really should be fixed. - -=head2 Cygwin 1.5 problems - -In Cygwin 1.5 the F and F tests have failures for -some yet unknown reason. In 1.5.5 the threads tests stress_cv, -stress_re, and stress_string are failing unless the environment -variable PERLIO is set to "perlio" (which makes also the io/tell -failure go away). - -Perl 5.8.1 does build and work well with Cygwin 1.3: with (uname -a) -C -a 100% "make test" was achieved with C. - -=head2 HP-UX: HP cc warnings about sendfile and sendpath - -With certain HP C compiler releases (e.g. B.11.11.02) you will -get many warnings like this (lines wrapped for easier reading): - - cc: "/usr/include/sys/socket.h", line 504: warning 562: - Redeclaration of "sendfile" with a different storage class specifier: - "sendfile" will have internal linkage. - cc: "/usr/include/sys/socket.h", line 505: warning 562: - Redeclaration of "sendpath" with a different storage class specifier: - "sendpath" will have internal linkage. - -The warnings show up both during the build of Perl and during certain -lib/ExtUtils tests that invoke the C compiler. The warning, however, -is not serious and can be ignored. - -=head2 IRIX: t/uni/tr_7jis.t falsely failing - -The test t/uni/tr_7jis.t is known to report failure under 'make test' -or the test harness with certain releases of IRIX (at least IRIX 6.5 -and MIPSpro Compilers Version 7.3.1.1m), but if run manually the test -fully passes. - -=head2 Mac OS X: no usemymalloc - -The Perl malloc (C<-Dusemymalloc>) does not work at all in Mac OS X. -This is not that serious, though, since the native malloc works just -fine. - -=head2 Tru64: No threaded builds with GNU cc (gcc) - -In the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used -to compile a threaded Perl (-Duseithreads) because the system -C<< >> file doesn't know about gcc. - -=head2 Win32: sysopen, sysread, syswrite - -As of the 5.8.0 release, sysopen()/sysread()/syswrite() do not behave -like they used to in 5.6.1 and earlier with respect to "text" mode. -These built-ins now always operate in "binary" mode (even if sysopen() -was passed the O_TEXT flag, or if binmode() was used on the file -handle). Note that this issue should only make a difference for disk -files, as sockets and pipes have always been in "binary" mode in the -Windows port. As this behavior is currently considered a bug, -compatible behavior may be re-introduced in a future release. Until -then, the use of sysopen(), sysread() and syswrite() is not supported -for "text" mode operations. - -=head1 TODO - -Here are some things that are planned for perl 5.10.0 : - -=over 4 - -=item * - -Various Copy-On-Write techniques will be investigated in hopes -of speeding up Perl. - -=item * - -CPANPLUS, Inline, and Module::Build will become core modules. - -=item * - -The ability to write true lexically scoped pragmas will be introduced, -perhaps via a C pragma. - -=item * - -Work will continue on the bytecompiler and byteloader. - -=item * - -v-strings as they currently exist are scheduled to be deprecated. The -v-less form (1.2.3) will become a "version object" when used with C, -C, and C<$VERSION>. $^V will also be a "version object" so the -printf("%vd",...) construct will no longer be needed. The v-ful version -(v1.2.3) will become obsolete. The equivalence of strings and v-strings (e.g. -that currently 5.8.0 is equal to "\5\8\0") will go away. B, though: it is quite hard to detect when -v-strings are being used safely, and when they are not. - -=back - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at F. There may also be -information at F, the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. You can browse and search -the Perl 5 bugs at F. - -=head1 SEE ALSO - -The F file for exhaustive details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl591delta.pod b/pod/perl591delta.pod deleted file mode 100644 index 349c49a40f2..00000000000 --- a/pod/perl591delta.pod +++ /dev/null @@ -1,323 +0,0 @@ -=head1 NAME - -perl591delta - what is new for perl v5.9.1 - -=head1 DESCRIPTION - -This document describes differences between the 5.9.0 and the 5.9.1 -development releases. See L for the differences between -5.8.0 and 5.9.0. - -=head1 Incompatible Changes - -=head2 substr() lvalues are no longer fixed-length - -The lvalues returned by the three argument form of substr() used to be a -"fixed length window" on the original string. In some cases this could -cause surprising action at distance or other undefined behaviour. Now the -length of the window adjusts itself to the length of the string assigned to -it. - -=head2 The C<:unique> attribute is only meaningful for globals - -Now applying C<:unique> to lexical variables and to subroutines will -result in a compilation error. - -=head1 Core Enhancements - -=head2 Lexical C<$_> - -The default variable C<$_> can now be lexicalized, by declaring it like -any other lexical variable, with a simple - - my $_; - -The operations that default on C<$_> will use the lexically-scoped -version of C<$_> when it exists, instead of the global C<$_>. - -In a C or a C block, if C<$_> was previously my'ed, then the -C<$_> inside the block is lexical as well (and scoped to the block). - -In a scope where C<$_> has been lexicalized, you can still have access to -the global version of C<$_> by using C<$::_>, or, more simply, by -overriding the lexical declaration with C. - -=head2 Tied hashes in scalar context - -As of perl 5.8.2/5.9.0, tied hashes did not return anything useful in -scalar context, for example when used as boolean tests: - - if (%tied_hash) { ... } - -The old nonsensical behaviour was always to return false, -regardless of whether the hash is empty or has elements. - -There is now an interface for the implementors of tied hashes to implement -the behaviour of a hash in scalar context, via the SCALAR method (see -L). Without a SCALAR method, perl will try to guess whether -the hash is empty, by testing if it's inside an iteration (in this case -it can't be empty) or by calling FIRSTKEY. - -=head2 Formats - -Formats were improved in several ways. A new field, C<^*>, can be used for -variable-width, one-line-at-a-time text. Null characters are now handled -correctly in picture lines. Using C<@#> and C<~~> together will now -produce a compile-time error, as those format fields are incompatible. -L has been improved, and miscellaneous bugs fixed. - -=head2 Stacked filetest operators - -As a new form of syntactic sugar, it's now possible to stack up filetest -operators. You can now write C<-f -w -x $file> in a row to mean -C<-x $file && -w _ && -f _>. See L. - -=head1 Modules and Pragmata - -=over 4 - -=item Benchmark - -In C, cmpthese() and timestr() now use the time statistics of -children instead of parent when the selected style is 'nop'. - -=item Carp - -The error messages produced by C now include spaces between the -arguments in function argument lists: this makes long error messages -appear more nicely in browsers and other tools. - -=item Exporter - -C will now recognize grouping tags (such as C<:name>) anywhere -in the import list, not only at the beginning. - -=item FindBin - -A function C is provided to resolve problems where modules in different -directories wish to use FindBin. - -=item List::Util - -You can now weaken references to read only values. - -=item threads::shared - -C has a new two argument form. C has been added. - -=back - -=head1 Utility Changes - -C now assumes C<-print> as a default action. Previously, it -needed to be specified explicitly. - -A new utility, C, makes it easy to run an individual regression test -at the command line. C is part of Test::Harness, which users of earlier -Perl versions can install from CPAN. - -The perl debugger now supports a C command, to save the current -history to a file, and an C command, which prints the inheritance tree -of its argument (if the C module is installed.) - -=head1 Documentation - -The documentation has been revised in places to produce more standard manpages. - -The long-existing feature of C regexps setting C<$_> and pos() -is now documented. - -=head1 Performance Enhancements - -Sorting arrays in place (C<@a = sort @a>) is now optimized to avoid -making a temporary copy of the array. - -The operations involving case mapping on UTF-8 strings (uc(), lc(), -C, etc.) have been greatly speeded up. - -Access to elements of lexical arrays via a numeric constant between 0 and -255 is now faster. (This used to be only the case for global arrays.) - -=head1 Selected Bug Fixes - -=head2 UTF-8 bugs - -Using substr() on a UTF-8 string could cause subsequent accesses on that -string to return garbage. This was due to incorrect UTF-8 offsets being -cached, and is now fixed. - -join() could return garbage when the same join() statement was used to -process 8 bit data having earlier processed UTF-8 data, due to the flags -on that statement's temporary workspace not being reset correctly. This -is now fixed. - -Using Unicode keys with tied hashes should now work correctly. - -chop() and chomp() used to mangle UTF-8 strings. This has been fixed. - -sprintf() used to misbehave when the format string was in UTF-8. This is -now fixed. - -=head2 Threading bugs - -Hashes with the C<:unique> attribute weren't made read-only in new -threads. They are now. - -=head2 More bugs - -C<$a .. $b> will now work as expected when either $a or $b is C. - -Reading $^E now preserves $!. Previously, the C code implementing $^E -did not preserve C, so reading $^E could cause C and therefore -C<$!> to change unexpectedly. - -C wasn't in effect in regexp-eval blocks (C). - -=head1 New or Changed Diagnostics - -A new deprecation warning, I, -has been added, to warn against the use of the dubious and deprecated -construct - - my $x if 0; - -See L. - -The fatal error I is now -documented in L. - -A new error, I<%ENV is aliased to %s>, is produced when taint checks are -enabled and when C<*ENV> has been aliased (and thus doesn't reflect the -program's environment anymore.) - -=head1 Changed Internals - -These news matter to you only if you either write XS code or like to -know about or hack Perl internals (using Devel::Peek or any of the -C modules counts), or like to run Perl with the C<-D> option. - -=head2 Reordering of SVt_* constants - -The relative ordering of constants that define the various types of C -have changed; in particular, C has been moved before C, -C, C and C. This is unlikely to make any -difference unless you have code that explicitly makes assumptions about that -ordering. (The inheritance hierarchy of C objects has been changed -to reflect this.) - -=head2 Removal of CPP symbols - -The C preprocessor symbols C and -C, which were supposed to give the version number of -the oldest perl binary-compatible (resp. source-compatible) with the -present one, were not used, and sometimes had misleading values. They have -been removed. - -=head2 Less space is used by ops - -The C structure now uses less space. The C field has been -removed and replaced by two one-bit fields, C and C. -C is now 9 bits long. (Consequently, the C class doesn't -provide an C method anymore.) - -=head2 New parser - -perl's parser is now generated by bison (it used to be generated by -byacc.) As a result, it seems to be a bit more robust. - -=head1 Configuration and Building - -C now invokes callbacks regardless of the value of the variable -they are called for. Previously callbacks were only invoked in the -C branch. This change should only affect platform -maintainers writing configuration hints files. - -The portability and cleanliness of the Win32 makefiles has been improved. - -=head1 Known Problems - -There are still a couple of problems in the implementation of the lexical -C<$_>: it doesn't work inside C blocks and with regard to the -reverse() built-in used without arguments. (See the TODO tests in -F.) - -=head2 Platform Specific Problems - -The test F may fail on OpenBSD. This hasn't been -diagnosed yet. - -On some configurations on AIX 5, one test in F fails. -When configured with long doubles, perl may fail tests 224-236 in -F on the same platform. - -For threaded builds, F has been reported to -fail some tests on HP-UX 10.20. - -=head1 To-do for perl 5.10.0 - -This is a non-exhaustive, non-ordered, non-contractual and non-definitive -list of things to do (or nice to have) for perl 5.10.0 : - -Clean up and finish support for assertions. See L. - -Reimplement the mechanism of lexical pragmas to be more extensible. Fix -current pragmas that don't work well (or at all) with lexical scopes or in -run-time eval(STRING) (C, C, C for example). MJD has a -preliminary patch that implements this. - -Fix (or rewrite) the implementation of the C closures. - -Conversions from byte strings to UTF-8 currently map high bit characters -to Unicode without translation (or, depending on how you look at it, by -implicitly assuming that the byte strings are in Latin-1). As perl assumes -the C locale by default, upgrading a string to UTF-8 may change the -meaning of its contents regarding character classes, case mapping, etc. -This should probably emit a warning (at least). - -Introduce a new special block, UNITCHECK, which is run at the end of a -compilation unit (module, file, eval(STRING) block). This will correspond to -the Perl 6 CHECK. Perl 5's CHECK cannot be changed or removed because the -O.pm/B.pm backend framework depends on it. - -Study the possibility of adding a new prototype character, C<_>, meaning -"this argument defaults to $_". - -Make the peephole optimizer optional. - -Allow lexical aliases (maybe via the syntax C. - -Fix the bugs revealed by running the test suite with the C<-t> switch (via -C). - -Make threads more robust. - -Make C and C work (opposite of C, etc.). - -A test suite for the B module would be nice. - -A ponie. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://bugs.perl.org/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -=head1 SEE ALSO - -The F file for exhaustive details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl592delta.pod b/pod/perl592delta.pod deleted file mode 100644 index db8be417d2b..00000000000 --- a/pod/perl592delta.pod +++ /dev/null @@ -1,342 +0,0 @@ -=head1 NAME - -perl592delta - what is new for perl v5.9.2 - -=head1 DESCRIPTION - -This document describes differences between the 5.9.1 and the 5.9.2 -development releases. See L and L for the -differences between 5.8.0 and 5.9.1. - -=head1 Incompatible Changes - -=head2 Packing and UTF-8 strings - -The semantics of pack() and unpack() regarding UTF-8-encoded data has been -changed. Processing is now by default character per character instead of -byte per byte on the underlying encoding. Notably, code that used things -like C to see through the encoding of string will now -simply get back the original $string. Packed strings can also get upgraded -during processing when you store upgraded characters. You can get the old -behaviour by using C. - -To be consistent with pack(), the C in unpack() templates indicates -that the data is to be processed in character mode, i.e. character by -character; on the contrary, C in unpack() indicates UTF-8 mode, where -the packed string is processed in its UTF-8-encoded Unicode form on a byte -by byte basis. This is reversed with regard to perl 5.8.X. - -Moreover, C and C can also be used in pack() templates to specify -respectively character and byte modes. - -C and C in the middle of a pack or unpack format now switch to the -specified encoding mode, honoring parens grouping. Previously, parens were -ignored. - -Also, there is a new pack() character format, C, which is intended to -replace the old C. C is kept for unsigned chars coded as bytes in -the strings internal representation. C represents unsigned (logical) -character values, which can be greater than 255. It is therefore more -robust when dealing with potentially UTF-8-encoded data (as C will wrap -values outside the range 0..255, and not respect the string encoding). - -In practice, that means that pack formats are now encoding-neutral, except -C. - -For consistency, C in unpack() format now trims all Unicode whitespace -from the end of the string. Before perl 5.9.2, it used to strip only the -classical ASCII space characters. - -=head2 Miscellaneous - -The internal dump output has been improved, so that non-printable characters -such as newline and backspace are output in C<\x> notation, rather than -octal. - -The B<-C> option can no longer be used on the C<#!> line. It wasn't -working there anyway. - -=head1 Core Enhancements - -=head2 Malloc wrapping - -Perl can now be built to detect attempts to assign pathologically large chunks -of memory. Previously such assignments would suffer from integer wrap-around -during size calculations causing a misallocation, which would crash perl, and -could theoretically be used for "stack smashing" attacks. The wrapping -defaults to enabled on platforms where we know it works (most AIX -configurations, BSDi, Darwin, DEC OSF/1, FreeBSD, HP-UX, GNU Linux, OpenBSD, -Solaris, VMS and most Win32 compilers) and defaults to disabled on other -platforms. - -=head2 Unicode Character Database 4.0.1 - -The copy of the Unicode Character Database included in Perl 5.9 has -been updated to 4.0.1 from 4.0.0. - -=head2 suidperl less insecure - -Paul Szabo has analysed and patched C to remove existing known -insecurities. Currently there are no known holes in C, but previous -experience shows that we cannot be confident that these were the last. You may -no longer invoke the set uid perl directly, so to preserve backwards -compatibility with scripts that invoke #!/usr/bin/suidperl the only set uid -binary is now CI (C for this release). C -is installed as a hard link to C; both C and C will -invoke C automatically the set uid binary, so this change should -be completely transparent. - -For new projects the core perl team would strongly recommend that you use -dedicated, single purpose security tools such as C in preference to -C. - -=head2 PERLIO_DEBUG - -The C environment variable has no longer any effect for -setuid scripts and for scripts run with B<-T>. - -Moreover, with a thread-enabled perl, using C could lead to -an internal buffer overflow. This has been fixed. - -=head2 Formats - -In addition to bug fixes, C's features have been enhanced. See -L. - -=head2 Unicode Character Classes - -Perl's regular expression engine now contains support for matching on the -intersection of two Unicode character classes. You can also now refer to -user-defined character classes from within other user defined character -classes. - -=head2 Byte-order modifiers for pack() and unpack() - -There are two new byte-order modifiers, C> (big-endian) and C> -(little-endian), that can be appended to most pack() and unpack() template -characters and groups to force a certain byte-order for that type or group. -See L and L for details. - -=head2 Byte count feature in pack() - -A new pack() template character, C<".">, returns the number of characters -read so far. - -=head2 New variables - -A new variable, ${^RE_DEBUG_FLAGS}, controls what debug flags are in -effect for the regular expression engine when running under C. See L for details. - -A new variable ${^UTF8LOCALE} indicates where a UTF-8 locale was detected -by perl at startup. - -=head1 Modules and Pragmata - -=head2 New modules - -=over 4 - -=item * - -C, by Audrey Tang, is a module to emit warnings -whenever an ASCII character string containing high-bit bytes is implicitly -converted into UTF-8. - -=item * - -C, by Richard Clamp, is a small handy module that tells -you what versions of core modules ship with any versions of Perl 5. It -comes with a command-line frontend, C. - -=back - -=head2 Updated And Improved Modules and Pragmata - -Dual-lived modules have been updated to be kept up-to-date with respect to -CPAN. - -The dual-lived modules which contain an C<_> in their version number are -actually I of the corresponding CPAN release. - -=over 4 - -=item B::Concise - -C was significantly improved. - -=item Socket - -There is experimental support for Linux abstract Unix domain sockets. - -=item Sys::Syslog - -C can now use numeric constants for facility names and priorities, -in addition to strings. - -=item threads - -Detached threads are now also supported on Windows. - -=back - -=head1 Utility Changes - -=over 4 - -=item * - -The C utility is now installed with perl (see L -above). - -=item * - -C and C have been made a bit more robust with regard to -"modern" C code. - -=item * - -Several bugs have been fixed in C, regarding C<-exec> and -C<-eval>. Also the options C<-path>, C<-ipath> and C<-iname> have been -added. - -=item * - -The Perl debugger can now save all debugger commands for sourcing later; -notably, it can now emulate stepping backwards, by restarting and -rerunning all bar the last command from a saved command history. - -It can also display the parent inheritance tree of a given class. - -Perl has a new -dt command-line flag, which enables threads support in the -debugger. - -=back - -=head1 Performance Enhancements - -=over 4 - -=item * - -Unicode case mappings (C, C, C, etc) are faster. - -=item * - -C<@a = sort @a> was optimized to do in-place sort. Likewise, C is now optimized to sort in reverse, avoiding the generation of -a temporary intermediate list. - -=item * - -Unnecessary assignments are optimised away in - - my $s = undef; - my @a = (); - my %h = (); - -=item * - -C in scalar context is now optimized. - -=item * - -The regexp engine now implements the trie optimization : it's able to -factor out common prefixes and suffixes in regular expressions. A new -special variable, ${^RE_TRIE_MAXBUF}, has been added to fine-tune this -optimization. - -=back - -=head1 Installation and Configuration Improvements - -Run-time customization of @INC can be enabled by passing the -C<-Dusesitecustomize> flag to configure. When enabled, this will make perl -run F<$sitelibexp/sitecustomize.pl> before anything else. This script can -then be set up to add additional entries to @INC. - -There is alpha support for relocatable @INC entries. - -Perl should build on Interix and on GNU/kFreeBSD. - -=head1 Selected Bug Fixes - -Most of those bugs were reported in the perl 5.8.x maintenance track. -Notably, quite a few utf8 bugs were fixed, and several memory leaks were -suppressed. The perl58Xdelta manpages have more details on them. - -Development-only bug fixes include : - -C<$Foo::_> was wrongly forced as C<$main::_>. - -=head1 New or Changed Diagnostics - -A new warning, C, is emitted to prevent this misspelling -of the non-matching operator. - -The warning I has been removed. - -The error I has been reformulated to be more -descriptive. - -There is a new compilation error, I, -for an obscure case of syntax errors. - -The diagnostic output of Carp has been changed slightly, to add a space after -the comma between arguments. This makes it much easier for tools such as -web browsers to wrap it, but might confuse any automatic tools which perform -detailed parsing of Carp output. - -C has several improvements, making it more useable from shell -scripts to get the value of configuration variables. See L for -details. - -=head1 Changed Internals - -The perl core has been refactored and reorganised in several places. -In short, this release will not be binary compatible with any previous -perl release. - -=head1 Known Problems - -For threaded builds, F has been reported to -fail some tests on HP-UX 10.20. - -Net::Ping might fail some tests on HP-UX 11.00 with the latest OS -upgrades. - -F, F and F fail some -tests on some BSD flavours. - -=head1 Plans for the next release - -The current plan for perl 5.9.3 is to add CPANPLUS as a core module. -More regular expression optimizations are also in the works. - -It is planned to release a development version of perl more frequently, -i.e. each time something major changes. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://bugs.perl.org/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -=head1 SEE ALSO - -The F file for exhaustive details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl593delta.pod b/pod/perl593delta.pod deleted file mode 100644 index 11f53ab0885..00000000000 --- a/pod/perl593delta.pod +++ /dev/null @@ -1,551 +0,0 @@ -=encoding utf8 - -=head1 NAME - -perl593delta - what is new for perl v5.9.3 - -=head1 DESCRIPTION - -This document describes differences between the 5.9.2 and the 5.9.3 -development releases. See L, L and -L for the differences between 5.8.0 and 5.9.2. - -=head1 Incompatible Changes - -=head2 Parsing of C<-f _> - -The identifier C<_> is now forced to be a bareword after a filetest -operator. This solves a number of misparsing issues when a global C<_> -subroutine is defined. - -=head2 C - -C without arguments now defaults to C<$_>. - -=head2 Magic goto and eval - -The construct C is now disallowed. (Note that the -similar construct, but with C instead, was already forbidden.) - -=head2 C<$#> has been removed - -The deprecated C<$#> variable (output format for numbers) has been -removed. A new warning, C<$# is no longer supported>, has been added. - -=head2 C<:unique> - -The C<:unique> attribute has been made a no-op, since its current -implementation was fundamentally flawed and not threadsafe. - -=head2 Scoping of the C pragma - -The C pragma is now lexically scoped. Its effect used to be global. - -=head1 Core Enhancements - -=head2 The C pragma - -The C pragma is used to enable new syntax that would break Perl's -backwards-compatibility with older releases of the language. It's a lexical -pragma, like C or C. - -Currently the following new features are available: C (adds a -switch statement), C<~~> (adds a Perl 6-like smart match operator), C -(adds a C built-in function), and C (adds an C keyword). -Those features are described below. - -Note that C low-precedence defined-or operator used to be enabled by -default (although as a weak keyword, meaning that any function would -override it). It's now only recognized when explicitly turned on (and is -then a regular keyword). - -Those features, and the C pragma itself, have been contributed by -Robin Houston. - -=head2 Switch and Smart Match operator - -Perl 5 now has a switch statement. It's available when C is in effect. This feature introduces three new keywords, -C, C, and C: - - given ($foo) { - when (/^abc/) { $abc = 1; } - when (/^def/) { $def = 1; } - when (/^xyz/) { $xyz = 1; } - default { $nothing = 1; } - } - -A more complete description of how Perl matches the switch variable -against the C conditions is given in L. - -This kind of match is called I, and it's also possible to use -it outside of switch statements, via the new C<~~> operator (enabled via -the C directive). See L. - -=head2 C - -say() is a new built-in, only available when C is in -effect, that is similar to print(), but that implicitly appends a newline -to the printed string. See L. - -=head2 C - -Perl has now support for the C special subroutine. Like -C, C is called once per package; however, it is called -just before cloning starts, and in the context of the parent thread. If it -returns a true value, then no objects of that class will be cloned. See -L for details. (Contributed by Dave Mitchell.) - -=head2 C<${^CHILD_ERROR_NATIVE}> - -A new internal variable, C<${^CHILD_ERROR_NATIVE}>, gives the native -status returned by the last pipe close, backtick command, successful call -to wait() or waitpid(), or from the system() operator. See L for -details. (Contributed by Gisle Aas.) - -=head2 Assertions - -The support for assertions, introduced in perl 5.9.0, has been improved. -The syntax for the C<-A> command-line switch has changed; it now accepts -an optional module name, defaulting to C. See -L and L. (Contributed by Salvador Fandiño García.) - -=head2 Unicode Character Database 4.1.0 - -The copy of the Unicode Character Database included in Perl 5.9 has -been updated to 4.1.0. - -=head2 C - -You can now use C followed by a version number to specify that you -want to use a version of perl older than the specified one. - -=head2 Recursive sort subs - -You can now use recursive subroutines with sort(), thanks to Robin Houston. - -=head2 Effect of pragmas in eval - -The compile-time value of the C<%^H> hint variable can now propagate into -eval("")uated code. This makes it more useful to implement lexical -pragmas. - -As a side-effect of this, the overloaded-ness of constants now propagates -into eval(""). - -=head2 New B<-E> command-line switch - -B<-E> is equivalent to B<-e>, but it implicitly enables all -optional features (like C). - -=head2 C, C and C on filehandles - -C, C and C can now work on filehandles as well as -filenames, if the system supports respectively C, C and -C, thanks to a patch provided by Gisle Aas. - -=head2 OS groups - -C<$(> and C<$)> now return groups in the order where the OS returns them, -thanks to Gisle Aas. This wasn't previously the case. - -=head1 Modules and Pragmata - -=head2 New Core Modules - -=over 4 - -=item * - -A new pragma, C, has been added; see above in L. - -=item * - -C, also available on CPAN, allows the use of assertions on -perl versions prior to 5.9.0 (that is the first one to natively support -them). - -=item * - -C is an XS-enabled, and thus faster, version of -C. - -=item * - -C is an interface to the zlib compression library. It -comes with a bundled version of zlib, so having a working zlib is not a -prerequisite to install it. It's used by C (see below). - -=item * - -C is an C-style interface to C. - -=item * - -C is a module to manipulate C archives. - -=item * - -C is a module used to calculate many types of SHA digests, -has been included for SHA support in the CPAN module. - -=item * - -C and C have been added. - -=back - -=head1 Utility Changes - -=head2 C - -C is a pure perl implementation of C, that comes with -C. - -=head2 C - -C is a small script used to generate a diff between the contents -of a tar archive and a directory tree. Like C, it comes with -C. - -=head2 C - -This command-line utility, used to print or to check SHA digests, comes -with the new C module. - -=head2 C enhancements - -C implements a new option C<--use-xsloader> to force use of -C even in backwards compatible modules. - -The handling of authors' names that had apostrophes has been fixed. - -Any enums with negative values are now skipped. - -=head2 C enhancements - -C no longer checks for F<*.ph> files by default. Use the new C<-a> -option to run I tests. - -=head1 Documentation - -=head2 Perl Glossary - -The L manpage is a glossary of terms used in the Perl -documentation, technical and otherwise, kindly provided by O'Reilly Media, -Inc. - -L now lists a rough roadmap to Perl 5.10. - -=head1 Performance Enhancements - -=head2 XS-assisted SWASHGET - -Some pure-perl code that perl was using to retrieve Unicode properties and -transliteration mappings has been reimplemented in XS. - -=head2 Constant subroutines - -The interpreter internals now support a far more memory efficient form of -inlineable constants. Storing a reference to a constant value in a symbol -table is equivalent to a full typeglob referencing a constant subroutine, -but using about 400 bytes less memory. This proxy constant subroutine is -automatically upgraded to a real typeglob with subroutine if necessary. -The approach taken is analogous to the existing space optimisation for -subroutine stub declarations, which are stored as plain scalars in place -of the full typeglob. - -Several of the core modules have been converted to use this feature for -their system dependent constants - as a result C now takes about -200K less memory. - -=head2 C - -The new compilation flag C, introduced as an option -in perl 5.8.8, is turned on by default in perl 5.9.3. It prevents perl -from creating an empty scalar with every new typeglob. See L -for details. - -=head2 Weak references are cheaper - -Weak reference creation is now I rather than I, courtesy of -Nicholas Clark. Weak reference deletion remains I, but if deletion only -happens at program exit, it may be skipped completely. - -=head2 sort() enhancements - -Salvador Fandiño provided improvements to reduce the memory usage of C -and to speed up some cases. - -=head1 Installation and Configuration Improvements - -=head2 Compilation improvements - -Parallel makes should work properly now, although there may still be problems -if C is instructed to run in parallel. - -Building with Borland's compilers on Win32 should work more smoothly. In -particular Steve Hay has worked to side step many warnings emitted by their -compilers and at least one C compiler internal error. - -Perl extensions on Windows now can be statically built into the Perl DLL, -thanks to a work by Vadim Konovalov. - -=head2 New Or Improved Platforms - -Perl is being ported to Symbian OS. See L for more -information. - -The VMS port has been improved. See L. - -DynaLoader::dl_unload_file() now works on Windows. - -Portability of Perl on various recent compilers on Windows has been -improved (Borland C++, Visual C++ 7.0). - -=head2 New probes - -C will now detect C and C, thanks to a -patch from Alan Burlison. It will also probe for C (and use it -internally if available), and whether C correctly returns the -length of the formatted string. - -=head2 Module auxiliary files - -README files and changelogs for CPAN modules bundled with perl are no -longer installed. - -=head1 Selected Bug Fixes - -=head2 C - -C was ignoring taking a hard reference in an argument -to defined(), as in : - - use strict "refs"; - my $x = "foo"; - if (defined $$x) {...} - -This now correctly produces the run-time error C. (However, C and -C are still allowed. Those constructs are discouraged -anyway.) - -=head2 Calling CORE::require() - -CORE::require() and CORE::do() were always parsed as require() and do() -when they were overridden. This is now fixed. - -=head2 Subscripts of slices - -You can now use a non-arrowed form for chained subscripts after a list -slice, like in: - - ({foo => "bar"})[0]{foo} - -This used to be a syntax error; a C<< -> >> was required. - -=head2 Remove over-optimisation - -Perl 5.9.2 introduced a change so that assignments of C to a -scalar, or of an empty list to an array or a hash, were optimised out. As -this could cause problems when C jumps were involved, this change -was backed out. - -=head2 sprintf() fixes - -Using the sprintf() function with some formats could lead to a buffer -overflow in some specific cases. This has been fixed, along with several -other bugs, notably in bounds checking. - -In related fixes, it was possible for badly written code that did not follow -the documentation of C to have formatting vulnerabilities. -C has been changed to protect people from poor quality third -party code. - -=head2 no warnings 'category' works correctly with -w - -Previously when running with warnings enabled globally via C<-w>, selective -disabling of specific warning categories would actually turn off all warnings. -This is now fixed; now C will only turn off warnings in the -C class. Previously it would erroneously turn off all warnings. - -=head2 Smaller fixes - -=over 4 - -=item * - -C now works better with directories where access rights are more -restrictive than usual. - -=item * - -Several memory leaks in ithreads were closed. Also, ithreads were made -less memory-intensive. - -=item * - -Trailing spaces are now trimmed from C<$!> and C<$^E>. - -=item * - -Operations that require perl to read a process's list of groups, such as reads -of C<$(> and C<$)>, now dynamically allocate memory rather than using a -fixed sized array. The fixed size array could cause C stack exhaustion on -systems configured to use large numbers of groups. - -=item * - -C now works better with non-default C<$/> settings. - -=item * - -The C repetition operator is now able to operate on C lists. This -used to raise a syntax error. - -=item * - -The debugger now traces correctly execution in eval("")uated code that -contains #line directives. - -=item * - -The value of the C pragma is no longer ignored for three-argument -opens. - -=item * - -Perl will now use the C library calls C and C if present -to delete keys from C<%ENV> and delete C<%ENV> entirely, thanks to a patch -from Alan Burlison. - -=back - -=head2 More Unicode Fixes - -=over 4 - -=item * - -chr() on a negative value now gives C<\x{FFFD}>, the Unicode replacement -character, unless when the C pragma is in effect, where the low -eight bytes of the value are used. - -=item * - -Some case insensitive matches between UTF-8 encoded data and 8 bit regexps, -and vice versa, could give malformed character warnings. These have been -fixed by Dave Mitchell and Yves Orton. - -=item * - -C and C could corrupt the string for certain cases where -the length UTF-8 encoding of the string in lower case, upper case or title -case differed. This was fixed by Nicholas Clark. - -=back - -=head1 New or Changed Diagnostics - -=head2 Attempt to set length of freed array - -This is a new warning, produced in situations like the following one: - - $r = do {my @a; \$#a}; - $$r = 503; - -=head2 Non-string passed as bitmask - -This is a new warning, produced when number has been passed as a argument to -select(), instead of a bitmask. - - # Wrong, will now warn - $rin = fileno(STDIN); - ($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout); - - # Should be - $rin = ''; - vec($rin,fileno(STDIN),1) = 1; - ($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout); - -=head2 Search pattern not terminated or ternary operator parsed as search pattern - -This syntax error indicates that the lexer couldn't find the final -delimiter of a C construct. Mentioning the ternary operator in -this error message makes syntax diagnostic easier. - -=head2 "%s" variable %s masks earlier declaration - -This warning is now emitted in more consistent cases; in short, when one -of the declarations involved is a C variable: - - my $x; my $x; # warns - my $x; our $x; # warns - our $x; my $x; # warns - -On the other hand, the following: - - our $x; our $x; - -now gives a C<"our" variable %s redeclared> warning. - -=head2 readdir()/closedir()/etc. attempted on invalid dirhandle - -These new warnings are now emitted when a dirhandle is used but is -either closed or not really a dirhandle. - -=head1 Changed Internals - -In general, the source code of perl has been refactored, tied up, and -optimized in many places. Also, memory management and allocation has been -improved in a couple of points. - -Andy Lester supplied many improvements to determine which function -parameters and local variables could actually be declared C to the C -compiler. Steve Peters provided new C<*_set> macros and reworked the core to -use these rather than assigning to macros in LVALUE context. - -Dave Mitchell improved the lexer debugging output under C<-DT>. - -A new file, F, has been added. It contains functions that are -no longer used in the perl core, but that remain available for binary or -source compatibility reasons. However, those functions will not be -compiled in if you add C<-DNO_MATHOMS> in the compiler flags. - -The C macro has been removed. - -The C functions, used to manipulate arrays, no longer accept null -C parameters. - -=head2 B:: modules inheritance changed - -The inheritance hierarchy of C modules has changed; C now -inherits from C (it used to inherit from C). - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://bugs.perl.org/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -=head1 SEE ALSO - -The F file for exhaustive details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl594delta.pod b/pod/perl594delta.pod deleted file mode 100644 index aa4358bc504..00000000000 --- a/pod/perl594delta.pod +++ /dev/null @@ -1,382 +0,0 @@ -=head1 NAME - -perl594delta - what is new for perl v5.9.4 - -=head1 DESCRIPTION - -This document describes differences between the 5.9.3 and the 5.9.4 -development releases. See L, L, L -and L for the differences between 5.8.0 and 5.9.3. - -=head1 Incompatible Changes - -=head2 chdir FOO - -A bareword argument to chdir() is now recognized as a file handle. -Earlier releases interpreted the bareword as a directory name. -(Gisle Aas) - -=head2 Handling of pmc files - -An old feature of perl was that before C or C look for a -file with a F<.pm> extension, they will first look for a similar filename -with a F<.pmc> extension. If this file is found, it will be loaded in -place of any potentially existing file ending in a F<.pm> extension. - -Previously, F<.pmc> files were loaded only if more recent than the -matching F<.pm> file. Starting with 5.9.4, they'll be always loaded if -they exist. (This trick is used by Pugs.) - -=head2 @- and @+ in patterns - -The special arrays C<@-> and C<@+> are no longer interpolated in regular -expressions. (Sadahiro Tomoyuki) - -=head2 $AUTOLOAD can now be tainted - -If you call a subroutine by a tainted name, and if it defers to an -AUTOLOAD function, then $AUTOLOAD will be (correctly) tainted. -(Rick Delaney) - -=head1 Core Enhancements - -=head2 state() variables - -A new class of variables has been introduced. State variables are similar -to C variables, but are declared with the C keyword in place of -C. They're visible only in their lexical scope, but their value is -persistent: unlike C variables, they're not undefined at scope entry, -but retain their previous value. (Rafael Garcia-Suarez) - -To use state variables, one needs to enable them by using - - use feature "state"; - -or by using the C<-E> command-line switch in one-liners. - -See L. - -=head2 UNIVERSAL::DOES() - -The C class has a new method, C. It has been added to -solve semantic problems with the C method. C checks for -inheritance, while C has been designed to be overridden when -module authors use other types of relations between classes (in addition -to inheritance). (chromatic) - -See L<< UNIVERSAL/"$obj->DOES( ROLE )" >>. - -=head2 Exceptions in constant folding - -The constant folding routine is now wrapped in an exception handler, and -if folding throws an exception (such as attempting to evaluate 0/0), perl -now retains the current optree, rather than aborting the whole program. -(Nicholas Clark, Dave Mitchell) - -=head2 Source filters in @INC - -It's possible to enhance the mechanism of subroutine hooks in @INC by -adding a source filter on top of the filehandle opened and returned by the -hook. This feature was planned a long time ago, but wasn't quite working -until now. See L for details. (Nicholas Clark) - -=head2 MAD - -MAD, which stands for I, is a -still-in-development work leading to a Perl 5 to Perl 6 converter. To -enable it, it's necessary to pass the argument C<-Dmad> to Configure. The -obtained perl isn't binary compatible with a regular perl 5.9.4, and has -space and speed penalties; moreover not all regression tests still pass -with it. (Larry Wall, Nicholas Clark) - -=head1 Modules and Pragmas - -=over 4 - -=item * - -C is now a lexical pragma. (Although on older perls, -which don't have support for lexical pragmas, it keeps its global -behaviour.) (Audrey Tang) - -=item * - -C is now a dual-life module, also available on CPAN. It has been -expanded in many ways. A kill() method is available for thread signalling. -One can get thread status, or the list of running or joinable threads. - -A new C<< threads->exit() >> method is used to exit from the application -(this is the default for the main thread) or from the current thread only -(this is the default for all other threads). On the other hand, the exit() -built-in now always causes the whole application to terminate. (Jerry -D. Hedden) - -=back - -=head2 New Core Modules - -=over 4 - -=item * - -C, by Anno Siegel, has been added. This module -provides support for I: hashes that maintain an association -of a reference with a value, in a thread-safe garbage-collected way. -Such hashes are useful to implement inside-out objects. - -=item * - -C, by Ken Williams, has been added. It's an alternative to -C to build and install perl modules. - -=item * - -C, by Jos Boumans, has been added. It provides a single -interface to load Perl modules and F<.pl> files. - -=item * - -C, by Jos Boumans, has been added. It's used to mark -modules as loaded or unloaded. - -=item * - -C, by Jos Boumans, has been added. It's a simple -helper to list all constants declared in a given package. - -=item * - -C, by Tye McQueen, has been added (for Windows builds). -This module provides low-level access to Win32 system API calls for -files/dirs. - -=back - -=head1 Utility Changes - -=head2 config_data - -C is a new utility that comes with C. It -provides a command-line interface to the configuration of Perl modules -that use Module::Build's framework of configurability (that is, -C<*::ConfigData> modules that contain local configuration information for -their parent modules.) - -=head1 Documentation - -=head2 New manpage, perlpragma - -The L manpage documents how to write one's own lexical -pragmas in pure Perl (something that is possible starting with 5.9.4). - -=head2 New manpage, perlreguts - -The L manpage, courtesy of Yves Orton, describes internals of the -Perl regular expression engine. - -=head2 New manpage, perlunitut - -The L manpage is an tutorial for programming with Unicode and -string encodings in Perl, courtesy of Juerd Waalboer. - -=head1 Performance Enhancements - -=head2 Memory optimisations - -Several internal data structures (typeglobs, GVs, CVs, formats) have been -restructured to use less memory. (Nicholas Clark) - -=head2 UTF-8 cache optimisation - -The UTF-8 caching code is now more efficient, and used more often. -(Nicholas Clark) - -=head2 Regular expressions - -=over 4 - -=item Engine de-recursivised - -The regular expression engine is no longer recursive, meaning that -patterns that used to overflow the stack will either die with useful -explanations, or run to completion, which, since they were able to blow -the stack before, will likely take a very long time to happen. If you were -experiencing the occasional stack overflow (or segfault) and upgrade to -discover that now perl apparently hangs instead, look for a degenerate -regex. (Dave Mitchell) - -=item Single char char-classes treated as literals - -Classes of a single character are now treated the same as if the character -had been used as a literal, meaning that code that uses char-classes as an -escaping mechanism will see a speedup. (Yves Orton) - -=item Trie optimisation of literal string alternations - -Alternations, where possible, are optimised into more efficient matching -structures. String literal alternations are merged into a trie and are -matched simultaneously. This means that instead of O(N) time for matching -N alternations at a given point the new code performs in O(1) time. (Yves -Orton) - -B Much code exists that works around perl's historic poor -performance on alternations. Often the tricks used to do so will disable -the new optimisations. Hopefully the utility modules used for this purpose -will be educated about these new optimisations by the time 5.10 is -released. - -=item Aho-Corasick start-point optimisation - -When a pattern starts with a trie-able alternation and there aren't -better optimisations available the regex engine will use Aho-Corasick -matching to find the start point. (Yves Orton) - -=back - -=head2 Sloppy stat on Windows - -On Windows, perl's stat() function normally opens the file to determine -the link count and update attributes that may have been changed through -hard links. Setting ${^WIN32_SLOPPY_STAT} to a true value speeds up -stat() by not performing this operation. (Jan Dubois) - -=head1 Installation and Configuration Improvements - -=head2 Relocatable installations - -There is now Configure support for creating a relocatable perl tree. If -you Configure with C<-Duserelocatableinc>, then the paths in @INC (and -everything else in %Config) can be optionally located via the path of the -perl executable. - -That means that, if the string C<".../"> is found at the start of any -path, it's substituted with the directory of $^X. So, the relocation can -be configured on a per-directory basis, although the default with -C<-Duserelocatableinc> is that everything is relocated. The initial -install is done to the original configured prefix. - -=head2 Ports - -Many improvements have been made towards making Perl work correctly on -z/OS. - -Perl has been reported to work on DragonFlyBSD. - -=head2 Compilation improvements - -All F files in the XS modules bundled with perl are now -autogenerated at build time. (Marcus Holland-Moritz) - -=head2 New probes - -The configuration process now detects whether strlcat() and strlcpy() are -available. When they are not available, perl's own version is used (from -Russ Allbery's public domain implementation). Various places in the perl -interpreter now use them. (Steve Peters) - -=head2 Windows build improvements - -=over 4 - -=item Building XS extensions - -Support for building XS extension modules with the free MinGW compiler has -been improved in the case where perl itself was built with the Microsoft -VC++ compiler. (ActiveState) - -=item Support for 64-bit compiler - -Support for building perl with Microsoft's 64-bit compiler has been -improved. (ActiveState) - -=back - -=head1 Selected Bug Fixes - -=head2 PERL5SHELL and tainting - -On Windows, the PERL5SHELL environment variable is now checked for -taintedness. (Rafael Garcia-Suarez) - -=head2 Using *FILE{IO} - -C and C<-X> filetests now treat *FILE{IO} filehandles like *FILE -filehandles. (Steve Peters) - -=head2 Overloading and reblessing - -Overloading now works when references are reblessed into another class. -Internally, this has been implemented by moving the flag for "overloading" -from the reference to the referent, which logically is where it should -always have been. (Nicholas Clark) - -=head2 Overloading and UTF-8 - -A few bugs related to UTF-8 handling with objects that have -stringification overloaded have been fixed. (Nicholas Clark) - -=head2 eval memory leaks fixed - -Traditionally, C has leaked badly. Many (but not all) -of these leaks have now been eliminated or reduced. (Dave Mitchell) - -=head2 Random device on Windows - -In previous versions, perl would read the file F if it -existed when seeding its random number generator. That file is unlikely -to exist on Windows, and if it did would probably not contain appropriate -data, so perl no longer tries to read it on Windows. (Alex Davies) - -=head1 New or Changed Diagnostics - -=over 4 - -=item State variable %s will be reinitialized - -One can assign initial values to state variables, but not when they're -declared as a sub-part of a list assignment. See L. - -=back - -=head1 Changed Internals - -A new file, F, contains functions that aren't used anymore in -the perl core, but remain around because modules out there might -still use them. They come from a factorization effort: for example, many -PP functions are now shared for several ops. - -The implementation of the special variables $^H and %^H has changed, to -allow implementing lexical pragmas in pure perl. - -=head1 Known Problems - -One warning test (number 263 in F) fails under UTF-8 -locales. - -Bytecode tests fail under several platforms. We are considering removing -support for byteloader and compiler before the 5.10.0 release. - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/rt3/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -=head1 SEE ALSO - -The F file for exhaustive details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perl595delta.pod b/pod/perl595delta.pod deleted file mode 100644 index 097b6b4dc7d..00000000000 --- a/pod/perl595delta.pod +++ /dev/null @@ -1,587 +0,0 @@ -=head1 NAME - -perl595delta - what is new for perl v5.9.5 - -=head1 DESCRIPTION - -This document describes differences between the 5.9.4 and the 5.9.5 -development releases. See L, L, -L, L and L for the differences -between 5.8.0 and 5.9.4. - -=head1 Incompatible Changes - -=head2 Tainting and printf - -When perl is run under taint mode, C and C will now -reject any tainted format argument. (Rafael Garcia-Suarez) - -=head2 undef and signal handlers - -Undefining or deleting a signal handler via C is now -equivalent to setting it to C<'DEFAULT'>. (Rafael) - -=head2 strictures and array/hash dereferencing in defined() - -C and C are now subject to C -(that is, C<$foo> and C<$bar> shall be proper references there.) -(Nicholas Clark) - -(However, C and C are discouraged constructs -anyway.) - -=head2 C<(?p{})> has been removed - -The regular expression construct C<(?p{})>, which was deprecated in perl -5.8, has been removed. Use C<(??{})> instead. (Rafael) - -=head2 Pseudo-hashes have been removed - -Support for pseudo-hashes has been removed from Perl 5.9. (The C -pragma remains here, but uses an alternate implementation.) - -=head2 Removal of the bytecode compiler and of perlcc - -C, the byteloader and the supporting modules (B::C, B::CC, -B::Bytecode, etc.) are no longer distributed with the perl sources. Those -experimental tools have never worked reliably, and, due to the lack of -volunteers to keep them in line with the perl interpreter developments, it -was decided to remove them instead of shipping a broken version of those. -The last version of those modules can be found with perl 5.9.4. - -However the B compiler framework stays supported in the perl core, as with -the more useful modules it has permitted (among others, B::Deparse and -B::Concise). - -=head2 Removal of the JPL - -The JPL (Java-Perl Linguo) has been removed from the perl sources tarball. - -=head2 Recursive inheritance detected earlier - -Perl will now immediately throw an exception if you modify any package's -C<@ISA> in such a way that it would cause recursive inheritance. - -Previously, the exception would not occur until Perl attempted to make -use of the recursive inheritance while resolving a method or doing a -C<$foo-Eisa($bar)> lookup. - -=head1 Core Enhancements - -=head2 Regular expressions - -=over 4 - -=item Recursive Patterns - -It is now possible to write recursive patterns without using the C<(??{})> -construct. This new way is more efficient, and in many cases easier to -read. - -Each capturing parenthesis can now be treated as an independent pattern -that can be entered by using the C<(?PARNO)> syntax (C standing for -"parenthesis number"). For example, the following pattern will match -nested balanced angle brackets: - - / - ^ # start of line - ( # start capture buffer 1 - < # match an opening angle bracket - (?: # match one of: - (?> # don't backtrack over the inside of this group - [^<>]+ # one or more non angle brackets - ) # end non backtracking group - | # ... or ... - (?1) # recurse to bracket 1 and try it again - )* # 0 or more times. - > # match a closing angle bracket - ) # end capture buffer one - $ # end of line - /x - -Note, users experienced with PCRE will find that the Perl implementation -of this feature differs from the PCRE one in that it is possible to -backtrack into a recursed pattern, whereas in PCRE the recursion is -atomic or "possessive" in nature. (Yves Orton) - -=item Named Capture Buffers - -It is now possible to name capturing parenthesis in a pattern and refer to -the captured contents by name. The naming syntax is C<< (?....) >>. -It's possible to backreference to a named buffer with the C<< \k >> -syntax. In code, the new magical hashes C<%+> and C<%-> can be used to -access the contents of the capture buffers. - -Thus, to replace all doubled chars, one could write - - s/(?.)\k/$+{letter}/g - -Only buffers with defined contents will be "visible" in the C<%+> hash, so -it's possible to do something like - - foreach my $name (keys %+) { - print "content of buffer '$name' is $+{$name}\n"; - } - -The C<%-> hash is a bit more complete, since it will contain array refs -holding values from all capture buffers similarly named, if there should -be many of them. - -C<%+> and C<%-> are implemented as tied hashes through the new module -C. - -Users exposed to the .NET regex engine will find that the perl -implementation differs in that the numerical ordering of the buffers -is sequential, and not "unnamed first, then named". Thus in the pattern - - /(A)(?B)(C)(?D)/ - -$1 will be 'A', $2 will be 'B', $3 will be 'C' and $4 will be 'D' and not -$1 is 'A', $2 is 'C' and $3 is 'B' and $4 is 'D' that a .NET programmer -would expect. This is considered a feature. :-) (Yves Orton) - -=item Possessive Quantifiers - -Perl now supports the "possessive quantifier" syntax of the "atomic match" -pattern. Basically a possessive quantifier matches as much as it can and never -gives any back. Thus it can be used to control backtracking. The syntax is -similar to non-greedy matching, except instead of using a '?' as the modifier -the '+' is used. Thus C, C<*+>, C<++>, C<{min,max}+> are now legal -quantifiers. (Yves Orton) - -=item Backtracking control verbs - -The regex engine now supports a number of special-purpose backtrack -control verbs: (*THEN), (*PRUNE), (*MARK), (*SKIP), (*COMMIT), (*FAIL) -and (*ACCEPT). See L for their descriptions. (Yves Orton) - -=item Relative backreferences - -A new syntax C<\g{N}> or C<\gN> where "N" is a decimal integer allows a -safer form of back-reference notation as well as allowing relative -backreferences. This should make it easier to generate and embed patterns -that contain backreferences. See L. (Yves Orton) - -=item C<\K> escape - -The functionality of Jeff Pinyan's module Regexp::Keep has been added to -the core. You can now use in regular expressions the special escape C<\K> -as a way to do something like floating length positive lookbehind. It is -also useful in substitutions like: - - s/(foo)bar/$1/g - -that can now be converted to - - s/foo\Kbar//g - -which is much more efficient. (Yves Orton) - -=item Vertical and horizontal whitespace, and linebreak - -Regular expressions now recognize the C<\v> and C<\h> escapes, that match -vertical and horizontal whitespace, respectively. C<\V> and C<\H> -logically match their complements. - -C<\R> matches a generic linebreak, that is, vertical whitespace, plus -the multi-character sequence C<"\x0D\x0A">. - -=back - -=head2 The C<_> prototype - -A new prototype character has been added. C<_> is equivalent to C<$> (it -denotes a scalar), but defaults to C<$_> if the corresponding argument -isn't supplied. Due to the optional nature of the argument, you can only -use it at the end of a prototype, or before a semicolon. - -This has a small incompatible consequence: the prototype() function has -been adjusted to return C<_> for some built-ins in appropriate cases (for -example, C). (Rafael) - -=head2 UNITCHECK blocks - -C, a new special code block has been introduced, in addition to -C, C, C and C. - -C and C blocks, while useful for some specialized purposes, -are always executed at the transition between the compilation and the -execution of the main program, and thus are useless whenever code is -loaded at runtime. On the other hand, C blocks are executed -just after the unit which defined them has been compiled. See L -for more information. (Alex Gough) - -=head2 readpipe() is now overridable - -The built-in function readpipe() is now overridable. Overriding it permits -also to override its operator counterpart, C (a.k.a. C<``>). -Moreover, it now defaults to C<$_> if no argument is provided. (Rafael) - -=head2 default argument for readline() - -readline() now defaults to C<*ARGV> if no argument is provided. (Rafael) - -=head2 UCD 5.0.0 - -The copy of the Unicode Character Database included in Perl 5.9 has -been updated to version 5.0.0. - -=head2 Smart match - -The smart match operator (C<~~>) is now available by default (you don't -need to enable it with C any longer). (Michael G Schwern) - -=head2 Implicit loading of C - -The C pragma is now implicitly loaded when you require a minimal -perl version (with the C construct) greater than, or equal -to, 5.9.5. - -=head1 Modules and Pragmas - -=head2 New Pragma, C - -A new pragma, C (for Method Resolution Order) has been added. It -permits to switch, on a per-class basis, the algorithm that perl uses to -find inherited methods in case of a multiple inheritance hierarchy. The -default MRO hasn't changed (DFS, for Depth First Search). Another MRO is -available: the C3 algorithm. See L for more information. -(Brandon Black) - -Note that, due to changes in the implementation of class hierarchy search, -code that used to undef the C<*ISA> glob will most probably break. Anyway, -undef'ing C<*ISA> had the side-effect of removing the magic on the @ISA -array and should not have been done in the first place. - -=head2 bignum, bigint, bigrat - -The three numeric pragmas C, C and C are now -lexically scoped. (Tels) - -=head2 Math::BigInt/Math::BigFloat - -Many bugs have been fixed; noteworthy are comparisons with NaN, which -no longer warn about undef values. - -The following things are new: - -=over 4 - -=item config() - -The config() method now also supports the calling-style -C<< config('lib') >> in addition to C<< config()->{'lib'} >>. - -=item import() - -Upon import, using C<< lib => 'Foo' >> now warns if the low-level library -cannot be found. To suppress the warning, you can use C<< try => 'Foo' >> -instead. To convert the warning into a die, use C<< only => 'Foo' >> -instead. - -=item roundmode common - -A rounding mode of C is now supported. - -=back - -Also, support for the following methods has been added: - -=over 4 - -=item bpi(), bcos(), bsin(), batan(), batan2() - -=item bmuladd() - -=item bexp(), bnok() - -=item from_hex(), from_oct(), and from_bin() - -=item as_oct() - -=back - -In addition, the default math-backend (Calc (Perl) and FastCalc (XS)) now -support storing numbers in parts with 9 digits instead of 7 on Perls with -either 64bit integer or long double support. This means math operations -scale better and are thus faster for really big numbers. - -=head2 New Core Modules - -=over 4 - -=item * - -C, needed by CPANPLUS, is a simple wrapper around -C. Note that C isn't -included in the perl core; the behaviour of C -gracefully degrades when the later isn't present. - -=item * - -C implements a generic input parsing/checking mechanism. It -is used by CPANPLUS. - -=item * - -C simplifies the task to ask questions at a terminal prompt. - -=item * - -C provides an interface to create per-object accessors. - -=item * - -C is a simple framework to create modules that accept -pluggable sub-modules. - -=item * - -C provides simple ways to query and possibly -load installed modules. - -=item * - -C provides an object oriented interface to time functions, -overriding the built-ins localtime() and gmtime(). - -=item * - -C helps to find and run external commands, possibly -interactively. - -=item * - -C provide a simple generic file fetching mechanism. - -=item * - -C and C are used by the log facility -of C. - -=item * - -C is a generic archive extraction mechanism -for F<.tar> (plain, gzipped or bzipped) or F<.zip> files. - -=item * - -C provides an API and a command-line tool to access the CPAN -mirrors. - -=back - -=head2 Module changes - -=over 4 - -=item C - -The C pragma, its submodules C and -C and the B<-A> command-line switch have been removed. -The interface was not judged mature enough for inclusion in a stable -release. - -=item C - -The C pragma now warns if a class tries to inherit from itself. -(Curtis "Ovid" Poe) - -=item C and C - -C and C will now complain loudly if they are loaded via -incorrect casing (as in C). (Johan Vromans) - -=item C - -The C pragma doesn't load C anymore. That means that code -that used C routines without having loaded it at compile time might -need to be adjusted; typically, the following (faulty) code won't work -anymore, and will require parentheses to be added after the function name: - - use warnings; - require Carp; - Carp::confess "argh"; - -=item C - -C now does something useful (or at least it tries to). In fact, it -has been turned into a lexical pragma. So, in your modules, you can now -test whether your users have requested to use less CPU, or less memory, -less magic, or maybe even less fat. See L for more. (Joshua ben -Jore) - -=item C - -C can now report the caller's file and line number. -(David Feldman) - -=item C - -C is now based on C, and so can be extended -with plugins. (Joshua ben Jore) - -=item C - -It's now possible to access the lexical pragma hints (C<%^H>) by using the -method B::COP::hints_hash(). It returns a C object, which in turn -can be used to get a hash reference via the method B::RHE::HASH(). (Joshua -ben Jore) - -=for p5p XXX document this in B.pm too - -=item C - -As the old 5005thread threading model has been removed, in favor of the -ithreads scheme, the C module is now a compatibility wrapper, to -be used in old code only. It has been removed from the default list of -dynamic extensions. - -=back - -=head1 Utility Changes - -=head2 C - -C, the CPANPLUS shell, has been added. (C, an -helper for CPANPLUS operation, has been added too, but isn't intended for -direct use). - -=head2 C - -C is a new utility, that comes with CPANPLUS. It's a tool to -create distributions (or packages) from CPAN modules. - -=head2 C - -The output of C has been enhanced to be more customizable via -CSS. Some formatting problems were also corrected. (Jari Aalto) - -=head1 Documentation - -=head2 New manpage, perlunifaq - -A new manual page, L (the Perl Unicode FAQ), has been added -(Juerd Waalboer). - -=head1 Installation and Configuration Improvements - -=head2 C++ compatibility - -Efforts have been made to make perl and the core XS modules compilable -with various C++ compilers (although the situation is not perfect with -some of the compilers on some of the platforms tested.) - -=head2 Visual C++ - -Perl now can be compiled with Microsoft Visual C++ 2005. - -=head2 Static build on Win32 - -It's now possible to build a C that doesn't depend -on C on Win32. See the Win32 makefiles for details. -(Vadim Konovalov) - -=head2 win32 builds - -All win32 builds (MS-Win, WinCE) have been merged and cleaned up. - -=head2 C and C - -A new configuration variable, available as C<$Config{d_pseudofork}> in -the L module, has been added, to distinguish real fork() support -from fake pseudofork used on Windows platforms. - -A new configuration variable, C, has been added, -to see if printf-like formats are allowed to be NULL. - -=head2 Help - -C has been extended with the most used option. - -Much less 'Whoa there' messages. - -=head2 64bit systems - -Better detection of 64bit(only) systems, and setting all the (library) -paths accordingly. - -=head2 Ports - -Perl has been reported to work on MidnightBSD. - -Support for Cray XT4 Catamount/Qk has been added. - -Vendor patches have been merged for RedHat and GenToo. - -=head1 Selected Bug Fixes - -PerlIO::scalar will now prevent writing to read-only scalars. Moreover, -seek() is now supported with PerlIO::scalar-based filehandles, the -underlying string being zero-filled as needed. (Rafael, Jarkko Hietaniemi) - -study() never worked for UTF-8 strings, but could lead to false results. -It's now a no-op on UTF-8 data. (Yves Orton) - -The signals SIGILL, SIGBUS and SIGSEGV are now always delivered in an -"unsafe" manner (contrary to other signals, that are deferred until the -perl interpreter reaches a reasonably stable state; see -L). (Rafael) - -When a module or a file is loaded through an @INC-hook, and when this hook -has set a filename entry in %INC, __FILE__ is now set for this module -accordingly to the contents of that %INC entry. (Rafael) - -The C<-w> and C<-t> switches can now be used together without messing -up what categories of warnings are activated or not. (Rafael) - -Duping a filehandle which has the C<:utf8> PerlIO layer set will now -properly carry that layer on the duped filehandle. (Rafael) - -Localizing an hash element whose key was given as a variable didn't work -correctly if the variable was changed while the local() was in effect (as -in C). (Bo Lindbergh) - -=head1 New or Changed Diagnostics - -=head2 Deprecations - -Two deprecation warnings have been added: (Rafael) - - Opening dirhandle %s also as a file - Opening filehandle %s also as a directory - -=head1 Changed Internals - -The anonymous hash and array constructors now take 1 op in the optree -instead of 3, now that pp_anonhash and pp_anonlist return a reference to -an hash/array when the op is flagged with OPf_SPECIAL (Nicholas Clark). - -=for p5p XXX have we some docs on how to create regexp engine plugins, since that's now possible ? (perlreguts) - -=for p5p XXX new BIND SV type, #29544, #29642 - -=head1 Reporting Bugs - -If you find what you think is a bug, you might check the articles -recently posted to the comp.lang.perl.misc newsgroup and the perl -bug database at http://rt.perl.org/rt3/ . There may also be -information at http://www.perl.org/ , the Perl Home Page. - -If you believe you have an unreported bug, please run the B -program included with your release. Be sure to trim your bug down -to a tiny but sufficient test case. Your bug report, along with the -output of C, will be sent off to perlbug@perl.org to be -analysed by the Perl porting team. - -=head1 SEE ALSO - -The F file for exhaustive details on what changed. - -The F file for how to build Perl. - -The F file for general stuff. - -The F and F files for copyright information. - -=cut diff --git a/pod/perlboot.pod b/pod/perlboot.pod index 5aa61795759..15b7117823a 100644 --- a/pod/perlboot.pod +++ b/pod/perlboot.pod @@ -1,884 +1,12 @@ +=encoding utf8 + =head1 NAME -perlboot - Beginner's Object-Oriented Tutorial +perlboot - This document has been deleted =head1 DESCRIPTION -If you're not familiar with objects from other languages, some of the -other Perl object documentation may be a little daunting, such as -L, a basic reference in using objects, and L, which -introduces readers to the peculiarities of Perl's object system in a -tutorial way. - -So, let's take a different approach, presuming no prior object -experience. It helps if you know about subroutines (L), -references (L et. seq.), and packages (L), so become -familiar with those first if you haven't already. - -=head2 If we could talk to the animals... - -Let's let the animals talk for a moment: - - sub Cow::speak { - print "a Cow goes moooo!\n"; - } - sub Horse::speak { - print "a Horse goes neigh!\n"; - } - sub Sheep::speak { - print "a Sheep goes baaaah!\n"; - } - - Cow::speak; - Horse::speak; - Sheep::speak; - -This results in: - - a Cow goes moooo! - a Horse goes neigh! - a Sheep goes baaaah! - -Nothing spectacular here. Simple subroutines, albeit from separate -packages, and called using the full package name. So let's create -an entire pasture: - - # Cow::speak, Horse::speak, Sheep::speak as before - @pasture = qw(Cow Cow Horse Sheep Sheep); - foreach $animal (@pasture) { - &{$animal."::speak"}; - } - -This results in: - - a Cow goes moooo! - a Cow goes moooo! - a Horse goes neigh! - a Sheep goes baaaah! - a Sheep goes baaaah! - -Wow. That symbolic coderef de-referencing there is pretty nasty. -We're counting on C mode, certainly not recommended -for larger programs. And why was that necessary? Because the name of -the package seems to be inseparable from the name of the subroutine we -want to invoke within that package. - -Or is it? - -=head2 Introducing the method invocation arrow - -For now, let's say that C<< Class->method >> invokes subroutine -C in package C. (Here, "Class" is used in its -"category" meaning, not its "scholastic" meaning.) That's not -completely accurate, but we'll do this one step at a time. Now let's -use it like so: - - # Cow::speak, Horse::speak, Sheep::speak as before - Cow->speak; - Horse->speak; - Sheep->speak; - -And once again, this results in: - - a Cow goes moooo! - a Horse goes neigh! - a Sheep goes baaaah! - -That's not fun yet. Same number of characters, all constant, no -variables. But yet, the parts are separable now. Watch: - - $a = "Cow"; - $a->speak; # invokes Cow->speak - -Ahh! Now that the package name has been parted from the subroutine -name, we can use a variable package name. And this time, we've got -something that works even when C is enabled. - -=head2 Invoking a barnyard - -Let's take that new arrow invocation and put it back in the barnyard -example: - - sub Cow::speak { - print "a Cow goes moooo!\n"; - } - sub Horse::speak { - print "a Horse goes neigh!\n"; - } - sub Sheep::speak { - print "a Sheep goes baaaah!\n"; - } - - @pasture = qw(Cow Cow Horse Sheep Sheep); - foreach $animal (@pasture) { - $animal->speak; - } - -There! Now we have the animals all talking, and safely at that, -without the use of symbolic coderefs. - -But look at all that common code. Each of the C routines has a -similar structure: a C operator and a string that contains -common text, except for two of the words. It'd be nice if we could -factor out the commonality, in case we decide later to change it all -to C instead of C. - -And we actually have a way of doing that without much fuss, but we -have to hear a bit more about what the method invocation arrow is -actually doing for us. - -=head2 The extra parameter of method invocation - -The invocation of: - - Class->method(@args) - -attempts to invoke subroutine C as: - - Class::method("Class", @args); - -(If the subroutine can't be found, "inheritance" kicks in, but we'll -get to that later.) This means that we get the class name as the -first parameter (the only parameter, if no arguments are given). So -we can rewrite the C speaking subroutine as: - - sub Sheep::speak { - my $class = shift; - print "a $class goes baaaah!\n"; - } - -And the other two animals come out similarly: - - sub Cow::speak { - my $class = shift; - print "a $class goes moooo!\n"; - } - sub Horse::speak { - my $class = shift; - print "a $class goes neigh!\n"; - } - -In each case, C<$class> will get the value appropriate for that -subroutine. But once again, we have a lot of similar structure. Can -we factor that out even further? Yes, by calling another method in -the same class. - -=head2 Calling a second method to simplify things - -Let's call out from C to a helper method called C. -This method provides the constant text for the sound itself. - - { package Cow; - sub sound { "moooo" } - sub speak { - my $class = shift; - print "a $class goes ", $class->sound, "!\n"; - } - } - -Now, when we call C<< Cow->speak >>, we get a C<$class> of C in -C. This in turn selects the C<< Cow->sound >> method, which -returns C. But how different would this be for the C? - - { package Horse; - sub sound { "neigh" } - sub speak { - my $class = shift; - print "a $class goes ", $class->sound, "!\n"; - } - } - -Only the name of the package and the specific sound change. So can we -somehow share the definition for C between the Cow and the -Horse? Yes, with inheritance! - -=head2 Inheriting the windpipes - -We'll define a common subroutine package called C, with the -definition for C: - - { package Animal; - sub speak { - my $class = shift; - print "a $class goes ", $class->sound, "!\n"; - } - } - -Then, for each animal, we say it "inherits" from C, along -with the animal-specific sound: - - { package Cow; - @ISA = qw(Animal); - sub sound { "moooo" } - } - -Note the added C<@ISA> array (pronounced "is a"). We'll get to that in a minute. - -But what happens when we invoke C<< Cow->speak >> now? - -First, Perl constructs the argument list. In this case, it's just -C. Then Perl looks for C. But that's not there, so -Perl checks for the inheritance array C<@Cow::ISA>. It's there, -and contains the single name C. - -Perl next checks for C inside C instead, as in -C. And that's found, so Perl invokes that subroutine -with the already frozen argument list. - -Inside the C subroutine, C<$class> becomes C (the -first argument). So when we get to the step of invoking -C<< $class->sound >>, it'll be looking for C<< Cow->sound >>, which -gets it on the first try without looking at C<@ISA>. Success! - -=head2 A few notes about @ISA - -This magical C<@ISA> variable has declared that C "is a" C. -Note that it's an array, not a simple single value, because on rare -occasions, it makes sense to have more than one parent class searched -for the missing methods. - -If C also had an C<@ISA>, then we'd check there too. The -search is recursive, depth-first, left-to-right in each C<@ISA> by -default (see L for alternatives). Typically, each C<@ISA> has -only one element (multiple elements means multiple inheritance and -multiple headaches), so we get a nice tree of inheritance. - -When we turn on C, we'll get complaints on C<@ISA>, since -it's not a variable containing an explicit package name, nor is it a -lexical ("my") variable. We can't make it a lexical variable though -(it has to belong to the package to be found by the inheritance mechanism), -so there's a couple of straightforward ways to handle that. - -The easiest is to just spell the package name out: - - @Cow::ISA = qw(Animal); - -Or declare it as a package global variable: - - package Cow; - our @ISA = qw(Animal); - -Or allow it as an implicitly named package variable: - - package Cow; - use vars qw(@ISA); - @ISA = qw(Animal); - -If the C class comes from another (object-oriented) module, then -just employ C to specify that C should serve as the basis -for the C class: - - package Cow; - use base qw(Animal); - -Now that's pretty darn simple! - -=head2 Overriding the methods - -Let's add a mouse, which can barely be heard: - - # Animal package from before - { package Mouse; - @ISA = qw(Animal); - sub sound { "squeak" } - sub speak { - my $class = shift; - print "a $class goes ", $class->sound, "!\n"; - print "[but you can barely hear it!]\n"; - } - } - - Mouse->speak; - -which results in: - - a Mouse goes squeak! - [but you can barely hear it!] - -Here, C has its own speaking routine, so C<< Mouse->speak >> -doesn't immediately invoke C<< Animal->speak >>. This is known as -"overriding". In fact, we don't even need to say that a C is -an C at all, because all of the methods needed for C are -completely defined for C; this is known as "duck typing": -"If it walks like a duck and quacks like a duck, I would call it a duck" -(James Whitcomb). However, it would probably be beneficial to allow a -closer examination to conclude that a C is indeed an C, -so it is actually better to define C with C as its base -(that is, it is better to "derive C from C"). - -Moreover, this duplication of code could become a maintenance headache -(though code-reuse is not actually a good reason for inheritance; good -design practices dictate that a derived class should be usable wherever -its base class is usable, which might not be the outcome if code-reuse -is the sole criterion for inheritance. Just remember that a C -should always act like an C). - -So, let's make C an C! - -The obvious solution is to invoke C directly: - - # Animal package from before - { package Mouse; - @ISA = qw(Animal); - sub sound { "squeak" } - sub speak { - my $class = shift; - Animal::speak($class); - print "[but you can barely hear it!]\n"; - } - } - -Note that we're using C. If we were to invoke -C<< Animal->speak >> instead, the first parameter to C -would automatically be C<"Animal"> rather than C<"Mouse">, so that -the call to C<< $class->sound >> in C would become -C<< Animal->sound >> rather than C<< Mouse->sound >>. - -Also, without the method arrow C<< -> >>, it becomes necessary to specify -the first parameter to C ourselves, which is why C<$class> -is explicitly passed: C. - -However, invoking C directly is a mess: Firstly, it assumes -that the C method is a member of the C class; what if C -actually inherits C from its own base? Because we are no longer using -C<< -> >> to access C, the special method look up mechanism wouldn't be -used, so C wouldn't even be found! - -The second problem is more subtle: C is now hardwired into the subroutine -selection. Let's assume that C does exist. What happens when, -at a later time, someone expands the class hierarchy by having C -inherit from C instead of C. Unless the invocation of C -is also changed to an invocation of C, centuries worth of taxonomical -classification could be obliterated! - -What we have here is a fragile or leaky abstraction; it is the beginning of a -maintenance nightmare. What we need is the ability to search for the right -method wih as few assumptions as possible. - -=head2 Starting the search from a different place - -A I solution is to tell Perl where in the inheritance chain to begin searching -for C. This can be achieved with a modified version of the method arrow C<< -> >>: - - ClassName->FirstPlaceToLook::method - -So, the improved C class is: - - # same Animal as before - { package Mouse; - # same @ISA, &sound as before - sub speak { - my $class = shift; - $class->Animal::speak; - print "[but you can barely hear it!]\n"; - } - } - -Using this syntax, we start with C to find C, and then -use all of C's inheritance chain if it is not found immediately. -As usual, the first parameter to C would be C<$class>, so we no -longer need to pass C<$class> explicitly to C. - -But what about the second problem? We're still hardwiring C into -the method lookup. - -=head2 The SUPER way of doing things - -If C is replaced with the special placeholder C in that -invocation, then the contents of C's C<@ISA> are used for the -search, beginning with C<$ISA[0]>. So, all of the problems can be fixed -as follows: - - # same Animal as before - { package Mouse; - # same @ISA, &sound as before - sub speak { - my $class = shift; - $class->SUPER::speak; - print "[but you can barely hear it!]\n"; - } - } - -In general, C means look in the current package's C<@ISA> -for a class that implements C, and invoke the first one found. -The placeholder is called C, because many other languages refer -to base classes as "Iclasses", and Perl likes to be eclectic. - -Note that a call such as - - $class->SUPER::method; - -does I look in the C<@ISA> of C<$class> unless C<$class> happens to -be the current package. - -=head2 Let's review... - -So far, we've seen the method arrow syntax: - - Class->method(@args); - -or the equivalent: - - $a = "Class"; - $a->method(@args); - -which constructs an argument list of: - - ("Class", @args) - -and attempts to invoke: - - Class::method("Class", @args); - -However, if C is not found, then C<@Class::ISA> is examined -(recursively) to locate a class (a package) that does indeed contain C, -and that subroutine is invoked instead. - -Using this simple syntax, we have class methods, (multiple) inheritance, -overriding, and extending. Using just what we've seen so far, we've -been able to factor out common code (though that's never a good reason -for inheritance!), and provide a nice way to reuse implementations with -variations. - -Now, what about data? - -=head2 A horse is a horse, of course of course, or is it? - -Let's start with the code for the C class -and the C class: - - { package Animal; - sub speak { - my $class = shift; - print "a $class goes ", $class->sound, "!\n"; - } - } - { package Horse; - @ISA = qw(Animal); - sub sound { "neigh" } - } - -This lets us invoke C<< Horse->speak >> to ripple upward to -C, calling back to C to get the specific -sound, and the output of: - - a Horse goes neigh! - -But all of our Horse objects would have to be absolutely identical. -If we add a subroutine, all horses automatically share it. That's -great for making horses the same, but how do we capture the -distinctions of an individual horse? For example, suppose we want -to give our first horse a name. There's got to be a way to keep its -name separate from the other horses. - -That is to say, we want particular instances of C to have -different names. - -In Perl, any reference can be an "instance", so let's start with the -simplest reference that can hold a horse's name: a scalar reference. - - my $name = "Mr. Ed"; - my $horse = \$name; - -So, now C<$horse> is a reference to what will be the instance-specific -data (the name). The final step is to turn this reference into a real -instance of a C by using the special operator C: - - bless $horse, Horse; - -This operator stores information about the package named C into -the thing pointed at by the reference. At this point, we say -C<$horse> is an instance of C. That is, it's a specific -horse. The reference is otherwise unchanged, and can still be used -with traditional dereferencing operators. - -=head2 Invoking an instance method - -The method arrow can be used on instances, as well as classes (the names -of packages). So, let's get the sound that C<$horse> makes: - - my $noise = $horse->sound("some", "unnecessary", "args"); - -To invoke C, Perl first notes that C<$horse> is a blessed -reference (and thus an instance). It then constructs an argument -list, as per usual. - -Now for the fun part: Perl takes the class in which the instance was -blessed, in this case C, and uses that class to locate the -subroutine. In this case, C is found directly (without -using inheritance). In the end, it is as though our initial line were -written as follows: - - my $noise = Horse::sound($horse, "some", "unnecessary", "args"); - -Note that the first parameter here is still the instance, not the name -of the class as before. We'll get C as the return value, and -that'll end up as the C<$noise> variable above. - -If Horse::sound had not been found, we'd be wandering up the C<@Horse::ISA> -array, trying to find the method in one of the superclasses. The only -difference between a class method and an instance method is whether the -first parameter is an instance (a blessed reference) or a class name (a -string). - -=head2 Accessing the instance data - -Because we get the instance as the first parameter, we can now access -the instance-specific data. In this case, let's add a way to get at -the name: - - { package Horse; - @ISA = qw(Animal); - sub sound { "neigh" } - sub name { - my $self = shift; - $$self; - } - } - -Inside C, the C<@_> array contains: - - ($horse, "some", "unnecessary", "args") - -so the C stores C<$horse> into C<$self>. Then, C<$self> gets -de-referenced with C<$$self> as normal, yielding C<"Mr. Ed">. - -It's traditional to C the first parameter into a variable named -C<$self> for instance methods and into a variable named C<$class> for -class methods. - -Then, the following line: - - print $horse->name, " says ", $horse->sound, "\n"; - -outputs: - - Mr. Ed says neigh. - -=head2 How to build a horse - -Of course, if we constructed all of our horses by hand, we'd most -likely make mistakes from time to time. We're also violating one of -the properties of object-oriented programming, in that the "inside -guts" of a Horse are visible. That's good if you're a veterinarian, -but not if you just like to own horses. So, let's have the Horse -class handle the details inside a class method: - - { package Horse; - @ISA = qw(Animal); - sub sound { "neigh" } - sub name { - my $self = shift; # instance method, so use $self - $$self; - } - sub named { - my $class = shift; # class method, so use $class - my $name = shift; - bless \$name, $class; - } - } - -Now with the new C method, we can build a horse as follows: - - my $horse = Horse->named("Mr. Ed"); - -Notice we're back to a class method, so the two arguments to -C are C and C. The C operator -not only blesses C<\$name>, it also returns that reference. - -This C method is called a "constructor". - -We've called the constructor C here, so that it quickly denotes -the constructor's argument as the name for this particular C. -You can use different constructors with different names for different -ways of "giving birth" to the object (like maybe recording its -pedigree or date of birth). However, you'll find that most people -coming to Perl from more limited languages use a single constructor -named C, with various ways of interpreting the arguments to -C. Either style is fine, as long as you document your particular -way of giving birth to an object. (And you I going to do that, -right?) - -=head2 Inheriting the constructor - -But was there anything specific to C in that method? No. Therefore, -it's also the same recipe for building anything else that inherited from -C, so let's put C and C there: - - { package Animal; - sub speak { - my $class = shift; - print "a $class goes ", $class->sound, "!\n"; - } - sub name { - my $self = shift; - $$self; - } - sub named { - my $class = shift; - my $name = shift; - bless \$name, $class; - } - } - { package Horse; - @ISA = qw(Animal); - sub sound { "neigh" } - } - -Ahh, but what happens if we invoke C on an instance? - - my $horse = Horse->named("Mr. Ed"); - $horse->speak; - -We get a debugging value: - - a Horse=SCALAR(0xaca42ac) goes neigh! - -Why? Because the C routine is expecting a classname as -its first parameter, not an instance. When the instance is passed in, -we'll end up using a blessed scalar reference as a string, and that -shows up as we saw it just now. - -=head2 Making a method work with either classes or instances - -All we need is for a method to detect if it is being called on a class -or called on an instance. The most straightforward way is with the -C operator. This returns a string (the classname) when used on a -blessed reference, and an empty string when used on a string (like a -classname). Let's modify the C method first to notice the change: - - sub name { - my $either = shift; - ref $either ? $$either : "Any $either"; - } - -Here, the C operator comes in handy to select either the -dereference or a derived string. Now we can use this with either an -instance or a class. Note that I've changed the first parameter -holder to C<$either> to show that this is intended: - - my $horse = Horse->named("Mr. Ed"); - print Horse->name, "\n"; # prints "Any Horse\n" - print $horse->name, "\n"; # prints "Mr Ed.\n" - -and now we'll fix C to use this: - - sub speak { - my $either = shift; - print $either->name, " goes ", $either->sound, "\n"; - } - -And since C already worked with either a class or an instance, -we're done! - -=head2 Adding parameters to a method - -Let's train our animals to eat: - - { package Animal; - sub named { - my $class = shift; - my $name = shift; - bless \$name, $class; - } - sub name { - my $either = shift; - ref $either ? $$either : "Any $either"; - } - sub speak { - my $either = shift; - print $either->name, " goes ", $either->sound, "\n"; - } - sub eat { - my $either = shift; - my $food = shift; - print $either->name, " eats $food.\n"; - } - } - { package Horse; - @ISA = qw(Animal); - sub sound { "neigh" } - } - { package Sheep; - @ISA = qw(Animal); - sub sound { "baaaah" } - } - -And now try it out: - - my $horse = Horse->named("Mr. Ed"); - $horse->eat("hay"); - Sheep->eat("grass"); - -which prints: - - Mr. Ed eats hay. - Any Sheep eats grass. - -An instance method with parameters gets invoked with the instance, -and then the list of parameters. So that first invocation is like: - - Animal::eat($horse, "hay"); - -=head2 More interesting instances - -What if an instance needs more data? Most interesting instances are -made of many items, each of which can in turn be a reference or even -another object. The easiest way to store these is often in a hash. -The keys of the hash serve as the names of parts of the object (often -called "instance variables" or "member variables"), and the -corresponding values are, well, the values. - -But how do we turn the horse into a hash? Recall that an object was -any blessed reference. We can just as easily make it a blessed hash -reference as a blessed scalar reference, as long as everything that -looks at the reference is changed accordingly. - -Let's make a sheep that has a name and a color: - - my $bad = bless { Name => "Evil", Color => "black" }, Sheep; - -so C<< $bad->{Name} >> has C, and C<< $bad->{Color} >> has -C. But we want to make C<< $bad->name >> access the name, and -that's now messed up because it's expecting a scalar reference. Not -to worry, because that's pretty easy to fix up. - -One solution is to override C and C by -defining them anew in C, but then any methods added later to -C might still mess up, and we'd have to override all of those -too. Therefore, it's never a good idea to define the data layout in a -way that's different from the data layout of the base classes. In fact, -it's a good idea to use blessed hash references in all cases. Also, this -is why it's important to have constructors do the low-level work. So, -let's redefine C: - - ## in Animal - sub name { - my $either = shift; - ref $either ? $either->{Name} : "Any $either"; - } - sub named { - my $class = shift; - my $name = shift; - my $self = { Name => $name }; - bless $self, $class; - } - -Of course, we still need to override C in order to handle -constructing a C with a certain color: - - ## in Sheep - sub named { - my ($class, $name) = @_; - my $self = $class->SUPER::named(@_); - $$self{Color} = $class->default_color; - $self - } - -(Note that C<@_> contains the parameters to C.) - -What's this C? Well, if C has only the name, -we still need to set a color, so we'll have a class-specific default color. -For a sheep, we might define it as white: - - ## in Sheep - sub default_color { "white" } - -Now: - - my $sheep = Sheep->named("Bad"); - print $sheep->{Color}, "\n"; - -outputs: - - white - -Now, there's nothing particularly specific to C when it comes -to color, so let's remove C and implement C -to handle color instead: - - ## in Animal - sub named { - my ($class, $name) = @_; - my $self = { Name => $name, Color => $class->default_color }; - bless $self, $class; - } - -And then to keep from having to define C for each additional -class, we'll define a method that serves as the "default default" directly -in C: - - ## in Animal - sub default_color { "brown" } - -Of course, because C and C were the only methods that -referenced the "structure" of the object, the rest of the methods can -remain the same, so C still works as before. - -=head2 A horse of a different color - -But having all our horses be brown would be boring. So let's add a -method or two to get and set the color. - - ## in Animal - sub color { - $_[0]->{Color} - } - sub set_color { - $_[0]->{Color} = $_[1]; - } - -Note the alternate way of accessing the arguments: C<$_[0]> is used -in-place, rather than with a C. (This saves us a bit of time -for something that may be invoked frequently.) And now we can fix -that color for Mr. Ed: - - my $horse = Horse->named("Mr. Ed"); - $horse->set_color("black-and-white"); - print $horse->name, " is colored ", $horse->color, "\n"; - -which results in: - - Mr. Ed is colored black-and-white - -=head2 Summary - -So, now we have class methods, constructors, instance methods, instance -data, and even accessors. But that's still just the beginning of what -Perl has to offer. We haven't even begun to talk about accessors that -double as getters and setters, destructors, indirect object notation, -overloading, "isa" and "can" tests, the C class, and so on. -That's for the rest of the Perl documentation to cover. Hopefully, this -gets you started, though. - -=head1 SEE ALSO - -For more information, see L (for all the gritty details about -Perl objects, now that you've seen the basics), L (the -tutorial for those who already know objects), L (dealing -with class data), L (for some more tricks), and books such as -Damian Conway's excellent I. - -Some modules which might prove interesting are Class::Accessor, -Class::Class, Class::Contract, Class::Data::Inheritable, -Class::MethodMaker and Tie::SecureHash - -=head1 COPYRIGHT - -Copyright (c) 1999, 2000 by Randal L. Schwartz and Stonehenge -Consulting Services, Inc. - -Copyright (c) 2009 by Michael F. Witten. - -Permission is hereby granted to distribute this document intact with -the Perl distribution, and in accordance with the licenses of the Perl -distribution; derived documents must include this copyright notice -intact. - -Portions of this text have been derived from Perl Training materials -originally appearing in the I course taught by instructors for Stonehenge Consulting -Services, Inc. and used with permission. +For information on OO programming with Perl, please see L +and L. -Portions of this text have been derived from materials originally -appearing in I and used with permission. +=cut diff --git a/pod/perlbot.pod b/pod/perlbot.pod index 305a6951b7f..2e8c68021c3 100644 --- a/pod/perlbot.pod +++ b/pod/perlbot.pod @@ -1,535 +1,12 @@ +=encoding utf8 + =head1 NAME -perlbot - Bag o' Object Tricks (the BOT) +perlbot - This document has been deleted =head1 DESCRIPTION -The following collection of tricks and hints is intended to whet curious -appetites about such things as the use of instance variables and the -mechanics of object and class relationships. The reader is encouraged to -consult relevant textbooks for discussion of Object Oriented definitions and -methodology. This is not intended as a tutorial for object-oriented -programming or as a comprehensive guide to Perl's object oriented features, -nor should it be construed as a style guide. If you're looking for tutorials, -be sure to read L, L, and L. - -The Perl motto still holds: There's more than one way to do it. - -=head1 OO SCALING TIPS - -=over 5 - -=item 1 - -Do not attempt to verify the type of $self. That'll break if the class is -inherited, when the type of $self is valid but its package isn't what you -expect. See rule 5. - -=item 2 - -If an object-oriented (OO) or indirect-object (IO) syntax was used, then the -object is probably the correct type and there's no need to become paranoid -about it. Perl isn't a paranoid language anyway. If people subvert the OO -or IO syntax then they probably know what they're doing and you should let -them do it. See rule 1. - -=item 3 - -Use the two-argument form of bless(). Let a subclass use your constructor. -See L. - -=item 4 - -The subclass is allowed to know things about its immediate superclass, the -superclass is allowed to know nothing about a subclass. - -=item 5 - -Don't be trigger happy with inheritance. A "using", "containing", or -"delegation" relationship (some sort of aggregation, at least) is often more -appropriate. See L, L, -and L<"DELEGATION">. - -=item 6 - -The object is the namespace. Make package globals accessible via the -object. This will remove the guess work about the symbol's home package. -See L. - -=item 7 - -IO syntax is certainly less noisy, but it is also prone to ambiguities that -can cause difficult-to-find bugs. Allow people to use the sure-thing OO -syntax, even if you don't like it. - -=item 8 - -Do not use function-call syntax on a method. You're going to be bitten -someday. Someone might move that method into a superclass and your code -will be broken. On top of that you're feeding the paranoia in rule 2. - -=item 9 - -Don't assume you know the home package of a method. You're making it -difficult for someone to override that method. See L. - -=back - -=head1 INSTANCE VARIABLES - -An anonymous array or anonymous hash can be used to hold instance -variables. Named parameters are also demonstrated. - - package Foo; - - sub new { - my $type = shift; - my %params = @_; - my $self = {}; - $self->{'High'} = $params{'High'}; - $self->{'Low'} = $params{'Low'}; - bless $self, $type; - } - - - package Bar; - - sub new { - my $type = shift; - my %params = @_; - my $self = []; - $self->[0] = $params{'Left'}; - $self->[1] = $params{'Right'}; - bless $self, $type; - } - - package main; - - $a = Foo->new( 'High' => 42, 'Low' => 11 ); - print "High=$a->{'High'}\n"; - print "Low=$a->{'Low'}\n"; - - $b = Bar->new( 'Left' => 78, 'Right' => 40 ); - print "Left=$b->[0]\n"; - print "Right=$b->[1]\n"; - -=head1 SCALAR INSTANCE VARIABLES - -An anonymous scalar can be used when only one instance variable is needed. - - package Foo; - - sub new { - my $type = shift; - my $self; - $self = shift; - bless \$self, $type; - } - - package main; - - $a = Foo->new( 42 ); - print "a=$$a\n"; - - -=head1 INSTANCE VARIABLE INHERITANCE - -This example demonstrates how one might inherit instance variables from a -superclass for inclusion in the new class. This requires calling the -superclass's constructor and adding one's own instance variables to the new -object. - - package Bar; - - sub new { - my $type = shift; - my $self = {}; - $self->{'buz'} = 42; - bless $self, $type; - } - - package Foo; - @ISA = qw( Bar ); - - sub new { - my $type = shift; - my $self = Bar->new; - $self->{'biz'} = 11; - bless $self, $type; - } - - package main; - - $a = Foo->new; - print "buz = ", $a->{'buz'}, "\n"; - print "biz = ", $a->{'biz'}, "\n"; - - - -=head1 OBJECT RELATIONSHIPS - -The following demonstrates how one might implement "containing" and "using" -relationships between objects. - - package Bar; - - sub new { - my $type = shift; - my $self = {}; - $self->{'buz'} = 42; - bless $self, $type; - } - - package Foo; - - sub new { - my $type = shift; - my $self = {}; - $self->{'Bar'} = Bar->new; - $self->{'biz'} = 11; - bless $self, $type; - } - - package main; - - $a = Foo->new; - print "buz = ", $a->{'Bar'}->{'buz'}, "\n"; - print "biz = ", $a->{'biz'}, "\n"; - - - -=head1 OVERRIDING SUPERCLASS METHODS - -The following example demonstrates how to override a superclass method and -then call the overridden method. The B pseudo-class allows the -programmer to call an overridden superclass method without actually knowing -where that method is defined. - - package Buz; - sub goo { print "here's the goo\n" } - - package Bar; @ISA = qw( Buz ); - sub google { print "google here\n" } - - package Baz; - sub mumble { print "mumbling\n" } - - package Foo; - @ISA = qw( Bar Baz ); - - sub new { - my $type = shift; - bless [], $type; - } - sub grr { print "grumble\n" } - sub goo { - my $self = shift; - $self->SUPER::goo(); - } - sub mumble { - my $self = shift; - $self->SUPER::mumble(); - } - sub google { - my $self = shift; - $self->SUPER::google(); - } - - package main; - - $foo = Foo->new; - $foo->mumble; - $foo->grr; - $foo->goo; - $foo->google; - -Note that C refers to the superclasses of the current package -(C), not to the superclasses of C<$self>. - - -=head1 USING RELATIONSHIP WITH SDBM - -This example demonstrates an interface for the SDBM class. This creates a -"using" relationship between the SDBM class and the new class Mydbm. - - package Mydbm; - - require SDBM_File; - require Tie::Hash; - @ISA = qw( Tie::Hash ); - - sub TIEHASH { - my $type = shift; - my $ref = SDBM_File->new(@_); - bless {'dbm' => $ref}, $type; - } - sub FETCH { - my $self = shift; - my $ref = $self->{'dbm'}; - $ref->FETCH(@_); - } - sub STORE { - my $self = shift; - if (defined $_[0]){ - my $ref = $self->{'dbm'}; - $ref->STORE(@_); - } else { - die "Cannot STORE an undefined key in Mydbm\n"; - } - } - - package main; - use Fcntl qw( O_RDWR O_CREAT ); - - tie %foo, "Mydbm", "Sdbm", O_RDWR|O_CREAT, 0640; - $foo{'bar'} = 123; - print "foo-bar = $foo{'bar'}\n"; - - tie %bar, "Mydbm", "Sdbm2", O_RDWR|O_CREAT, 0640; - $bar{'Cathy'} = 456; - print "bar-Cathy = $bar{'Cathy'}\n"; - -=head1 THINKING OF CODE REUSE - -One strength of Object-Oriented languages is the ease with which old code -can use new code. The following examples will demonstrate first how one can -hinder code reuse and then how one can promote code reuse. - -This first example illustrates a class which uses a fully-qualified method -call to access the "private" method BAZ(). The second example will show -that it is impossible to override the BAZ() method. - - package FOO; - - sub new { - my $type = shift; - bless {}, $type; - } - sub bar { - my $self = shift; - $self->FOO::private::BAZ; - } - - package FOO::private; - - sub BAZ { - print "in BAZ\n"; - } - - package main; - - $a = FOO->new; - $a->bar; - -Now we try to override the BAZ() method. We would like FOO::bar() to call -GOOP::BAZ(), but this cannot happen because FOO::bar() explicitly calls -FOO::private::BAZ(). - - package FOO; - - sub new { - my $type = shift; - bless {}, $type; - } - sub bar { - my $self = shift; - $self->FOO::private::BAZ; - } - - package FOO::private; - - sub BAZ { - print "in BAZ\n"; - } - - package GOOP; - @ISA = qw( FOO ); - sub new { - my $type = shift; - bless {}, $type; - } - - sub BAZ { - print "in GOOP::BAZ\n"; - } - - package main; - - $a = GOOP->new; - $a->bar; - -To create reusable code we must modify class FOO, flattening class -FOO::private. The next example shows a reusable class FOO which allows the -method GOOP::BAZ() to be used in place of FOO::BAZ(). - - package FOO; - - sub new { - my $type = shift; - bless {}, $type; - } - sub bar { - my $self = shift; - $self->BAZ; - } - - sub BAZ { - print "in BAZ\n"; - } - - package GOOP; - @ISA = qw( FOO ); - - sub new { - my $type = shift; - bless {}, $type; - } - sub BAZ { - print "in GOOP::BAZ\n"; - } - - package main; - - $a = GOOP->new; - $a->bar; - -=head1 CLASS CONTEXT AND THE OBJECT - -Use the object to solve package and class context problems. Everything a -method needs should be available via the object or should be passed as a -parameter to the method. - -A class will sometimes have static or global data to be used by the -methods. A subclass may want to override that data and replace it with new -data. When this happens the superclass may not know how to find the new -copy of the data. - -This problem can be solved by using the object to define the context of the -method. Let the method look in the object for a reference to the data. The -alternative is to force the method to go hunting for the data ("Is it in my -class, or in a subclass? Which subclass?"), and this can be inconvenient -and will lead to hackery. It is better just to let the object tell the -method where that data is located. - - package Bar; - - %fizzle = ( 'Password' => 'XYZZY' ); - - sub new { - my $type = shift; - my $self = {}; - $self->{'fizzle'} = \%fizzle; - bless $self, $type; - } - - sub enter { - my $self = shift; - - # Don't try to guess if we should use %Bar::fizzle - # or %Foo::fizzle. The object already knows which - # we should use, so just ask it. - # - my $fizzle = $self->{'fizzle'}; - - print "The word is ", $fizzle->{'Password'}, "\n"; - } - - package Foo; - @ISA = qw( Bar ); - - %fizzle = ( 'Password' => 'Rumple' ); - - sub new { - my $type = shift; - my $self = Bar->new; - $self->{'fizzle'} = \%fizzle; - bless $self, $type; - } - - package main; - - $a = Bar->new; - $b = Foo->new; - $a->enter; - $b->enter; - -=head1 INHERITING A CONSTRUCTOR - -An inheritable constructor should use the second form of bless() which allows -blessing directly into a specified class. Notice in this example that the -object will be a BAR not a FOO, even though the constructor is in class FOO. - - package FOO; - - sub new { - my $type = shift; - my $self = {}; - bless $self, $type; - } - - sub baz { - print "in FOO::baz()\n"; - } - - package BAR; - @ISA = qw(FOO); - - sub baz { - print "in BAR::baz()\n"; - } - - package main; - - $a = BAR->new; - $a->baz; - -=head1 DELEGATION - -Some classes, such as SDBM_File, cannot be effectively subclassed because -they create foreign objects. Such a class can be extended with some sort of -aggregation technique such as the "using" relationship mentioned earlier or -by delegation. - -The following example demonstrates delegation using an AUTOLOAD() function to -perform message-forwarding. This will allow the Mydbm object to behave -exactly like an SDBM_File object. The Mydbm class could now extend the -behavior by adding custom FETCH() and STORE() methods, if this is desired. - - package Mydbm; - - require SDBM_File; - require Tie::Hash; - @ISA = qw(Tie::Hash); - - sub TIEHASH { - my $type = shift; - my $ref = SDBM_File->new(@_); - bless {'delegate' => $ref}; - } - - sub AUTOLOAD { - my $self = shift; - - # The Perl interpreter places the name of the - # message in a variable called $AUTOLOAD. - - # DESTROY messages should never be propagated. - return if $AUTOLOAD =~ /::DESTROY$/; - - # Remove the package name. - $AUTOLOAD =~ s/^Mydbm:://; - - # Pass the message to the delegate. - $self->{'delegate'}->$AUTOLOAD(@_); - } - - package main; - use Fcntl qw( O_RDWR O_CREAT ); - - tie %foo, "Mydbm", "adbm", O_RDWR|O_CREAT, 0640; - $foo{'bar'} = 123; - print "foo-bar = $foo{'bar'}\n"; - -=head1 SEE ALSO +For information on OO programming with Perl, please see L +and L. -L, L, L. +=cut diff --git a/pod/perldata.pod b/pod/perldata.pod index f34979cef16..7899e396e02 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -179,8 +179,9 @@ are considered pretty much the same thing for nearly all purposes, references are strongly-typed, uncastable pointers with builtin reference-counting and destructor invocation. -A scalar value is interpreted as TRUE in the Boolean sense if it is not -the null string or the number 0 (or its string equivalent, "0"). The +A scalar value is interpreted as FALSE in the Boolean sense +if it is undefined, the null string or the number 0 (or its +string equivalent, "0"), and TRUE if it is anything else. The Boolean context is just a special kind of scalar context where no conversion to a string or a number is ever performed. X X X X X @@ -251,14 +252,6 @@ which return whatever they feel like returning.) The following is always true: X - scalar(@whatever) == $#whatever - $[ + 1; - -Version 5 of Perl changed the semantics of C<$[>: files that don't set -the value of C<$[> no longer need to worry about whether another -file changed its value. (In other words, use of C<$[> is deprecated.) -So in general you can assume that -X<$[> - scalar(@whatever) == $#whatever + 1; Some programmers choose to use an explicit conversion so as to @@ -302,7 +295,9 @@ integer formats: 0b011011 # binary You are allowed to use underscores (underbars) in numeric literals -between digits for legibility. You could, for example, group binary +between digits for legibility (but not multiple underscores in a row: +C<23__500> is not legal; C<23_500> is). +You could, for example, group binary digits by threes (as for a Unix-style mode argument such as 0b110_100_100) or by fours (to represent nibbles, as in 0b1010_0110) or in other groups. X diff --git a/pod/perldelta.pod b/pod/perldelta.pod index a1df93a7924..32fdb7a97d5 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -1,23 +1,20 @@ =encoding utf8 -=for comment -This has been completed up to 527d644b124fe. - =head1 NAME [ this is a template for a new perldelta file. Any text flagged as XXX needs to be processed before release. ] -perldelta - what is new for perl v5.15.3 +perldelta - what is new for perl v5.15.4 =head1 DESCRIPTION -This document describes differences between the 5.15.2 release and -the 5.15.3 release. +This document describes differences between the 5.15.3 release and +the 5.15.4 release. -If you are upgrading from an earlier release such as 5.15.1, first read -L, which describes differences between 5.15.1 and -5.15.2. +If you are upgrading from an earlier release such as 5.15.3, first read +L, which describes differences between 5.15.3 and +5.15.4. =head1 Notice @@ -31,16 +28,6 @@ here, but most should go in the L section. [ List each enhancement as a =head2 entry ] -=head2 More CORE subs are callable through references - -Perl 5.15.2 introduced subroutines in the CORE namespace. Most of them -could only be called as barewords; i.e., they could be aliased at compile -time and then inlined under new names. - -Almost all of these functions can now be called through references and via -C<&foo()> syntax, bypassing the prototype. See L for a list of the -exceptions. - =head1 Security XXX Any security-related notices go here. In particular, any security @@ -49,33 +36,14 @@ L section. [ List each security issue as a =head2 entry ] -=head2 C memory error with GLOB_ALTDIRFUNC (CVE-2011-2728). - -Calling C with the unsupported flag GLOB_ALTDIRFUNC would -cause an access violation / segfault. A Perl program that accepts a flags value from -an external source could expose itself to denial of service or arbitrary code -execution attacks. There are no known exploits in the wild. The problem has been -corrected by explicitly disabling all unsupported flags and setting unused function -pointers to null. Bug reported by Clément Lecigne. - =head1 Incompatible Changes -=head2 User-defined case changing operations. +XXX For a release on a stable branch, this section aspires to be: -This feature was deprecated in Perl 5.14, and has now been removed. -The CPAN module L provides better functionality without -the drawbacks that this feature had, as are detailed in the 5.14 -documentation: -L + There are no changes intentionally incompatible with 5.XXX.XXX + If any exist, they are bugs and reports are welcome. -=head2 XSUBs are now 'static' - -XSUB C functions are now 'static', that is, they are not visible from -outside the compilation unit. For the exceedingly rare case where -this is not desired, a new public macro C can be -used in place of C. C (C) -can be made to declare XSUBs with C using the -C keyword, see L for details. +[ List each incompatible change as a =head2 entry ] =head1 Deprecations @@ -128,65 +96,7 @@ XXX =item * -L has been upgraded from version 1.00 to version 1.01. - -This is only a minor documentation update. - -=item * - -L has been upgraded from version 0.52 to version 0.56. - -Resolved an issue where C executable was present in C on MSWin32 - -=item * - -L has been upgraded from version 0.9109 to version 0.9110. - -=item * - -L has been upgraded from version 0.56 to version 0.58. - -=item * - -L has been upgraded from version 1.24 to version 1.25. - -It now strips out C<...>> formatting codes before displaying -descriptions [perl #94488]. - -=item * - -L has been upgraded from version 3.17 to version 3.18. - -The CIA world added non-standard values, so this is no longer used as a source -of data. - -=item * - -L has been upgraded from version 1.12 to version 1.13. - -See L. - -=item * - -L has been upgraded from version 0.2602 to version 0.2603. - -C on a Math::BigRat object containing -1/2 now creates a -Math::BigInt containing 0, rather than -0. L does not even -support negative zero, so the resulting object was actually malformed -[perl #95530]. - -=item * - -L has been upgraded from version 3.18 to version 3.19. - -=item * - -L has been upgraded from version 1.24 to version 1.25. - -L no longer uses L. Any code which was relying on this -implementation detail was buggy, and may fail as a result of this change. -The module's Perl code has been considerably simplified, roughly halving -the number of lines, with no change in functionality. +L has been upgraded from version 5.0150034 to version 5.0150035. =back @@ -314,15 +224,7 @@ L section, instead. =item * -The file F is no longer needed, and has been removed. It -contained a list of all exported functions, one of the files generated by -F from data in F and F. The code -has been refactored so that the only user of F, F, -now reads F and F directly, removing the need to -store the list of exported functions in an intermediate file. - -As F was never installed, this change will not be visible -outside the build process. +XXX =back @@ -340,14 +242,9 @@ that they represent may be covered elsewhere. =item * -F has been added, to run a sanity check on F. -F is not needed on most *nix platforms, but is for Win32, hence -previously was it was possible to inadvertently commit changes that worked -perfectly locally, but broke the build on Win32. - -=item * - -F has been added to test the C function. +F now tests that all config.sh-style files are +complete. These are used by the various non-*nix to generate their +F, and an incomplete input file will generate invalid output. =back @@ -428,97 +325,7 @@ L. =item * -In Perl 5.15.0 C stopped returning true if the C<$$> -variable had not been used yet. This has been fixed. - -=item * - -C, C, etc., used to -return true for most, but not all built-in variables, if -they had not been used yet. Many times that new built-in -variables were added in past versions, this construct was -not taken into account, so this affected C<${^GLOBAL_PHASE}> and -C<${^UTF8CACHE}>, among others. It also used to return false if the -package name was given as well (C<${"::!"}>) and for subroutines in the -CORE package [perl #97978] [perl #97492] [perl #97484]. - -=item * - -Perl 5.10.0 introduced a similar bug: C where "foo" -represents the name of a built-in global variable used to return false if -the variable had never been used before, but only on the I call. -This, too, has been fixed. - -=item * - -Various functions that take a filehandle argument in rvalue context -(C, C, etc.) used to call C multiple times, if it -was a tied variable, and warn twice, if it was C [perl #97482]. - -=item * - -C and similar filehandle functions, when called on built-in global -variables (like C<$+>), used to die if the variable happened to hold the -undefined value, instead of producing the usual "Use of uninitialized -value" warning. - -=item * - -When autovivified file handles were introduced in Perl 5.6.0, C -was inadvertently made to autovivify when called as C (but -not as C<< <$foo> >>). It has now been fixed never to autovivify. - -=item * - -C used to call C multiple times, but -now calls it just once. - -=item * - -Some cases of dereferencing a complex expression, such as -C<${ (), $tied } = 1>, used to call C multiple times, but now call -it once. - -=item * - -For a tied variable returning a package name, C<< $tied->method >> used to -call C multiple times (even up to six!), and sometimes would -fail to call the method, due to memory corruption. - -=item * - -Calling an undefined anonymous subroutine (e.g., what $x holds after -C) used to cause a "Not a CODE reference" error, which -has been corrected to "Undefined subroutine called" [perl #71154]. - -=item * - -Causing C<@DB::args> to be freed between uses of C no longer -results in a crash [perl #93320]. - -=item * - -Since 5.6.0, C<*{ ... }> has been inconsistent in how it treats undefined -values. It would die in strict mode or lvalue context for most undefined -values, but would be treated as the empty string (with a warning) for the -specific scalar return by C (C<&PL_sv_undef> internally). This -has been corrected. C is now treated like other undefined -scalars, as in Perl 5.005. - -=item * - -It used to be possible to free the typeglob of a localised array or hash -(e.g., C), resulting in a crash on scope exit. - -=item * - -C used to be equivalent to C<($foo, setpgrp)>, because -C was ignoring its argument if there was just one. Now it is -equivalent to C. - -=item * - -An assignment like C<*$tied = \&{"..."}> now calls FETCH only once. +XXX =back @@ -550,7 +357,7 @@ here. XXX Generate this with: - perl Porting/acknowledgements.pl v5.15.2..HEAD + perl Porting/acknowledgements.pl v5.15.3..HEAD =head1 Reporting Bugs diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 45322c25411..9ef46e4e36d 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -238,6 +238,11 @@ spots. This is now heavily deprecated. (P) A general assertion failed. The file in question must be examined. +=item Assigning non-zero to $[ is no longer possible + +(F) The special variable C<$[>, deprecated in older perls, is now a fixed +zero value, because the feature that it used to control has been removed. + =item Assignment to both a list and a scalar (F) If you assign to a conditional operator, the 2nd and 3rd arguments @@ -3408,13 +3413,6 @@ there are in the savestack. (P) Failed an internal consistency check while trying to reset a weak reference. -=item panic: Devel::DProf inconsistent subroutine return - -(P) Devel::DProf called a subroutine that exited using goto(LABEL), -last(LABEL) or next(LABEL). Leaving that way a subroutine called from -an XSUB will lead very probably to a crash of the interpreter. This is -a bug that will hopefully one day get fixed. - =item panic: die %s (P) We popped the context stack to an eval context, and then discovered @@ -3564,6 +3562,12 @@ scalar's string buffer. (P) The sv_insert() routine was told to remove more string than there was string. +=item panic: strxfrm() gets absurd - a => %u, ab => %u + +(P) The interpreter's sanity check of the C function strxfrm() failed. +In your current locale the returned transformation of the string "ab" is +shorter than that of the string "a", which makes no sense. + =item panic: top_env (P) The compiler attempted to do a goto, or something weird like that. @@ -4505,21 +4509,6 @@ a dirhandle. Check your control flow. (W unopened) You tried to use the tell() function on a filehandle that was either never opened or has since been closed. -=item That use of $[ is unsupported - -(F) Assignment to C<$[> is now strictly circumscribed, and interpreted -as a compiler directive. You may say only one of - - $[ = 0; - $[ = 1; - ... - local $[ = 0; - local $[ = 1; - ... - -This is to prevent the problem of one module changing the array base out -from under another module inadvertently. See L. - =item The crypt() function is unimplemented due to excessive paranoia (F) Configure couldn't find the crypt() function on your machine, @@ -5120,11 +5109,6 @@ you can write it as C to avoid this warning. (F) The "use" keyword is recognized and executed at compile time, and returns no useful value. See L. -=item Use of assignment to $[ is deprecated - -(D deprecated) The C<$[> variable (index of the first element in an array) -is deprecated. See L. - =item Use of bare << to mean <<"" is deprecated (D deprecated) You are now encouraged to use the explicitly quoted diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index f457188b6e1..5d15fe39a3c 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -635,8 +635,7 @@ in the CLASSNAME package. If CLASSNAME is omitted, the current package is used. Because a C is often the last thing in a constructor, it returns the reference for convenience. Always use the two-argument version if a derived class might inherit the function doing the blessing. -See L and L for more about the blessing (and blessings) -of objects. +SeeL for more about the blessing (and blessings) of objects. Consider always blessing objects in CLASSNAMEs that are mixed case. Namespaces with all lowercase names are considered reserved for @@ -2684,9 +2683,8 @@ It returns the position of the first occurrence of SUBSTR in STR at or after POSITION. If POSITION is omitted, starts searching from the beginning of the string. POSITION before the beginning of the string or after its end is treated as if it were the beginning or the end, -respectively. POSITION and the return value are based at C<0> (or whatever -you've set the C<$[> variable to--but don't do that). If the substring -is not found, C returns one less than the base, ordinarily C<-1>. +respectively. POSITION and the return value are based at zero. +If the substring is not found, C returns -1. =item int EXPR X X X X X @@ -3494,6 +3492,9 @@ opens the UTF8-encoded file containing Unicode characters; see L. Note that if layers are specified in the three-argument form, then default layers stored in ${^OPEN} (see L; usually set by the B pragma or the switch B<-CioD>) are ignored. +Those layers will also be ignored if you specifying 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 C involved a pipe, the return value happens to be the pid of @@ -6060,7 +6061,7 @@ If both OFFSET and LENGTH are omitted, removes everything. If OFFSET is past the end of the array, Perl issues a warning, and splices at the end of the array. -The following equivalences hold (assuming C<< $[ == 0 and $#a >= $i >> ) +The following equivalences hold (assuming C<< $#a >= $i >> ) push(@a,$x,$y) splice(@a,@a,0,$x,$y) pop(@a) splice(@a,-1) @@ -6777,10 +6778,11 @@ C declares a lexically scoped variable, just like C. However, those variables will never be reinitialized, contrary to lexical variables that are reinitialized each time their enclosing block is entered. +See L for details. C variables are enabled only when the C pragma is in effect, unless the keyword is written as C. -See L. +See also L. =item study SCALAR X @@ -6867,8 +6869,7 @@ X X X X X =item substr EXPR,OFFSET Extracts a substring out of EXPR and returns it. First character is at -offset C<0> (or whatever you've set C<$[> to (but B<)). -If OFFSET is negative (or more precisely, less than C<$[>), starts +offset zero. If OFFSET is negative, starts that far back from the end of the string. If LENGTH is omitted, returns everything through the end of the string. If LENGTH is negative, leaves that many characters off the end of the string. diff --git a/pod/perlgit.pod b/pod/perlgit.pod index a316e7bf97d..feb5535d8f8 100644 --- a/pod/perlgit.pod +++ b/pod/perlgit.pod @@ -258,7 +258,7 @@ Now you should create a patch file for all your local changes: % git format-patch -M origin.. 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch -You should now send an email to to +You should now send an email to L with a description of your changes, and include this patch file as an attachment. In addition to being tracked by RT, mail to perlbug will automatically be forwarded to diff --git a/pod/perlhack.pod b/pod/perlhack.pod index 60e2b31a575..63df5d5dfc3 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -64,8 +64,8 @@ subject: % perlbug -s "[PATCH] $(git log -1 --oneline HEAD)" -f 0001-*.patch The perlbug program will ask you a few questions about your email -address and the patch you're submitting. Once you've answered them you -can submit your patch. +address and the patch you're submitting. Once you've answered them it +will submit your patch via email. =item * Thank you @@ -76,9 +76,9 @@ Thank you! =head1 BUG REPORTING -If you want to report a bug in Perl, you must use the F command -line tool. This tool will ensure that your bug report includes all the -relevant system and configuration information. +If you want to report a bug in Perl, you must use the F +command line tool. This tool will ensure that your bug report includes +all the relevant system and configuration information. To browse existing Perl bugs and patches, you can use the web interface at L. @@ -95,7 +95,8 @@ please add it. This will help the porters fix the bug. The perl5-porters (p5p) mailing list is where the Perl standard distribution is maintained and developed. The people who maintain Perl -are also referred to as the "Perl 5 Porters", "p5p" or just the "porters". +are also referred to as the "Perl 5 Porters", "p5p" or just the +"porters". A searchable archive of the list is available at L. There is @@ -109,6 +110,12 @@ submitted to the maintenance and development branches of the perl repository. See L for subscription and archive information. +=head2 #p5p on IRC + +Many porters are also active on the L channel. +Feel free to join the channel and ask questions about hacking on the +Perl core. + =head1 GETTING THE PERL SOURCE All of Perl's source code is kept centrally in a Git repository at @@ -472,8 +479,8 @@ documentation or its listing on L for more information on reporting bugs and submitting patches. In most cases, patches to modules in F should be sent upstream -and should not be applied to the Perl core individually. If a patch -to a file in F absolutely cannot wait for the fix to be made +and should not be applied to the Perl core individually. If a patch to +a file in F absolutely cannot wait for the fix to be made upstream, released to CPAN and copied to blead, you must add (or update) a C entry in the F<"Porting/Maintainers.pl"> file to flag that a local modification has been made. See @@ -690,7 +697,8 @@ The F library provides some of the features of L, but avoids loading most modules and uses as few core features as possible. -If you write your own test, use the L. +If you write your own test, use the L. =over 4 @@ -772,8 +780,8 @@ F. =item * test.torture torturetest -Run all the usual tests and some extra tests. As of Perl 5.8.0, the only -extra tests are Abigail's JAPHs, F. +Run all the usual tests and some extra tests. As of Perl 5.8.0, the +only extra tests are Abigail's JAPHs, F. You can also run the torture test with F by giving C<-torture> argument to F. @@ -833,14 +841,14 @@ because L needs to be able to schedule individual non-conflicting test scripts itself, and there is no standard interface to C utilities to interact with their job schedulers. -Note that currently some test scripts may fail when run in parallel (most -notably F). If necessary, run just the failing scripts -again sequentially and see if the failures go away. +Note that currently some test scripts may fail when run in parallel +(most notably F). If necessary, run just the failing +scripts again sequentially and see if the failures go away. =head2 Running tests by hand -You can run part of the test suite by hand by using one of the following -commands from the F directory: +You can run part of the test suite by hand by using one of the +following commands from the F directory: ./perl -I../lib TEST list-of-.t-files @@ -852,9 +860,9 @@ or =head2 Using F for testing -If you use C for testing, you have several command line options -available to you. The arguments are as follows, and are in the order -that they must appear if used together. +If you use C for testing, you have several command line +options available to you. The arguments are as follows, and are in the +order that they must appear if used together. harness -v -torture -re=pattern LIST OF FILES TO TEST harness -v -torture -re LIST OF PATTERNS TO MATCH @@ -1080,9 +1088,9 @@ each file's purpose. Perl instead begins each with a literary allusion to that file's purpose. Like chapters in many books, all top-level Perl source files (along -with a few others here and there) begin with an epigrammatic inscription -that alludes, indirectly and metaphorically, to the material you're -about to read. +with a few others here and there) begin with an epigrammatic +inscription that alludes, indirectly and metaphorically, to the +material you're about to read. Quotations are taken from writings of J.R.R. Tolkien pertaining to his Legendarium, almost always from I. Chapters and diff --git a/pod/perlhist.pod b/pod/perlhist.pod index 93f5353f3d6..8f5328ecc96 100644 --- a/pod/perlhist.pod +++ b/pod/perlhist.pod @@ -30,7 +30,8 @@ Sarathy, Graham Barr, Jarkko Hietaniemi, Hugo van der Sanden, Michael Schwern, Rafael Garcia-Suarez, Nicholas Clark, Richard Clamp, Leon Brocard, Dave Mitchell, Jesse Vincent, Ricardo Signes, Steve Hay, Matt S Trout, David Golden, Florian Ragwitz, Tatsuhiko Miyagawa, -Chris C Williams, Zefram and Ævar Arnfjörð Bjarmason. +Chris C Williams, Zefram, Ævar Arnfjörð Bjarmason and Stevan +Little. =head2 PUMPKIN? @@ -459,10 +460,13 @@ the strings?). Jesse 5.14.0 2011-May-14 The 5.14 maintenance track Jesse 5.14.1 2011-Jun-16 + Florian 5.14.2-RC1 2011-Sep-19 + 5.14.2 2011-Sep-26 David G 5.15.0 2011-Jun-20 The 5.15 development track Zefram 5.15.1 2011-Jul-20 Ricardo 5.15.2 2011-Aug-20 + Stevan 5.15.3 2011-Sep-20 =head2 SELECTED RELEASE SIZES diff --git a/pod/perlintro.pod b/pod/perlintro.pod index 2d0076a029d..5e2fe5c9afc 100644 --- a/pod/perlintro.pod +++ b/pod/perlintro.pod @@ -660,7 +660,7 @@ For more information on writing subroutines, see L. OO Perl is relatively simple and is implemented using references which know what sort of object they are based on Perl's concept of packages. However, OO Perl is largely beyond the scope of this document. -Read L, L, L and L. +Read L and L. As a beginning Perl programmer, your most common use of OO Perl will be in using third-party modules, which are documented below. diff --git a/pod/perlipc.pod b/pod/perlipc.pod index 3009913147c..c064f2a0ec2 100644 --- a/pod/perlipc.pod +++ b/pod/perlipc.pod @@ -40,24 +40,7 @@ handler could in theory trigger a memory fault and subsequent core dump - see L below. The names of the signals are the ones listed out by C on your -system, or you can retrieve them from the Config module. Set up an -@signame list indexed by number to get the name and a %signo hash table -indexed by name to get the number: - - use Config; - defined($Config{sig_name}) || die "No sigs?"; - foreach $name (split(" ", $Config{sig_name})) { - $signo{$name} = $i; - $signame[$i] = $name; - $i++; - } - -So to check whether signal 17 and SIGALRM were the same, do just this: - - print "signal #17 = $signame[17]\n"; - if ($signo{ALRM}) { - print "SIGALRM is $signo{ALRM}\n"; - } +system, or you can retrieve them using the CPAN module L. You may also choose to assign the strings C<"IGNORE"> or C<"DEFAULT"> as the handler, in which case Perl will try to discard the signal or do the @@ -72,19 +55,9 @@ Calling C with C<$SIG{CHLD}> set to C<"IGNORE"> usually returns C<-1> on such platforms. Some signals can be neither trapped nor ignored, such as the KILL and STOP -(but not the TSTP) signals. One strategy for temporarily ignoring signals -is to use a local() on that hash element, automatically restoring a -previous value once your block is exited. Remember that values created by -the dynamically-scoped local() are "inherited" by functions called from -within their caller's scope. - - sub precious { - local $SIG{INT} = "IGNORE"; - more_functions(); - } - sub more_functions { - # interrupts still ignored, for now... - } +(but not the TSTP) signals. Note that ignoring signals makes them disappear. +If you only want them blocked temporarily without them getting lost you'll +have to use POSIX' sigprocmask. Sending a signal to a negative process ID means that you send the signal to the entire Unix process group. This code sends a hang-up signal to all @@ -100,16 +73,17 @@ so it doesn't kill itself: Another interesting signal to send is signal number zero. This doesn't actually affect a child process, but instead checks whether it's alive -or has changed its UID. +or has changed its UIDs. unless (kill 0 => $kid_pid) { warn "something wicked happened to $kid_pid"; } -When directed at a process whose UID is not identical to that -of the sending process, signal number zero may fail because -you lack permission to send the signal, even though the process is alive. -You may be able to determine the cause of failure using C<%!>. +Signal number zero may fail because you lack permission to send the +signal when directed at a process whose real or saved UID is not +identical to the real or effective UID of the sending process, even +though the process is alive. You may be able to determine the cause of +failure using C<$!> or C<%!>. unless (kill(0 => $pid) || $!{EPERM}) { warn "$pid looks dead"; @@ -120,45 +94,25 @@ handlers: $SIG{INT} = sub { die "\nOutta here!\n" }; -But that will be problematic for the more complicated handlers that need -to reinstall themselves. Because Perl's signal mechanism is currently -based on the signal(3) function from the C library, you may sometimes be so -unfortunate as to run on systems where that function is "broken"; that -is, it behaves in the old unreliable SysV way rather than the newer, more -reasonable BSD and POSIX fashion. So you'll see defensive people writing -signal handlers like this: - - sub REAPER { - $waitedpid = wait; - # loathe SysV: it makes us not only reinstate - # the handler, but place it after the wait - $SIG{CHLD} = \&REAPER; - } - $SIG{CHLD} = \&REAPER; - # now do something that forks... - -or better still: +SIGCHLD handlers require some special care. If a second child dies +while in the signal handler caused by the first death, we won't get +another signal. So must loop here else we will leave the unreaped child +as a zombie. And the next time two children die we get another zombie. +And so on. use POSIX ":sys_wait_h"; - sub REAPER { - my $child; - # If a second child dies while in the signal handler caused by the - # first death, we won't get another signal. So must loop here else - # we will leave the unreaped child as a zombie. And the next time - # two children die we get another zombie. And so on. - while (($child = waitpid(-1, WNOHANG)) > 0) { + $SIG{CHLD} = sub { + while ((my $child = waitpid(-1, WNOHANG)) > 0) { $Kid_Status{$child} = $?; } - $SIG{CHLD} = \&REAPER; # still loathe SysV - } - $SIG{CHLD} = \&REAPER; + }; # do something that forks... Be careful: qx(), system(), and some modules for calling external commands do a fork(), then wait() for the result. Thus, your signal handler -(C<&REAPER> in the example) will be called. Because wait() was already -called by system() or qx(), the wait() in the signal handler will see no -more zombies and will therefore block. +will be called. Because wait() was already called by system() or qx(), +the wait() in the signal handler will see no more zombies and will +therefore block. The best way to prevent this issue is to use waitpid(), as in the following example: @@ -196,8 +150,7 @@ protected within an C block, you set a signal handler to trap alarm signals and then schedule to have one delivered to you in some number of seconds. Then try your blocking operation, clearing the alarm when it's done but not before you've exited your C block. If it -goes off, you'll use die() to jump out of the block, much as you might -using longjmp() or throw() in other languages. +goes off, you'll use die() to jump out of the block. Here's an example: @@ -231,12 +184,6 @@ the process. Many daemons provide this mechanism using a C signal handler. When you want to tell the daemon to reread the file, simply send it the C signal. -Not all platforms automatically reinstall their (native) signal -handlers after a signal delivery. This means that the handler works -the first time the signal is sent, only. The solution to this problem -is to use C signal handlers if available; their behavior -is well-defined. - The following example implements a simple daemon, which restarts itself every time the C signal is received. The actual code is located in the subroutine C, which just prints some debugging @@ -257,16 +204,10 @@ info to show that it works; it should be replaced with the real code. my $SELF = catfile($FindBin::Bin, $script); # POSIX unmasks the sigprocmask properly - my $sigset = POSIX::SigSet->new(); - my $action = POSIX::SigAction->new("sigHUP_handler", - $sigset, - &POSIX::SA_NODEFER); - POSIX::sigaction(&POSIX::SIGHUP, $action); - - sub sigHUP_handler { + $SIG{HUP} = sub { print "got SIGHUP\n"; exec($SELF, @ARGV) || die "$0: couldn't restart: $!"; - } + }; code(); @@ -310,7 +251,8 @@ Then at strategic "safe" points in the Perl interpreter (e.g. when it is about to execute a new opcode) the flags are checked and the Perl level handler from %SIG is executed. The "deferred" scheme allows much more flexibility in the coding of signal handlers as we know the Perl -interpreter is in a safe state, and that we are not in a system library function when the handler is called. However the implementation does +interpreter is in a safe state, and that we are not in a system library +function when the handler is called. However the implementation does differ from previous Perls in the following ways: =over 4 @@ -372,10 +314,9 @@ Instead of setting C<$SIG{ALRM}>: try something like the following: - use POSIX qw(SIGALRM); - POSIX::sigaction(SIGALRM, - POSIX::SigAction->new(sub { die "alarm" })) - || die "Error setting SIGALRM handler: $!\n"; + use POSIX qw(SIGALRM); + POSIX::sigaction(SIGALRM, POSIX::SigAction->new(sub { die "alarm" })) + || die "Error setting SIGALRM handler: $!\n"; Another way to disable the safe signal behavior locally is to use the C module from CPAN, which affects @@ -399,7 +340,7 @@ C calls will always be retried. Certain signals like SEGV, ILL, and BUS are generated by virtual memory addressing errors and similar "faults". These are normally fatal: there is -little a Perl-level handler can do with them. So Perl now delivers them +little a Perl-level handler can do with them. So Perl delivers them immediately rather than attempting to defer them. =item Signals triggered by operating system state diff --git a/pod/perllol.pod b/pod/perllol.pod index 8c6c0563f89..b35a0febb31 100644 --- a/pod/perllol.pod +++ b/pod/perllol.pod @@ -174,7 +174,7 @@ Prior to Perl 5.14, this wouldn't even compile: push $AoA[0], "wilma", "betty"; # implicit deref -How come? Because once upon a time, the argument to push() had to be be a +How come? Because once upon a time, the argument to push() had to be a real array, not just a reference to one. That's no longer true. In fact, the line marked "implicit deref" above works just fine--in this instance--to do what the one that says explicit deref did. diff --git a/pod/perlmod.pod b/pod/perlmod.pod index f02193324fd..e31b0b9fce1 100644 --- a/pod/perlmod.pod +++ b/pod/perlmod.pod @@ -381,7 +381,7 @@ package may also derive some of its methods from another class (package) by listing the other package name(s) in its global @ISA array (which must be a package global, not a lexical). -For more on this, see L and L. +For more on this, see L and L. =head2 Perl Modules X @@ -606,7 +606,7 @@ C<1> value. See L for general style issues related to building Perl modules and classes, as well as descriptions of the standard library and CPAN, L for how Perl's standard import/export mechanism -works, L and L for an in-depth tutorial on +works, L and L for in-depth information on creating classes, L for a hard-core reference document on objects, L for an explanation of functions and scoping, and L and L for more information on writing diff --git a/pod/perlmodlib.PL b/pod/perlmodlib.PL index 26f69cb3e81..74e85e7afa1 100644 --- a/pod/perlmodlib.PL +++ b/pod/perlmodlib.PL @@ -1044,7 +1044,7 @@ its methods by loading dynamic C or C++ objects, but that should be totally transparent to the user of the module. Likewise, the module might set up an AUTOLOAD function to slurp in subroutine definitions on demand, but this is also transparent. Only the F<.pm> file is required to -exist. See L, L, and L for details about +exist. See L, L, and L for details about the AUTOLOAD mechanism. =head2 Guidelines for Module Creation @@ -1104,7 +1104,7 @@ Let the objects look after themselves! Generally, avoid hard-wired class names as far as possible. Avoid C<< $r->Class::func() >> where using C<@ISA=qw(... Class ...)> and -C<< $r->func() >> would work (see L for more details). +C<< $r->func() >> would work. Use autosplit so little used or newly added functions won't be a burden to programs that don't use them. Add test functions to diff --git a/pod/perlmodstyle.pod b/pod/perlmodstyle.pod index dfe5662f942..df813a0f3dd 100644 --- a/pod/perlmodstyle.pod +++ b/pod/perlmodstyle.pod @@ -254,55 +254,58 @@ Your module may be object oriented (OO) or not, or it may have both kinds of interfaces available. There are pros and cons of each technique, which should be considered when you design your API. -According to Damian Conway, you should consider using OO: +In I (copyright 2004, Published by O'Reilly Media, Inc.), +Damian Conway provides a list of criteria to use when deciding if OO is the +right fit for your problem: =over 4 -=item * +=item * -When the system is large or likely to become so +The system being designed is large, or is likely to become large. -=item * +=item * -When the data is aggregated in obvious structures that will become objects +The data can be aggregated into obvious structures, especially if +there's a large amount of data in each aggregate. -=item * +=item * -When the types of data form a natural hierarchy that can make use of inheritance +The various types of data aggregate form a natural hierarchy that +facilitates the use of inheritance and polymorphism. =item * -When operations on data vary according to data type (making -polymorphic invocation of methods feasible) +You have a piece of data on which many different operations are +applied. =item * -When it is likely that new data types may be later introduced -into the system, and will need to be handled by existing code +You need to perform the same general operations on related types of +data, but with slight variations depending on the specific type of data +the operations are applied to. =item * -When interactions between data are best represented by -overloaded operators +It's likely you'll have to add new data types later. =item * -When the implementation of system components is likely to -change over time (and hence should be encapsulated) +The typical interactions between pieces of data are best represented by +operators. =item * -When the system design is itself object-oriented +The implementation of individual components of the system is likely to +change over time. =item * -When large amounts of client code will use the software (and -should be insulated from changes in its implementation) +The system design is already object-oriented. =item * -When many separate operations will need to be applied to the -same set of data +Large numbers of other programmers will be using your code modules. =back diff --git a/pod/perlobj.pod b/pod/perlobj.pod index 850225f64a9..0280c62be42 100644 --- a/pod/perlobj.pod +++ b/pod/perlobj.pod @@ -1,595 +1,1034 @@ +=encoding utf8 + +=for comment +Consistent formatting of this file is achieved with: + perl ./Porting/podtidy pod/perlobj.pod + =head1 NAME X X -perlobj - Perl objects +perlobj - Perl object reference =head1 DESCRIPTION -First you need to understand what references are in Perl. -See L for that. Second, if you still find the following -reference work too complicated, a tutorial on object-oriented programming -in Perl can be found in L and L. +This document provides a reference for Perl's object orientation +features. If you're looking for an introduction to object-oriented +programming in Perl, please see L. + +In order to understand Perl objects, you first need to understand +references in Perl. See L for details. + +This document describes all of Perl's object-oriented (OO) features +from the ground up. If you're just looking to write some +object-oriented code of your own, you are probably better served by +using one of the object systems from CPAN described in L. -If you're still with us, then -here are three very simple definitions that you should find reassuring. +If you're looking to write your own object system, or you need to +maintain code which implements objects from scratch then this document +will help you understand exactly how Perl does object orientation. + +There are a few basic principles which define object oriented Perl: =over 4 =item 1. -An object is simply a reference that happens to know which class it -belongs to. +An object is simply a data structure that knows to which class it +belongs. =item 2. -A class is simply a package that happens to provide methods to deal -with object references. +A class is simply a package. A class provides methods that expect to +operate on objects. =item 3. -A method is simply a subroutine that expects an object reference (or -a package name, for class methods) as the first argument. +A method is simply a subroutine that expects a reference to an object +(or a package name, for class methods) as the first argument. =back -We'll cover these points now in more depth. +Let's look at each of these principles in depth. -=head2 An Object is Simply a Reference +=head2 An Object is Simply a Data Structure X X X X -Unlike say C++, Perl doesn't provide any special syntax for -constructors. A constructor is merely a subroutine that returns a -reference to something "blessed" into a class, generally the -class that the subroutine is defined in. Here is a typical -constructor: - - package Critter; - sub new { bless {} } - -That word C isn't special. You could have written -a construct this way, too: - - package Critter; - sub spawn { bless {} } - -This might even be preferable, because the C++ programmers won't -be tricked into thinking that C works in Perl as it does in C++. -It doesn't. We recommend that you name your constructors whatever -makes sense in the context of the problem you're solving. For example, -constructors in the Tk extension to Perl are named after the widgets -they create. - -One thing that's different about Perl constructors compared with those in -C++ is that in Perl, they have to allocate their own memory. (The other -things is that they don't automatically call overridden base-class -constructors.) The C<{}> allocates an anonymous hash containing no -key/value pairs, and returns it The bless() takes that reference and -tells the object it references that it's now a Critter, and returns -the reference. This is for convenience, because the referenced object -itself knows that it has been blessed, and the reference to it could -have been returned directly, like this: - - sub new { - my $self = {}; - bless $self; - return $self; - } - -You often see such a thing in more complicated constructors -that wish to call methods in the class as part of the construction: - - sub new { - my $self = {}; - bless $self; - $self->initialize(); - return $self; - } - -If you care about inheritance (and you should; see -L), -then you want to use the two-arg form of bless -so that your constructors may be inherited: - - sub new { - my $class = shift; - my $self = {}; - bless $self, $class; - $self->initialize(); - return $self; - } - -Or if you expect people to call not just C<< CLASS->new() >> but also -C<< $obj->new() >>, then use something like the following. (Note that using -this to call new() on an instance does not automatically perform any -copying. If you want a shallow or deep copy of an object, you'll have to -specifically allow for that.) The initialize() method used will be of -whatever $class we blessed the object into: - - sub new { - my $this = shift; - my $class = ref($this) || $this; - my $self = {}; - bless $self, $class; - $self->initialize(); - return $self; - } - -Within the class package, the methods will typically deal with the -reference as an ordinary reference. Outside the class package, -the reference is generally treated as an opaque value that may -be accessed only through the class's methods. - -Although a constructor can in theory re-bless a referenced object -currently belonging to another class, this is almost certainly going -to get you into trouble. The new class is responsible for all -cleanup later. The previous blessing is forgotten, as an object -may belong to only one class at a time. (Although of course it's -free to inherit methods from many classes.) If you find yourself -having to do this, the parent class is probably misbehaving, though. - -A clarification: Perl objects are blessed. References are not. Objects -know which package they belong to. References do not. The bless() -function uses the reference to find the object. Consider -the following example: - - $a = {}; - $b = $a; - bless $a, BLAH; - print "\$b is a ", ref($b), "\n"; - -This reports $b as being a BLAH, so obviously bless() -operated on the object and not on the reference. +Unlike many other languages which support object orientation, Perl does +not provide any special syntax for constructing an object. Objects are +merely Perl data structures (hashes, arrays, scalars, filehandles, +etc.) that have been explicitly associated with a particular class. -=head2 A Class is Simply a Package -X X X<@ISA> X +That explicit association is created by the built-in C function, +which is typically used within the I subroutine of the +class. -Unlike say C++, Perl doesn't provide any special syntax for class -definitions. You use a package as a class by putting method -definitions into the class. - -There is a special array within each package called @ISA, which says -where else to look for a method if you can't find it in the current -package. This is how Perl implements inheritance. Each element of the -@ISA array is just the name of another package that happens to be a -class package. The classes are searched for missing methods in -depth-first, left-to-right order by default (see L for alternative -search order and other in-depth information). The classes accessible -through @ISA are known as base classes of the current class. - -All classes implicitly inherit from class C as their -last base class. Several commonly used methods are automatically -supplied in the UNIVERSAL class; see L<"Default UNIVERSAL methods"> or -L for more details. -X X X - -If a missing method is found in a base class, it is cached -in the current class for efficiency. Changing @ISA or defining new -subroutines invalidates the cache and causes Perl to do the lookup again. - -If neither the current class, its named base classes, nor the UNIVERSAL -class contains the requested method, these three places are searched -all over again, this time looking for a method named AUTOLOAD(). If an -AUTOLOAD is found, this method is called on behalf of the missing method, -setting the package global $AUTOLOAD to be the fully qualified name of -the method that was intended to be called. -X +Here is a simple constructor: -If none of that works, Perl finally gives up and complains. + package File; -If you want to stop the AUTOLOAD inheritance say simply -X + sub new { + my $class = shift; + + return bless {}, $class; + } + +The name C isn't special. We could name our constructor something +else: + + package File; + + sub load { + my $class = shift; + + return bless {}, $class; + } + +The modern convention for OO modules is to always use C as the +name for the constructor, but there is no requirement to do so. Any +subroutine that blesses a data structure into a class is a valid +constructor in Perl. + +In the previous examples, the C<{}> code creates a reference to an +empty anonymous hash. The C function then takes that reference +and associates the hash with the class in C<$class>. In the simplest +case, the C<$class> variable will end up containing the string "File". + +We can also use a variable to store a reference to the data structure +that is being blessed as our object: + + sub new { + my $class = shift; + + my $self = {}; + bless $self, $class; + + return $self; + } + +Once we've blessed the hash referred to by C<$self> we can start +calling methods on it. This is useful if you want to put object +initialization in its own separate method: + + sub new { + my $class = shift; + + my $self = {}; + bless $self, $class; + + $self->_initialize(); + + return $self; + } + +Since the object is also a hash, you can treat it as one, using it to +store data associated with the object. Typically, code inside the class +can treat the hash as an accessible data structure, while code outside +the class should always treat the object as opaque. This is called +B. Encapsulation means that the user of an object does +not have to know how it is implemented. The user simply calls +documented methods on the object. + +Note, however, that (unlike most other OO languages) Perl does not +ensure or enforce encapsulation in any way. If you want objects to +actually I opaque you need to arrange for that yourself. This can +be done in a varierty of ways, including using L<"Inside-Out objects"> +or modules from CPAN. + +=head3 Objects Are Blessed; Variables Are Not - sub AUTOLOAD; +When we bless something, we are not blessing the variable which +contains a reference to that thing, nor are we blessing the reference +that the variable stores; we are blessing the thing that the variable +refers to (sometimes known as the I). This is best +demonstrated with this code: -and the call will die using the name of the sub being called. + my $foo = {}; + my $bar = $foo; -Perl classes do method inheritance only. Data inheritance is left up -to the class itself. By and large, this is not a problem in Perl, -because most classes model the attributes of their object using an -anonymous hash, which serves as its own little namespace to be carved up -by the various classes that might want to do something with the object. -The only problem with this is that you can't sure that you aren't using -a piece of the hash that isn't already used. A reasonable workaround -is to prepend your fieldname in the hash with the package name. -X X + bless $foo, 'Class'; + print blessed( $bar ); # prints "Class" - sub bump { - my $self = shift; - $self->{ __PACKAGE__ . ".count"}++; - } + $bar = "some other value"; + print blessed( $bar ); # prints undef + +When we call C on a variable, we are actually blessing the +underlying data structure that the variable refers to. We are not +blessing the reference itself, nor the variable that contains that +reference. That's why the second call to C returns +false. At that point C<$bar> is no longer storing a reference to an +object. + +You will sometimes see older books or documentation mention "blessing a +reference" or describe an object as a "blessed reference", but this is +incorrect. It isn't the reference that is blessed as an object; it's +the thing the reference refers to (i.e. the referent). + +=head2 A Class is Simply a Package +X X X<@ISA> X + +Perl does not provide any special syntax for class definitions. A +package is simply a namespace containing variables and subroutines. The +only difference is that in a class, the subroutines may expect a +reference to an object or the name of a class as the first argument. +This is purely a matter of convention, so a class may contain both +methods and subroutines which I operate on an object or class. + +Each package contains a special array called C<@ISA>. The C<@ISA> array +contains a list of that class's parent classes, if any. This array is +examined when Perl does method resolution, which we will cover later. + +It is possible to manually set C<@ISA>, and you may see this in older +Perl code. Much older code also uses the L pragma. For new code, +we recommend that you use the L pragma to declare your parents. +This pragma will take care of setting C<@ISA>. It will also load the +parent classes and make sure that the package doesn't inherit from +itself. + +However the parent classes are set, the package's C<@ISA> variable will +contain a list of those parents. + +All classes inherit from the L class implicitly. The +L class is implemented by the Perl core, and provides +several default methods, such as C, C, and C. +The C class will I appear in a package's C<@ISA> +variable. + +Perl I provides method inheritance as a built-in feature. +Attribute inheritance is left up the class to implement. See the +L section for details. =head2 A Method is Simply a Subroutine X -Unlike say C++, Perl doesn't provide any special syntax for method -definition. (It does provide a little syntax for method invocation -though. More on that later.) A method expects its first argument -to be the object (reference) or package (string) it is being invoked -on. There are two ways of calling methods, which we'll call class -methods and instance methods. - -A class method expects a class name as the first argument. It -provides functionality for the class as a whole, not for any -individual object belonging to the class. Constructors are often -class methods, but see L and L for alternatives. -Many class methods simply ignore their first argument, because they -already know what package they're in and don't care what package -they were invoked via. (These aren't necessarily the same, because -class methods follow the inheritance tree just like ordinary instance -methods.) Another typical use for class methods is to look up an -object by name: - - sub find { - my ($class, $name) = @_; - $objtable{$name}; - } - -An instance method expects an object reference as its first argument. -Typically it shifts the first argument into a "self" or "this" variable, -and then uses that as an ordinary reference. - - sub display { - my $self = shift; - my @keys = @_ ? @_ : sort keys %$self; - foreach $key (@keys) { - print "\t$key => $self->{$key}\n"; - } - } +Perl does not provide any special syntax for defining a method. A +method is simply a regular subroutine, and is declared with C. +What makes a method special is that it expects to receive either an +object or a class name as its first argument. + +Perl I provide special syntax for method invocation, the C<< -> +>> operator. We will cover this in more detail later. + +Most methods you write will expect to operate on objects: + + sub save { + my $self = shift; + + open my $fh, '>', $self->path() or die $!; + print {$fh} $self->data() or die $!; + close $fh or die $!; + } =head2 Method Invocation X X X X<< -> >> -For various historical and other reasons, Perl offers two equivalent -ways to write a method call. The simpler and more common way is to use -the arrow notation: +Calling a method on an object is written as C<< $object->method >>. - my $fred = Critter->find("Fred"); - $fred->display("Height", "Weight"); +The left hand side of the method invocation (or arrow) operator is the +object (or class name), and the right hand side is the method name. -You should already be familiar with the use of the C<< -> >> operator with -references. In fact, since C<$fred> above is a reference to an object, -you could think of the method call as just another form of -dereferencing. + my $pod = File->new( 'perlobj.pod', $data ); + $pod->save(); -Whatever is on the left side of the arrow, whether a reference or a -class name, is passed to the method subroutine as its first argument. -So the above code is mostly equivalent to: +The C<< -> >> syntax is also used when dereferencing a reference. It +looks like the same operator, but these are two different operations. - my $fred = Critter::find("Critter", "Fred"); - Critter::display($fred, "Height", "Weight"); +When you call a method, the thing on the left side of the arrow is +passed as the first argument to the method. That means when we call C<< +Critter->new() >>, the C method receives the string C<"Critter"> +as its first argument. When we call C<< $fred->speak() >>, the C<$fred> +variable is passed as the first argument to C. -How does Perl know which package the subroutine is in? By looking at -the left side of the arrow, which must be either a package name or a -reference to an object, i.e. something that has been blessed to a -package. Either way, that's the package where Perl starts looking. If -that package has no subroutine with that name, Perl starts looking for -it in any base classes of that package, and so on. +Just as with any Perl subroutine, all of the arguments passed in C<@_> +are aliases to the original argument. This includes the object itself. +If you assign directly to C<$_[0]> you will change the contents of the +variable that holds the reference to the object. We recommend that you +don't do this unless you know exactly what you're doing. -If you need to, you I force Perl to start looking in some other package: +Perl knows what package the method is in by looking at the left side of +the arrow. If the left hand side is a package name, it looks for the +method in that package. If the left hand side is an object, then Perl +looks for the method in the package that the object has been blessed +into. - my $barney = MyCritter->Critter::find("Barney"); - $barney->Critter::display("Height", "Weight"); +If the left hand side is neither a package name nor an object, then the +method call will cause an error, but see the section on L for more nuances. -Here C is presumably a subclass of C that defines -its own versions of find() and display(). We haven't specified what -those methods do, but that doesn't matter above since we've forced Perl -to start looking for the subroutines in C. +=head2 Inheritance +X -As a special case of the above, you may use the C pseudo-class to -tell Perl to start looking for the method in the packages named in the -current class's C<@ISA> list. -X +We already talked about the special C<@ISA> array and the L +pragma. + +When a class inherits from another class, any methods defined in the +parent class are available to the child class. If you attempt to call a +method on an object that isn't defined in its own class, Perl will also +look for that method in any parent classes it may have. + + package File::MP3; + use parent 'File'; # sets @File::MP3::ISA = ('File'); + + my $mp3 = File::MP3->new( 'Andvari.mp3', $data ); + $mp3->save(); - package MyCritter; - use base 'Critter'; # sets @MyCritter::ISA = ('Critter'); +Since we didn't define a C method in the C class, +Perl will look at the C class's parent classes to find the +C method. If Perl cannot find a C method anywhere in +the inheritance hierarchy, it will die. - sub display { - my ($self, @args) = @_; - $self->SUPER::display("Name", @args); - } +In this case, it finds a C method in the C class. Note +that the object passed to C in this case is still a +C object, even though the method is found in the C +class. -It is important to note that C refers to the superclass(es) of the -I and not to the superclass(es) of the object. Also, the -C pseudo-class can only currently be used as a modifier to a method -name, but not in any of the other ways that class names are normally used, -eg: +We can override a parent's method in a child class. When we do so, we +can still call the parent class's method with the C +pseudo-class. + + sub save { + my $self = shift; + + say 'Prepare to rock'; + $self->SUPER::save(); + } + +The C modifier can I be used for method calls. You can't +use it for regular subroutine calls or class methods: + + SUPER::save($thing); # FAIL: looks for save() sub in package SUPER + + SUPER->save($thing); # FAIL: looks for save() method in class + # SUPER + + $thing->SUPER::save(); # Okay: looks for save() method in parent + # classes + + +=head3 How SUPER is Resolved X - something->SUPER::method(...); # OK - SUPER::method(...); # WRONG - SUPER->method(...); # WRONG +The C pseudo-class is resolved from the package where the call +is made. It is I resolved based on the object's class. This is +important, because it lets methods at different levels within a deep +inheritance hierarchy each correctly call their respective parent +methods. + + package A; + + sub new { + return bless {}, shift; + } + + sub speak { + my $self = shift; + + $self->SUPER::speak(); + + say 'A'; + } + + package B; -Instead of a class name or an object reference, you can also use any -expression that returns either of those on the left side of the arrow. -So the following statement is valid: + use parent 'A'; - Critter->find("Fred")->display("Height", "Weight"); + sub speak { + my $self = shift; -and so is the following: + $self->SUPER::speak(); - my $fred = (reverse "rettirC")->find(reverse "derF"); + say 'B'; + } -The right side of the arrow typically is the method name, but a simple -scalar variable containing either the method name or a subroutine -reference can also be used. + package C; -If the right side of the arrow is a scalar containing a reference -to a subroutine, then this is equivalent to calling the referenced -subroutine directly with the class name or object on the left side -of the arrow as its first argument. No lookup is done and there is -no requirement that the subroutine be defined in any package related -to the class name or object on the left side of the arrow. + use parent 'B'; -For example, the following calls to $display are equivalent: + sub speak { + my $self = shift; - my $display = sub { my $self = shift; ... }; - $fred->$display("Height", "Weight"); - $display->($fred, "Height", "Weight"); + $self->SUPER::speak(); -=head2 Indirect Object Syntax -X X X + say 'C'; + } -The other way to invoke a method is by using the so-called "indirect -object" notation. This syntax was available in Perl 4 long before -objects were introduced, and is still used with filehandles like this: + my $c = C->new(); + $c->speak(); - print STDERR "help!!!\n"; +In this example, we will get the following output: -The same syntax can be used to call either object or class methods. + A + B + C - my $fred = find Critter "Fred"; - display $fred "Height", "Weight"; +This demonstrates how C is resolved. Even though the object is +blessed into the C class, the C method in the C class +can still call C and expect it to correctly look in the +parent class of C (i.e the class the method call is in), not in the +parent class of C (i.e. the class the object belongs to). -Notice that there is no comma between the object or class name and the -parameters. This is how Perl can tell you want an indirect method call -instead of an ordinary subroutine call. +There are rare cases where this package-based resolution can be a +problem. If you copy a subroutine from one package to another, C +resolution will be done based on the original package. -But what if there are no arguments? In that case, Perl must guess what -you want. Even worse, it must make that guess I. -Usually Perl gets it right, but when it doesn't you get a function -call compiled as a method, or vice versa. This can introduce subtle bugs -that are hard to detect. +=head3 Multiple Inheritance +X -For example, a call to a method C in indirect notation (as C++ -programmers are wont to make) can be miscompiled into a subroutine -call if there's already a C function in scope. You'd end up -calling the current package's C as a subroutine, rather than the -desired class's method. The compiler tries to cheat by remembering -bareword Cs, but the grief when it messes up just isn't worth the -years of debugging it will take you to track down such subtle bugs. +Multiple inheritance often indicates a design problem, but Perl always +give you enough rope to hang yourself with if you really need to. + +To declare multiple parents, you simply need to pass multiple class +names to C: + + package MultiChild; + + use parent 'Parent1', 'Parent2'; + +=head3 Method Resolution Order +X X + +Method resolution order only matters in the case of multiple +inheritance. In the case of single inheritance, Perl simply looks up +the inheritance chain to find a method: + + Grandparent + | + Parent + | + Child + +If we call a method on a C object and that method is not defined +in the C class, Perl will look for that method in the C +class and then, if necessary, in the C class. + +If Perl cannot find the method in any of these classes, it will die +with an error message. + +When a class has multiple parents, the method lookup order becomes more +complicated. + +By default, Perl does a depth-first left-to-right search for a method. +That means it starts with the first parent in the C<@ISA> array, and +then searches all of its parents, grandparents, etc. If it fails to +find the method, it then goes to the next parent in the original +class's C<@ISA> array and searches from there. + + SharedGreatGrandParent + / \ + PaternalGrandparent MaternalGrandparent + \ / + Father Mother + \ / + Child + +So given the diagram above, Perl will search C, C, +C, C, C, and +finally C This is a problem because now we're +looking in C I we've checked all its +derived classes (i.e. before we tried C and +C). + +It is possible to ask for a different method resolution order with the +L pragma. + + package Child; + + use mro 'c3'; + use parent 'Father', 'Mother'; + +This pragma lets you switch to the "C3" resolution order. In simple +terms, "C3" order ensures that parent classes are never searched before +child classes, so Perl will now search: C, C, +C, C C, and finally +C. Note however that this is not +"breadth-first" searching: All the C ancestors (except the +common ancestor) are searched before any of the C ancestors are +considered. + +The C3 order also lets you call methods in sibling classes with the +C pseudo-class. See the L documentation for more details on +this feature. + +=head3 Method Resolution Caching + +When Perl searches for a method, it caches the lookup so that future +calls to the method do not need to search for it again. Changing a +class's parent class or adding subroutines to a class will invalidate +the cache for that class. + +The L pragma provides some functions for manipulating the method +cache directly. + +=head2 Writing Constructors +X + +As we mentioned earlier, Perl provides no special constructor syntax. +This means that a class must implement its own constructor. A +constructor is simply a class method that returns a reference to a new +object. + +The constructor can also accept additional parameters that define the +object. Let's write a real constructor for the C class we used +earlier: + + package File; + + sub new { + my $class = shift; + my ( $path, $data ) = @_; + + my $self = bless { + path => $path, + data => $data, + }, $class; + + return $self; + } + +As you can see, we've stored the path and file data in the object +itself. Remember, under the hood, this object is still just a hash. +Later, we'll write accessors to manipulate this data. + +For our File::MP3 class, we can check to make sure that the path we're +given ends with ".mp3": + + package File::MP3; + + sub new { + my $class = shift; + my ( $path, $data ) = @_; + + die "You cannot create a File::MP3 without an mp3 extension\n" + unless $path =~ /\.mp3\z/; + + return $class->SUPER::new(@_); + } + +This constructor lets its parent class do the actual object +construction. + +=head2 Attributes +X + +An attribute is a piece of data belonging to a particular object. +Unlike most object-oriented languages, Perl provides no special syntax +or support for declaring and manipulating attributes. + +Attributes are often stored in the object itself. For example, if the +object is an anonymous hash, we can store the attribute values in the +hash using the attribute name as the key. + +While it's possible to refer directly to these hash keys outside of the +class, it's considered a best practice to wrap all access to the +attribute with accessor methods. + +This has several advantages. Accessors make it easier to change the +implementation of an object later while still preserving the original +API. + +An accessor lets you add additional code around attribute access. For +example, you could apply a default to an attribute that wasn't set in +the constructor, or you could validate that a new value for the +attribute is acceptable. + +Finally, using accessors makes inheritance much simpler. Subclasses can +use the accessors rather than having to know the inner details of the +object. + +=head3 Writing Accessors +X + +As with constructors, Perl provides no special accessor declaration +syntax, so classes must write them by hand. There are two common types +of accessors, read-only and read-write. + +A simple read-only accessor simply gets the value of a single +attribute: + + sub path { + my $self = shift; + + return $self->{path}; + } + +A read-write accessor will allow the caller to set the value as well as +get it: + + sub path { + my $self = shift; + + if (@_) { + $self->{path} = shift; + } + + return $self->{path}; + } + +=head2 An Aside About Smarter and Safer Code + +Our constructor and accessors are not very smart. They don't check that +a C<$path> is defined, nor do they check that a C<$path> is a valid +filesystem path. + +Doing these checks by hand can quickly become tedious. Writing a bunch +of accessors by hand is also incredibly tedious. There are a lot of +modules on CPAN that can help you write safer and more concise code, +including the modules we recommend in L. + +=head2 Method Call Variations +X -There is another problem with this syntax: the indirect object is -limited to a name, a scalar variable, or a block, because it would have -to do too much lookahead otherwise, just like any other postfix -dereference in the language. (These are the same quirky rules as are -used for the filehandle slot in functions like C and C.) -This can lead to horribly confusing precedence problems, as in these -next two lines: +Perl supports several other ways to call methods besides the typical +C<< $object->method() >> pattern we've seen so far. - move $obj->{FIELD}; # probably wrong! - move $ary[$i]; # probably wrong! +=head3 Method Names as Strings -Those actually parse as the very surprising: +Perl lets you use a scalar variable containing a string as a method +name: - $obj->move->{FIELD}; # Well, lookee here - $ary->move([$i]); # Didn't expect this one, eh? + my $file = File->new( $path, $data ); -Rather than what you might have expected: + my $method = 'save'; + $file->$method(); - $obj->{FIELD}->move(); # You should be so lucky. - $ary[$i]->move; # Yeah, sure. +This works exactly like calling C<< $file->save() >>. This can be very +useful for writing dynamic code. For example, it allows you to pass a +method name to be called as a parameter to another method. -To get the correct behavior with indirect object syntax, you would have -to use a block around the indirect object: +=head3 Class Names as Strings - move {$obj->{FIELD}}; - move {$ary[$i]}; +Perl also lets you use a scalar containing a string as a class name: -Even then, you still have the same potential problem if there happens to -be a function named C in the current package. B >> -notation suffers from neither of these disturbing ambiguities, so we -recommend you use it exclusively.> However, you may still end up having -to read code using the indirect object notation, so it's important to be -familiar with it. + my $class = 'File'; -=head2 Default UNIVERSAL methods + my $file = $class->new( $path, $data ); + +Again, this allows for very dynamic code. + +=head3 Subroutine References as Methods + +You can also use a subroutine reference as a method: + + my $sub = sub { + my $self = shift; + + $self->save(); + }; + + $file->$sub(); + +This is exactly equivalent to writing C<< $sub->($file) >>. You may see +this idiom in the wild combined with a call to C: + + if ( my $meth = $object->can('foo') ) { + $object->$meth(); + } + +=head3 Deferencing Method Call + +Perl also lets you use a dereferenced scalar reference in a method +call. That's a mouthful, so let's look at some code: + + $file->${ \'save' }; + $file->${ returns_scalar_ref() }; + $file->${ \( returns_scalar() ) }; + +This works if the dereference produces a string I a subroutine +reference. + +=head3 Method Calls on Filehandles + +Under the hood, Perl filehandles are instances of the C or +C class. Once you have an open filehandle, you can call +methods on it. Additionally, you can call methods on the C, +C, and C filehandles. + + open my $fh, '>', 'path/to/file'; + $fh->autoflush(); + $fh->print('content'); + + STDOUT->autoflush(); + +=head2 Invoking Class Methods +X + +Because Perl allows you to use barewords for package names and +subroutine names, it can sometimes guess wrong about what you intend a +bareword to be. For example, the construct C<< Class->new() >> can be +interpreted as either C<< 'Class'->new() >> or C<< Class()->new() >>. +In English, that second interpretation reads as "call a subroutine +named Class(), then call new() as a method on the return value". If +there is a subroutine named C in the current namespace, Perl +will always interpret Cnew()> as the second alterative: a call +to C on the object returned by a call to C + +You can force Perl to use the first interpretation (i.e. as a method +call on the class named "Class") in two ways. First, you can append a +C<::> to the class name: + + Class::->new() + +Perl will always interpret this as a method call. + +Alternatively, you can quote the class name: + + 'Class'->new() + +Of course, if the class name is in a scalar Perl will do the right +thing as well: + + my $class = 'Class'; + $class->new(); + +=head3 Indirect Object Syntax +X + +B + +Perl suports another method invocation syntax called "indirect object" +notation. This syntax is called "indirect" because the method comes +before the object it is being invoked on. + +This syntax can be used with any class or object method: + + my $file = new File $path, $data; + save $file; + +We recommend that you avoid this syntax, for several reasons. + +First, it can be confusing to read. In the above example, it's not +clear if C is a method or simply a subroutine that expects a file +object as its first argument. + +When used with class methods, the problem is even worse. Because Perl +allows subroutine names to be written as barewords, Perl has to guess +whether the bareword after the method is a class name or subroutine +name. In other words, Perl can resolve the syntax as either C<< +File->new( $path, $data ) >> B C<< new( File( $path, $data ) ) >>. + +To parse this code, Perl uses a heuristic based on what package names +it has seen, what subroutines exist in the current package, what +barewords it has previously seen, and other input. Needless to say, +heuristics can produce very surprising results! + +Older documentation (and some CPAN modules) encouraged this syntax, +particularly for constructors, so you may still find it in the wild. +However, we encourage you to avoid using it in new code. + +You can force Perl to interpret the bareword as a class name by +appending "::" to it, like we saw earlier: + + my $file = new File:: $path, $data; + +=head2 C, C, and C + +As we saw earlier, an object is simply a data structure that has been +blessed into a class via the C function. The C function +can take either one or two arguments: + + my $object = bless {}, $class; + my $object = bless {}; + +In the first form, the anonymous hash is being blessed into the class +in C<$class>. In the second form, the anonymous hash is blessed into +the current package. + +The second form is strongly discouraged, because it breaks the ability +of a subclass to reuse the parent's constructor, but you may still run +across it in existing code. + +If you want to know whether a particular scalar refers to an object, +you can use the C function exported by L, which +is shipped with the Perl core. + + use Scalar::Util 'blessed'; + + if ( blessed($thing) ) { ... } + +If C<$thing> refers to an object, then this function returns the name +of the package the object has been blessed into. Note that the example +above will return false if C<$thing> has been blessed into a class +named "0". If C<$thing> doesn't contain a reference to a blessed +object, the C function returns false (specifically: C). + +Similarly, Perl's built-in C function treats a reference to a +blessed object specially. If you call C and C<$thing> +holds a reference to an object, it will return the name of the class +that the object has been blessed into. + +If you simply want to check that a variable contains an object +reference, we recommend that you use C, since +C returns true values for all references, not just objects. + +=head2 The UNIVERSAL Class X -The C package automatically contains the following methods that -are inherited by all other classes: +All classes automatically inherit from the L class, which is +built-in to the Perl core. This class provides a number of methods, all +of which can be called on either a class or an object. You can also +choose to override some of these methods in your class. If you do so, +we recommend that you follow the built-in semantics described below. =over 4 -=item isa(CLASS) +=item isa($class) X -C returns I if its object is blessed into a subclass of C +The C method returns I if the object is a member of the +class in C<$class>, or a member of a subclass of C<$class>. -=item DOES(ROLE) +=item DOES($role) X -C returns I if its object claims to perform the role C. By -default, this is equivalent to C. +The C method returns I if its object claims to perform the +role C<$role>. By default, this is equivalent to C. This method is +provided for use by object system extensions that implement roles, like +C and C. -=item can(METHOD) +You can also override C directly in your own classes. + +=item can($method) X -C checks to see if its object has a method called C, -if it does then a reference to the sub is returned, if it does not then -C is returned. +The C method checks to see if the class or object it was called on +has a method named C<$method>. This checks for the method in the class +and all of its parents. If the method exists, then a reference to the +subroutine is returned. If it does not then C is returned. + +If your class responds to method calls via C, you may want to +overload C to return a subroutine reference for methods which your +C method handles. -=item VERSION( [NEED] ) +=item VERSION($need) X -C returns the version number of the class (package). If the -NEED argument is given then it will check that the current version (as -defined by the $VERSION variable in the given package) not less than -NEED; it will die if this is not the case. This method is called automatically -by the C form of C. +The C method returns the version number of the class +(package). + +If the C<$need> argument is given then it will check that the current +version (as defined by the $VERSION variable in the package) is greater +than or equal to C<$need>; it will die if this is not the case. This +method is called automatically by the C form of C. use Package 1.2 qw(some imported subs); # implies: Package->VERSION(1.2); +We recommend that you use this method to access another package's +version, rather than looking directly at C<$Package::VERSION>. The +package you are looking at could have overridden the C method. + +We also recommend using this method to check whether a module has a +sufficient version. The internal implementation uses the L +module to make sure that different types of version numbers are +compared correctly. + =back +=head2 AUTOLOAD +X + +If you call a method that doesn't exist in a class, Perl will throw an +error. However, if that class or any of its parent classes defined an +C method, that method will be called instead. + +This is called as a regular method, and the caller will not know the +difference. Whatever value your C method returns is given to +the caller. + +The fully qualified method name that was called is available in the +C<$AUTOLOAD> package global for your class. Since this is a global, if +you want to refer to do it without a package name prefix under C, you need to declare it. + + # XXX - this is a terrible way to implement accessors, but it makes + # for a simple example. + our $AUTOLOAD; + sub AUTOLOAD { + my $self = shift; + + # Remove qualifier from original method name... + my $called = $AUTOLOAD =~ s/.*:://r; + + # Is there an attribute of that name? + die "No such attribute: $called" + unless exists $self->{$called}; + + # If so, return it... + return $self->{$called}; + } + + sub DESTROY { } # see below + +Without the C declaration, this code will not compile +under the L pragma. + +As the comment says, this is not a good way to implement accessors. +It's slow and too clever by far. See L for recommendations +on OO coding in Perl. + +If your class does have an C method, we strongly recommend +that you override C in your class as well. Your overridden C +method should return a subroutine reference for any method that your +C responds to. + =head2 Destructors X X When the last reference to an object goes away, the object is -automatically destroyed. (This may even be after you exit, if you've -stored references in global variables.) If you want to capture control -just before the object is freed, you may define a DESTROY method in -your class. It will automatically be called at the appropriate moment, -and you can do any extra cleanup you need to do. Perl passes a reference -to the object under destruction as the first (and only) argument. Beware -that the reference is a read-only value, and cannot be modified by -manipulating C<$_[0]> within the destructor. The object itself (i.e. -the thingy the reference points to, namely C<${$_[0]}>, C<@{$_[0]}>, -C<%{$_[0]}> etc.) is not similarly constrained. - -Since DESTROY methods can be called at unpredictable times, it is -important that you localise any global variables that the method may -update. In particular, localise C<$@> if you use C and -localise C<$?> if you use C or backticks. - -If you arrange to re-bless the reference before the destructor returns, -perl will again call the DESTROY method for the re-blessed object after -the current one returns. This can be used for clean delegation of -object destruction, or for ensuring that destructors in the base classes -of your choosing get called. Explicitly calling DESTROY is also possible, -but is usually never needed. - -DESTROY is subject to AUTOLOAD lookup, just like any other method. Hence, if -your class has an AUTOLOAD method, but does not need any DESTROY actions, -you probably want to provide a DESTROY method anyway, to prevent an -expensive call to AUTOLOAD each time an object is freed. As this technique -makes empty DESTROY methods common, the implementation is optimised so that -a DESTROY method that is an empty or constant subroutine, and hence could -have no side effects anyway, is not actually called. -X X - -Do not confuse the previous discussion with how objects I in the current -one are destroyed. Such objects will be freed and destroyed automatically -when the current object is freed, provided no other references to them exist -elsewhere. - -=head2 Summary - -That's about all there is to it. Now you need just to go off and buy a -book about object-oriented design methodology, and bang your forehead -with it for the next six months or so. - -=head2 Two-Phased Garbage Collection -X X X -X X X - -For most purposes, Perl uses a fast and simple, reference-based -garbage collection system. That means there's an extra -dereference going on at some level, so if you haven't built -your Perl executable using your C compiler's C<-O> flag, performance -will suffer. If you I built Perl with C, then this -probably won't matter. - -A more serious concern is that unreachable memory with a non-zero -reference count will not normally get freed. Therefore, this is a bad -idea: - - { - my $a; - $a = \$a; - } - -Even thought $a I go away, it can't. When building recursive data -structures, you'll have to break the self-reference yourself explicitly -if you don't care to leak. For example, here's a self-referential -node such as one might use in a sophisticated tree structure: - - sub new_node { - my $class = shift; - my $node = {}; - $node->{LEFT} = $node->{RIGHT} = $node; - $node->{DATA} = [ @_ ]; - return bless $node => $class; - } - -If you create nodes like that, they (currently) won't go away unless you -break their self reference yourself. (In other words, this is not to be -construed as a feature, and you shouldn't depend on it.) - -Almost. - -When an interpreter thread finally shuts down (usually when your program -exits), then a rather costly but complete mark-and-sweep style of garbage -collection is performed, and everything allocated by that thread gets -destroyed. This is essential to support Perl as an embedded or a -multithreadable language. For example, this program demonstrates Perl's -two-phased garbage collection: - - #!/usr/bin/perl - package Subtle; - - sub new { - my $test; - $test = \$test; - warn "CREATING " . \$test; - return bless \$test; - } - - sub DESTROY { - my $self = shift; - warn "DESTROYING $self"; - } - - package main; - - warn "starting program"; - { - my $a = Subtle->new; - my $b = Subtle->new; - $$a = 0; # break selfref - warn "leaving block"; - } - - warn "just exited block"; - warn "time to die..."; - exit; - -When run as F, the following output is produced: - - starting program at /foo/test line 18. - CREATING SCALAR(0x8e5b8) at /foo/test line 7. - CREATING SCALAR(0x8e57c) at /foo/test line 7. - leaving block at /foo/test line 23. - DESTROYING Subtle=SCALAR(0x8e5b8) at /foo/test line 13. - just exited block at /foo/test line 26. - time to die... at /foo/test line 27. - DESTROYING Subtle=SCALAR(0x8e57c) during global destruction. - -Notice that "global destruction" bit there? That's the thread -garbage collector reaching the unreachable. - -Objects are always destructed, even when regular refs aren't. Objects -are destructed in a separate pass before ordinary refs just to -prevent object destructors from using refs that have been themselves -destructed. Plain refs are only garbage-collected if the destruct level -is greater than 0. You can test the higher levels of global destruction -by setting the PERL_DESTRUCT_LEVEL environment variable, presuming -C<-DDEBUGGING> was enabled during perl build time. -See L for more information. - -A more complete garbage collection strategy will be implemented -at a future date. - -In the meantime, the best solution is to create a non-recursive container -class that holds a pointer to the self-referential data structure. -Define a DESTROY method for the containing object's class that manually -breaks the circularities in the self-referential structure. +destroyed. If you only have one reference to an object stored in a +lexical scalar, the object is destroyed when that scalar goes out of +scope. If you store the object in a package global, that object may not +go out of scope until the program exits. + +If you want to do something when the object is destroyed, you can +define a C method in your class. This method will always be +called by Perl at the appropriate time, unless the method is empty. + +This is called just like any other method, with the object as the first +argument. It does not receive any additional arguments. However, the +C<$_[0]> variable will be read-only in the destructor, so you cannot +assign a value to it. + +If your C method throws an error, this error will be ignored. +It will not be sent to C and it will not cause the program to +die. However, if your destructor is running inside an C block, +then the error will change the value of C<$@>. + +Because C methods can be called at any time, you should +localize any global variables you might update in your C. In +particular, if you use C you should localize C<$@>, and if you +use C or backticks, you should localize C<$?>. + +If you define an C in your class, then Perl will call your +C to handle the C method. You can prevent this by +defining an empty C, like we did in the autoloading example. +You can also check the value of C<$AUTOLOAD> and return without doing +anything when called to handle C. + +=head3 Global Destruction + +The order in which objects are destroyed during the global destruction +before the program exits is unpredictable. This means that any objects +contained by your object may already have been destroyed. You should +check that a contained object is defined before calling a method on it: + + sub DESTROY { + my $self = shift; + + $self->{handle}->close() if $self->{handle}; + } + +You can use the C<${^GLOBAL_PHASE}> variable to detect if you are +currently in the global destruction phase: + + sub DESTROY { + my $self = shift; + + return if ${^GLOBAL_PHASE} eq 'DESTRUCT'; + + $self->{handle}->close(); + } + +Note that this variable was added in Perl 5.14.0. If you want to detect +the global destruction phase on older versions of Perl, you can use the +C module on CPAN. + +If your C method issues a warning during global destruction, +the Perl interpreter will append the string " during global +destruction" the warning. + +During global destruction, Perl will always garbage collect objects +before unblessed references. See L +for more information about global destruction. + +=head2 Non-Hash Objects + +All the examples so far have shown objects based on a blessed hash. +However, it's possible to bless any type of data structure or referent, +including scalars, globs, and subroutines. You may see this sort of +thing when looking at code in the wild. + +Here's an example of a module as a blessed scalar: + + package Time; + + use strict; + use warnings; + + sub new { + my $class = shift; + + my $time = time; + return bless \$time, $class; + } + + sub epoch { + my $self = shift; + return ${ $self }; + } + + my $time = Time->new(); + print $time->epoch(); + +=head2 Inside-Out objects + +In the past, the Perl community experimented with a technique called +"inside-out objects". An inside-out object stores its data outside of +the object's reference, indexed on a unique property of the object, +such as its memory address, rather than in the object itself. This has +the advantage of enforcing the encapsulation of object attributes, +since their data is not stored in the object itself. + +This technique was popular for a while (and was recommended in Damian +Conway's I), but never achieved universal +adoption. The L module on CPAN provides a +comprehensive implementation of this technique, and you may see it or +other inside-out modules in the wild. + +Here is a simple example of the technique, using the +L core module. This module was added to the core +to support inside-out object implementations. + + package Time; + + use strict; + use warnings; + + use Hash::Util::FieldHash 'fieldhash'; + + fieldhash my %time_for; + + sub new { + my $class = shift; + + my $self = bless \( my $object ), $class; + + $time_for{$self} = time; + + return $self; + } + + sub epoch { + my $self = shift; + + return $time_for{$self}; + } + + my $time = Time->new; + print $time->epoch; + +=head2 Pseudo-hashes + +The pseudo-hash feature was an experimental feature introduced in +earlier versions of Perl and removed in 5.10.0. A pseudo-hash is an +array reference which can be accessed using named keys like a hash. You +may run in to some code in the wild which uses it. See the L +pragma for more information. =head1 SEE ALSO A kinder, gentler tutorial on object-oriented programming in Perl can -be found in L, L and L. You should -also check out L for other object tricks, traps, and tips, as -well as L for some style guides on constructing both -modules and classes. +be found in L. You should also check out L for +some style guides on constructing both modules and classes. + diff --git a/pod/perlootut.pod b/pod/perlootut.pod new file mode 100644 index 00000000000..f91f1ab9245 --- /dev/null +++ b/pod/perlootut.pod @@ -0,0 +1,744 @@ +=encoding utf8 + +=for comment +Consistent formatting of this file is achieved with: + perl ./Porting/podtidy pod/perlootut.pod + +=head1 NAME + +perlootut - Object-Oriented Programming in Perl Tutorial + +=head1 DATE + +This document was created in February, 2011. + +=head1 DESCRIPTION + +This document provides an introduction to object-oriented programming +in Perl. It begins with a brief overview of the concepts behind object +oriented design. Then it introduces several different OO systems from +L which build on top of what Perl +provides. + +By default, Perl's built-in OO system is very minimal, leaving you to +do most of the work. This minimalism made a lot of sense in 1994, but +in the years since Perl 5.0 we've seen a number of common patterns +emerge in Perl OO. Fortunately, Perl's flexibility has allowed a rich +ecosystem of Perl OO systems to flourish. + +If you want to know how Perl OO works under the hood, the L +document explains the nitty gritty details. + +This document assumes that you already understand the basics of Perl +syntax, variable types, operators, and subroutine calls. If you don't +understand these concepts yet, please read L first. You +should also read the L, L, and L documents. + +=head1 OBJECT-ORIENTED FUNDAMENTALS + +Most object systems share a number of common concepts. You've probably +heard terms like "class", "object, "method", and "attribute" before. +Understanding the concepts will make it much easier to read and write +object-oriented code. If you're already familiar with these terms, you +should still skim this section, since it explains each concept in terms +of Perl's OO implementation. + +Perl's OO system is class-based. Class-based OO is fairly common. It's +used by Java, C++, C#, Python, Ruby, and many other languages. There +are other object orientation paradigms as well. JavaScript is the most +popular language to use another paradigm. JavaScript's OO system is +prototype-based. + +=head2 Object + +An B is a data structure that bundles together data and +subroutines which operate on that data. An object's data is called +B, and its subroutines are called B. An object can +be thought of as a noun (a person, a web service, a computer). + +An object represents a single discrete thing. For example, an object +might represent a file. The attributes for a file object might include +its path, content, and last modification time. If we created an object +to represent F on a machine named "foo.example.com", +that object's path would be "/etc/hostname", its content would be +"foo\n", and it's last modification time would be 1304974868 seconds +since the beginning of the epoch. + +The methods associated with a file might include C and +C. + +In Perl most objects are hashes, but the OO systems we recommend keep +you from having to worry about this. In practice, it's best to consider +an object's internal data structure opaque. + +=head2 Class + +A B defines the behavior of a category of objects. A class is a +name for a category (like "File"), and a class also defines the +behavior of objects in that category. + +All objects belong to a specific class. For example, our +F object belongs to the C class. When we want to +create a specific object, we start with its class, and B or +B an object. A specific object is often referred to as an +B of a class. + +In Perl, any package can be a class. The difference between a package +which is a class and one which isn't is based on how the package is +used. Here's our "class declaration" for the C class: + + package File; + +In Perl, there is no special keyword for constructing an object. +However, most OO modules on CPAN use a method named C to +construct a new object: + + my $hostname = File->new( + path => '/etc/hostname', + content => "foo\n", + last_mod_time => 1304974868, + ); + +(Don't worry about that C<< -> >> operator, it will be explained +later.) + +=head3 Blessing + +As we said earlier, most Perl objects are hashes, but an object can be +an instance of any Perl data type (scalar, array, etc.). Turning a +plain data structure into an object is done by B that data +structure using Perl's C function. + +While we strongly suggest you don't build your objects from scratch, +you should know the term B. A B data structure (aka "a +referent") is an object. We sometimes say that an object has been +"blessed into a class". + +Once a referent has been blessed, the C function from the +L core module can tell us its class name. This subroutine +returns an object's class when passed an object, and false otherwise. + + use Scalar::Util 'blessed'; + + print blessed($hash); # undef + print blessed($hostname); # File + +=head3 Constructor + +A B creates a new object. In Perl, a class's constructor +is just another method, unlike some other languages, which provide +syntax for constructors. Most Perl classes use C as the name for +their constructor: + + my $file = File->new(...); + +=head2 Methods + +You already learned that a B is a subroutine that operates on +an object. You can think of a method as the things that an object can +I. If an object is a noun, then methods are its verbs (save, print, +open). + +In Perl, methods are simply subroutines that live in a class's package. +Methods are always written to receive the object as their first +argument: + + sub print_info { + my $self = shift; + + print "This file is at ", $self->path, "\n"; + } + + $file->print_info; + # The file is at /etc/hostname + +What makes a method special is I. The arrow operator +(C<< -> >>) tells Perl that we are calling a method. + +When we make a method call, Perl arranges for the method's B +to be passed as the first argument. B is a fancy name for the +thing on the left side of the arrow. The invocant can either be a class +name or an object. We can also pass additional arguments to the method: + + sub print_info { + my $self = shift; + my $prefix = shift // "This file is at "; + + print $prefix, ", ", $self->path, "\n"; + } + + $file->print_info("The file is located at "); + # The file is located at /etc/hostname + +=head2 Attributes + +Each class can define its B. When we instantiate an object, +we assign values to those attributes. For example, every C object +has a path. Attributes are sometimes called B. + +Perl has no special syntax for attributes. Under the hood, attributes +are often stored as keys in the object's underlying hash, but don't +worry about this. + +We recommend that you only access attributes via B methods. +These are methods that can get or set the value of each attribute. We +saw this earlier in the C example, which calls C<< +$self->path >>. + +You might also see the terms B and B. These are two +types of accessors. A getter gets the attribute's value, while a setter +sets it. Another term for a setter is B + +Attributes are typically defined as read-only or read-write. Read-only +attributes can only be set when the object is first created, while +read-write attributes can be altered at any time. + +The value of an attribute may itself be another object. For example, +instead of returning its last mod time as a number, the C class +could return a L object representing that value. + +It's possible to have a class that does not expose any publicly +settable attributes. Not every class has attributes and methods. + +=head2 Polymorphism + +B is a fancy way of saying that objects from two +different classes share an API. For example, we could have C and +C classes which both have a C method. This +method might produce different output for each class, but they share a +common interface. + +While the two classes may differ in many ways, when it comes to the +C method, they are the same. This means that we can +try to call the C method on an object of either class, +and B + +Polymorphism is one of the key concepts of object-oriented design. + +=head2 Inheritance + +B lets you create a specialized version of an existing +class. Inheritance lets the new class to reuse the methods and +attributes of another class. + +For example, we could create an C class which B +from C. An C B I type of C. +All mp3 files are files, but not all files are mp3 files. + +We often refer to inheritance relationships as B or +C relationships. Sometimes we say that the child +has an B relationship with its parent class. + +C is a B of C, and C is a +B of C. + + package File::MP3; + + use parent 'File'; + +The L module is one of several ways that Perl lets you define +inheritance relationships. + +Perl allows multiple inheritance, which means that a class can inherit +from multiple parents. While this is possible, we strongly recommend +against it. Generally, you can use B to do everything you can do +with multiple inheritance, but in a cleaner way. + +Note that there's nothing wrong with defining multiple subclasses of a +given class. This is both common and safe. For example, we might define +C and C classes to +distinguish between different types of mp3 file. + +=head3 Overriding methods and method resolution + +Inheritance allows two classes to share code. By default, every method +in the parent class is also available in the child. The child can +explicitly B a parent's method to provide its own +implementation. For example, if we have an C object, it has +the C method from C: + + my $cage = File::MP3->new( + path => 'mp3s/My-Body-Is-a-Cage.mp3', + content => $mp3_data, + last_mod_time => 1304974868, + title => 'My Body Is a Cage', + ); + + $cage->print_info; + # The file is at mp3s/My-Body-Is-a-Cage.mp3 + +If we wanted to include the mp3's title in the greeting, we could +override the method: + + package File::MP3; + + use parent 'File'; + + sub print_info { + my $self = shift; + + print "This file is at ", $self->path, "\n"; + print "Its title is ", $self->title, "\n"; + } + + $cage->print_info; + # The file is at mp3s/My-Body-Is-a-Cage.mp3 + # Its title is My Body Is a Cage + +The process of determining what method should be used is called +B. What Perl does is look at the object's class +first (C in this case). If that class defines the method, +then that class's version of the method is called. If not, Perl looks +at each parent class in turn. For C, its only parent is +C. If C does not define the method, but C does, +then Perl calls the method in C. + +If C inherited from C, which inherited from C, +then Perl would keep looking "up the chain" if necessary. + +It is possible to explicitly call a parent method from a child: + + package File::MP3; + + use parent 'File'; + + sub print_info { + my $self = shift; + + $self->SUPER::print_info(); + print "Its title is ", $self->title, "\n"; + } + +The C bit tells Perl to look for the C in the +C class's inheritance chain. When it finds the parent class +that implements this method, the method is called. + +We mentioned multiple inheritance earlier. The main problem with +multiple inheritance is that it greatly complicates method resolution. +See L for more details. + +=head2 Encapsulation + +B is the idea that an object is opaque. When another +developer uses your class, they don't need to know I it is +implemented, they just need to know I it does. + +Encapsulation is important for several reasons. First, it allows you to +separate the public API from the private implementation. This means you +can change that implementation without breaking the API. + +Second, when classes are well encapsulated, they become easier to +subclass. Ideally, a subclass uses the same APIs to access object data +that its parent class uses. In reality, subclassing sometimes involves +violating encapsulation, but a good API can minimize the need to do +this. + +We mentioned earlier that most Perl objects are implemented as hashes +under the hood. The principle of encapsulation tells us that we should +not rely on this. Instead, we should use accessor methods to access the +data in that hash. The object systems that we recommend below all +automate the generation of accessor methods. If you use one of them, +you should never have to access the object as a hash directly. + +=head2 Composition + +In object-oriented code, we often find that one object references +another object. This is called B, or a B +relationship. + +Earlier, we mentioned that the C class's C +accessor could return a L object. This is a perfect example +of composition. We could go even further, and make the C and +C accessors return objects as well. The C class would +then be B of several other objects. + +=head2 Roles + +B are something that a class I, rather than something that +it I. Roles are relatively new to Perl, but have become rather +popular. Roles are B to classes. Sometimes we say that classes +B roles. + +Roles are an alternative to inheritance for providing polymorphism. +Let's assume we have two classes, C and C. Both of +these things have on/off switches. We want to model that in our class +definitions. + +We could have both classes inherit from a common parent, like +C, but not all machines have on/off switches. We could create +a parent class called C, but that is very artificial. +Radios and computers are not specializations of this parent. This +parent is really a rather ridiculous creation. + +This is where roles come in. It makes a lot of sense to create a +C role and apply it to both classes. This role would +define a known API like providing C and C +methods. + +Perl does not have any built-in way to express roles. In the past, +people just bit the bullet and used multiple inheritance. Nowadays, +there are several good choices on CPAN for using roles. + +=head2 When to Use OO + +Object Orientation is not the best solution to every problem. In I (copyright 2004, Published by O'Reilly Media, Inc.), +Damian Conway provides a list of criteria to use when deciding if OO is +the right fit for your problem: + +=over 4 + +=item * + +The system being designed is large, or is likely to become large. + +=item * + +The data can be aggregated into obvious structures, especially if +there's a large amount of data in each aggregate. + +=item * + +The various types of data aggregate form a natural hierarchy that +facilitates the use of inheritance and polymorphism. + +=item * + +You have a piece of data on which many different operations are +applied. + +=item * + +You need to perform the same general operations on related types of +data, but with slight variations depending on the specific type of data +the operations are applied to. + +=item * + +It's likely you'll have to add new data types later. + +=item * + +The typical interactions between pieces of data are best represented by +operators. + +=item * + +The implementation of individual components of the system is likely to +change over time. + +=item * + +The system design is already object-oriented. + +=item * + +Large numbers of other programmers will be using your code modules. + +=back + +=head1 PERL OO SYSTEMS + +As we mentioned before, Perl's built-in OO system is very minimal, but +also quite flexible. Over the years, many people have developed systems +which build on top of Perl's built-in system to provide more features +and convenience. + +We strongly recommend that you use one of these systems. Even the most +minimal of them eliminates a lot of repetitive boilerplate. There's +really no good reason to write your classes from scratch in Perl. + +If you are interested in the guts underlying these systems, check out +L. + +=head2 Moose + +L bills itself as a "postmodern object system for Perl 5". Don't +be scared, the "postmodern" label is a callback to Larry's description +of Perl as "the first postmodern computer language". + +C provides a complete, modern OO system. Its biggest influence +is the Common Lisp Object System, but it also borrows ideas from +Smalltalk and several other languages. C was created by Stevan +Little, and draws heavily from his work on the Perl 6 OO design. + +Here is our C class using C: + + +Here's a simple but complete C class: + + package File; + use Moose; + + has path => ( is => 'ro' ); + has content => ( is => 'ro' ); + has last_mod_time => ( is => 'ro' ); + + sub print_info { + my $self = shift; + + print "This file is at ", $self->path, "\n"; + } + +C provides a number of features: + +=over 4 + +=item * Declarative sugar + +C provides a layer of declarative "sugar" for defining classes. +That sugar is just a set of exported functions that make declaring how +your class works simpler and more palatable. This lets you describe +I your class is, rather than having to tell Perl I to +implement your class. + +The C subroutine declares an attribute, and C +automatically creates accessors for these attributes. It also takes +care of creating a C method for you. This constructor knows +about the attributes you declared, so you can set them when creating a +new C. + +=item * Roles built-in + +C lets you define roles the same way you define classes: + + package HasOnOfSwitch; + use Moose::Role; + + has is_on => ( + is => 'rw', + isa => 'Bool', + ); + + sub turn_on { + my $self = shift; + $self->is_on(1); + } + + sub turn_off { + my $self = shift; + $self->is_on(0); + } + +=item * A miniature type system + +In the example above, you can see that we passed C<< isa => 'Bool' >> +to C when creating our C attribute. This tells C +that this attribute must be a boolean value. If we try to set it to an +invalid value, our code will throw an error. + +=item * Full introspection and manipulation + +Perl's built-in introspection features are fairly minimal. C +builds on top of them and creates a full introspection layer for your +classes. This lets you ask questions like "what methods does the File +class implement?" It also lets you modify your classes +programmatically. + +=item * Self-hosted and extensible + +C describes itself using its own introspection API. Besides +being a cool trick, this means that you can extend C using +C itself. + +=item * Rich ecosystem + +There is a rich ecosystem of C extensions on CPAN under the +L +namespace. In addition, many modules on CPAN already use C, +providing you with lots of examples to learn from. + +=item * Many more features + +C is a very powerful tool, and we can't cover all of its +features here. We encourage you to learn more by reading the C +documentation, starting with +L. + +=back + +Of course, C isn't perfect. + +C can make your code slower to load. C itself is not +small, and it does a I of code generation when you define your +class. This code generation means that your runtime code is as fast as +it can be, but you pay for this when your modules are first loaded. + +This load time hit can be a problem when startup speed is important, +such as with a command-line script or a "plain vanilla" CGI script that +must be loaded each time it is executed. + +Before you panic, know that many people do use C for +command-line tools and other startup-sensitive code. We encourage you +to try C out first before worrying about startup speed. + +C also has several dependencies on other modules. Most of these +are small stand-alone modules, a number of which have been spun off +from C. C itself, and some of its dependencies, require a +compiler. If you need to install your software on a system without a +compiler, or if having I dependencies is a problem, then C +may not be right for you. + +=head3 Mouse + +If you try C and find that one of these issues is preventing you +from using C, we encourage you to consider L next. +C implements a subset of C's functionality in a simpler +package. For all features that it does implement, the end-user API is +I to C, meaning you can switch from C to +C quite easily. + +C does not implement most of C's introspection API, so +it's often faster when loading your modules. Additionally, all of its +I dependencies ship with the Perl core, and it can run +without a compiler. If you do have a compiler, C will use it to +compile some of its code for a speed boost. + +Finally, it ships with a C module that takes most of +C's features and bundles them up in a single module file. You +can copy this module file into your application's library directory for +easy bundling. + +The C authors hope that one day C can be made obsolete by +improving C enough, but for now it provides a worthwhile +alternative to C. + +=head2 Class::Accessor + +L is the polar opposite of C. It provides very +few features, nor is it self-hosting. + +It is, however, very simple, pure Perl, and it has no non-core +dependencies. It also provides a "Moose-like" API on demand for the +features it supports. + +Even though it doesn't do much, it is still preferable to writing your +own classes from scratch. + +Here's our C class with C: + + package File; + use Class::Accessor 'antlers'; + + has path => ( is => 'ro' ); + has content => ( is => 'ro' ); + has last_mod_time => ( is => 'ro' ); + + sub print_info { + my $self = shift; + + print "This file is at ", $self->path, "\n"; + } + +The C import flag tells C that you want to +define your attributes using C-like syntax. The only parameter +that you can pass to C is C. We recommend that you use this +Moose-like syntax if you choose C since it means you +will have a smoother upgrade path if you later decide to move to +C. + +Like C, C generates accessor methods and a +constructor for your class. + +=head2 Object::Tiny + +Finally, we have L. This module truly lives up to its +name. It has an incredibly minimal API and absolutely no dependencies +(core or not). Still, we think it's a lot easier to use than writing +your own OO code from scratch. + +Here's our C class once more: + + package File; + use Object::Tiny qw( path content last_mod_time ); + + sub print_info { + my $self = shift; + + print "This file is at ", $self->path, "\n"; + } + +That's it! + +With C, all accessors are read-only. It generates a +constructor for you, as well as the accessors you define. + +=head2 Role::Tiny + +As we mentioned before, roles provide an alternative to inheritance, +but Perl does not have any built-in role support. If you choose to use +Moose, it comes with a full-fledged role implementation. However, if +you use one of our other recommended OO modules, you can still use +roles with L + +C provides some of the same features as Moose's role +system, but in a much smaller package. Most notably, it doesn't support +any sort of attribute declaration, so you have to do that by hand. +Still, it's useful, and works well with C and +C + +=head2 OO System Summary + +Here's a brief recap of the options we covered: + +=over 4 + +=item * L + +C is the maximal option. It has a lot of features, a big +ecosystem, and a thriving user base. We also covered L briefly. +C is C lite, and a reasonable alternative when Moose +doesn't work for your application. + +=item * L + +C does a lot less than C, and is a nice +alternative if you find C overwhelming. It's been around a long +time and is well battle-tested. It also has a minimal C +compatibility mode which makes moving from C to +C easy. + +=item * L + +C is the absolute minimal option. It has no dependencies, +and almost no syntax to learn. It's a good option for a super minimal +environment and for throwing something together quickly without having +to worry about details. + +=item * L + +Use C with C or C if you +find yourself considering multiple inheritance. If you go with +C, it comes with its own role implementation. + +=back + +=head2 Other OO Systems + +There are literally dozens of other OO-related modules on CPAN besides +those covered here, and you're likely to run across one or more of them +if you work with other people's code. + +In addition, plenty of code in the wild does all of its OO "by hand", +using just the Perl built-in OO features. If you need to maintain such +code, you should read L to understand exactly how Perl's +built-in OO works. + +=head1 CONCLUSION + +As we said before, Perl's minimal OO system has lead to a flourishing +of OO systems on CPAN. While you can still drop down to the bare metal +and write your classes by hand, there's really no reason to do that in +2011. + +For small systems, L and L both provide +minimal object systems that take care of basic boilerplate for you. + +For bigger projects, L provides a rich set of features that will +let you focus on implementing your business logic. + +We encourage you to play with and evaluate L, +L, and L to see which OO system is right +for you. + +=cut diff --git a/pod/perlop.pod b/pod/perlop.pod index 61fd2ef4487..169c5f14002 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -514,11 +514,13 @@ X X Although it has no direct equivalent in C, Perl's C operator is related to its C-style or. In fact, it's exactly the same as C<||>, except that it -tests the left hand side's definedness instead of its truth. Thus, C<$a // $b> -is similar to C (except that it returns the value of C<$a> -rather than the value of C) and yields the same result as -C (except that the ternary-operator form can be -used as a lvalue, while C<$a // $b> cannot). This is very useful for +tests the left hand side's definedness instead of its truth. Thus, +C<< EXPR1 // EXPR2 >> returns the value of C<< EXPR1 >> if it's defined, +otherwise, the value of C<< EXPR2 >> is returned. (C<< EXPR1 >> is evaluated +in scalar context, C<< EXPR2 >> in the context of C<< // >> itself). Usually, +this is the same result as C<< defined(EXPR1) ? EXPR1 : EXPR2 >> (except that +the ternary-operator form can be used as a lvalue, while C<< EXPR1 // EXPR2 >> +cannot). This is very useful for providing default values for variables. If you actually want to test if at least one of C<$a> and C<$b> is defined, use C. @@ -1171,7 +1173,8 @@ L below for details on which character. Some contexts allow 2 or even 1 digit, but any usage without exactly three digits, the first being a zero, may give unintended results. (For -example, see L.) Starting in Perl 5.14, you may +example, in a regular expression it may be confused with a backreference; +see L.) Starting in Perl 5.14, you may use C<\o{}> instead, which avoids all these problems. Otherwise, it is best to use this construct only for ordinals C<\077> and below, remembering to pad to the left with zeros to make three digits. For larger ordinals, either use @@ -1181,8 +1184,8 @@ instead. Having fewer than 3 digits may lead to a misleading warning message that says that what follows is ignored. For example, C<"\128"> in the ASCII character set is equivalent to the two characters C<"\n8">, but the warning C will be thrown. To avoid this warning, make sure to pad -your octal number with C<0>'s: C<"\0128">. +digit '8' ignored> will be thrown. If C<"\n8"> is what you want, you can +avoid this warning by padding your octal number with C<0>'s: C<"\0128">. =item [8] diff --git a/pod/perlpacktut.pod b/pod/perlpacktut.pod index 7d2126a0eaa..2ce56622b75 100644 --- a/pod/perlpacktut.pod +++ b/pod/perlpacktut.pod @@ -73,14 +73,13 @@ remains. The inverse operation - packing byte contents from a string of hexadecimal digits - is just as easily written. For instance: - my $s = pack( 'H2' x 10, map { "3$_" } ( 0..9 ) ); + my $s = pack( 'H2' x 10, 30..39 ); print "$s\n"; Since we feed a list of ten 2-digit hexadecimal strings to C, the pack template should contain ten pack codes. If this is run on a computer with ASCII character coding, it will print C<0123456789>. - =head1 Packing Text Let's suppose you've got to read in a data file like this: diff --git a/pod/perlpodstyle.pod b/pod/perlpodstyle.pod index f635f73d325..850f38dc8d9 100644 --- a/pod/perlpodstyle.pod +++ b/pod/perlpodstyle.pod @@ -25,7 +25,7 @@ command-line option from the C<-f> filetest operator. =item italic (IEE) Use italic to emphasize text, like I. Function names are -traditionally written in in italics; if you write a function as function(), +traditionally written in italics; if you write a function as function(), Pod::Man will take care of this for you. Names of programs, including the name of the program being documented, are conventionally written in italics (using IEE) wherever they occur in normal roman text. diff --git a/pod/perlport.pod b/pod/perlport.pod index 2c9a8493637..5f266f95378 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -689,10 +689,6 @@ If your code is destined for systems with severely constrained (or missing!) virtual memory systems then you want to be I mindful of avoiding wasteful constructs such as: - # NOTE: this is no longer "bad" in perl5.005 - for (0..10000000) {} # bad - for (my $x = 0; $x <= 10000000; ++$x) {} # good - my @lines = <$very_large_file>; # bad while (<$fh>) {$file .= $_} # sometimes bad diff --git a/pod/perlpragma.pod b/pod/perlpragma.pod index 856014438e5..604387d9f97 100644 --- a/pod/perlpragma.pod +++ b/pod/perlpragma.pod @@ -82,17 +82,17 @@ The interaction with the Perl compilation happens inside package C: use warnings; sub import { - $^H{myint} = 1; + $^H{"myint/in_effect"} = 1; } sub unimport { - $^H{myint} = 0; + $^H{"myint/in_effect"} = 0; } sub in_effect { my $level = shift // 0; my $hinthash = (caller($level))[10]; - return $hinthash->{myint}; + return $hinthash->{"myint/in_effect"}; } 1; @@ -122,10 +122,26 @@ at index 10 of the list of returned results. In the example pragma, retrieval is encapsulated into the routine C, which takes as parameter the number of call frames to go up to find the value of the pragma in the user's script. This uses C to determine the value of -C<$^H{myint}> when each line of the user's script was called, and +C<$^H{"myint/in_effect"}> when each line of the user's script was called, and therefore provide the correct semantics in the subroutine implementing the overloaded addition. +=head1 Key naming + +There is only a single C<%^H>, but arbitrarily many modules that want +to use its scoping semantics. To avoid stepping on each other's toes, +they need to be sure to use different keys in the hash. It is therefore +conventional for a module to use only keys that begin with the module's +name (the name of its main package) and a "/" character. After this +module-identifying prefix, the rest of the key is entirely up to the +module: it may include any characters whatsoever. For example, a module +C should use keys such as C and C. +Modules following this convention all play nicely with each other. + +The Perl core uses a handful of keys in C<%^H> which do not follow this +convention, because they predate it. Keys that follow the convention +won't conflict with the core's historical keys. + =head1 Implementation details The optree is shared between threads. This means there is a possibility that diff --git a/pod/perlre.pod b/pod/perlre.pod index e3bdd514023..dafe4cf48f8 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -76,6 +76,18 @@ Perl doesn't match multiple characters in an inverted bracketed character class, which otherwise could be highly confusing. See L. +Another bug involves character classes that match both a sequence of +multiple characters, and an initial sub-string of that sequence. For +example, + + /[s\xDF]/i + +should match both a single and a double "s", since C<\xDF> (on ASCII +platforms) matches "ss". However, this bug +(L<[perl #89774]|https://rt.perl.org/rt3/Ticket/Display.html?id=89774>) +causes it to only match a single "s", even if the final larger match +fails, and matching the double "ss" would have succeeded. + Also, Perl matching doesn't fully conform to the current Unicode C recommendations, which ask that the matching be made upon the NFD (Normalization Form Decomposed) of the text. However, Unicode is @@ -1818,10 +1830,12 @@ As a shortcut C<(*MARK:NAME)> can be written C<(*:NAME)>. =item C<(*THEN)> C<(*THEN:NAME)> -This is similar to the "cut group" operator C<::> from Perl 6. Like +This is similar to the "cut group" operator C<::> from Perl 6. Like C<(*PRUNE)>, this verb always matches, and when backtracked into on failure, it causes the regex engine to try the next alternation in the -innermost enclosing group (capturing or otherwise). +innermost enclosing group (capturing or otherwise) that has alternations. +The two branches of a C<(?(condition)yes-pattern|no-pattern)> do not +count as an alternation, as far as C<(*THEN)> is concerned. Its name comes from the observation that this operation combined with the alternation operator (C<|>) can be used to create what is essentially a diff --git a/pod/perlrebackslash.pod b/pod/perlrebackslash.pod index 8f2490d78ee..0ce42b4515a 100644 --- a/pod/perlrebackslash.pod +++ b/pod/perlrebackslash.pod @@ -603,7 +603,7 @@ linebreak sequence by Unicode. This includes all characters matched by C<\v> (vertical whitespace), and the multi character sequence C<"\x0D\x0A"> (carriage return followed by a line feed, sometimes called the network newline; it's the end of line sequence used in Microsoft text files opened -in binary mode). C<\R> is equivalent to C<< (?>\x0D\x0A)|\v) >>. Since +in binary mode). C<\R> is equivalent to C<< (?>\x0D\x0A|\v) >>. Since C<\R> can match a sequence of more than one character, it cannot be put inside a bracketed character class; C is an error; use C<\v> instead. C<\R> was introduced in perl 5.10.0. diff --git a/pod/perlref.pod b/pod/perlref.pod index f1dffceeff5..0fab80969aa 100644 --- a/pod/perlref.pod +++ b/pod/perlref.pod @@ -24,7 +24,7 @@ Hard references are smart--they keep track of reference counts for you, automatically freeing the thing referred to when its reference count goes to zero. (Reference counts for values in self-referential or cyclic data structures may not go to zero without a little help; see -L for a detailed explanation.) +L for a detailed explanation.) If that thing happens to be an object, the object is destructed. See L for more about objects. (In a sense, everything in Perl is an object, but we usually reserve the word for references to objects that @@ -747,5 +747,5 @@ Some pathological examples of the use of references can be found in the F regression test in the Perl source directory. See also L and L for how to use references to create -complex data structures, and L, L, and L +complex data structures, and L and L for how to use them to create objects. diff --git a/pod/perlsub.pod b/pod/perlsub.pod index e2a9bcfaf53..4c6f401fdeb 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -1520,4 +1520,4 @@ See L if you'd like to learn about calling C subroutines from Perl. See L if you'd like to learn about calling Perl subroutines from C. See L to learn about bundling up your functions in separate files. See L to learn what library modules come standard on your system. -See L to learn how to make object method calls. +See L to learn how to make object method calls. diff --git a/pod/perltooc.pod b/pod/perltooc.pod index 06f697cdef1..35163255300 100644 --- a/pod/perltooc.pod +++ b/pod/perltooc.pod @@ -1,1342 +1,12 @@ +=encoding utf8 + =head1 NAME -perltooc - Tom's OO Tutorial for Class Data in Perl +perltooc - This document has been deleted =head1 DESCRIPTION -When designing an object class, you are sometimes faced with the situation -of wanting common state shared by all objects of that class. -Such I act somewhat like global variables for the entire -class, but unlike program-wide globals, class attributes have meaning only to -the class itself. - -Here are a few examples where class attributes might come in handy: - -=over 4 - -=item * - -to keep a count of the objects you've created, or how many are -still extant. - -=item * - -to extract the name or file descriptor for a logfile used by a debugging -method. - -=item * - -to access collective data, like the total amount of cash dispensed by -all ATMs in a network in a given day. - -=item * - -to access the last object created by a class, or the most accessed object, -or to retrieve a list of all objects. - -=back - -Unlike a true global, class attributes should not be accessed directly. -Instead, their state should be inspected, and perhaps altered, only -through the mediated access of I. These class attributes -accessor methods are similar in spirit and function to accessors used -to manipulate the state of instance attributes on an object. They provide a -clear firewall between interface and implementation. - -You should allow access to class attributes through either the class -name or any object of that class. If we assume that $an_object is of -type Some_Class, and the &Some_Class::population_count method accesses -class attributes, then these two invocations should both be possible, -and almost certainly equivalent. - - Some_Class->population_count() - $an_object->population_count() - -The question is, where do you store the state which that method accesses? -Unlike more restrictive languages like C++, where these are called -static data members, Perl provides no syntactic mechanism to declare -class attributes, any more than it provides a syntactic mechanism to -declare instance attributes. Perl provides the developer with a broad -set of powerful but flexible features that can be uniquely crafted to -the particular demands of the situation. - -A class in Perl is typically implemented in a module. A module consists -of two complementary feature sets: a package for interfacing with the -outside world, and a lexical file scope for privacy. Either of these -two mechanisms can be used to implement class attributes. That means you -get to decide whether to put your class attributes in package variables -or to put them in lexical variables. - -And those aren't the only decisions to make. If you choose to use package -variables, you can make your class attribute accessor methods either ignorant -of inheritance or sensitive to it. If you choose lexical variables, -you can elect to permit access to them from anywhere in the entire file -scope, or you can limit direct data access exclusively to the methods -implementing those attributes. - -=head1 Class Data in a Can - -One of the easiest ways to solve a hard problem is to let someone else -do it for you! In this case, Class::Data::Inheritable (available on a -CPAN near you) offers a canned solution to the class data problem -using closures. So before you wade into this document, consider -having a look at that module. - - -=head1 Class Data as Package Variables - -Because a class in Perl is really just a package, using package variables -to hold class attributes is the most natural choice. This makes it simple -for each class to have its own class attributes. Let's say you have a class -called Some_Class that needs a couple of different attributes that you'd -like to be global to the entire class. The simplest thing to do is to -use package variables like $Some_Class::CData1 and $Some_Class::CData2 -to hold these attributes. But we certainly don't want to encourage -outsiders to touch those data directly, so we provide methods -to mediate access. - -In the accessor methods below, we'll for now just ignore the first -argument--that part to the left of the arrow on method invocation, which -is either a class name or an object reference. - - package Some_Class; - sub CData1 { - shift; # XXX: ignore calling class/object - $Some_Class::CData1 = shift if @_; - return $Some_Class::CData1; - } - sub CData2 { - shift; # XXX: ignore calling class/object - $Some_Class::CData2 = shift if @_; - return $Some_Class::CData2; - } - -This technique is highly legible and should be completely straightforward -to even the novice Perl programmer. By fully qualifying the package -variables, they stand out clearly when reading the code. Unfortunately, -if you misspell one of these, you've introduced an error that's hard -to catch. It's also somewhat disconcerting to see the class name itself -hard-coded in so many places. - -Both these problems can be easily fixed. Just add the C -pragma, then pre-declare your package variables. (The C operator -will be new in 5.6, and will work for package globals just like C -works for scoped lexicals.) - - package Some_Class; - use strict; - our($CData1, $CData2); # our() is new to perl5.6 - sub CData1 { - shift; # XXX: ignore calling class/object - $CData1 = shift if @_; - return $CData1; - } - sub CData2 { - shift; # XXX: ignore calling class/object - $CData2 = shift if @_; - return $CData2; - } - - -As with any other global variable, some programmers prefer to start their -package variables with capital letters. This helps clarity somewhat, but -by no longer fully qualifying the package variables, their significance -can be lost when reading the code. You can fix this easily enough by -choosing better names than were used here. - -=head2 Putting All Your Eggs in One Basket - -Just as the mindless enumeration of accessor methods for instance attributes -grows tedious after the first few (see L), so too does the -repetition begin to grate when listing out accessor methods for class -data. Repetition runs counter to the primary virtue of a programmer: -Laziness, here manifesting as that innate urge every programmer feels -to factor out duplicate code whenever possible. - -Here's what to do. First, make just one hash to hold all class attributes. - - package Some_Class; - use strict; - our %ClassData = ( # our() is new to perl5.6 - CData1 => "", - CData2 => "", - ); - -Using closures (see L) and direct access to the package symbol -table (see L), now clone an accessor method for each key in -the %ClassData hash. Each of these methods is used to fetch or store -values to the specific, named class attribute. - - for my $datum (keys %ClassData) { - no strict "refs"; # to register new methods in package - *$datum = sub { - shift; # XXX: ignore calling class/object - $ClassData{$datum} = shift if @_; - return $ClassData{$datum}; - } - } - -It's true that you could work out a solution employing an &AUTOLOAD -method, but this approach is unlikely to prove satisfactory. Your -function would have to distinguish between class attributes and object -attributes; it could interfere with inheritance; and it would have to -careful about DESTROY. Such complexity is uncalled for in most cases, -and certainly in this one. - -You may wonder why we're rescinding strict refs for the loop. We're -manipulating the package's symbol table to introduce new function names -using symbolic references (indirect naming), which the strict pragma -would otherwise forbid. Normally, symbolic references are a dodgy -notion at best. This isn't just because they can be used accidentally -when you aren't meaning to. It's also because for most uses -to which beginning Perl programmers attempt to put symbolic references, -we have much better approaches, like nested hashes or hashes of arrays. -But there's nothing wrong with using symbolic references to manipulate -something that is meaningful only from the perspective of the package -symbol table, like method names or package variables. In other -words, when you want to refer to the symbol table, use symbol references. - -Clustering all the class attributes in one place has several advantages. -They're easy to spot, initialize, and change. The aggregation also -makes them convenient to access externally, such as from a debugger -or a persistence package. The only possible problem is that we don't -automatically know the name of each class's class object, should it have -one. This issue is addressed below in L<"The Eponymous Meta-Object">. - -=head2 Inheritance Concerns - -Suppose you have an instance of a derived class, and you access class -data using an inherited method call. Should that end up referring -to the base class's attributes, or to those in the derived class? -How would it work in the earlier examples? The derived class inherits -all the base class's methods, including those that access class attributes. -But what package are the class attributes stored in? - -The answer is that, as written, class attributes are stored in the package into -which those methods were compiled. When you invoke the &CData1 method -on the name of the derived class or on one of that class's objects, the -version shown above is still run, so you'll access $Some_Class::CData1--or -in the method cloning version, C<$Some_Class::ClassData{CData1}>. - -Think of these class methods as executing in the context of their base -class, not in that of their derived class. Sometimes this is exactly -what you want. If Feline subclasses Carnivore, then the population of -Carnivores in the world should go up when a new Feline is born. -But what if you wanted to figure out how many Felines you have apart -from Carnivores? The current approach doesn't support that. - -You'll have to decide on a case-by-case basis whether it makes any sense -for class attributes to be package-relative. If you want it to be so, -then stop ignoring the first argument to the function. Either it will -be a package name if the method was invoked directly on a class name, -or else it will be an object reference if the method was invoked on an -object reference. In the latter case, the ref() function provides the -class of that object. - - package Some_Class; - sub CData1 { - my $obclass = shift; - my $class = ref($obclass) || $obclass; - my $varname = $class . "::CData1"; - no strict "refs"; # to access package data symbolically - $$varname = shift if @_; - return $$varname; - } - -And then do likewise for all other class attributes (such as CData2, -etc.) that you wish to access as package variables in the invoking package -instead of the compiling package as we had previously. - -Once again we temporarily disable the strict references ban, because -otherwise we couldn't use the fully-qualified symbolic name for -the package global. This is perfectly reasonable: since all package -variables by definition live in a package, there's nothing wrong with -accessing them via that package's symbol table. That's what it's there -for (well, somewhat). - -What about just using a single hash for everything and then cloning -methods? What would that look like? The only difference would be the -closure used to produce new method entries for the class's symbol table. - - no strict "refs"; - *$datum = sub { - my $obclass = shift; - my $class = ref($obclass) || $obclass; - my $varname = $class . "::ClassData"; - $varname->{$datum} = shift if @_; - return $varname->{$datum}; - } - -=head2 The Eponymous Meta-Object - -It could be argued that the %ClassData hash in the previous example is -neither the most imaginative nor the most intuitive of names. Is there -something else that might make more sense, be more useful, or both? - -As it happens, yes, there is. For the "class meta-object", we'll use -a package variable of the same name as the package itself. Within the -scope of a package Some_Class declaration, we'll use the eponymously -named hash %Some_Class as that class's meta-object. (Using an eponymously -named hash is somewhat reminiscent of classes that name their constructors -eponymously in the Python or C++ fashion. That is, class Some_Class would -use &Some_Class::Some_Class as a constructor, probably even exporting that -name as well. The StrNum class in Recipe 13.14 in I -does this, if you're looking for an example.) - -This predictable approach has many benefits, including having a well-known -identifier to aid in debugging, transparent persistence, -or checkpointing. It's also the obvious name for monadic classes and -translucent attributes, discussed later. - -Here's an example of such a class. Notice how the name of the -hash storing the meta-object is the same as the name of the package -used to implement the class. - - package Some_Class; - use strict; - - # create class meta-object using that most perfect of names - our %Some_Class = ( # our() is new to perl5.6 - CData1 => "", - CData2 => "", - ); - - # this accessor is calling-package-relative - sub CData1 { - my $obclass = shift; - my $class = ref($obclass) || $obclass; - no strict "refs"; # to access eponymous meta-object - $class->{CData1} = shift if @_; - return $class->{CData1}; - } - - # but this accessor is not - sub CData2 { - shift; # XXX: ignore calling class/object - no strict "refs"; # to access eponymous meta-object - __PACKAGE__ -> {CData2} = shift if @_; - return __PACKAGE__ -> {CData2}; - } - -In the second accessor method, the __PACKAGE__ notation was used for -two reasons. First, to avoid hardcoding the literal package name -in the code in case we later want to change that name. Second, to -clarify to the reader that what matters here is the package currently -being compiled into, not the package of the invoking object or class. -If the long sequence of non-alphabetic characters bothers you, you can -always put the __PACKAGE__ in a variable first. - - sub CData2 { - shift; # XXX: ignore calling class/object - no strict "refs"; # to access eponymous meta-object - my $class = __PACKAGE__; - $class->{CData2} = shift if @_; - return $class->{CData2}; - } - -Even though we're using symbolic references for good not evil, some -folks tend to become unnerved when they see so many places with strict -ref checking disabled. Given a symbolic reference, you can always -produce a real reference (the reverse is not true, though). So we'll -create a subroutine that does this conversion for us. If invoked as a -function of no arguments, it returns a reference to the compiling class's -eponymous hash. Invoked as a class method, it returns a reference to -the eponymous hash of its caller. And when invoked as an object method, -this function returns a reference to the eponymous hash for whatever -class the object belongs to. - - package Some_Class; - use strict; - - our %Some_Class = ( # our() is new to perl5.6 - CData1 => "", - CData2 => "", - ); - - # tri-natured: function, class method, or object method - sub _classobj { - my $obclass = shift || __PACKAGE__; - my $class = ref($obclass) || $obclass; - no strict "refs"; # to convert sym ref to real one - return \%$class; - } - - for my $datum (keys %{ _classobj() } ) { - # turn off strict refs so that we can - # register a method in the symbol table - no strict "refs"; - *$datum = sub { - use strict "refs"; - my $self = shift->_classobj(); - $self->{$datum} = shift if @_; - return $self->{$datum}; - } - } - -=head2 Indirect References to Class Data - -A reasonably common strategy for handling class attributes is to store -a reference to each package variable on the object itself. This is -a strategy you've probably seen before, such as in L and -L, but there may be variations in the example below that you -haven't thought of before. - - package Some_Class; - our($CData1, $CData2); # our() is new to perl5.6 - - sub new { - my $obclass = shift; - return bless my $self = { - ObData1 => "", - ObData2 => "", - CData1 => \$CData1, - CData2 => \$CData2, - } => (ref $obclass || $obclass); - } - - sub ObData1 { - my $self = shift; - $self->{ObData1} = shift if @_; - return $self->{ObData1}; - } - - sub ObData2 { - my $self = shift; - $self->{ObData2} = shift if @_; - return $self->{ObData2}; - } - - sub CData1 { - my $self = shift; - my $dataref = ref $self - ? $self->{CData1} - : \$CData1; - $$dataref = shift if @_; - return $$dataref; - } - - sub CData2 { - my $self = shift; - my $dataref = ref $self - ? $self->{CData2} - : \$CData2; - $$dataref = shift if @_; - return $$dataref; - } - -As written above, a derived class will inherit these methods, which -will consequently access package variables in the base class's package. -This is not necessarily expected behavior in all circumstances. Here's an -example that uses a variable meta-object, taking care to access the -proper package's data. - - package Some_Class; - use strict; - - our %Some_Class = ( # our() is new to perl5.6 - CData1 => "", - CData2 => "", - ); - - sub _classobj { - my $self = shift; - my $class = ref($self) || $self; - no strict "refs"; - # get (hard) ref to eponymous meta-object - return \%$class; - } - - sub new { - my $obclass = shift; - my $classobj = $obclass->_classobj(); - bless my $self = { - ObData1 => "", - ObData2 => "", - CData1 => \$classobj->{CData1}, - CData2 => \$classobj->{CData2}, - } => (ref $obclass || $obclass); - return $self; - } - - sub ObData1 { - my $self = shift; - $self->{ObData1} = shift if @_; - return $self->{ObData1}; - } - - sub ObData2 { - my $self = shift; - $self->{ObData2} = shift if @_; - return $self->{ObData2}; - } - - sub CData1 { - my $self = shift; - $self = $self->_classobj() unless ref $self; - my $dataref = $self->{CData1}; - $$dataref = shift if @_; - return $$dataref; - } - - sub CData2 { - my $self = shift; - $self = $self->_classobj() unless ref $self; - my $dataref = $self->{CData2}; - $$dataref = shift if @_; - return $$dataref; - } - -Not only are we now strict refs clean, using an eponymous meta-object -seems to make the code cleaner. Unlike the previous version, this one -does something interesting in the face of inheritance: it accesses the -class meta-object in the invoking class instead of the one into which -the method was initially compiled. - -You can easily access data in the class meta-object, making -it easy to dump the complete class state using an external mechanism such -as when debugging or implementing a persistent class. This works because -the class meta-object is a package variable, has a well-known name, and -clusters all its data together. (Transparent persistence -is not always feasible, but it's certainly an appealing idea.) - -There's still no check that object accessor methods have not been -invoked on a class name. If strict ref checking is enabled, you'd -blow up. If not, then you get the eponymous meta-object. What you do -with--or about--this is up to you. The next two sections demonstrate -innovative uses for this powerful feature. - -=head2 Monadic Classes - -Some of the standard modules shipped with Perl provide class interfaces -without any attribute methods whatsoever. The most commonly used module -not numbered amongst the pragmata, the Exporter module, is a class with -neither constructors nor attributes. Its job is simply to provide a -standard interface for modules wishing to export part of their namespace -into that of their caller. Modules use the Exporter's &import method by -setting their inheritance list in their package's @ISA array to mention -"Exporter". But class Exporter provides no constructor, so you can't -have several instances of the class. In fact, you can't have any--it -just doesn't make any sense. All you get is its methods. Its interface -contains no statefulness, so state data is wholly superfluous. - -Another sort of class that pops up from time to time is one that supports -a unique instance. Such classes are called I, or less -formally, I or I. - -If a class is monadic, where do you store its state, that is, -its attributes? How do you make sure that there's never more than -one instance? While you could merely use a slew of package variables, -it's a lot cleaner to use the eponymously named hash. Here's a complete -example of a monadic class: - - package Cosmos; - %Cosmos = (); - - # accessor method for "name" attribute - sub name { - my $self = shift; - $self->{name} = shift if @_; - return $self->{name}; - } - - # read-only accessor method for "birthday" attribute - sub birthday { - my $self = shift; - die "can't reset birthday" if @_; # XXX: croak() is better - return $self->{birthday}; - } - - # accessor method for "stars" attribute - sub stars { - my $self = shift; - $self->{stars} = shift if @_; - return $self->{stars}; - } - - # oh my - one of our stars just went out! - sub supernova { - my $self = shift; - my $count = $self->stars(); - $self->stars($count - 1) if $count > 0; - } - - # constructor/initializer method - fix by reboot - sub bigbang { - my $self = shift; - %$self = ( - name => "the world according to tchrist", - birthday => time(), - stars => 0, - ); - return $self; # yes, it's probably a class. SURPRISE! - } - - # After the class is compiled, but before any use or require - # returns, we start off the universe with a bang. - __PACKAGE__ -> bigbang(); - -Hold on, that doesn't look like anything special. Those attribute -accessors look no different than they would if this were a regular class -instead of a monadic one. The crux of the matter is there's nothing -that says that $self must hold a reference to a blessed object. It merely -has to be something you can invoke methods on. Here the package name -itself, Cosmos, works as an object. Look at the &supernova method. Is that -a class method or an object method? The answer is that static analysis -cannot reveal the answer. Perl doesn't care, and neither should you. -In the three attribute methods, C<%$self> is really accessing the %Cosmos -package variable. - -If like Stephen Hawking, you posit the existence of multiple, sequential, -and unrelated universes, then you can invoke the &bigbang method yourself -at any time to start everything all over again. You might think of -&bigbang as more of an initializer than a constructor, since the function -doesn't allocate new memory; it only initializes what's already there. -But like any other constructor, it does return a scalar value to use -for later method invocations. - -Imagine that some day in the future, you decide that one universe just -isn't enough. You could write a new class from scratch, but you already -have an existing class that does what you want--except that it's monadic, -and you want more than just one cosmos. - -That's what code reuse via subclassing is all about. Look how short -the new code is: - - package Multiverse; - use Cosmos; - @ISA = qw(Cosmos); - - sub new { - my $protoverse = shift; - my $class = ref($protoverse) || $protoverse; - my $self = {}; - return bless($self, $class)->bigbang(); - } - 1; - -Because we were careful to be good little creators when we designed our -Cosmos class, we can now reuse it without touching a single line of code -when it comes time to write our Multiverse class. The same code that -worked when invoked as a class method continues to work perfectly well -when invoked against separate instances of a derived class. - -The astonishing thing about the Cosmos class above is that the value -returned by the &bigbang "constructor" is not a reference to a blessed -object at all. It's just the class's own name. A class name is, for -virtually all intents and purposes, a perfectly acceptable object. -It has state, behavior, and identity, the three crucial components -of an object system. It even manifests inheritance, polymorphism, -and encapsulation. And what more can you ask of an object? - -To understand object orientation in Perl, it's important to recognize the -unification of what other programming languages might think of as class -methods and object methods into just plain methods. "Class methods" -and "object methods" are distinct only in the compartmentalizing mind -of the Perl programmer, not in the Perl language itself. - -Along those same lines, a constructor is nothing special either, which -is one reason why Perl has no pre-ordained name for them. "Constructor" -is just an informal term loosely used to describe a method that returns -a scalar value that you can make further method calls against. So long -as it's either a class name or an object reference, that's good enough. -It doesn't even have to be a reference to a brand new object. - -You can have as many--or as few--constructors as you want, and you can -name them whatever you care to. Blindly and obediently using new() -for each and every constructor you ever write is to speak Perl with -such a severe C++ accent that you do a disservice to both languages. -There's no reason to insist that each class have but one constructor, -or that a constructor be named new(), or that a constructor be -used solely as a class method and not an object method. - -The next section shows how useful it can be to further distance ourselves -from any formal distinction between class method calls and object method -calls, both in constructors and in accessor methods. - -=head2 Translucent Attributes - -A package's eponymous hash can be used for more than just containing -per-class, global state data. It can also serve as a sort of template -containing default settings for object attributes. These default -settings can then be used in constructors for initialization of a -particular object. The class's eponymous hash can also be used to -implement I. A translucent attribute is one -that has a class-wide default. Each object can set its own value for the -attribute, in which case C<< $object->attribute() >> returns that value. -But if no value has been set, then C<< $object->attribute() >> returns -the class-wide default. - -We'll apply something of a copy-on-write approach to these translucent -attributes. If you're just fetching values from them, you get -translucency. But if you store a new value to them, that new value is -set on the current object. On the other hand, if you use the class as -an object and store the attribute value directly on the class, then the -meta-object's value changes, and later fetch operations on objects with -uninitialized values for those attributes will retrieve the meta-object's -new values. Objects with their own initialized values, however, won't -see any change. - -Let's look at some concrete examples of using these properties before we -show how to implement them. Suppose that a class named Some_Class -had a translucent data attribute called "color". First you set the color -in the meta-object, then you create three objects using a constructor -that happens to be named &spawn. - - use Vermin; - Vermin->color("vermilion"); - - $ob1 = Vermin->spawn(); # so that's where Jedi come from - $ob2 = Vermin->spawn(); - $ob3 = Vermin->spawn(); - - print $obj3->color(); # prints "vermilion" - -Each of these objects' colors is now "vermilion", because that's the -meta-object's value for that attribute, and these objects do not have -individual color values set. - -Changing the attribute on one object has no effect on other objects -previously created. - - $ob3->color("chartreuse"); - print $ob3->color(); # prints "chartreuse" - print $ob1->color(); # prints "vermilion", translucently - -If you now use $ob3 to spawn off another object, the new object will -take the color its parent held, which now happens to be "chartreuse". -That's because the constructor uses the invoking object as its template -for initializing attributes. When that invoking object is the -class name, the object used as a template is the eponymous meta-object. -When the invoking object is a reference to an instantiated object, the -&spawn constructor uses that existing object as a template. - - $ob4 = $ob3->spawn(); # $ob3 now template, not %Vermin - print $ob4->color(); # prints "chartreuse" - -Any actual values set on the template object will be copied to the -new object. But attributes undefined in the template object, being -translucent, will remain undefined and consequently translucent in the -new one as well. - -Now let's change the color attribute on the entire class: - - Vermin->color("azure"); - print $ob1->color(); # prints "azure" - print $ob2->color(); # prints "azure" - print $ob3->color(); # prints "chartreuse" - print $ob4->color(); # prints "chartreuse" - -That color change took effect only in the first pair of objects, which -were still translucently accessing the meta-object's values. The second -pair had per-object initialized colors, and so didn't change. - -One important question remains. Changes to the meta-object are reflected -in translucent attributes in the entire class, but what about -changes to discrete objects? If you change the color of $ob3, does the -value of $ob4 see that change? Or vice-versa. If you change the color -of $ob4, does then the value of $ob3 shift? - - $ob3->color("amethyst"); - print $ob3->color(); # prints "amethyst" - print $ob4->color(); # hmm: "chartreuse" or "amethyst"? - -While one could argue that in certain rare cases it should, let's not -do that. Good taste aside, we want the answer to the question posed in -the comment above to be "chartreuse", not "amethyst". So we'll treat -these attributes similar to the way process attributes like environment -variables, user and group IDs, or the current working directory are -treated across a fork(). You can change only yourself, but you will see -those changes reflected in your unspawned children. Changes to one object -will propagate neither up to the parent nor down to any existing child objects. -Those objects made later, however, will see the changes. - -If you have an object with an actual attribute value, and you want to -make that object's attribute value translucent again, what do you do? -Let's design the class so that when you invoke an accessor method with -C as its argument, that attribute returns to translucency. - - $ob4->color(undef); # back to "azure" - -Here's a complete implementation of Vermin as described above. - - package Vermin; - - # here's the class meta-object, eponymously named. - # it holds all class attributes, and also all instance attributes - # so the latter can be used for both initialization - # and translucency. - - our %Vermin = ( # our() is new to perl5.6 - PopCount => 0, # capital for class attributes - color => "beige", # small for instance attributes - ); - - # constructor method - # invoked as class method or object method - sub spawn { - my $obclass = shift; - my $class = ref($obclass) || $obclass; - my $self = {}; - bless($self, $class); - $class->{PopCount}++; - # init fields from invoking object, or omit if - # invoking object is the class to provide translucency - %$self = %$obclass if ref $obclass; - return $self; - } - - # translucent accessor for "color" attribute - # invoked as class method or object method - sub color { - my $self = shift; - my $class = ref($self) || $self; - - # handle class invocation - unless (ref $self) { - $class->{color} = shift if @_; - return $class->{color} - } - - # handle object invocation - $self->{color} = shift if @_; - if (defined $self->{color}) { # not exists! - return $self->{color}; - } else { - return $class->{color}; - } - } - - # accessor for "PopCount" class attribute - # invoked as class method or object method - # but uses object solely to locate meta-object - sub population { - my $obclass = shift; - my $class = ref($obclass) || $obclass; - return $class->{PopCount}; - } - - # instance destructor - # invoked only as object method - sub DESTROY { - my $self = shift; - my $class = ref $self; - $class->{PopCount}--; - } - -Here are a couple of helper methods that might be convenient. They aren't -accessor methods at all. They're used to detect accessibility of data -attributes. The &is_translucent method determines whether a particular -object attribute is coming from the meta-object. The &has_attribute -method detects whether a class implements a particular property at all. -It could also be used to distinguish undefined properties from non-existent -ones. - - # detect whether an object attribute is translucent - # (typically?) invoked only as object method - sub is_translucent { - my($self, $attr) = @_; - return !defined $self->{$attr}; - } - - # test for presence of attribute in class - # invoked as class method or object method - sub has_attribute { - my($self, $attr) = @_; - my $class = ref($self) || $self; - return exists $class->{$attr}; - } - -If you prefer to install your accessors more generically, you can make -use of the upper-case versus lower-case convention to register into the -package appropriate methods cloned from generic closures. - - for my $datum (keys %{ +__PACKAGE__ }) { - *$datum = ($datum =~ /^[A-Z]/) - ? sub { # install class accessor - my $obclass = shift; - my $class = ref($obclass) || $obclass; - return $class->{$datum}; - } - : sub { # install translucent accessor - my $self = shift; - my $class = ref($self) || $self; - unless (ref $self) { - $class->{$datum} = shift if @_; - return $class->{$datum} - } - $self->{$datum} = shift if @_; - return defined $self->{$datum} - ? $self -> {$datum} - : $class -> {$datum} - } - } - -Translations of this closure-based approach into C++, Java, and Python -have been left as exercises for the reader. Be sure to send us mail as -soon as you're done. - -=head1 Class Data as Lexical Variables - -=head2 Privacy and Responsibility - -Unlike conventions used by some Perl programmers, in the previous -examples, we didn't prefix the package variables used for class attributes -with an underscore, nor did we do so for the names of the hash keys used -for instance attributes. You don't need little markers on data names to -suggest nominal privacy on attribute variables or hash keys, because these -are B notionally private! Outsiders have no business whatsoever -playing with anything within a class save through the mediated access of -its documented interface; in other words, through method invocations. -And not even through just any method, either. Methods that begin with -an underscore are traditionally considered off-limits outside the class. -If outsiders skip the documented method interface to poke around the -internals of your class and end up breaking something, that's not your -fault--it's theirs. - -Perl believes in individual responsibility rather than mandated control. -Perl respects you enough to let you choose your own preferred level of -pain, or of pleasure. Perl believes that you are creative, intelligent, -and capable of making your own decisions--and fully expects you to -take complete responsibility for your own actions. In a perfect world, -these admonitions alone would suffice, and everyone would be intelligent, -responsible, happy, and creative. And careful. One probably shouldn't -forget careful, and that's a good bit harder to expect. Even Einstein -would take wrong turns by accident and end up lost in the wrong part -of town. - -Some folks get the heebie-jeebies when they see package variables -hanging out there for anyone to reach over and alter them. Some folks -live in constant fear that someone somewhere might do something wicked. -The solution to that problem is simply to fire the wicked, of course. -But unfortunately, it's not as simple as all that. These cautious -types are also afraid that they or others will do something not so -much wicked as careless, whether by accident or out of desperation. -If we fire everyone who ever gets careless, pretty soon there won't be -anybody left to get any work done. - -Whether it's needless paranoia or sensible caution, this uneasiness can -be a problem for some people. We can take the edge off their discomfort -by providing the option of storing class attributes as lexical variables -instead of as package variables. The my() operator is the source of -all privacy in Perl, and it is a powerful form of privacy indeed. - -It is widely perceived, and indeed has often been written, that Perl -provides no data hiding, that it affords the class designer no privacy -nor isolation, merely a rag-tag assortment of weak and unenforceable -social conventions instead. This perception is demonstrably false and -easily disproven. In the next section, we show how to implement forms -of privacy that are far stronger than those provided in nearly any -other object-oriented language. - -=head2 File-Scoped Lexicals - -A lexical variable is visible only through the end of its static scope. -That means that the only code able to access that variable is code -residing textually below the my() operator through the end of its block -if it has one, or through the end of the current file if it doesn't. - -Starting again with our simplest example given at the start of this -document, we replace our() variables with my() versions. - - package Some_Class; - my($CData1, $CData2); # file scope, not in any package - sub CData1 { - shift; # XXX: ignore calling class/object - $CData1 = shift if @_; - return $CData1; - } - sub CData2 { - shift; # XXX: ignore calling class/object - $CData2 = shift if @_; - return $CData2; - } - -So much for that old $Some_Class::CData1 package variable and its brethren! -Those are gone now, replaced with lexicals. No one outside the -scope can reach in and alter the class state without resorting to the -documented interface. Not even subclasses or superclasses of -this one have unmediated access to $CData1. They have to invoke the &CData1 -method against Some_Class or an instance thereof, just like anybody else. - -To be scrupulously honest, that last statement assumes you haven't packed -several classes together into the same file scope, nor strewn your class -implementation across several different files. Accessibility of those -variables is based uniquely on the static file scope. It has nothing to -do with the package. That means that code in a different file but -the same package (class) could not access those variables, yet code in the -same file but a different package (class) could. There are sound reasons -why we usually suggest a one-to-one mapping between files and packages -and modules and classes. You don't have to stick to this suggestion if -you really know what you're doing, but you're apt to confuse yourself -otherwise, especially at first. - -If you'd like to aggregate your class attributes into one lexically scoped, -composite structure, you're perfectly free to do so. - - package Some_Class; - my %ClassData = ( - CData1 => "", - CData2 => "", - ); - sub CData1 { - shift; # XXX: ignore calling class/object - $ClassData{CData1} = shift if @_; - return $ClassData{CData1}; - } - sub CData2 { - shift; # XXX: ignore calling class/object - $ClassData{CData2} = shift if @_; - return $ClassData{CData2}; - } - -To make this more scalable as other class attributes are added, we can -again register closures into the package symbol table to create accessor -methods for them. - - package Some_Class; - my %ClassData = ( - CData1 => "", - CData2 => "", - ); - for my $datum (keys %ClassData) { - no strict "refs"; - *$datum = sub { - shift; # XXX: ignore calling class/object - $ClassData{$datum} = shift if @_; - return $ClassData{$datum}; - }; - } - -Requiring even your own class to use accessor methods like anybody else is -probably a good thing. But demanding and expecting that everyone else, -be they subclass or superclass, friend or foe, will all come to your -object through mediation is more than just a good idea. It's absolutely -critical to the model. Let there be in your mind no such thing as -"public" data, nor even "protected" data, which is a seductive but -ultimately destructive notion. Both will come back to bite at you. -That's because as soon as you take that first step out of the solid -position in which all state is considered completely private, save from the -perspective of its own accessor methods, you have violated the envelope. -And, having pierced that encapsulating envelope, you shall doubtless -someday pay the price when future changes in the implementation break -unrelated code. Considering that avoiding this infelicitous outcome was -precisely why you consented to suffer the slings and arrows of obsequious -abstraction by turning to object orientation in the first place, such -breakage seems unfortunate in the extreme. - -=head2 More Inheritance Concerns - -Suppose that Some_Class were used as a base class from which to derive -Another_Class. If you invoke a &CData method on the derived class or -on an object of that class, what do you get? Would the derived class -have its own state, or would it piggyback on its base class's versions -of the class attributes? - -The answer is that under the scheme outlined above, the derived class -would B have its own state data. As before, whether you consider -this a good thing or a bad one depends on the semantics of the classes -involved. - -The cleanest, sanest, simplest way to address per-class state in a -lexical is for the derived class to override its base class's version -of the method that accesses the class attributes. Since the actual method -called is the one in the object's derived class if this exists, you -automatically get per-class state this way. Any urge to provide an -unadvertised method to sneak out a reference to the %ClassData hash -should be strenuously resisted. - -As with any other overridden method, the implementation in the -derived class always has the option of invoking its base class's -version of the method in addition to its own. Here's an example: - - package Another_Class; - @ISA = qw(Some_Class); - - my %ClassData = ( - CData1 => "", - ); - - sub CData1 { - my($self, $newvalue) = @_; - if (@_ > 1) { - # set locally first - $ClassData{CData1} = $newvalue; - - # then pass the buck up to the first - # overridden version, if there is one - if ($self->can("SUPER::CData1")) { - $self->SUPER::CData1($newvalue); - } - } - return $ClassData{CData1}; - } - -Those dabbling in multiple inheritance might be concerned -about there being more than one override. - - for my $parent (@ISA) { - my $methname = $parent . "::CData1"; - if ($self->can($methname)) { - $self->$methname($newvalue); - } - } - -Because the &UNIVERSAL::can method returns a reference -to the function directly, you can use this directly -for a significant performance improvement: - - for my $parent (@ISA) { - if (my $coderef = $self->can($parent . "::CData1")) { - $self->$coderef($newvalue); - } - } - -If you override C in your own classes, be sure to return the -reference appropriately. - -=head2 Locking the Door and Throwing Away the Key - -As currently implemented, any code within the same scope as the -file-scoped lexical %ClassData can alter that hash directly. Is that -ok? Is it acceptable or even desirable to allow other parts of the -implementation of this class to access class attributes directly? - -That depends on how careful you want to be. Think back to the Cosmos -class. If the &supernova method had directly altered $Cosmos::Stars or -C<$Cosmos::Cosmos{stars}>, then we wouldn't have been able to reuse the -class when it came to inventing a Multiverse. So letting even the class -itself access its own class attributes without the mediating intervention of -properly designed accessor methods is probably not a good idea after all. - -Restricting access to class attributes from the class itself is usually -not enforceable even in strongly object-oriented languages. But in Perl, -you can. - -Here's one way: - - package Some_Class; - - { # scope for hiding $CData1 - my $CData1; - sub CData1 { - shift; # XXX: unused - $CData1 = shift if @_; - return $CData1; - } - } - - { # scope for hiding $CData2 - my $CData2; - sub CData2 { - shift; # XXX: unused - $CData2 = shift if @_; - return $CData2; - } - } - -No one--absolutely no one--is allowed to read or write the class -attributes without the mediation of the managing accessor method, since -only that method has access to the lexical variable it's managing. -This use of mediated access to class attributes is a form of privacy far -stronger than most OO languages provide. - -The repetition of code used to create per-datum accessor methods chafes -at our Laziness, so we'll again use closures to create similar -methods. - - package Some_Class; - - { # scope for ultra-private meta-object for class attributes - my %ClassData = ( - CData1 => "", - CData2 => "", - ); - - for my $datum (keys %ClassData ) { - no strict "refs"; - *$datum = sub { - use strict "refs"; - my ($self, $newvalue) = @_; - $ClassData{$datum} = $newvalue if @_ > 1; - return $ClassData{$datum}; - } - } - - } - -The closure above can be modified to take inheritance into account using -the &UNIVERSAL::can method and SUPER as shown previously. - -=head2 Translucency Revisited - -The Vermin class demonstrates translucency using a package variable, -eponymously named %Vermin, as its meta-object. If you prefer to -use absolutely no package variables beyond those necessary to appease -inheritance or possibly the Exporter, this strategy is closed to you. -That's too bad, because translucent attributes are an appealing -technique, so it would be valuable to devise an implementation using -only lexicals. - -There's a second reason why you might wish to avoid the eponymous -package hash. If you use class names with double-colons in them, you -would end up poking around somewhere you might not have meant to poke. - - package Vermin; - $class = "Vermin"; - $class->{PopCount}++; - # accesses $Vermin::Vermin{PopCount} - - package Vermin::Noxious; - $class = "Vermin::Noxious"; - $class->{PopCount}++; - # accesses $Vermin::Noxious{PopCount} - -In the first case, because the class name had no double-colons, we got -the hash in the current package. But in the second case, instead of -getting some hash in the current package, we got the hash %Noxious in -the Vermin package. (The noxious vermin just invaded another package and -sprayed their data around it. :-) Perl doesn't support relative packages -in its naming conventions, so any double-colons trigger a fully-qualified -lookup instead of just looking in the current package. - -In practice, it is unlikely that the Vermin class had an existing -package variable named %Noxious that you just blew away. If you're -still mistrustful, you could always stake out your own territory -where you know the rules, such as using Eponymous::Vermin::Noxious or -Hieronymus::Vermin::Boschious or Leave_Me_Alone::Vermin::Noxious as class -names instead. Sure, it's in theory possible that someone else has -a class named Eponymous::Vermin with its own %Noxious hash, but this -kind of thing is always true. There's no arbiter of package names. -It's always the case that globals like @Cwd::ISA would collide if more -than one class uses the same Cwd package. - -If this still leaves you with an uncomfortable twinge of paranoia, -we have another solution for you. There's nothing that says that you -have to have a package variable to hold a class meta-object, either for -monadic classes or for translucent attributes. Just code up the methods -so that they access a lexical instead. - -Here's another implementation of the Vermin class with semantics identical -to those given previously, but this time using no package variables. - - package Vermin; - - - # Here's the class meta-object, eponymously named. - # It holds all class data, and also all instance data - # so the latter can be used for both initialization - # and translucency. it's a template. - my %ClassData = ( - PopCount => 0, # capital for class attributes - color => "beige", # small for instance attributes - ); - - # constructor method - # invoked as class method or object method - sub spawn { - my $obclass = shift; - my $class = ref($obclass) || $obclass; - my $self = {}; - bless($self, $class); - $ClassData{PopCount}++; - # init fields from invoking object, or omit if - # invoking object is the class to provide translucency - %$self = %$obclass if ref $obclass; - return $self; - } - - # translucent accessor for "color" attribute - # invoked as class method or object method - sub color { - my $self = shift; - - # handle class invocation - unless (ref $self) { - $ClassData{color} = shift if @_; - return $ClassData{color} - } - - # handle object invocation - $self->{color} = shift if @_; - if (defined $self->{color}) { # not exists! - return $self->{color}; - } else { - return $ClassData{color}; - } - } - - # class attribute accessor for "PopCount" attribute - # invoked as class method or object method - sub population { - return $ClassData{PopCount}; - } - - # instance destructor; invoked only as object method - sub DESTROY { - $ClassData{PopCount}--; - } - - # detect whether an object attribute is translucent - # (typically?) invoked only as object method - sub is_translucent { - my($self, $attr) = @_; - $self = \%ClassData if !ref $self; - return !defined $self->{$attr}; - } - - # test for presence of attribute in class - # invoked as class method or object method - sub has_attribute { - my($self, $attr) = @_; - return exists $ClassData{$attr}; - } - -=head1 NOTES - -Inheritance is a powerful but subtle device, best used only after careful -forethought and design. Aggregation instead of inheritance is often a -better approach. - -You can't use file-scoped lexicals in conjunction with the SelfLoader -or the AutoLoader, because they alter the lexical scope in which the -module's methods wind up getting compiled. - -The usual mealy-mouthed package-munging doubtless applies to setting -up names of object attributes. For example, C<< $self->{ObData1} >> -should probably be C<< $self->{ __PACKAGE__ . "_ObData1" } >>, but that -would just confuse the examples. - -=head1 SEE ALSO - -L, L, L, and L. - -The Tie::SecureHash and Class::Data::Inheritable modules from CPAN are -worth checking out. - -=head1 AUTHOR AND COPYRIGHT - -Copyright (c) 1999 Tom Christiansen. -All rights reserved. - -This documentation is free; you can redistribute it and/or modify it -under the same terms as Perl itself. - -Irrespective of its distribution, all code examples in this file -are hereby placed into the public domain. You are permitted and -encouraged to use this code in your own programs for fun -or for profit as you see fit. A simple comment in the code giving -credit would be courteous but is not required. - -=head1 ACKNOWLEDGEMENTS - -Russ Allbery, Jon Orwant, Randy Ray, Larry Rosler, Nat Torkington, -and Stephen Warren all contributed suggestions and corrections to this -piece. Thanks especially to Damian Conway for his ideas and feedback, -and without whose indirect prodding I might never have taken the time -to show others how much Perl has to offer in the way of objects once -you start thinking outside the tiny little box that today's "popular" -object-oriented languages enforce. - -=head1 HISTORY +For information on OO programming with Perl, please see L +and L. -Last edit: Sun Feb 4 20:50:28 EST 2001 +=cut diff --git a/pod/perltoot.pod b/pod/perltoot.pod index 0d8648bdd55..c89629036c3 100644 --- a/pod/perltoot.pod +++ b/pod/perltoot.pod @@ -1,1836 +1,12 @@ +=encoding utf8 + =head1 NAME -perltoot - Tom's object-oriented tutorial for perl +perltoot - This document has been deleted =head1 DESCRIPTION -Object-oriented programming is a big seller these days. Some managers -would rather have objects than sliced bread. Why is that? What's so -special about an object? Just what I an object anyway? - -An object is nothing but a way of tucking away complex behaviours into -a neat little easy-to-use bundle. (This is what professors call -abstraction.) Smart people who have nothing to do but sit around for -weeks on end figuring out really hard problems make these nifty -objects that even regular people can use. (This is what professors call -software reuse.) Users (well, programmers) can play with this little -bundle all they want, but they aren't to open it up and mess with the -insides. Just like an expensive piece of hardware, the contract says -that you void the warranty if you muck with the cover. So don't do that. - -The heart of objects is the class, a protected little private namespace -full of data and functions. A class is a set of related routines that -addresses some problem area. You can think of it as a user-defined type. -The Perl package mechanism, also used for more traditional modules, -is used for class modules as well. Objects "live" in a class, meaning -that they belong to some package. - -More often than not, the class provides the user with little bundles. -These bundles are objects. They know whose class they belong to, -and how to behave. Users ask the class to do something, like "give -me an object." Or they can ask one of these objects to do something. -Asking a class to do something for you is calling a I. -Asking an object to do something for you is calling an I. -Asking either a class (usually) or an object (sometimes) to give you -back an object is calling a I, which is just a -kind of method. - -That's all well and good, but how is an object different from any other -Perl data type? Just what is an object I; that is, what's its -fundamental type? The answer to the first question is easy. An object -is different from any other data type in Perl in one and only one way: -you may dereference it using not merely string or numeric subscripts -as with simple arrays and hashes, but with named subroutine calls. -In a word, with I. - -The answer to the second question is that it's a reference, and not just -any reference, mind you, but one whose referent has been I()ed -into a particular class (read: package). What kind of reference? Well, -the answer to that one is a bit less concrete. That's because in Perl -the designer of the class can employ any sort of reference they'd like -as the underlying intrinsic data type. It could be a scalar, an array, -or a hash reference. It could even be a code reference. But because -of its inherent flexibility, an object is usually a hash reference. - -=head1 Creating a Class - -Before you create a class, you need to decide what to name it. That's -because the class (package) name governs the name of the file used to -house it, just as with regular modules. Then, that class (package) -should provide one or more ways to generate objects. Finally, it should -provide mechanisms to allow users of its objects to indirectly manipulate -these objects from a distance. - -For example, let's make a simple Person class module. It gets stored in -the file Person.pm. If it were called a Happy::Person class, it would -be stored in the file Happy/Person.pm, and its package would become -Happy::Person instead of just Person. (On a personal computer not -running Unix or Plan 9, but something like Mac OS or VMS, the directory -separator may be different, but the principle is the same.) Do not assume -any formal relationship between modules based on their directory names. -This is merely a grouping convenience, and has no effect on inheritance, -variable accessibility, or anything else. - -For this module we aren't going to use Exporter, because we're -a well-behaved class module that doesn't export anything at all. -In order to manufacture objects, a class needs to have a I. A constructor gives you back not just a regular data type, -but a brand-new object in that class. This magic is taken care of by -the bless() function, whose sole purpose is to enable its referent to -be used as an object. Remember: being an object really means nothing -more than that methods may now be called against it. - -While a constructor may be named anything you'd like, most Perl -programmers seem to like to call theirs new(). However, new() is not -a reserved word, and a class is under no obligation to supply such. -Some programmers have also been known to use a function with -the same name as the class as the constructor. - -=head2 Object Representation - -By far the most common mechanism used in Perl to represent a Pascal -record, a C struct, or a C++ class is an anonymous hash. That's because a -hash has an arbitrary number of data fields, each conveniently accessed by -an arbitrary name of your own devising. - -If you were just doing a simple -struct-like emulation, you would likely go about it something like this: - - $rec = { - name => "Jason", - age => 23, - peers => [ "Norbert", "Rhys", "Phineas"], - }; - -If you felt like it, you could add a bit of visual distinction -by up-casing the hash keys: - - $rec = { - NAME => "Jason", - AGE => 23, - PEERS => [ "Norbert", "Rhys", "Phineas"], - }; - -And so you could get at C<< $rec->{NAME} >> to find "Jason", or -C<< @{ $rec->{PEERS} } >> to get at "Norbert", "Rhys", and "Phineas". -(Have you ever noticed how many 23-year-old programmers seem to -be named "Jason" these days? :-) - -This same model is often used for classes, although it is not considered -the pinnacle of programming propriety for folks from outside the -class to come waltzing into an object, brazenly accessing its data -members directly. Generally speaking, an object should be considered -an opaque cookie that you use I to access. Visually, -methods look like you're dereffing a reference using a function name -instead of brackets or braces. - -=head2 Class Interface - -Some languages provide a formal syntactic interface to a class's methods, -but Perl does not. It relies on you to read the documentation of each -class. If you try to call an undefined method on an object, Perl won't -complain, but the program will trigger an exception while it's running. -Likewise, if you call a method expecting a prime number as its argument -with a non-prime one instead, you can't expect the compiler to catch this. -(Well, you can expect it all you like, but it's not going to happen.) - -Let's suppose you have a well-educated user of your Person class, -someone who has read the docs that explain the prescribed -interface. Here's how they might use the Person class: - - use Person; - - $him = Person->new(); - $him->name("Jason"); - $him->age(23); - $him->peers( "Norbert", "Rhys", "Phineas" ); - - push @All_Recs, $him; # save object in array for later - - printf "%s is %d years old.\n", $him->name, $him->age; - print "His peers are: ", join(", ", $him->peers), "\n"; - - printf "Last rec's name is %s\n", $All_Recs[-1]->name; - -As you can see, the user of the class doesn't know (or at least, has no -business paying attention to the fact) that the object has one particular -implementation or another. The interface to the class and its objects -is exclusively via methods, and that's all the user of the class should -ever play with. - -=head2 Constructors and Instance Methods - -Still, I has to know what's in the object. And that someone is -the class. It implements methods that the programmer uses to access -the object. Here's how to implement the Person class using the standard -hash-ref-as-an-object idiom. We'll make a class method called new() to -act as the constructor, and three object methods called name(), age(), and -peers() to get at per-object data hidden away in our anonymous hash. - - package Person; - use strict; - - ################################################## - ## the object constructor (simplistic version) ## - ################################################## - sub new { - my $self = {}; - $self->{NAME} = undef; - $self->{AGE} = undef; - $self->{PEERS} = []; - bless($self); # but see below - return $self; - } - - ############################################## - ## methods to access per-object data ## - ## ## - ## With args, they set the value. Without ## - ## any, they only retrieve it/them. ## - ############################################## - - sub name { - my $self = shift; - if (@_) { $self->{NAME} = shift } - return $self->{NAME}; - } - - sub age { - my $self = shift; - if (@_) { $self->{AGE} = shift } - return $self->{AGE}; - } - - sub peers { - my $self = shift; - if (@_) { @{ $self->{PEERS} } = @_ } - return @{ $self->{PEERS} }; - } - - 1; # so the require or use succeeds - -We've created three methods to access an object's data, name(), age(), -and peers(). These are all substantially similar. If called with an -argument, they set the appropriate field; otherwise they return the -value held by that field, meaning the value of that hash key. - -=head2 Planning for the Future: Better Constructors - -Even though at this point you may not even know what it means, someday -you're going to worry about inheritance. (You can safely ignore this -for now and worry about it later if you'd like.) To ensure that this -all works out smoothly, you must use the double-argument form of bless(). -The second argument is the class into which the referent will be blessed. -By not assuming our own class as the default second argument and instead -using the class passed into us, we make our constructor inheritable. - - sub new { - my $class = shift; - my $self = {}; - $self->{NAME} = undef; - $self->{AGE} = undef; - $self->{PEERS} = []; - bless ($self, $class); - return $self; - } - -That's about all there is for constructors. These methods bring objects -to life, returning neat little opaque bundles to the user to be used in -subsequent method calls. - -=head2 Destructors - -Every story has a beginning and an end. The beginning of the object's -story is its constructor, explicitly called when the object comes into -existence. But the ending of its story is the I, a method -implicitly called when an object leaves this life. Any per-object -clean-up code is placed in the destructor, which must (in Perl) be called -DESTROY. - -If constructors can have arbitrary names, then why not destructors? -Because while a constructor is explicitly called, a destructor is not. -Destruction happens automatically via Perl's garbage collection (GC) -system, which is a quick but somewhat lazy reference-based GC system. -To know what to call, Perl insists that the destructor be named DESTROY. -Perl's notion of the right time to call a destructor is not well-defined -currently, which is why your destructors should not rely on when they are -called. - -Why is DESTROY in all caps? Perl on occasion uses purely uppercase -function names as a convention to indicate that the function will -be automatically called by Perl in some way. Others that are called -implicitly include BEGIN, END, AUTOLOAD, plus all methods used by -tied objects, described in L. - -In really good object-oriented programming languages, the user doesn't -care when the destructor is called. It just happens when it's supposed -to. In low-level languages without any GC at all, there's no way to -depend on this happening at the right time, so the programmer must -explicitly call the destructor to clean up memory and state, crossing -their fingers that it's the right time to do so. Unlike C++, an -object destructor is nearly never needed in Perl, and even when it is, -explicit invocation is uncalled for. In the case of our Person class, -we don't need a destructor because Perl takes care of simple matters -like memory deallocation. - -The only situation where Perl's reference-based GC won't work is -when there's a circularity in the data structure, such as: - - $this->{WHATEVER} = $this; - -In that case, you must delete the self-reference manually if you expect -your program not to leak memory. While admittedly error-prone, this is -the best we can do right now. Nonetheless, rest assured that when your -program is finished, its objects' destructors are all duly called. -So you are guaranteed that an object I gets properly -destroyed, except in the unique case of a program that never exits. -(If you're running Perl embedded in another application, this full GC -pass happens a bit more frequently--whenever a thread shuts down.) - -=head2 Other Object Methods - -The methods we've talked about so far have either been constructors or -else simple "data methods", interfaces to data stored in the object. -These are a bit like an object's data members in the C++ world, except -that strangers don't access them as data. Instead, they should only -access the object's data indirectly via its methods. This is an -important rule: in Perl, access to an object's data should I -be made through methods. - -Perl doesn't impose restrictions on who gets to use which methods. -The public-versus-private distinction is by convention, not syntax. -(Well, unless you use the Alias module described below in -L.) Occasionally you'll see method names beginning or ending -with an underscore or two. This marking is a convention indicating -that the methods are private to that class alone and sometimes to its -closest acquaintances, its immediate subclasses. But this distinction -is not enforced by Perl itself. It's up to the programmer to behave. - -There's no reason to limit methods to those that simply access data. -Methods can do anything at all. The key point is that they're invoked -against an object or a class. Let's say we'd like object methods that -do more than fetch or set one particular field. - - sub exclaim { - my $self = shift; - return sprintf "Hi, I'm %s, age %d, working with %s", - $self->{NAME}, $self->{AGE}, join(", ", @{$self->{PEERS}}); - } - -Or maybe even one like this: - - sub happy_birthday { - my $self = shift; - return ++$self->{AGE}; - } - -Some might argue that one should go at these this way: - - sub exclaim { - my $self = shift; - return sprintf "Hi, I'm %s, age %d, working with %s", - $self->name, $self->age, join(", ", $self->peers); - } - - sub happy_birthday { - my $self = shift; - return $self->age( $self->age() + 1 ); - } - -But since these methods are all executing in the class itself, this -may not be critical. There are tradeoffs to be made. Using direct -hash access is faster (about an order of magnitude faster, in fact), and -it's more convenient when you want to interpolate in strings. But using -methods (the external interface) internally shields not just the users of -your class but even you yourself from changes in your data representation. - -=head1 Class Data - -What about "class data", data items common to each object in a class? -What would you want that for? Well, in your Person class, you might -like to keep track of the total people alive. How do you implement that? - -You I make it a global variable called $Person::Census. But about -only reason you'd do that would be if you I people to be able to -get at your class data directly. They could just say $Person::Census -and play around with it. Maybe this is ok in your design scheme. -You might even conceivably want to make it an exported variable. To be -exportable, a variable must be a (package) global. If this were a -traditional module rather than an object-oriented one, you might do that. - -While this approach is expected in most traditional modules, it's -generally considered rather poor form in most object modules. In an -object module, you should set up a protective veil to separate interface -from implementation. So provide a class method to access class data -just as you provide object methods to access object data. - -So, you I still keep $Census as a package global and rely upon -others to honor the contract of the module and therefore not play around -with its implementation. You could even be supertricky and make $Census a -tied object as described in L, thereby intercepting all accesses. - -But more often than not, you just want to make your class data a -file-scoped lexical. To do so, simply put this at the top of the file: - - my $Census = 0; - -Even though the scope of a my() normally expires when the block in which -it was declared is done (in this case the whole file being required or -used), Perl's deep binding of lexical variables guarantees that the -variable will not be deallocated, remaining accessible to functions -declared within that scope. This doesn't work with global variables -given temporary values via local(), though. - -Irrespective of whether you leave $Census a package global or make -it instead a file-scoped lexical, you should make these -changes to your Person::new() constructor: - - sub new { - my $class = shift; - my $self = {}; - $Census++; - $self->{NAME} = undef; - $self->{AGE} = undef; - $self->{PEERS} = []; - bless ($self, $class); - return $self; - } - - sub population { - return $Census; - } - -Now that we've done this, we certainly do need a destructor so that -when Person is destroyed, the $Census goes down. Here's how -this could be done: - - sub DESTROY { --$Census } - -Notice how there's no memory to deallocate in the destructor? That's -something that Perl takes care of for you all by itself. - -Alternatively, you could use the Class::Data::Inheritable module from -CPAN. - - -=head2 Accessing Class Data - -It turns out that this is not really a good way to go about handling -class data. A good scalable rule is that I. Otherwise you aren't building a -scalable, inheritable class. The object must be the rendezvous point -for all operations, especially from an object method. The globals -(class data) would in some sense be in the "wrong" package in your -derived classes. In Perl, methods execute in the context of the class -they were defined in, I that of the object that triggered them. -Therefore, namespace visibility of package globals in methods is unrelated -to inheritance. - -Got that? Maybe not. Ok, let's say that some other class "borrowed" -(well, inherited) the DESTROY method as it was defined above. When those -objects are destroyed, the original $Census variable will be altered, -not the one in the new class's package namespace. Perhaps this is what -you want, but probably it isn't. - -Here's how to fix this. We'll store a reference to the data in the -value accessed by the hash key "_CENSUS". Why the underscore? Well, -mostly because an initial underscore already conveys strong feelings -of magicalness to a C programmer. It's really just a mnemonic device -to remind ourselves that this field is special and not to be used as -a public data member in the same way that NAME, AGE, and PEERS are. -(Because we've been developing this code under the strict pragma, prior -to perl version 5.004 we'll have to quote the field name.) - - sub new { - my $class = shift; - my $self = {}; - $self->{NAME} = undef; - $self->{AGE} = undef; - $self->{PEERS} = []; - # "private" data - $self->{"_CENSUS"} = \$Census; - bless ($self, $class); - ++ ${ $self->{"_CENSUS"} }; - return $self; - } - - sub population { - my $self = shift; - if (ref $self) { - return ${ $self->{"_CENSUS"} }; - } else { - return $Census; - } - } - - sub DESTROY { - my $self = shift; - -- ${ $self->{"_CENSUS"} }; - } - -=head2 Debugging Methods - -It's common for a class to have a debugging mechanism. For example, -you might want to see when objects are created or destroyed. To do that, -add a debugging variable as a file-scoped lexical. For this, we'll pull -in the standard Carp module to emit our warnings and fatal messages. -That way messages will come out with the caller's filename and -line number instead of our own; if we wanted them to be from our own -perspective, we'd just use die() and warn() directly instead of croak() -and carp() respectively. - - use Carp; - my $Debugging = 0; - -Now add a new class method to access the variable. - - sub debug { - my $class = shift; - if (ref $class) { confess "Class method called as object method" } - unless (@_ == 1) { confess "usage: CLASSNAME->debug(level)" } - $Debugging = shift; - } - -Now fix up DESTROY to murmur a bit as the moribund object expires: - - sub DESTROY { - my $self = shift; - if ($Debugging) { carp "Destroying $self " . $self->name } - -- ${ $self->{"_CENSUS"} }; - } - -One could conceivably make a per-object debug state. That -way you could call both of these: - - Person->debug(1); # entire class - $him->debug(1); # just this object - -To do so, we need our debugging method to be a "bimodal" one, one that -works on both classes I objects. Therefore, adjust the debug() -and DESTROY methods as follows: - - sub debug { - my $self = shift; - confess "usage: thing->debug(level)" unless @_ == 1; - my $level = shift; - if (ref($self)) { - $self->{"_DEBUG"} = $level; # just myself - } else { - $Debugging = $level; # whole class - } - } - - sub DESTROY { - my $self = shift; - if ($Debugging || $self->{"_DEBUG"}) { - carp "Destroying $self " . $self->name; - } - -- ${ $self->{"_CENSUS"} }; - } - -What happens if a derived class (which we'll call Employee) inherits -methods from this Person base class? Then C<< Employee->debug() >>, when called -as a class method, manipulates $Person::Debugging not $Employee::Debugging. - -=head2 Class Destructors - -The object destructor handles the death of each distinct object. But sometimes -you want a bit of cleanup when the entire class is shut down, which -currently only happens when the program exits. To make such a -I, create a function in that class's package named -END. This works just like the END function in traditional modules, -meaning that it gets called whenever your program exits unless it execs -or dies of an uncaught signal. For example, - - sub END { - if ($Debugging) { - print "All persons are going away now.\n"; - } - } - -When the program exits, all the class destructors (END functions) are -be called in the opposite order that they were loaded in (LIFO order). - -=head2 Documenting the Interface - -And there you have it: we've just shown you the I of this -Person class. Its I would be its documentation. Usually this -means putting it in pod ("plain old documentation") format right there -in the same file. In our Person example, we would place the following -docs anywhere in the Person.pm file. Even though it looks mostly like -code, it's not. It's embedded documentation such as would be used by -the pod2man, pod2html, or pod2text programs. The Perl compiler ignores -pods entirely, just as the translators ignore code. Here's an example of -some pods describing the informal interface: - - =head1 NAME - - Person - class to implement people - - =head1 SYNOPSIS - - use Person; - - ################# - # class methods # - ################# - $ob = Person->new; - $count = Person->population; - - ####################### - # object data methods # - ####################### - - ### get versions ### - $who = $ob->name; - $years = $ob->age; - @pals = $ob->peers; - - ### set versions ### - $ob->name("Jason"); - $ob->age(23); - $ob->peers( "Norbert", "Rhys", "Phineas" ); - - ######################## - # other object methods # - ######################## - - $phrase = $ob->exclaim; - $ob->happy_birthday; - - =head1 DESCRIPTION - - The Person class implements dah dee dah dee dah.... - -That's all there is to the matter of interface versus implementation. -A programmer who opens up the module and plays around with all the private -little shiny bits that were safely locked up behind the interface contract -has voided the warranty, and you shouldn't worry about their fate. - -=head1 Aggregation - -Suppose you later want to change the class to implement better names. -Perhaps you'd like to support both given names (called Christian names, -irrespective of one's religion) and family names (called surnames), plus -nicknames and titles. If users of your Person class have been properly -accessing it through its documented interface, then you can easily change -the underlying implementation. If they haven't, then they lose and -it's their fault for breaking the contract and voiding their warranty. - -To do this, we'll make another class, this one called Fullname. What's -the Fullname class look like? To answer that question, you have to -first figure out how you want to use it. How about we use it this way: - - $him = Person->new(); - $him->fullname->title("St"); - $him->fullname->christian("Thomas"); - $him->fullname->surname("Aquinas"); - $him->fullname->nickname("Tommy"); - printf "His normal name is %s\n", $him->name; - printf "But his real name is %s\n", $him->fullname->as_string; - -Ok. To do this, we'll change Person::new() so that it supports -a full name field this way: - - sub new { - my $class = shift; - my $self = {}; - $self->{FULLNAME} = Fullname->new(); - $self->{AGE} = undef; - $self->{PEERS} = []; - $self->{"_CENSUS"} = \$Census; - bless ($self, $class); - ++ ${ $self->{"_CENSUS"} }; - return $self; - } - - sub fullname { - my $self = shift; - return $self->{FULLNAME}; - } - -Then to support old code, define Person::name() this way: - - sub name { - my $self = shift; - return $self->{FULLNAME}->nickname(@_) - || $self->{FULLNAME}->christian(@_); - } - -Here's the Fullname class. We'll use the same technique -of using a hash reference to hold data fields, and methods -by the appropriate name to access them: - - package Fullname; - use strict; - - sub new { - my $class = shift; - my $self = { - TITLE => undef, - CHRISTIAN => undef, - SURNAME => undef, - NICK => undef, - }; - bless ($self, $class); - return $self; - } - - sub christian { - my $self = shift; - if (@_) { $self->{CHRISTIAN} = shift } - return $self->{CHRISTIAN}; - } - - sub surname { - my $self = shift; - if (@_) { $self->{SURNAME} = shift } - return $self->{SURNAME}; - } - - sub nickname { - my $self = shift; - if (@_) { $self->{NICK} = shift } - return $self->{NICK}; - } - - sub title { - my $self = shift; - if (@_) { $self->{TITLE} = shift } - return $self->{TITLE}; - } - - sub as_string { - my $self = shift; - my $name = join(" ", @$self{'CHRISTIAN', 'SURNAME'}); - if ($self->{TITLE}) { - $name = $self->{TITLE} . " " . $name; - } - return $name; - } - - 1; - -Finally, here's the test program: - - #!/usr/bin/perl -w - use strict; - use Person; - sub END { show_census() } - - sub show_census () { - printf "Current population: %d\n", Person->population; - } - - Person->debug(1); - - show_census(); - - my $him = Person->new(); - - $him->fullname->christian("Thomas"); - $him->fullname->surname("Aquinas"); - $him->fullname->nickname("Tommy"); - $him->fullname->title("St"); - $him->age(1); - - printf "%s is really %s.\n", $him->name, $him->fullname->as_string; - printf "%s's age: %d.\n", $him->name, $him->age; - $him->happy_birthday; - printf "%s's age: %d.\n", $him->name, $him->age; - - show_census(); - -=head1 Inheritance - -Object-oriented programming systems all support some notion of -inheritance. Inheritance means allowing one class to piggy-back on -top of another one so you don't have to write the same code again and -again. It's about software reuse, and therefore related to Laziness, -the principal virtue of a programmer. (The import/export mechanisms in -traditional modules are also a form of code reuse, but a simpler one than -the true inheritance that you find in object modules.) - -Sometimes the syntax of inheritance is built into the core of the -language, and sometimes it's not. Perl has no special syntax for -specifying the class (or classes) to inherit from. Instead, it's all -strictly in the semantics. Each package can have a variable called @ISA, -which governs (method) inheritance. If you try to call a method on an -object or class, and that method is not found in that object's package, -Perl then looks to @ISA for other packages to go looking through in -search of the missing method. - -Like the special per-package variables recognized by Exporter (such as -@EXPORT, @EXPORT_OK, @EXPORT_FAIL, %EXPORT_TAGS, and $VERSION), the @ISA -array I be a package-scoped global and not a file-scoped lexical -created via my(). Most classes have just one item in their @ISA array. -In this case, we have what's called "single inheritance", or SI for short. - -Consider this class: - - package Employee; - use Person; - @ISA = ("Person"); - 1; - -Not a lot to it, eh? All it's doing so far is loading in another -class and stating that this one will inherit methods from that -other class if need be. We have given it none of its own methods. -We rely upon an Employee to behave just like a Person. - -Setting up an empty class like this is called the "empty subclass test"; -that is, making a derived class that does nothing but inherit from a -base class. If the original base class has been designed properly, -then the new derived class can be used as a drop-in replacement for the -old one. This means you should be able to write a program like this: - - use Employee; - my $empl = Employee->new(); - $empl->name("Jason"); - $empl->age(23); - printf "%s is age %d.\n", $empl->name, $empl->age; - -By proper design, we mean always using the two-argument form of bless(), -avoiding direct access of global data, and not exporting anything. If you -look back at the Person::new() function we defined above, we were careful -to do that. There's a bit of package data used in the constructor, -but the reference to this is stored on the object itself and all other -methods access package data via that reference, so we should be ok. - -What do we mean by the Person::new() function? Isn't that actually -a method? Well, in principle, yes. A method is just a function that -expects as its first argument a class name (package) or object -(blessed reference). Person::new() is the function that both the -C<< Person->new() >> method and the C<< Employee->new() >> method end -up calling. Understand that while a method call looks a lot like a -function call, they aren't really quite the same, and if you treat them -as the same, you'll very soon be left with nothing but broken programs. -First, the actual underlying calling conventions are different: method -calls get an extra argument. Second, function calls don't do inheritance, -but methods do. - - Method Call Resulting Function Call - ----------- ------------------------ - Person->new() Person::new("Person") - Employee->new() Person::new("Employee") - -So don't use function calls when you mean to call a method. - -If an employee is just a Person, that's not all too very interesting. -So let's add some other methods. We'll give our employee -data fields to access their salary, their employee ID, and their -start date. - -If you're getting a little tired of creating all these nearly identical -methods just to get at the object's data, do not despair. Later, -we'll describe several different convenience mechanisms for shortening -this up. Meanwhile, here's the straight-forward way: - - sub salary { - my $self = shift; - if (@_) { $self->{SALARY} = shift } - return $self->{SALARY}; - } - - sub id_number { - my $self = shift; - if (@_) { $self->{ID} = shift } - return $self->{ID}; - } - - sub start_date { - my $self = shift; - if (@_) { $self->{START_DATE} = shift } - return $self->{START_DATE}; - } - -=head2 Overridden Methods - -What happens when both a derived class and its base class have the same -method defined? Well, then you get the derived class's version of that -method. For example, let's say that we want the peers() method called on -an employee to act a bit differently. Instead of just returning the list -of peer names, let's return slightly different strings. So doing this: - - $empl->peers("Peter", "Paul", "Mary"); - printf "His peers are: %s\n", join(", ", $empl->peers); - -will produce: - - His peers are: PEON=PETER, PEON=PAUL, PEON=MARY - -To do this, merely add this definition into the Employee.pm file: - - sub peers { - my $self = shift; - if (@_) { @{ $self->{PEERS} } = @_ } - return map { "PEON=\U$_" } @{ $self->{PEERS} }; - } - -There, we've just demonstrated the high-falutin' concept known in certain -circles as I. We've taken on the form and behaviour of -an existing object, and then we've altered it to suit our own purposes. -This is a form of Laziness. (Getting polymorphed is also what happens -when the wizard decides you'd look better as a frog.) - -Every now and then you'll want to have a method call trigger both its -derived class (also known as "subclass") version as well as its base class -(also known as "superclass") version. In practice, constructors and -destructors are likely to want to do this, and it probably also makes -sense in the debug() method we showed previously. - -To do this, add this to Employee.pm: - - use Carp; - my $Debugging = 0; - - sub debug { - my $self = shift; - confess "usage: thing->debug(level)" unless @_ == 1; - my $level = shift; - if (ref($self)) { - $self->{"_DEBUG"} = $level; - } else { - $Debugging = $level; # whole class - } - Person::debug($self, $Debugging); # don't really do this - } - -As you see, we turn around and call the Person package's debug() function. -But this is far too fragile for good design. What if Person doesn't -have a debug() function, but is inheriting I debug() method -from elsewhere? It would have been slightly better to say - - Person->debug($Debugging); - -But even that's got too much hard-coded. It's somewhat better to say - - $self->Person::debug($Debugging); - -Which is a funny way to say to start looking for a debug() method up -in Person. This strategy is more often seen on overridden object methods -than on overridden class methods. - -There is still something a bit off here. We've hard-coded our -superclass's name. This in particular is bad if you change which classes -you inherit from, or add others. Fortunately, the pseudoclass SUPER -comes to the rescue here. - - $self->SUPER::debug($Debugging); - -This way it starts looking in my class's @ISA. This only makes sense -from I a method call, though. Don't try to access anything -in SUPER:: from anywhere else, because it doesn't exist outside -an overridden method call. Note that C refers to the superclass of -the current package, I to the superclass of C<$self>. - -Things are getting a bit complicated here. Have we done anything -we shouldn't? As before, one way to test whether we're designing -a decent class is via the empty subclass test. Since we already have -an Employee class that we're trying to check, we'd better get a new -empty subclass that can derive from Employee. Here's one: - - package Boss; - use Employee; # :-) - @ISA = qw(Employee); - -And here's the test program: - - #!/usr/bin/perl -w - use strict; - use Boss; - Boss->debug(1); - - my $boss = Boss->new(); - - $boss->fullname->title("Don"); - $boss->fullname->surname("Pichon Alvarez"); - $boss->fullname->christian("Federico Jesus"); - $boss->fullname->nickname("Fred"); - - $boss->age(47); - $boss->peers("Frank", "Felipe", "Faust"); - - printf "%s is age %d.\n", $boss->fullname->as_string, $boss->age; - printf "His peers are: %s\n", join(", ", $boss->peers); - -Running it, we see that we're still ok. If you'd like to dump out your -object in a nice format, somewhat like the way the 'x' command works in -the debugger, you could use the Data::Dumper module from CPAN this way: - - use Data::Dumper; - print "Here's the boss:\n"; - print Dumper($boss); - -Which shows us something like this: - - Here's the boss: - $VAR1 = bless( { - _CENSUS => \1, - FULLNAME => bless( { - TITLE => 'Don', - SURNAME => 'Pichon Alvarez', - NICK => 'Fred', - CHRISTIAN => 'Federico Jesus' - }, 'Fullname' ), - AGE => 47, - PEERS => [ - 'Frank', - 'Felipe', - 'Faust' - ] - }, 'Boss' ); - -Hm.... something's missing there. What about the salary, start date, -and ID fields? Well, we never set them to anything, even undef, so they -don't show up in the hash's keys. The Employee class has no new() method -of its own, and the new() method in Person doesn't know about Employees. -(Nor should it: proper OO design dictates that a subclass be allowed to -know about its immediate superclass, but never vice-versa.) So let's -fix up Employee::new() this way: - - sub new { - my $class = shift; - my $self = $class->SUPER::new(); - $self->{SALARY} = undef; - $self->{ID} = undef; - $self->{START_DATE} = undef; - bless ($self, $class); # reconsecrate - return $self; - } - -Now if you dump out an Employee or Boss object, you'll find -that new fields show up there now. - -=head2 Multiple Inheritance - -Ok, at the risk of confusing beginners and annoying OO gurus, it's -time to confess that Perl's object system includes that controversial -notion known as multiple inheritance, or MI for short. All this means -is that rather than having just one parent class who in turn might -itself have a parent class, etc., that you can directly inherit from -two or more parents. It's true that some uses of MI can get you into -trouble, although hopefully not quite so much trouble with Perl as with -dubiously-OO languages like C++. - -The way it works is actually pretty simple: just put more than one package -name in your @ISA array. When it comes time for Perl to go finding -methods for your object, it looks at each of these packages in order. -Well, kinda. It's actually a fully recursive, depth-first order by -default (see L for alternate method resolution orders). -Consider a bunch of @ISA arrays like this: - - @First::ISA = qw( Alpha ); - @Second::ISA = qw( Beta ); - @Third::ISA = qw( First Second ); - -If you have an object of class Third: - - my $ob = Third->new(); - $ob->spin(); - -How do we find a spin() method (or a new() method for that matter)? -Because the search is depth-first, classes will be looked up -in the following order: Third, First, Alpha, Second, and Beta. - -In practice, few class modules have been seen that actually -make use of MI. One nearly always chooses simple containership of -one class within another over MI. That's why our Person -object I a Fullname object. That doesn't mean -it I one. - -However, there is one particular area where MI in Perl is rampant: -borrowing another class's class methods. This is rather common, -especially with some bundled "objectless" classes, -like Exporter, DynaLoader, AutoLoader, and SelfLoader. These classes -do not provide constructors; they exist only so you may inherit their -class methods. (It's not entirely clear why inheritance was done -here rather than traditional module importation.) - -For example, here is the POSIX module's @ISA: - - package POSIX; - @ISA = qw(Exporter DynaLoader); - -The POSIX module isn't really an object module, but then, -neither are Exporter or DynaLoader. They're just lending their -classes' behaviours to POSIX. - -Why don't people use MI for object methods much? One reason is that -it can have complicated side-effects. For one thing, your inheritance -graph (no longer a tree) might converge back to the same base class. -Although Perl guards against recursive inheritance, merely having parents -who are related to each other via a common ancestor, incestuous though -it sounds, is not forbidden. What if in our Third class shown above we -wanted its new() method to also call both overridden constructors in its -two parent classes? The SUPER notation would only find the first one. -Also, what about if the Alpha and Beta classes both had a common ancestor, -like Nought? If you kept climbing up the inheritance tree calling -overridden methods, you'd end up calling Nought::new() twice, -which might well be a bad idea. - -=head2 UNIVERSAL: The Root of All Objects - -Wouldn't it be convenient if all objects were rooted at some ultimate -base class? That way you could give every object common methods without -having to go and add it to each and every @ISA. Well, it turns out that -you can. You don't see it, but Perl tacitly and irrevocably assumes -that there's an extra element at the end of @ISA: the class UNIVERSAL. -In version 5.003, there were no predefined methods there, but you could put -whatever you felt like into it. - -However, as of version 5.004 (or some subversive releases, like 5.003_08), -UNIVERSAL has some methods in it already. These are builtin to your Perl -binary, so they don't take any extra time to load. Predefined methods -include isa(), can(), and VERSION(). isa() tells you whether an object or -class "is" another one without having to traverse the hierarchy yourself: - - $has_io = $fd->isa("IO::Handle"); - $itza_handle = IO::Socket->isa("IO::Handle"); - -The can() method, called against that object or class, reports back -whether its string argument is a callable method name in that class. -In fact, it gives you back a function reference to that method: - - $his_print_method = $obj->can('as_string'); - -Finally, the VERSION method checks whether the class (or the object's -class) has a package global called $VERSION that's high enough, as in: - - Some_Module->VERSION(3.0); - $his_vers = $ob->VERSION(); - -However, we don't usually call VERSION ourselves. (Remember that an all -uppercase function name is a Perl convention that indicates that the -function will be automatically used by Perl in some way.) In this case, -it happens when you say - - use Some_Module 3.0; - -If you wanted to add version checking to your Person class explained -above, just add this to Person.pm: - - our $VERSION = '1.1'; - -and then in Employee.pm you can say - - use Person 1.1; - -And it would make sure that you have at least that version number or -higher available. This is not the same as loading in that exact version -number. No mechanism currently exists for concurrent installation of -multiple versions of a module. Lamentably. - -=head2 Deeper UNIVERSAL details - -It is also valid (though perhaps unwise in most cases) to put other -packages' names in @UNIVERSAL::ISA. These packages will also be -implicitly inherited by all classes, just as UNIVERSAL itself is. -However, neither UNIVERSAL nor any of its parents from the @ISA tree -are explicit base classes of all objects. To clarify, given the -following: - - @UNIVERSAL::ISA = ('REALLYUNIVERSAL'); - - package REALLYUNIVERSAL; - sub special_method { return "123" } - - package Foo; - sub normal_method { return "321" } - -Calling Foo->special_method() will return "123", but calling -Foo->isa('REALLYUNIVERSAL') or Foo->isa('UNIVERSAL') will return -false. - -If your class is using an alternate mro like C3 (see -L), method resolution within UNIVERSAL / @UNIVERSAL::ISA will -still occur in the default depth-first left-to-right manner, -after the class's C3 mro is exhausted. - -All of the above is made more intuitive by realizing what really -happens during method lookup, which is roughly like this -ugly pseudo-code: - - get_mro(class) { - # recurses down the @ISA's starting at class, - # builds a single linear array of all - # classes to search in the appropriate order. - # The method resolution order (mro) to use - # for the ordering is whichever mro "class" - # has set on it (either default (depth first - # l-to-r) or C3 ordering). - # The first entry in the list is the class - # itself. - } - - find_method(class, methname) { - foreach $class (get_mro(class)) { - if($class->has_method(methname)) { - return ref_to($class->$methname); - } - } - foreach $class (get_mro(UNIVERSAL)) { - if($class->has_method(methname)) { - return ref_to($class->$methname); - } - } - return undef; - } - -However the code that implements UNIVERSAL::isa does not -search in UNIVERSAL itself, only in the package's actual -@ISA. - -=head1 Alternate Object Representations - -Nothing requires objects to be implemented as hash references. An object -can be any sort of reference so long as its referent has been suitably -blessed. That means scalar, array, and code references are also fair -game. - -A scalar would work if the object has only one datum to hold. An array -would work for most cases, but makes inheritance a bit dodgy because -you have to invent new indices for the derived classes. - -=head2 Arrays as Objects - -If the user of your class honors the contract and sticks to the advertised -interface, then you can change its underlying interface if you feel -like it. Here's another implementation that conforms to the same -interface specification. This time we'll use an array reference -instead of a hash reference to represent the object. - - package Person; - use strict; - - my($NAME, $AGE, $PEERS) = ( 0 .. 2 ); - - ############################################ - ## the object constructor (array version) ## - ############################################ - sub new { - my $self = []; - $self->[$NAME] = undef; # this is unnecessary - $self->[$AGE] = undef; # as is this - $self->[$PEERS] = []; # but this isn't, really - bless($self); - return $self; - } - - sub name { - my $self = shift; - if (@_) { $self->[$NAME] = shift } - return $self->[$NAME]; - } - - sub age { - my $self = shift; - if (@_) { $self->[$AGE] = shift } - return $self->[$AGE]; - } - - sub peers { - my $self = shift; - if (@_) { @{ $self->[$PEERS] } = @_ } - return @{ $self->[$PEERS] }; - } - - 1; # so the require or use succeeds - -You might guess that the array access would be a lot faster than the -hash access, but they're actually comparable. The array is a I -bit faster, but not more than ten or fifteen percent, even when you -replace the variables above like $AGE with literal numbers, like 1. -A bigger difference between the two approaches can be found in memory use. -A hash representation takes up more memory than an array representation -because you have to allocate memory for the keys as well as for the values. -However, it really isn't that bad, especially since as of version 5.004, -memory is only allocated once for a given hash key, no matter how many -hashes have that key. It's expected that sometime in the future, even -these differences will fade into obscurity as more efficient underlying -representations are devised. - -Still, the tiny edge in speed (and somewhat larger one in memory) -is enough to make some programmers choose an array representation -for simple classes. There's still a little problem with -scalability, though, because later in life when you feel -like creating subclasses, you'll find that hashes just work -out better. - -=head2 Closures as Objects - -Using a code reference to represent an object offers some fascinating -possibilities. We can create a new anonymous function (closure) who -alone in all the world can see the object's data. This is because we -put the data into an anonymous hash that's lexically visible only to -the closure we create, bless, and return as the object. This object's -methods turn around and call the closure as a regular subroutine call, -passing it the field we want to affect. (Yes, -the double-function call is slow, but if you wanted fast, you wouldn't -be using objects at all, eh? :-) - -Use would be similar to before: - - use Person; - $him = Person->new(); - $him->name("Jason"); - $him->age(23); - $him->peers( [ "Norbert", "Rhys", "Phineas" ] ); - printf "%s is %d years old.\n", $him->name, $him->age; - print "His peers are: ", join(", ", @{$him->peers}), "\n"; - -but the implementation would be radically, perhaps even sublimely -different: - - package Person; - - sub new { - my $class = shift; - my $self = { - NAME => undef, - AGE => undef, - PEERS => [], - }; - my $closure = sub { - my $field = shift; - if (@_) { $self->{$field} = shift } - return $self->{$field}; - }; - bless($closure, $class); - return $closure; - } - - sub name { &{ $_[0] }("NAME", @_[ 1 .. $#_ ] ) } - sub age { &{ $_[0] }("AGE", @_[ 1 .. $#_ ] ) } - sub peers { &{ $_[0] }("PEERS", @_[ 1 .. $#_ ] ) } - - 1; - -Because this object is hidden behind a code reference, it's probably a bit -mysterious to those whose background is more firmly rooted in standard -procedural or object-based programming languages than in functional -programming languages whence closures derive. The object -created and returned by the new() method is itself not a data reference -as we've seen before. It's an anonymous code reference that has within -it access to a specific version (lexical binding and instantiation) -of the object's data, which are stored in the private variable $self. -Although this is the same function each time, it contains a different -version of $self. - -When a method like C<$him-Ename("Jason")> is called, its implicit -zeroth argument is the invoking object--just as it is with all method -calls. But in this case, it's our code reference (something like a -function pointer in C++, but with deep binding of lexical variables). -There's not a lot to be done with a code reference beyond calling it, so -that's just what we do when we say C<&{$_[0]}>. This is just a regular -function call, not a method call. The initial argument is the string -"NAME", and any remaining arguments are whatever had been passed to the -method itself. - -Once we're executing inside the closure that had been created in new(), -the $self hash reference suddenly becomes visible. The closure grabs -its first argument ("NAME" in this case because that's what the name() -method passed it), and uses that string to subscript into the private -hash hidden in its unique version of $self. - -Nothing under the sun will allow anyone outside the executing method to -be able to get at this hidden data. Well, nearly nothing. You I -single step through the program using the debugger and find out the -pieces while you're in the method, but everyone else is out of luck. - -There, if that doesn't excite the Scheme folks, then I just don't know -what will. Translation of this technique into C++, Java, or any other -braindead-static language is left as a futile exercise for aficionados -of those camps. - -You could even add a bit of nosiness via the caller() function and -make the closure refuse to operate unless called via its own package. -This would no doubt satisfy certain fastidious concerns of programming -police and related puritans. - -If you were wondering when Hubris, the third principle virtue of a -programmer, would come into play, here you have it. (More seriously, -Hubris is just the pride in craftsmanship that comes from having written -a sound bit of well-designed code.) - -=head1 AUTOLOAD: Proxy Methods - -Autoloading is a way to intercept calls to undefined methods. An autoload -routine may choose to create a new function on the fly, either loaded -from disk or perhaps just eval()ed right there. This define-on-the-fly -strategy is why it's called autoloading. - -But that's only one possible approach. Another one is to just -have the autoloaded method itself directly provide the -requested service. When used in this way, you may think -of autoloaded methods as "proxy" methods. - -When Perl tries to call an undefined function in a particular package -and that function is not defined, it looks for a function in -that same package called AUTOLOAD. If one exists, it's called -with the same arguments as the original function would have had. -The fully-qualified name of the function is stored in that package's -global variable $AUTOLOAD. Once called, the function can do anything -it would like, including defining a new function by the right name, and -then doing a really fancy kind of C right to it, erasing itself -from the call stack. - -What does this have to do with objects? After all, we keep talking about -functions, not methods. Well, since a method is just a function with -an extra argument and some fancier semantics about where it's found, -we can use autoloading for methods, too. Perl doesn't start looking -for an AUTOLOAD method until it has exhausted the recursive hunt up -through @ISA, though. Some programmers have even been known to define -a UNIVERSAL::AUTOLOAD method to trap unresolved method calls to any -kind of object. - -=head2 Autoloaded Data Methods - -You probably began to get a little suspicious about the duplicated -code way back earlier when we first showed you the Person class, and -then later the Employee class. Each method used to access the -hash fields looked virtually identical. This should have tickled -that great programming virtue, Impatience, but for the time, -we let Laziness win out, and so did nothing. Proxy methods can cure -this. - -Instead of writing a new function every time we want a new data field, -we'll use the autoload mechanism to generate (actually, mimic) methods on -the fly. To verify that we're accessing a valid member, we will check -against an C<_permitted> (pronounced "under-permitted") field, which -is a reference to a file-scoped lexical (like a C file static) hash of permitted fields in this record -called %fields. Why the underscore? For the same reason as the _CENSUS -field we once used: as a marker that means "for internal use only". - -Here's what the module initialization code and class -constructor will look like when taking this approach: - - package Person; - use Carp; - our $AUTOLOAD; # it's a package global - - my %fields = ( - name => undef, - age => undef, - peers => undef, - ); - - sub new { - my $class = shift; - my $self = { - _permitted => \%fields, - %fields, - }; - bless $self, $class; - return $self; - } - -If we wanted our record to have default values, we could fill those in -where current we have C in the %fields hash. - -Notice how we saved a reference to our class data on the object itself? -Remember that it's important to access class data through the object -itself instead of having any method reference %fields directly, or else -you won't have a decent inheritance. - -The real magic, though, is going to reside in our proxy method, which -will handle all calls to undefined methods for objects of class Person -(or subclasses of Person). It has to be called AUTOLOAD. Again, it's -all caps because it's called for us implicitly by Perl itself, not by -a user directly. - - sub AUTOLOAD { - my $self = shift; - my $type = ref($self) - or croak "$self is not an object"; - - my $name = $AUTOLOAD; - $name =~ s/.*://; # strip fully-qualified portion - - unless (exists $self->{_permitted}->{$name} ) { - croak "Can't access `$name' field in class $type"; - } - - if (@_) { - return $self->{$name} = shift; - } else { - return $self->{$name}; - } - } - -Pretty nifty, eh? All we have to do to add new data fields -is modify %fields. No new functions need be written. - -I could have avoided the C<_permitted> field entirely, but I -wanted to demonstrate how to store a reference to class data on the -object so you wouldn't have to access that class data -directly from an object method. - -=head2 Inherited Autoloaded Data Methods - -But what about inheritance? Can we define our Employee -class similarly? Yes, so long as we're careful enough. - -Here's how to be careful: - - package Employee; - use Person; - use strict; - our @ISA = qw(Person); - - my %fields = ( - id => undef, - salary => undef, - ); - - sub new { - my $class = shift; - my $self = $class->SUPER::new(); - my($element); - foreach $element (keys %fields) { - $self->{_permitted}->{$element} = $fields{$element}; - } - @{$self}{keys %fields} = values %fields; - return $self; - } - -Once we've done this, we don't even need to have an -AUTOLOAD function in the Employee package, because -we'll grab Person's version of that via inheritance, -and it will all work out just fine. - -=head1 Metaclassical Tools - -Even though proxy methods can provide a more convenient approach to making -more struct-like classes than tediously coding up data methods as -functions, it still leaves a bit to be desired. For one thing, it means -you have to handle bogus calls that you don't mean to trap via your proxy. -It also means you have to be quite careful when dealing with inheritance, -as detailed above. - -Perl programmers have responded to this by creating several different -class construction classes. These metaclasses are classes -that create other classes. A couple worth looking at are -Class::Struct and Alias. These and other related metaclasses can be -found in the modules directory on CPAN. - -=head2 Class::Struct - -One of the older ones is Class::Struct. In fact, its syntax and -interface were sketched out long before perl5 even solidified into a -real thing. What it does is provide you a way to "declare" a class -as having objects whose fields are of a specific type. The function -that does this is called, not surprisingly enough, struct(). Because -structures or records are not base types in Perl, each time you want to -create a class to provide a record-like data object, you yourself have -to define a new() method, plus separate data-access methods for each of -that record's fields. You'll quickly become bored with this process. -The Class::Struct::struct() function alleviates this tedium. - -Here's a simple example of using it: - - use Class::Struct qw(struct); - use Jobbie; # user-defined; see below - - struct 'Fred' => { - one => '$', - many => '@', - profession => 'Jobbie', # does not call Jobbie->new() - }; - - $ob = Fred->new(profession => Jobbie->new()); - $ob->one("hmmmm"); - - $ob->many(0, "here"); - $ob->many(1, "you"); - $ob->many(2, "go"); - print "Just set: ", $ob->many(2), "\n"; - - $ob->profession->salary(10_000); - -You can declare types in the struct to be basic Perl types, or -user-defined types (classes). User types will be initialized by calling -that class's new() method. - -Take care that the C object is not created automatically by the -C class's new() method, so you should specify a C object -when you create an instance of C. - -Here's a real-world example of using struct generation. Let's say you -wanted to override Perl's idea of gethostbyname() and gethostbyaddr() so -that they would return objects that acted like C structures. We don't -care about high-falutin' OO gunk. All we want is for these objects to -act like structs in the C sense. - - use Socket; - use Net::hostent; - $h = gethostbyname("perl.com"); # object return - printf "perl.com's real name is %s, address %s\n", - $h->name, inet_ntoa($h->addr); - -Here's how to do this using the Class::Struct module. -The crux is going to be this call: - - struct 'Net::hostent' => [ # note bracket - name => '$', - aliases => '@', - addrtype => '$', - 'length' => '$', - addr_list => '@', - ]; - -Which creates object methods of those names and types. -It even creates a new() method for us. - -We could also have implemented our object this way: - - struct 'Net::hostent' => { # note brace - name => '$', - aliases => '@', - addrtype => '$', - 'length' => '$', - addr_list => '@', - }; - -and then Class::Struct would have used an anonymous hash as the object -type, instead of an anonymous array. The array is faster and smaller, -but the hash works out better if you eventually want to do inheritance. -Since for this struct-like object we aren't planning on inheritance, -this time we'll opt for better speed and size over better flexibility. - -Here's the whole implementation: - - package Net::hostent; - use strict; - - BEGIN { - use Exporter (); - our @EXPORT = qw(gethostbyname gethostbyaddr gethost); - our @EXPORT_OK = qw( - $h_name @h_aliases - $h_addrtype $h_length - @h_addr_list $h_addr - ); - our %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); - } - our @EXPORT_OK; - - # Class::Struct forbids use of @ISA - sub import { goto &Exporter::import } - - use Class::Struct qw(struct); - struct 'Net::hostent' => [ - name => '$', - aliases => '@', - addrtype => '$', - 'length' => '$', - addr_list => '@', - ]; - - sub addr { shift->addr_list->[0] } - - sub populate (@) { - return unless @_; - my $hob = new(); # Class::Struct made this! - $h_name = $hob->[0] = $_[0]; - @h_aliases = @{ $hob->[1] } = split ' ', $_[1]; - $h_addrtype = $hob->[2] = $_[2]; - $h_length = $hob->[3] = $_[3]; - $h_addr = $_[4]; - @h_addr_list = @{ $hob->[4] } = @_[ (4 .. $#_) ]; - return $hob; - } - - sub gethostbyname ($) { populate(CORE::gethostbyname(shift)) } - - sub gethostbyaddr ($;$) { - my ($addr, $addrtype); - $addr = shift; - require Socket unless @_; - $addrtype = @_ ? shift : Socket::AF_INET(); - populate(CORE::gethostbyaddr($addr, $addrtype)) - } - - sub gethost($) { - if ($_[0] =~ /^\d+(?:\.\d+(?:\.\d+(?:\.\d+)?)?)?$/) { - require Socket; - &gethostbyaddr(Socket::inet_aton(shift)); - } else { - &gethostbyname; - } - } - - 1; - -We've snuck in quite a fair bit of other concepts besides just dynamic -class creation, like overriding core functions, import/export bits, -function prototyping, short-cut function call via C<&whatever>, and -function replacement with C. These all mostly make -sense from the perspective of a traditional module, but as you can see, -we can also use them in an object module. - -You can look at other object-based, struct-like overrides of core -functions in the 5.004 release of Perl in File::stat, Net::hostent, -Net::netent, Net::protoent, Net::servent, Time::gmtime, Time::localtime, -User::grent, and User::pwent. These modules have a final component -that's all lowercase, by convention reserved for compiler pragmas, -because they affect the compilation and change a builtin function. -They also have the type names that a C programmer would most expect. - -=head2 Data Members as Variables - -If you're used to C++ objects, then you're accustomed to being able to -get at an object's data members as simple variables from within a method. -The Alias module provides for this, as well as a good bit more, such -as the possibility of private methods that the object can call but folks -outside the class cannot. - -Here's an example of creating a Person using the Alias module. -When you update these magical instance variables, you automatically -update value fields in the hash. Convenient, eh? - - package Person; - - # this is the same as before... - sub new { - my $class = shift; - my $self = { - NAME => undef, - AGE => undef, - PEERS => [], - }; - bless($self, $class); - return $self; - } - - use Alias qw(attr); - our ($NAME, $AGE, $PEERS); - - sub name { - my $self = attr shift; - if (@_) { $NAME = shift; } - return $NAME; - } - - sub age { - my $self = attr shift; - if (@_) { $AGE = shift; } - return $AGE; - } - - sub peers { - my $self = attr shift; - if (@_) { @PEERS = @_; } - return @PEERS; - } - - sub exclaim { - my $self = attr shift; - return sprintf "Hi, I'm %s, age %d, working with %s", - $NAME, $AGE, join(", ", @PEERS); - } - - sub happy_birthday { - my $self = attr shift; - return ++$AGE; - } - -The need for the C declaration is because what Alias does -is play with package globals with the same name as the fields. To use -globals while C is in effect, you have to predeclare them. -These package variables are localized to the block enclosing the attr() -call just as if you'd used a local() on them. However, that means that -they're still considered global variables with temporary values, just -as with any other local(). - -It would be nice to combine Alias with -something like Class::Struct or Class::MethodMaker. - -=head1 NOTES - -=head2 Object Terminology - -In the various OO literature, it seems that a lot of different words -are used to describe only a few different concepts. If you're not -already an object programmer, then you don't need to worry about all -these fancy words. But if you are, then you might like to know how to -get at the same concepts in Perl. - -For example, it's common to call an object an I of a class -and to call those objects' methods I. Data fields -peculiar to each object are often called I or I, and data fields common to all members of that class are -I, I, or I. - -Also, I, I, and I all describe -the same notion, whereas I, I, and -I describe the other related one. - -C++ programmers have I and I, -but Perl only has I and I. -Actually, Perl only has methods. Whether a method gets used -as a class or object method is by usage only. You could accidentally -call a class method (one expecting a string argument) on an -object (one expecting a reference), or vice versa. - -From the C++ perspective, all methods in Perl are virtual. -This, by the way, is why they are never checked for function -prototypes in the argument list as regular builtin and user-defined -functions can be. - -Because a class is itself something of an object, Perl's classes can be -taken as describing both a "class as meta-object" (also called I) philosophy and the "class as type definition" (I -behaviour, not I mechanism) idea. C++ supports the latter -notion, but not the former. - -=head1 SEE ALSO - -The following manpages will doubtless provide more -background for this one: -L, -L, -L, -L, -L, -and -L. - -L is a kinder, gentler introduction to object-oriented -programming. - -L provides more detail on class data. - -Some modules which might prove interesting are Class::Accessor, -Class::Class, Class::Contract, Class::Data::Inheritable, -Class::MethodMaker and Tie::SecureHash - - -=head1 AUTHOR AND COPYRIGHT - -Copyright (c) 1997, 1998 Tom Christiansen -All rights reserved. - -This documentation is free; you can redistribute it and/or modify it -under the same terms as Perl itself. - -Irrespective of its distribution, all code examples in this file -are hereby placed into the public domain. You are permitted and -encouraged to use this code in your own programs for fun -or for profit as you see fit. A simple comment in the code giving -credit would be courteous but is not required. - -=head1 COPYRIGHT - -=head2 Acknowledgments +For information on OO programming with Perl, please see L +and L. -Thanks to -Larry Wall, -Roderick Schertler, -Gurusamy Sarathy, -Dean Roehrich, -Raphael Manfredi, -Brent Halsey, -Greg Bacon, -Brad Appleton, -and many others for their helpful comments. +=cut diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 890909d5261..05f3c294ea9 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -603,6 +603,12 @@ X<%^H> The C<%^H> hash provides the same scoping semantic as C<$^H>. This makes it useful for implementation of lexically scoped pragmas. See L. +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 +name of its main package) and a "/" character. For example, a module +C should use keys such as C. + This variable was added in Perl 5.6. =item @INC @@ -697,7 +703,7 @@ An internal variable used by 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 variable was added in Perl 5.8.2. +This variable was added in Perl 5.8.0. =item $PERLDB @@ -2071,25 +2077,17 @@ Removed in Perl 5.10. =item $[ X<$[> X<$ARRAY_BASE> -This variable stores the index of the first element in an array, and -of the first character in a substring. The default is 0, but you could -theoretically set it to 1 to make Perl behave more like B (or Fortran) -when subscripting and when evaluating the index() and substr() functions. - -As of release 5 of Perl, assignment to C<$[> is treated as a compiler -directive, and cannot influence the behavior of any other file. -(That's why you can only assign compile-time constants to it.) -Its use is highly discouraged. - -Prior to Perl 5.10, assignment to C<$[> could be seen from outer lexical -scopes in the same file, unlike other compile-time directives (such as -L). Using local() on it would bind its value strictly to a lexical -block. Now it is always lexically scoped. - -Mnemonic: [ begins subscripts. +C<$[> was a variable that you could use to offset the indexing of arrays +and strings. After a deprecation cycle, the feature was removed in +Perl 5.16. Two old ways of coping with the variability of the index +offset, which were rendered obsolete in Perl 5.000 when C<$[> became +effectively lexically scoped, are still supported: you can read it +(always yielding zero) and you can assign zero to it. Deprecated in Perl 5.12. +Removed in Perl 5.16. + =item $OLD_PERL_VERSION =item $] diff --git a/pod/roffitall b/pod/roffitall index e9495a74ff0..d504c479779 100644 --- a/pod/roffitall +++ b/pod/roffitall @@ -37,8 +37,6 @@ toroff=` $mandir/perlapi.1 \ $mandir/perlapio.1 \ $mandir/perlbook.1 \ - $mandir/perlboot.1 \ - $mandir/perlbot.1 \ $mandir/perlcall.1 \ $mandir/perlcompile.1 \ $mandir/perldata.1 \ @@ -95,8 +93,6 @@ toroff=` $mandir/perltie.1 \ $mandir/perltoc.1 \ $mandir/perltodo.1 \ - $mandir/perltooc.1 \ - $mandir/perltoot.1 \ $mandir/perltrap.1 \ $mandir/perlunicode.1 \ $mandir/perlutil.1 \ diff --git a/pp.c b/pp.c index c732c5ba868..48774bdab61 100644 --- a/pp.c +++ b/pp.c @@ -155,12 +155,11 @@ static SV * S_rv2gv(pTHX_ SV *sv, const bool vivify_sv, const bool strict, const bool noinit) { - dSP; dVAR; + dVAR; if (!isGV(sv) || SvFAKE(sv)) SvGETMAGIC(sv); if (SvROK(sv)) { if (SvAMAGIC(sv)) { sv = amagic_deref_call(sv, to_gv_amg); - SPAGAIN; } wasref: sv = SvRV(sv); @@ -209,10 +208,8 @@ S_rv2gv(pTHX_ SV *sv, const bool vivify_sv, const bool strict, } if (noinit) { - STRLEN len; - const char * const nambeg = SvPV_nomg_const(sv, len); - if (!(sv = MUTABLE_SV(gv_fetchpvn_flags( - nambeg, len, SvUTF8(sv)|GV_ADDMG, SVt_PVGV + if (!(sv = MUTABLE_SV(gv_fetchsv_nomg( + sv, GV_ADDMG, SVt_PVGV )))) return &PL_sv_undef; } @@ -232,15 +229,7 @@ S_rv2gv(pTHX_ SV *sv, const bool vivify_sv, const bool strict, things. */ return sv; } - { - STRLEN len; - const char * const nambeg = SvPV_nomg_const(sv, len); - sv = MUTABLE_SV( - gv_fetchpvn_flags( - nambeg, len, GV_ADD | SvUTF8(sv), SVt_PVGV - ) - ); - } + sv = MUTABLE_SV(gv_fetchsv_nomg(sv, GV_ADD, SVt_PVGV)); } /* FAKE globs in the symbol table cause weird bugs (#77810) */ SvFAKE_off(sv); @@ -306,20 +295,14 @@ Perl_softref2xv(pTHX_ SV *const sv, const char *const what, if ((PL_op->op_flags & OPf_SPECIAL) && !(PL_op->op_flags & OPf_MOD)) { - STRLEN len; - const char * const nambeg = SvPV_nomg_const(sv, len); - if (!(gv = gv_fetchpvn_flags( - nambeg, len, SvUTF8(sv)|GV_ADDMG, type - ))) + if (!(gv = gv_fetchsv_nomg(sv, GV_ADDMG, type))) { **spp = &PL_sv_undef; return NULL; } } else { - STRLEN len; - const char * const nambeg = SvPV_nomg_const(sv, len); - gv = gv_fetchpvn_flags(nambeg, len, GV_ADD | SvUTF8(sv), type); + gv = gv_fetchsv_nomg(sv, GV_ADD, type); } return gv; } @@ -386,9 +369,7 @@ PP(pp_av2arylen) } SETs(*sv); } else { - SETs(sv_2mortal(newSViv( - AvFILL(MUTABLE_AV(av)) + CopARYBASE_get(PL_curcop) - ))); + SETs(sv_2mortal(newSViv(AvFILL(MUTABLE_AV(av))))); } RETURN; } @@ -413,7 +394,7 @@ PP(pp_pos) I32 i = mg->mg_len; if (DO_UTF8(sv)) sv_pos_b2u(sv, &i); - PUSHi(i + CopARYBASE_get(PL_curcop)); + PUSHi(i); RETURN; } } @@ -1070,68 +1051,33 @@ PP(pp_undef) RETPUSHUNDEF; } -PP(pp_predec) -{ - dVAR; dSP; - if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs)) - Perl_croak_no_modify(aTHX); - if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs) - && SvIVX(TOPs) != IV_MIN) - { - SvIV_set(TOPs, SvIVX(TOPs) - 1); - SvFLAGS(TOPs) &= ~(SVp_NOK|SVp_POK); - } - else - sv_dec(TOPs); - SvSETMAGIC(TOPs); - return NORMAL; -} - PP(pp_postinc) { dVAR; dSP; dTARGET; - if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs)) + const bool inc = + PL_op->op_type == OP_POSTINC || PL_op->op_type == OP_I_POSTINC; + if (SvTYPE(TOPs) >= SVt_PVAV || (isGV_with_GP(TOPs) && !SvFAKE(TOPs))) Perl_croak_no_modify(aTHX); if (SvROK(TOPs)) TARG = sv_newmortal(); sv_setsv(TARG, TOPs); if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs) - && SvIVX(TOPs) != IV_MAX) + && SvIVX(TOPs) != (inc ? IV_MAX : IV_MIN)) { - SvIV_set(TOPs, SvIVX(TOPs) + 1); + SvIV_set(TOPs, SvIVX(TOPs) + (inc ? 1 : -1)); SvFLAGS(TOPs) &= ~(SVp_NOK|SVp_POK); } - else + else if (inc) sv_inc_nomg(TOPs); + else sv_dec_nomg(TOPs); SvSETMAGIC(TOPs); /* special case for undef: see thread at 2003-03/msg00536.html in archive */ - if (!SvOK(TARG)) + if (inc && !SvOK(TARG)) sv_setiv(TARG, 0); SETs(TARG); return NORMAL; } -PP(pp_postdec) -{ - dVAR; dSP; dTARGET; - if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs)) - Perl_croak_no_modify(aTHX); - if (SvROK(TOPs)) - TARG = sv_newmortal(); - sv_setsv(TARG, TOPs); - if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs) - && SvIVX(TOPs) != IV_MIN) - { - SvIV_set(TOPs, SvIVX(TOPs) - 1); - SvFLAGS(TOPs) &= ~(SVp_NOK|SVp_POK); - } - else - sv_dec_nomg(TOPs); - SvSETMAGIC(TOPs); - SETs(TARG); - return NORMAL; -} - /* Ordinary operators. */ PP(pp_pow) @@ -3023,7 +2969,6 @@ PP(pp_substr) int len_is_uv = 1; const I32 lvalue = PL_op->op_flags & OPf_MOD || LVRET; const char *tmps; - const IV arybase = CopARYBASE_get(PL_curcop); SV *repl_sv = NULL; const char *repl = NULL; STRLEN repl_len; @@ -3069,32 +3014,12 @@ PP(pp_substr) else utf8_curlen = 0; - if ( (pos1_is_uv && arybase < 0) || (pos1_iv >= arybase) ) { /* pos >= $[ */ - UV pos1_uv = pos1_iv-arybase; - /* Overflow can occur when $[ < 0 */ - if (arybase < 0 && pos1_uv < (UV)pos1_iv) - goto bound_fail; - pos1_iv = pos1_uv; - pos1_is_uv = 1; - } - else if (pos1_is_uv ? (UV)pos1_iv > 0 : pos1_iv > 0) { - goto bound_fail; /* $[=3; substr($_,2,...) */ - } - else { /* pos < $[ */ - if (pos1_iv == 0) { /* $[=1; substr($_,0,...) */ - pos1_iv = curlen; - pos1_is_uv = 1; - } else { - if (curlen) { - pos1_is_uv = curlen-1 > ~(UV)pos1_iv; - pos1_iv += curlen; - } - } - } - if (pos1_is_uv || pos1_iv > 0) { - if ((UV)pos1_iv > curlen) - goto bound_fail; + if (!pos1_is_uv && pos1_iv < 0 && curlen) { + pos1_is_uv = curlen-1 > ~(UV)pos1_iv; + pos1_iv += curlen; } + if ((pos1_is_uv || pos1_iv > 0) && (UV)pos1_iv > curlen) + goto bound_fail; if (num_args > 2) { if (!len_is_uv && len_iv < 0) { @@ -3251,17 +3176,13 @@ PP(pp_index) I32 retval; const char *big_p; const char *little_p; - const I32 arybase = CopARYBASE_get(PL_curcop); bool big_utf8; bool little_utf8; const bool is_index = PL_op->op_type == OP_INDEX; const bool threeargs = MAXARG >= 3 && (TOPs || ((void)POPs,0)); - if (threeargs) { - /* arybase is in characters, like offset, so combine prior to the - UTF-8 to bytes calculation. */ - offset = POPi - arybase; - } + if (threeargs) + offset = POPi; little = POPs; big = POPs; big_p = SvPV_const(big, biglen); @@ -3356,7 +3277,7 @@ PP(pp_index) } SvREFCNT_dec(temp); fail: - PUSHi(retval + arybase); + PUSHi(retval); RETURN; } @@ -4395,7 +4316,6 @@ PP(pp_aslice) register const I32 lval = (PL_op->op_flags & OPf_MOD || LVRET); if (SvTYPE(av) == SVt_PVAV) { - const I32 arybase = CopARYBASE_get(PL_curcop); const bool localizing = PL_op->op_private & OPpLVAL_INTRO; bool can_preserve = FALSE; @@ -4423,8 +4343,6 @@ PP(pp_aslice) I32 elem = SvIV(*MARK); bool preeminent = TRUE; - if (elem > 0) - elem -= arybase; if (localizing && can_preserve) { /* If we can determine whether the element exist, * Try to preserve the existenceness of a tied array @@ -4510,7 +4428,7 @@ PP(pp_aeach) } EXTEND(SP, 2); - mPUSHi(CopARYBASE_get(PL_curcop) + current); + mPUSHi(current); if (gimme == G_ARRAY) { SV **const element = av_fetch(array, current, 0); PUSHs(element ? *element : &PL_sv_undef); @@ -4533,13 +4451,12 @@ PP(pp_akeys) } else if (gimme == G_ARRAY) { IV n = Perl_av_len(aTHX_ array); - IV i = CopARYBASE_get(PL_curcop); + IV i; EXTEND(SP, n + 1); if (PL_op->op_type == OP_AKEYS || PL_op->op_type == OP_RKEYS) { - n += i; - for (; i <= n; i++) { + for (i = 0; i <= n; i++) { mPUSHi(i); } } @@ -4945,7 +4862,6 @@ PP(pp_lslice) SV ** const lastlelem = PL_stack_base + POPMARK; SV ** const firstlelem = PL_stack_base + POPMARK + 1; register SV ** const firstrelem = lastlelem + 1; - const I32 arybase = CopARYBASE_get(PL_curcop); I32 is_something_there = FALSE; register const I32 max = lastrelem - lastlelem; @@ -4955,8 +4871,6 @@ PP(pp_lslice) I32 ix = SvIV(*lastlelem); if (ix < 0) ix += max; - else - ix -= arybase; if (ix < 0 || ix >= max) *firstlelem = &PL_sv_undef; else @@ -4974,8 +4888,6 @@ PP(pp_lslice) I32 ix = SvIV(*lelem); if (ix < 0) ix += max; - else - ix -= arybase; if (ix < 0 || ix >= max) *lelem = &PL_sv_undef; else { @@ -5079,8 +4991,6 @@ PP(pp_splice) offset = i = SvIV(*MARK); if (offset < 0) offset += AvFILLp(ary) + 1; - else - offset -= CopARYBASE_get(PL_curcop); if (offset < 0) DIE(aTHX_ PL_no_aelem, i); if (++MARK < SP) { diff --git a/pp.h b/pp.h index 0ba877f22a6..ad71668fab9 100644 --- a/pp.h +++ b/pp.h @@ -496,12 +496,28 @@ True if this op will be the return value of an lvalue subroutine ) #ifdef PERL_CORE + /* These are just for Perl_tied_method(), which is not part of the public API. Use 0x04 rather than the next available bit, to help the compiler if the architecture can generate more efficient instructions. */ # define TIED_METHOD_MORTALIZE_NOT_NEEDED 0x04 # define TIED_METHOD_ARGUMENTS_ON_STACK 0x08 # define TIED_METHOD_SAY 0x10 + +/* Used in various places that need to dereference a glob or globref */ +# define MAYBE_DEREF_GV_flags(sv,phlags) \ + ( \ + (void)(phlags & SV_GMAGIC && (SvGETMAGIC(sv),0)), \ + isGV_with_GP(sv) \ + ? (GV *)sv \ + : SvROK(sv) && SvTYPE(SvRV(sv)) <= SVt_PVLV && \ + (SvGETMAGIC(SvRV(sv)), isGV_with_GP(SvRV(sv))) \ + ? (GV *)SvRV(sv) \ + : NULL \ + ) +# define MAYBE_DEREF_GV(sv) MAYBE_DEREF_GV_flags(sv,SV_GMAGIC) +# define MAYBE_DEREF_GV_nomg(sv) MAYBE_DEREF_GV_flags(sv,0) + #endif /* diff --git a/pp_ctl.c b/pp_ctl.c index 238f230116c..054de67e285 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2917,6 +2917,7 @@ PP(pp_goto) sub_crush_depth(cv); pad_push(padlist, CvDEPTH(cv)); } + PL_curcop = cx->blk_oldcop; SAVECOMPPAD(); PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv)); if (CxHASARGS(cx)) @@ -3508,7 +3509,6 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq) PL_eval_root = NULL; PL_curcop = &PL_compiling; - CopARYBASE_set(PL_curcop, 0); if (saveop && (saveop->op_type != OP_REQUIRE) && (saveop->op_flags & OPf_SPECIAL)) PL_in_eval |= EVAL_KEEPERR; else @@ -3634,7 +3634,7 @@ S_check_type_and_open(pTHX_ SV *name) } #if !defined(PERLIO_IS_STDIO) && !defined(USE_SFIO) - return PerlIO_openn(aTHX_ NULL, PERL_SCRIPT_MODE, -1, 0, 0, NULL, 1, &name); + return PerlIO_openn(aTHX_ ":", PERL_SCRIPT_MODE, -1, 0, 0, NULL, 1, &name); #else return PerlIO_open(p, PERL_SCRIPT_MODE); #endif @@ -4445,14 +4445,14 @@ S_destroy_matcher(pTHX_ PMOP *matcher) PP(pp_smartmatch) { DEBUG_M(Perl_deb(aTHX_ "Starting smart match resolution\n")); - return do_smartmatch(NULL, NULL); + return do_smartmatch(NULL, NULL, 0); } /* This version of do_smartmatch() implements the * table of smart matches that is found in perlsyn. */ STATIC OP * -S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other) +S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other, const bool copied) { dVAR; dSP; @@ -4464,7 +4464,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other) /* Take care only to invoke mg_get() once for each argument. * Currently we do this by copying the SV if it's magical. */ if (d) { - if (SvGMAGICAL(d)) + if (!copied && SvGMAGICAL(d)) d = sv_mortalcopy(d); } else @@ -4775,7 +4775,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other) PUTBACK; DEBUG_M(Perl_deb(aTHX_ " recursively comparing array element...\n")); - (void) do_smartmatch(seen_this, seen_other); + (void) do_smartmatch(seen_this, seen_other, 0); SPAGAIN; DEBUG_M(Perl_deb(aTHX_ " recursion finished\n")); @@ -4837,7 +4837,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other) PUTBACK; /* infinite recursion isn't supposed to happen here */ DEBUG_M(Perl_deb(aTHX_ " recursively testing array element...\n")); - (void) do_smartmatch(NULL, NULL); + (void) do_smartmatch(NULL, NULL, 1); SPAGAIN; DEBUG_M(Perl_deb(aTHX_ " recursion finished\n")); if (SvTRUEx(POPs)) diff --git a/pp_hot.c b/pp_hot.c index 6a22452b3b0..59fc443078e 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -125,8 +125,6 @@ PP(pp_sassign) const U32 cv_type = SvTYPE(cv); const bool is_gv = isGV_with_GP(right); const bool got_coderef = cv_type == SVt_PVCV || cv_type == SVt_PVFM; - STRLEN len = 0; - const char *nambeg = is_gv ? NULL : SvPV_nomg_const(right, len); if (!got_coderef) { assert(SvROK(cv)); @@ -137,9 +135,7 @@ PP(pp_sassign) context. */ if (!got_coderef && !is_gv && GIMME_V == G_VOID) { /* Is the target symbol table currently empty? */ - GV * const gv = gv_fetchpvn_flags( - nambeg, len, SvUTF8(right)|GV_NOINIT, SVt_PVGV - ); + GV * const gv = gv_fetchsv_nomg(right, GV_NOINIT, SVt_PVGV); if (SvTYPE(gv) != SVt_PVGV && !SvOK(gv)) { /* Good. Create a new proxy constant subroutine in the target. The gv becomes a(nother) reference to the constant. */ @@ -157,9 +153,7 @@ PP(pp_sassign) /* Need to fix things up. */ if (!is_gv) { /* Need to fix GV. */ - right = MUTABLE_SV(gv_fetchpvn_flags( - nambeg, len, SvUTF8(right)|GV_ADD, SVt_PVGV - )); + right = MUTABLE_SV(gv_fetchsv_nomg(right,GV_ADD, SVt_PVGV)); } if (!got_coderef) { @@ -368,16 +362,19 @@ PP(pp_eq) PP(pp_preinc) { dVAR; dSP; - if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs)) + const bool inc = + PL_op->op_type == OP_PREINC || PL_op->op_type == OP_I_PREINC; + if (SvTYPE(TOPs) >= SVt_PVAV || (isGV_with_GP(TOPs) && !SvFAKE(TOPs))) Perl_croak_no_modify(aTHX); if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs) - && SvIVX(TOPs) != IV_MAX) + && SvIVX(TOPs) != (inc ? IV_MAX : IV_MIN)) { - SvIV_set(TOPs, SvIVX(TOPs) + 1); + SvIV_set(TOPs, SvIVX(TOPs) + (inc ? 1 : -1)); SvFLAGS(TOPs) &= ~(SVp_NOK|SVp_POK); } else /* Do all the PERL_PRESERVE_IVUV conditionals in sv_inc */ - sv_inc(TOPs); + if (inc) sv_inc(TOPs); + else sv_dec(TOPs); SvSETMAGIC(TOPs); return NORMAL; } @@ -2806,8 +2803,6 @@ PP(pp_aelem) Perl_warner(aTHX_ packWARN(WARN_MISC), "Use of reference \"%"SVf"\" as array index", SVfARG(elemsv)); - if (elem > 0) - elem -= CopARYBASE_get(PL_curcop); if (SvTYPE(av) != SVt_PVAV) RETPUSHUNDEF; diff --git a/pp_proto.h b/pp_proto.h index 5e19fc3120a..bc4622b2ccf 100644 --- a/pp_proto.h +++ b/pp_proto.h @@ -167,10 +167,8 @@ PERL_CALLCONV OP *Perl_pp_padhv(pTHX); PERL_CALLCONV OP *Perl_pp_padsv(pTHX); PERL_CALLCONV OP *Perl_pp_pipe_op(pTHX); PERL_CALLCONV OP *Perl_pp_pos(pTHX); -PERL_CALLCONV OP *Perl_pp_postdec(pTHX); PERL_CALLCONV OP *Perl_pp_postinc(pTHX); PERL_CALLCONV OP *Perl_pp_pow(pTHX); -PERL_CALLCONV OP *Perl_pp_predec(pTHX); PERL_CALLCONV OP *Perl_pp_preinc(pTHX); PERL_CALLCONV OP *Perl_pp_print(pTHX); PERL_CALLCONV OP *Perl_pp_prototype(pTHX); diff --git a/pp_sys.c b/pp_sys.c index ccc43258898..0a3d3cbd3c5 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -49,10 +49,6 @@ # include #endif -#ifdef I_SYS_WAIT -# include -#endif - #ifdef I_SYS_RESOURCE # include #endif @@ -2188,14 +2184,14 @@ PP(pp_truncate) /* XXX Configure probe for the signedness of the length type of *truncate() needed? XXX */ SETERRNO(0,0); { + SV * const sv = POPs; int result = 1; GV *tmpgv; IO *io; - if (PL_op->op_flags & OPf_SPECIAL) { - tmpgv = gv_fetchsv(POPs, 0, SVt_PVIO); - - do_ftruncate_gv: + if ((tmpgv = PL_op->op_flags & OPf_SPECIAL + ? gv_fetchsv(sv, 0, SVt_PVIO) + : MAYBE_DEREF_GV(sv) )) { io = GvIO(tmpgv); if (!io) result = 0; @@ -2217,24 +2213,12 @@ PP(pp_truncate) } } } - else { - SV * const sv = POPs; - const char *name; - - if (isGV_with_GP(sv)) { - tmpgv = MUTABLE_GV(sv); /* *main::FRED for example */ - goto do_ftruncate_gv; - } - else if (SvROK(sv) && isGV_with_GP(SvRV(sv))) { - tmpgv = MUTABLE_GV(SvRV(sv)); /* \*main::FRED for example */ - goto do_ftruncate_gv; - } - else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { + else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { io = MUTABLE_IO(SvRV(sv)); /* *main::FRED{IO} for example */ goto do_ftruncate_io; - } - - name = SvPV_nolen_const(sv); + } + else { + const char * const name = SvPV_nomg_const_nolen(sv); TAINT_PROPER("truncate"); #ifdef HAS_TRUNCATE if (truncate(name, len) < 0) @@ -2756,19 +2740,20 @@ PP(pp_stat) IO *io; I32 gimme; I32 max = 13; + SV* sv; - if (PL_op->op_flags & OPf_REF) { - gv = cGVOP_gv; + if (PL_op->op_flags & OPf_REF ? (gv = cGVOP_gv, 1) + : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) { if (PL_op->op_type == OP_LSTAT) { if (gv != PL_defgv) { do_fstat_warning_check: Perl_ck_warner(aTHX_ packWARN(WARN_IO), "lstat() on filehandle %s", gv ? GvENAME(gv) : ""); } else if (PL_laststype != OP_LSTAT) + /* diag_listed_as: The stat preceding %s wasn't an lstat */ Perl_croak(aTHX_ "The stat preceding lstat() wasn't an lstat"); } - do_fstat: if (gv != PL_defgv) { PL_laststype = OP_STAT; PL_statgv = gv; @@ -2796,23 +2781,14 @@ PP(pp_stat) } } else { - SV* const sv = POPs; - if (isGV_with_GP(sv)) { - gv = MUTABLE_GV(sv); - goto do_fstat; - } else if(SvROK(sv) && isGV_with_GP(SvRV(sv))) { - gv = MUTABLE_GV(SvRV(sv)); - if (PL_op->op_type == OP_LSTAT) - goto do_fstat_warning_check; - goto do_fstat; - } else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { + if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { io = MUTABLE_IO(SvRV(sv)); if (PL_op->op_type == OP_LSTAT) goto do_fstat_warning_check; goto do_fstat_have_io; } - sv_setpv(PL_statname, SvPV_nolen_const(sv)); + sv_setpv(PL_statname, SvPV_nomg_const_nolen(sv)); PL_statgv = NULL; PL_laststype = PL_op->op_type; if (PL_op->op_type == OP_LSTAT) @@ -2897,6 +2873,7 @@ PP(pp_stat) #define tryAMAGICftest_MG(chr) STMT_START { \ if ( (SvFLAGS(TOPs) & (SVf_ROK|SVs_GMG)) \ + && PL_op->op_flags & OPf_KIDS \ && S_try_amagic_ftest(aTHX_ chr)) \ return NORMAL; \ } STMT_END @@ -2910,8 +2887,7 @@ S_try_amagic_ftest(pTHX_ char chr) { assert(chr != '?'); SvGETMAGIC(arg); - if ((PL_op->op_flags & OPf_KIDS) - && SvAMAGIC(TOPs)) + if (SvAMAGIC(TOPs)) { const char tmpchr = chr; SV * const tmpsv = amagic_call(arg, @@ -3238,6 +3214,7 @@ PP(pp_ftlink) I32 result; tryAMAGICftest_MG('l'); + STACKED_FTEST_CHECK; result = my_lstat_flags(0); SPAGAIN; @@ -3264,11 +3241,7 @@ PP(pp_fttty) if (PL_op->op_flags & OPf_REF) gv = cGVOP_gv; - else if (isGV_with_GP(TOPs)) - gv = MUTABLE_GV(POPs); - else if (SvROK(TOPs) && isGV(SvRV(TOPs))) - gv = MUTABLE_GV(SvRV(POPs)); - else { + else if (!(gv = MAYBE_DEREF_GV_nomg(TOPs))) { tmpsv = POPs; name = SvPV_nomg(tmpsv, namelen); gv = gv_fetchpvn_flags(name, namelen, SvUTF8(tmpsv), SVt_PVIO); @@ -3317,12 +3290,7 @@ PP(pp_fttext) if (PL_op->op_flags & OPf_REF) gv = cGVOP_gv; - else if (isGV_with_GP(TOPs)) - gv = MUTABLE_GV(POPs); - else if (SvROK(TOPs) && isGV(SvRV(TOPs))) - gv = MUTABLE_GV(SvRV(POPs)); - else - gv = NULL; + else gv = MAYBE_DEREF_GV_nomg(TOPs); if (gv) { EXTEND(SP, 1); @@ -3466,15 +3434,8 @@ PP(pp_chdir) if (PL_op->op_flags & OPf_SPECIAL) { gv = gv_fetchsv(sv, 0, SVt_PVIO); } - else if (isGV_with_GP(sv)) { - gv = MUTABLE_GV(sv); - } - else if (SvROK(sv) && isGV_with_GP(SvRV(sv))) { - gv = MUTABLE_GV(SvRV(sv)); - } - else { - tmps = SvPV_nolen_const(sv); - } + else if (!(gv = MAYBE_DEREF_GV(sv))) + tmps = SvPV_nomg_const_nolen(sv); } if( !gv && (!tmps || !*tmps) ) { diff --git a/proto.h b/proto.h index 783b8396d8c..2b7127c22e4 100644 --- a/proto.h +++ b/proto.h @@ -5759,7 +5759,7 @@ STATIC void S_destroy_matcher(pTHX_ PMOP* matcher) #define PERL_ARGS_ASSERT_DESTROY_MATCHER \ assert(matcher) -STATIC OP* S_do_smartmatch(pTHX_ HV* seen_this, HV* seen_other); +STATIC OP* S_do_smartmatch(pTHX_ HV* seen_this, HV* seen_other, const bool copied); STATIC OP* S_docatch(pTHX_ OP *o) __attribute__warn_unused_result__; diff --git a/regen/opcode.pl b/regen/opcode.pl index 791de9f4bee..d8186cd2944 100755 --- a/regen/opcode.pl +++ b/regen/opcode.pl @@ -116,10 +116,8 @@ BEGIN Perl_pp_chop => [qw(chop chomp)], Perl_pp_schop => [qw(schop schomp)], Perl_pp_bind => {connect => '#ifdef HAS_SOCKET'}, - Perl_pp_preinc => ['i_preinc'], - Perl_pp_predec => ['i_predec'], - Perl_pp_postinc => ['i_postinc'], - Perl_pp_postdec => ['i_postdec'], + Perl_pp_preinc => ['i_preinc', 'predec', 'i_predec'], + Perl_pp_postinc => ['i_postinc', 'postdec', 'i_postdec'], Perl_pp_ehostent => [qw(enetent eprotoent eservent spwent epwent sgrent egrent)], Perl_pp_shostent => [qw(snetent sprotoent sservent)], @@ -349,9 +347,12 @@ END 'u' => 128, # defaults to $_ ); -my %OP_IS_SOCKET; -my %OP_IS_FILETEST; -my %OP_IS_FT_ACCESS; +my %OP_IS_SOCKET; # /Fs/ +my %OP_IS_FILETEST; # /F-/ +my %OP_IS_FT_ACCESS; # /F-+/ +my %OP_IS_NUMCOMPARE; # /S table. opcode.pl verifies the range contiguity. */ +/* the OP_IS_* macros are optimized to a simple range check because + all the member OPs are contiguous in regen/opcodes table. + opcode.pl verifies the range contiguity, or generates an OR-equals + expression */ EO_OP_IS_COMMENT gen_op_is_macro( \%OP_IS_SOCKET, 'OP_IS_SOCKET'); gen_op_is_macro( \%OP_IS_FILETEST, 'OP_IS_FILETEST'); gen_op_is_macro( \%OP_IS_FT_ACCESS, 'OP_IS_FILETEST_ACCESS'); +gen_op_is_macro( \%OP_IS_NUMCOMPARE, 'OP_IS_NUMCOMPARE'); +gen_op_is_macro( \%OP_IS_DIRHOP, 'OP_IS_DIRHOP'); sub gen_op_is_macro { my ($op_is, $macname) = @_; @@ -431,14 +442,14 @@ sub gen_op_is_macro { if ( $op_is->{$last} - $op_is->{$first} == scalar @rest + 1) { # contiguous ops -> optimized version - print $on "(op) >= OP_" . uc($first) . " && (op) <= OP_" . uc($last); - print $on ")\n"; + print $on "(op) >= OP_" . uc($first) + . " && (op) <= OP_" . uc($last); } else { print $on join(" || \\\n\t ", - map { "(op) == OP_" . uc() } sort keys %$op_is); - print $on ")\n"; + map { "(op) == OP_" . uc() } sort keys %$op_is); } + print $on ")\n"; } } diff --git a/regen/opcodes b/regen/opcodes index d6720c3cb37..688f1661cd8 100644 --- a/regen/opcodes +++ b/regen/opcodes @@ -30,6 +30,7 @@ # scalar - S list - L array - A # hash - H sub (CV) - C file - F # socket - Fs filetest - F- filetest_access - F-+ +# num-compare - S< dirhandle - DF # reference - R # "?" denotes an optional operand. @@ -137,20 +138,20 @@ stringify string ck_fun fsT@ S left_shift left bitshift (<<) ck_bitop fsT2 S S right_shift right bitshift (>>) ck_bitop fsT2 S S -lt numeric lt (<) ck_null Iifs2 S S -i_lt integer lt (<) ck_null ifs2 S S -gt numeric gt (>) ck_null Iifs2 S S -i_gt integer gt (>) ck_null ifs2 S S -le numeric le (<=) ck_null Iifs2 S S -i_le integer le (<=) ck_null ifs2 S S -ge numeric ge (>=) ck_null Iifs2 S S -i_ge integer ge (>=) ck_null ifs2 S S -eq numeric eq (==) ck_null Iifs2 S S -i_eq integer eq (==) ck_null ifs2 S S -ne numeric ne (!=) ck_null Iifs2 S S -i_ne integer ne (!=) ck_null ifs2 S S -ncmp numeric comparison (<=>) ck_null Iifst2 S S -i_ncmp integer comparison (<=>) ck_null ifst2 S S +lt numeric lt (<) ck_null Iifs2 S S< +i_lt integer lt (<) ck_null ifs2 S S< +gt numeric gt (>) ck_null Iifs2 S S< +i_gt integer gt (>) ck_null ifs2 S S< +le numeric le (<=) ck_null Iifs2 S S< +i_le integer le (<=) ck_null ifs2 S S< +ge numeric ge (>=) ck_null Iifs2 S S< +i_ge integer ge (>=) ck_null ifs2 S S< +eq numeric eq (==) ck_null Iifs2 S S< +i_eq integer eq (==) ck_null ifs2 S S< +ne numeric ne (!=) ck_null Iifs2 S S< +i_ne integer ne (!=) ck_null ifs2 S S< +ncmp numeric comparison (<=>) ck_null Iifst2 S S< +i_ncmp integer comparison (<=>) ck_null ifst2 S S< slt string lt ck_null ifs2 S S sgt string gt ck_null ifs2 S S @@ -428,11 +429,11 @@ rmdir rmdir ck_fun isTu% S? # Directory calls. open_dir opendir ck_fun is@ F S -readdir readdir ck_fun % F -telldir telldir ck_fun st% F -seekdir seekdir ck_fun s@ F S -rewinddir rewinddir ck_fun s% F -closedir closedir ck_fun is% F +readdir readdir ck_fun % DF +telldir telldir ck_fun st% DF +seekdir seekdir ck_fun s@ DF S +rewinddir rewinddir ck_fun s% DF +closedir closedir ck_fun is% DF # Process control. diff --git a/run.c b/run.c index 368ef0301d3..7c1d0aa8cc5 100644 --- a/run.c +++ b/run.c @@ -30,7 +30,7 @@ * Now we are come to the lands where you were foaled, and every stone you * know. Run now! Hope is in speed!' --Gandalf * - * [p.600 of _The Lord of the Rings_, III/xi: "The Palantr"] + * [p.600 of _The Lord of the Rings_, III/xi: "The Palantír"] */ int diff --git a/scope.c b/scope.c index b9051d5c63c..9ed6475d6ce 100644 --- a/scope.c +++ b/scope.c @@ -1115,11 +1115,6 @@ Perl_leave_scope(pTHX_ I32 base) ptr = SSPOPPTR; (*SSPOPDPTR)(ptr); break; - case SAVEt_COP_ARYBASE: - ptr = SSPOPPTR; - i = SSPOPINT; - CopARYBASE_set((COP *)ptr, i); - break; case SAVEt_COMPILE_WARNINGS: ptr = SSPOPPTR; diff --git a/scope.h b/scope.h index 113f4e8d717..22407e1b8c6 100644 --- a/scope.h +++ b/scope.h @@ -49,7 +49,6 @@ #define SAVEt_BOOL 38 #define SAVEt_SET_SVFLAGS 39 #define SAVEt_SAVESWITCHSTACK 40 -#define SAVEt_COP_ARYBASE 41 #define SAVEt_RE_STATE 42 #define SAVEt_COMPILE_WARNINGS 43 #define SAVEt_STACK_CXPOS 44 @@ -218,8 +217,6 @@ scope has the given name. Name must be a literal string. PL_curstackinfo->si_stack = (t); \ } STMT_END -#define SAVECOPARYBASE(c) save_pushi32ptr(CopARYBASE_get(c), c, SAVEt_COP_ARYBASE); - /* Need to do the cop warnings like this, rather than a "SAVEFREESHAREDPV", because realloc() means that the value can actually change. Possibly could have done savefreesharedpvREF, but this way actually seems cleaner, diff --git a/sv.c b/sv.c index f555e44c361..6ab04da0018 100644 --- a/sv.c +++ b/sv.c @@ -4161,7 +4161,7 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV* sstr, const I32 flags) "Undefined value assigned to typeglob"); } else { - GV *gv = gv_fetchsv(sstr, GV_ADD, SVt_PVGV); + GV *gv = gv_fetchsv_nomg(sstr, GV_ADD, SVt_PVGV); if (dstr != (const SV *)gv) { const char * const name = GvNAME((const GV *)dstr); const STRLEN len = GvNAMELEN(dstr); @@ -5395,6 +5395,7 @@ Perl_sv_rvweaken(pTHX_ SV *const sv) Perl_ck_warner(aTHX_ packWARN(WARN_MISC), "Reference is already weak"); return sv; } + else if (SvREADONLY(sv)) croak_no_modify(); tsv = SvRV(sv); Perl_sv_add_backref(aTHX_ tsv, sv); SvWEAKREF_on(sv); @@ -7847,7 +7848,7 @@ Perl_sv_inc_nomg(pTHX_ register SV *const sv) if (!sv) return; if (SvTHINKFIRST(sv)) { - if (SvIsCOW(sv)) + if (SvIsCOW(sv) || isGV_with_GP(sv)) sv_force_normal_flags(sv, 0); if (SvREADONLY(sv)) { if (IN_PERL_RUNTIME) @@ -8028,7 +8029,7 @@ Perl_sv_dec_nomg(pTHX_ register SV *const sv) if (!sv) return; if (SvTHINKFIRST(sv)) { - if (SvIsCOW(sv)) + if (SvIsCOW(sv) || isGV_with_GP(sv)) sv_force_normal_flags(sv, 0); if (SvREADONLY(sv)) { if (IN_PERL_RUNTIME) @@ -8837,15 +8838,6 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **const st, GV **const gvp, const I32 lref) *st = NULL; *gvp = NULL; return NULL; - case SVt_PVGV: - if (isGV_with_GP(sv)) { - gv = MUTABLE_GV(sv); - *gvp = gv; - *st = GvESTASH(gv); - goto fix_gv; - } - /* FALL THROUGH */ - default: SvGETMAGIC(sv); if (SvROK(sv)) { @@ -8870,11 +8862,7 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **const st, GV **const gvp, const I32 lref) gv = MUTABLE_GV(sv); } else { - STRLEN len; - const char * const nambeg = SvPV_nomg_const(sv, len); - gv = gv_fetchpvn_flags( - nambeg, len, lref | SvUTF8(sv), SVt_PVCV - ); + gv = gv_fetchsv_nomg(sv, lref, SVt_PVCV); } *gvp = gv; if (!gv) { @@ -8887,7 +8875,6 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **const st, GV **const gvp, const I32 lref) return NULL; } *st = GvESTASH(gv); - fix_gv: if (lref & ~GV_ADDMG && !GvCVu(gv)) { SV *tmpsv; ENTER; @@ -12343,7 +12330,6 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param) TOPLONG(nss,ix) = longval; break; case SAVEt_I32: /* I32 reference */ - case SAVEt_COP_ARYBASE: /* call CopARYBASE_set */ ptr = POPPTR(ss,ix); TOPPTR(nss,ix) = any_dup(ptr, proto_perl); i = POPINT(ss,ix); diff --git a/sv.h b/sv.h index c838367d936..534535204c5 100644 --- a/sv.h +++ b/sv.h @@ -1919,7 +1919,7 @@ Returns a pointer to the character buffer. #define SvUNLOCK(sv) PL_unlockhook(aTHX_ sv) #define SvDESTROYABLE(sv) PL_destroyhook(aTHX_ sv) -#define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END +#define SvGETMAGIC(x) ((void)(SvGMAGICAL(x) && mg_get(x))) #define SvSETMAGIC(x) STMT_START { if (SvSMAGICAL(x)) mg_set(x); } STMT_END #define SvSetSV_and(dst,src,finally) \ diff --git a/symbian/config.sh b/symbian/config.sh index 2e531ae34d5..6a27ff50649 100644 --- a/symbian/config.sh +++ b/symbian/config.sh @@ -1,20 +1,20 @@ #!\\bin\\sh -PERL_CONFIG_SH='true' +Author='' _a='.a' _o='.o' afs='false' afsroot='/afs' alignbytes='4' -apiversion='5.005' aphostname='localhost' +apiversion='5.005' ar=':' archlib='\\system\\libs\\perl\\x.y.z\\thumb-symbian' archlibexp='\\system\\libs\\perl\\x.y.z\\thumb-symbian' archname='thumb-symbian' asctime_r_proto='0' bin='\\system\\apps\\perl' -binexp='\\system\\apps\\perl' bincompat5005='n' +binexp='\\system\\apps\\perl' byteorder='1234' castflags='0' cc='gcc' @@ -46,6 +46,7 @@ d_PRIo64='undef' d_PRIu64='undef' d_PRIx64='undef' d_SCNfldbl='undef' +d__fwalk='undef' d_access='undef' d_accessx='undef' d_aintl='undef' @@ -65,9 +66,9 @@ d_attribute_unused='undef' d_attribute_warn_unused_result='undef' d_bcmp='undef' d_bcopy='undef' +d_bsd='undef' d_bsdgetpgrp='undef' d_bsdsetpgrp='undef' -d_bsd='undef' d_builtin_choose_expr='undef' d_builtin_expect='undef' d_bzero='undef' @@ -85,11 +86,11 @@ d_cmsghdr_s='undef' d_const='define' d_copysignl='undef' d_cplusplus='undef' -d_crypt_r='undef' d_crypt='undef' +d_crypt_r='undef' d_csh='undef' -d_ctermid_r='undef' d_ctermid='undef' +d_ctermid_r='undef' d_ctime64='undef' d_ctime_r='undef' d_cuserid='undef' @@ -104,20 +105,20 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' -d_drand48proto='undef' d_drand48_r='undef' +d_drand48proto='undef' d_dup2='undef' d_eaccess='undef' -d_endgrent_r='undef' d_endgrent='undef' +d_endgrent_r='undef' d_endhent='undef' d_endhostent_r='undef' d_endnent='undef' d_endnetent_r='undef' d_endpent='undef' d_endprotoent_r='undef' -d_endpwent_r='undef' d_endpwent='undef' +d_endpwent_r='undef' d_endsent='undef' d_endservent_r='undef' d_eofnblk='undef' @@ -126,23 +127,23 @@ d_faststdio='undef' d_fchdir='undef' d_fchmod='undef' d_fchown='undef' -d_fcntl_can_lock='undef' d_fcntl='undef' +d_fcntl_can_lock='undef' d_fd_macros='undef' -d_fds_bits='undef' d_fd_set='undef' +d_fds_bits='undef' d_fgetpos='undef' -d_finitel='undef' d_finite='undef' +d_finitel='undef' d_flexfnam='define' -d_flockproto='undef' d_flock='undef' +d_flockproto='undef' d_fork='undef' +d_fp_class='undef' d_fpathconf='undef' +d_fpclass='undef' d_fpclassify='undef' d_fpclassl='undef' -d_fp_class='undef' -d_fpclass='undef' d_fpos64_t='undef' d_frexpl='undef' d_fs_data_s='undef' @@ -153,17 +154,16 @@ d_fstatvfs='undef' d_fsync='undef' d_ftello='undef' d_ftime='undef' -d_futimesat='undef' d_futimes='undef' -d__fwalk='undef' +d_futimesat='undef' d_gdbm_ndbm_h_uses_prototypes='undef' d_gdbmndbm_h_uses_prototypes='undef' d_getaddrinfo='undef' d_getcwd='define' d_getespwnam='undef' d_getfsstat='undef' -d_getgrent_r='undef' d_getgrent='undef' +d_getgrent_r='undef' d_getgrgid_r='undef' d_getgrnam_r='undef' d_getgrps='undef' @@ -176,10 +176,10 @@ d_gethostbyname_r='undef' d_gethostent_r='undef' d_gethostprotos='define' d_getitimer='undef' -d_getlogin_r='undef' d_getlogin='undef' -d_getmntent='undef' +d_getlogin_r='undef' d_getmnt='undef' +d_getmntent='undef' d_getnameinfo='undef' d_getnbyaddr='undef' d_getnbyname='undef' @@ -202,8 +202,8 @@ d_getprotobynumber_r='undef' d_getprotoent_r='undef' d_getprotoprotos='define' d_getprpwnam='undef' -d_getpwent_r='undef' d_getpwent='undef' +d_getpwent_r='undef' d_getpwnam_r='undef' d_getpwuid_r='undef' d_getsbyname='define' @@ -214,8 +214,8 @@ d_getservbyport_r='undef' d_getservent_r='undef' d_getservprotos='define' d_getspent='undef' -d_getspnam_r='undef' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='define' d_gmtime64='undef' d_gmtime_r='undef' @@ -233,16 +233,16 @@ d_int64_t='undef' d_isascii='undef' d_isfinite='undef' d_isinf='undef' -d_isnanl='undef' d_isnan='undef' +d_isnanl='undef' d_killpg='undef' d_lchown='undef' d_ldbl_dig='undef' d_libm_lib_version='undef' d_link='undef' d_localtime64='undef' -d_localtime_r_needs_tzset='undef' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='undef' d_lockf='undef' d_longdbl='undef' @@ -263,26 +263,26 @@ d_memset='define' d_mkdir='define' d_mkdtemp='undef' d_mkfifo='undef' -d_mkstemps='undef' d_mkstemp='undef' +d_mkstemps='undef' d_mktime64='undef' d_mktime='undef' d_mmap='undef' +d_modfl='undef' d_modfl_pow32_bug='undef' d_modflproto='undef' -d_modfl='undef' d_mprotect='undef' -d_msgctl='undef' +d_msg='undef' d_msg_ctrunc='undef' d_msg_dontroute='undef' -d_msgget='undef' -d_msghdr_s='undef' d_msg_oob='undef' d_msg_peek='undef' d_msg_proxy='undef' +d_msgctl='undef' +d_msgget='undef' +d_msghdr_s='undef' d_msgrcv='undef' d_msgsnd='undef' -d_msg='undef' d_msync='undef' d_munmap='undef' d_mymalloc='undef' @@ -393,6 +393,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='undef' d_sitearch='define' d_sitecustomize='undef' +d_sitecustomize='undef' d_snprintf='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' @@ -409,8 +410,8 @@ d_sresgproto='undef' d_sresuproto='undef' d_statblks='undef' d_statfs_f_flags='undef' -d_static_inline='undef' d_statfs_s='undef' +d_static_inline='undef' d_statvfs='undef' d_stdio_cnt_lval='undef' d_stdio_ptr_lval='undef' @@ -465,7 +466,6 @@ d_uname='undef' d_union_semun='undef' d_unordered='undef' d_unsetenv='undef' -d_sitecustomize='undef' d_usleep='define' d_usleepproto='undef' d_ustat='undef' @@ -597,6 +597,7 @@ i_sgtty='undef' i_shadow='undef' i_socks='undef' i_stdarg='define' +i_stdbool='undef' i_stddef='undef' i_stdlib='define' i_string='define' @@ -653,10 +654,10 @@ intsize='4' ivdformat='"ld"' ivsize='4' ivtype='long' -lib_ext='.a' -lddlflags='' ld=':' +lddlflags='' ldflags='' +lib_ext='.a' libc='stdlib' libm_lib_version='0' libperl='libperl.a' @@ -682,11 +683,11 @@ netdb_host_type='const char *' netdb_name_type='const char *' netdb_net_type='unsigned long' nroff='nroff' +nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' nv_preserves_uv_bits='0' nveformat='"e"' nvfformat='"f"' nvgformat='"g"' -nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' nvsize='8' nvtype='double' o_nonblock='O_NONBLOCK' @@ -698,7 +699,7 @@ osname='symbian' osvers='7.0s' otherlibdirs='' package='' -path_sep=';'; +path_sep=';' perl_static_inline='static' phostname='hostname' pidtype='int' @@ -749,8 +750,8 @@ setnetent_r_proto='0' setprotoent_r_proto='0' setpwent_r_proto='0' setservent_r_proto='0' -shmattype='void *' sh=':' +shmattype='void *' shortsize=2 sig_name_init='0' sig_num_init='0' @@ -771,6 +772,8 @@ srand48_r_proto='0' srandom_r_proto='0' src='' ssizetype=int +st_ino_sign='1' +st_ino_size='4' startperl='' stdchar=char stdio_base='((fp)->_IO_read_base)' @@ -779,8 +782,6 @@ stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)' stdio_filbuf='' stdio_ptr='((fp)->_IO_read_ptr)' stdio_stream_array='' -st_ino_sign='1' -st_ino_size='4' strerror_r_proto='0' targetarch='thumb-symbian' timetype=time_t @@ -833,16 +834,18 @@ uvoformat='"lo"' uvsize='4' uvtype='unsigned long' uvuformat='"lu"' +uvxformat='"lx"' vaproto='undef' -vendorlib_stem='' -vendorlib='' -vendorlibexp='' vendorarch='' vendorarchexp='' +vendorlib='' +vendorlib_stem='' +vendorlibexp='' vendorprefix='' vendorprefixexp='' version='x.y.z' -uvxformat='"lx"' versiononly='undef' voidflags=1 xs_apiversion='5.008' +zip='' +PERL_CONFIG_SH='true' diff --git a/t/TEST b/t/TEST index 0c24c179fa0..a57261c7691 100755 --- a/t/TEST +++ b/t/TEST @@ -159,6 +159,7 @@ $ENV{PERL_DESTRUCT_LEVEL} = 2 unless exists $ENV{PERL_DESTRUCT_LEVEL}; $ENV{EMXSHELL} = 'sh'; # For OS/2 if ($show_elapsed_time) { require Time::HiRes } +my %timings = (); # testname => [@et] pairs if $show_elapsed_time. my %skip = ( '.' => 1, @@ -170,20 +171,24 @@ my %skip = ( ); # Roll your own File::Find! -sub _find_tests { - my($dir) = @_; - opendir DIR, $dir or die "Trouble opening $dir: $!"; - foreach my $f (sort { $a cmp $b } readdir DIR) { - next if $skip{$f}; - - my $fullpath = "$dir/$f"; - - if (-d $fullpath) { - _find_tests($fullpath); - } elsif ($f =~ /\.t$/) { - push @ARGV, $fullpath; +sub _find_tests { our @found=(); push @ARGV, _find_files('\.t$', $_[0]) } +sub _find_files { + my($patt, @dirs) = @_; + for my $dir (@dirs) { + opendir DIR, $dir or die "Trouble opening $dir: $!"; + foreach my $f (sort { $a cmp $b } readdir DIR) { + next if $skip{$f}; + + my $fullpath = "$dir/$f"; + + if (-d $fullpath) { + _find_files($patt, $fullpath); + } elsif ($f =~ /$patt/) { + push @found, $fullpath; + } } } + @found; } @@ -290,12 +295,13 @@ sub _cmd { if ($ENV{PERL_VALGRIND}) { my $perl_supp = $options->{return_dir} ? "$options->{return_dir}/perl.supp" : "perl.supp"; - my $valgrind = $ENV{VALGRIND} // 'valgrind'; + my $valgrind_exe = $ENV{VALGRIND} // 'valgrind'; my $vg_opts = $ENV{VG_OPTS} - // "--suppressions=$perl_supp --leak-check=yes " - . "--leak-resolution=high --show-reachable=yes " + // '--log-fd=3 ' + . "--suppressions=$perl_supp --leak-check=yes " + . "--leak-resolution=high --show-reachable=yes " . "--num-callers=50 --track-origins=yes"; - $perl = "$valgrind --log-fd=3 $vg_opts $perl"; + $perl = "$valgrind_exe $vg_opts $perl"; $redir = "3>$Valgrind_Log"; if ($options->{run_dir}) { $Valgrind_Log = "$options->{run_dir}/$Valgrind_Log"; @@ -305,7 +311,6 @@ sub _cmd { my $args = "$options->{testswitch} $options->{switch} $options->{utf8}"; $cmd = $perl . _quote_args($args) . " $test $redir"; } - return $cmd; } @@ -509,22 +514,33 @@ EOT } my $maxlen = 0; foreach (@::path_to_name{@tests}) { - s/\.\w+\z/./; + s/\.\w+\z/ /; # space gives easy doubleclick to select fname my $len = length ; $maxlen = $len if $len > $maxlen; } # + 3 : we want three dots between the test name and the "ok" my $dotdotdot = $maxlen + 3 ; - my $valgrind = 0; + my $grind_ct = 0; # count of non-empty valgrind reports my $total_files = @tests; my $good_files = 0; my $tested_files = 0; my $totmax = 0; my %failed_tests; + my $toolnm; # valgrind, cachegrind, perf while (my $test = shift @tests) { - my $test_start_time = $show_elapsed_time ? Time::HiRes::time() : 0; - + my ($test_start_time, @starttimes) = 0; + if ($show_elapsed_time) { + $test_start_time = Time::HiRes::time(); + # times() reports usage by TEST, but we want usage of each + # testprog it calls, so record accumulated times now, + # subtract them out afterwards. Ideally, we'd take times + # in BEGIN/END blocks (giving better visibility of self vs + # children of each testprog), but that would require some + # IPC to send results back here, or a completely different + # collection scheme (Storable isnt tuned for incremental use) + @starttimes = times; + } if ($test =~ /^$/) { next; } @@ -539,7 +555,7 @@ EOT } } my $te = $::path_to_name{$test} . '.' - x ($dotdotdot - length($::path_to_name{$test})); + x ($dotdotdot - length($::path_to_name{$test})) .' '; if ($^O ne 'VMS') { # defer printing on VMS due to piping bug print $te; @@ -647,7 +663,9 @@ EOT } if ($ENV{PERL_VALGRIND}) { - my @valgrind; + $toolnm = $ENV{VALGRIND}; + $toolnm =~ s|.*/||; # keep basename + my @valgrind; # gets content of file if (-e $Valgrind_Log) { if (open(V, $Valgrind_Log)) { @valgrind = ; @@ -656,11 +674,17 @@ EOT warn "$0: Failed to open '$Valgrind_Log': $!\n"; } } - if ($ENV{VG_OPTS} =~ /cachegrind/) { - if (rename $Valgrind_Log, "$test.valgrind") { - $valgrind = $valgrind + 1; + if ($ENV{VG_OPTS} =~ /(cachegrind)/ or $toolnm =~ /(perf)/) { + $toolnm = $1; + if ($toolnm eq 'perf') { + # append perfs subcommand, not just stat + my ($sub) = split /\s/, $ENV{VG_OPTS}; + $toolnm .= "-$sub"; + } + if (rename $Valgrind_Log, "$test.$toolnm") { + $grind_ct++; } else { - warn "$0: Failed to create '$test.valgrind': $!\n"; + warn "$0: Failed to create '$test.$toolnm': $!\n"; } } elsif (@valgrind) { @@ -681,7 +705,7 @@ EOT } if ($errors or $leaks) { if (rename $Valgrind_Log, "$test.valgrind") { - $valgrind = $valgrind + 1; + $grind_ct = $grind_ct + 1; } else { warn "$0: Failed to create '$test.valgrind': $!\n"; } @@ -725,12 +749,17 @@ EOT } else { if ($max) { - my $elapsed; + my ($elapsed, $etms) = ("", 0); if ( $show_elapsed_time ) { - $elapsed = sprintf( " %8.0f ms", (Time::HiRes::time() - $test_start_time) * 1000 ); - } - else { - $elapsed = ""; + $etms = (Time::HiRes::time() - $test_start_time) * 1000; + $elapsed = sprintf(" %8.0f ms", $etms); + + my (@endtimes) = times; + $endtimes[$_] -= $starttimes[$_] for 0..$#endtimes; + splice @endtimes, 0, 2; # drop self/harness times + $_ *= 1000 for @endtimes; # and scale to ms + $timings{$test} = [$etms,@endtimes]; + $elapsed .= sprintf(" %5.0f ms", $_) for @endtimes; } print "${te}ok$elapsed\n"; $good_files = $good_files + 1; @@ -795,13 +824,68 @@ SHRDLU_5 } } my ($user,$sys,$cuser,$csys) = times; - print sprintf("u=%.2f s=%.2f cu=%.2f cs=%.2f scripts=%d tests=%d\n", - $user,$sys,$cuser,$csys,$tested_files,$totmax); + my $tot = sprintf("u=%.2f s=%.2f cu=%.2f cs=%.2f scripts=%d tests=%d", + $user,$sys,$cuser,$csys,$tested_files,$totmax); + print "$tot\n"; + if ($good_files) { + if (-d $show_elapsed_time) { + # HARNESS_TIMER = . Save timings etc to + # storable file there. NB: the test cds to ./t/, so + # relative path must account for that, ie ../../perf + # points to dir next to source tree. + require Storable; + my @dt = localtime; + $dt[5] += 1900; $dt[4] += 1; # fix year, month + my $fn = "$show_elapsed_time/".join('-', @dt[5,4,3,2,1]).".ttimes"; + Storable::store({ perf => \%timings, + gather_conf_platform_info(), + total => $tot, + }, $fn); + print "wrote storable file: $fn\n"; + } + } if ($ENV{PERL_VALGRIND}) { - my $s = $valgrind == 1 ? '' : 's'; - print "$valgrind valgrind report$s created.\n", ; + my $s = $grind_ct == 1 ? '' : 's'; + print "$grind_ct valgrind report$s created.\n", ; + if ($toolnm eq 'cachegrind') { + # cachegrind leaves a lot of cachegrind.out.$pid litter + # around the tree, find and delete them + unlink _find_files('cachegrind.out.\d+$', + qw ( ../t ../cpan ../ext ../dist/ )); + } } } exit ($::bad_files != 0); +# Collect platform, config data that should allow comparing +# performance data between different machines. With enough data, +# and/or clever statistical analysis, it should be possible to +# determine the effect of config choices, more memory, etc + +sub gather_conf_platform_info { + # currently rather quick & dirty, and subject to change + # for both content and format. + require Config; + my (%conf, @platform) = (); + $conf{$_} = $Config::Config{$_} for + grep /cc|git|config_arg\d+/, keys %Config::Config; + if (-f '/proc/cpuinfo') { + open my $fh, '/proc/cpuinfo' or warn "$!: /proc/cpuinfo\n"; + @platform = grep /name|cpu/, <$fh>; + chomp $_ for @platform; + } + unshift @platform, $^O; + + return ( + conf => \%conf, + platform => {cpu => \@platform, + mem => [ grep s/\s+/ /, + grep chomp, `free` ], + load => [ grep chomp, `uptime` ], + }, + host => (grep chomp, `hostname -f`), + version => '0.03', # bump for conf, platform, or data collection changes + ); +} + # ex: set ts=8 sts=4 sw=4 noet: diff --git a/t/comp/require.t b/t/comp/require.t index 233068036c7..07ac51bfe1e 100644 --- a/t/comp/require.t +++ b/t/comp/require.t @@ -22,7 +22,7 @@ krunch.pm krunch.pmc whap.pm whap.pmc); my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0; my $Is_UTF8 = (${^OPEN} || "") =~ /:utf8/; -my $total_tests = 51; +my $total_tests = 52; if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; } print "1..$total_tests\n"; @@ -276,6 +276,16 @@ if (defined &DynaLoader::boot_DynaLoader) { print "ok $i # SKIP Cwd may not be available in miniperl\n"; } +{ + BEGIN { ${^OPEN} = ":utf8\0"; } + %INC = (); + write_file('bleah.pm',"package F; \$x = '\xD1\x9E';\n"); + eval { require "bleah.pm" }; + $i++; + my $not = $F::x eq "\xD1\x9E" ? "" : "not "; + print "${not}ok $i - require ignores I/O layers\n"; +} + ########################################## # What follows are UTF-8 specific tests. # diff --git a/t/io/perlio.t b/t/io/perlio.t index f6e7fc471ac..18c2028a66d 100644 --- a/t/io/perlio.t +++ b/t/io/perlio.t @@ -6,7 +6,7 @@ BEGIN { skip_all_without_perlio(); } -plan tests => 44; +plan tests => 45; use_ok('PerlIO'); @@ -201,6 +201,20 @@ SKIP: { } +{ + # see RT #75722, RT #96008 + fresh_perl_like(<<'EOP', +unshift @INC, sub { + return undef unless caller eq "main"; + open my $fh, "<", \1; + $fh; +}; +require Symbol; # doesn't matter whether it exists or not +EOP + qr/\ARecursive call to Perl_load_module in PerlIO_find_layer at/s, + {stderr => 1}, + 'Mutal recursion between Perl_load_module and PerlIO_find_layer croaks'); +} END { unlink_all $txt; diff --git a/t/io/shm.t b/t/io/shm.t new file mode 100644 index 00000000000..0ba566b1d4c --- /dev/null +++ b/t/io/shm.t @@ -0,0 +1,82 @@ +################################################################################ +# +# $Revision: 6 $ +# $Author: mhx $ +# $Date: 2010/03/07 16:01:42 +0100 $ +# +################################################################################ +# +# Version 2.x, Copyright (C) 2007-2010, Marcus Holland-Moritz . +# Version 1.x, Copyright (C) 1999, Graham Barr . +# +# This program is free software; you can redistribute it and/or +# modify it under the same terms as Perl itself. +# +################################################################################ + +BEGIN { + if ($ENV{'PERL_CORE'}) { + chdir 't' if -d 't'; + @INC = '../lib' if -d '../lib' && -d '../ext'; + } + + require "./test.pl"; + require Config; import Config; + + if ($ENV{'PERL_CORE'} && $Config{'extensions'} !~ m[\bIPC/SysV\b]) { + skip_all('-- IPC::SysV was not built'); + } + skip_all_if_miniperl(); + if ($Config{'d_shm'} ne 'define') { + skip_all('-- $Config{d_shm} undefined'); + } +} + + +use sigtrap qw/die normal-signals error-signals/; +use IPC::SysV qw/ IPC_PRIVATE S_IRWXU IPC_RMID /; + +my $key; +END { shmctl $key, IPC_RMID, 0 if defined $key } + +{ + local $SIG{SYS} = sub { plan(skip_all => "SIGSYS caught") } if exists $SIG{SYS}; + $key = shmget IPC_PRIVATE, 8, S_IRWXU; +} + +if (not defined $key) { + my $info = "IPC::SharedMem->new failed: $!"; + if ($! == &IPC::SysV::ENOSPC || $! == &IPC::SysV::ENOSYS || + $! == &IPC::SysV::ENOMEM || $! == &IPC::SysV::EACCES) { + plan(skip_all => $info); + } + else { + die $info; + } +} +else { + plan(tests => 13); + pass('acquired shared mem'); +} + +ok(shmwrite($key, pack("N", 4711), 0, 4), 'write(offs=0)'); +ok(shmwrite($key, pack("N", 210577), 4, 4), 'write(offs=4)'); + +my $var; +ok(shmread($key, $var, 0, 4), 'read(offs=0) returned ok'); +is($var, pack("N", 4711), 'read(offs=0) correct'); +ok(shmread($key, $var, 4, 4), 'read(offs=4) returned ok'); +is($var, pack("N", 210577), 'read(offs=4) correct'); + +ok(shmwrite($key, "Shared", 1, 6), 'write(offs=1)'); + +ok(shmread($key, $var, 1, 6), 'read(offs=1) returned ok'); +is($var, 'Shared', 'read(offs=1) correct'); +ok(shmwrite($key,"Memory", 0, 6), 'write(offs=0)'); + +my $number = 1; +my $int = 2; +shmwrite $key, $int, 0, 1; +shmread $key, $number, 0, 1; +is("$number", $int, qq{"\$id" eq "$int"}); +cmp_ok($number + 0, '==', $int, "\$id + 0 == $int"); diff --git a/t/lib/warnings/doio b/t/lib/warnings/doio index 815e8a2f0c6..8f6e558b527 100644 --- a/t/lib/warnings/doio +++ b/t/lib/warnings/doio @@ -159,16 +159,10 @@ Unsuccessful stat on filename containing newline at - line 4. # doio.c [Perl_my_stat] use warnings 'io'; -l STDIN; --l $fh; -open $fh, $0 or die "# $!"; --l $fh; no warnings 'io'; -l STDIN; --l $fh; -close $fh; EXPECT Use of -l on filehandle STDIN at - line 3. -Use of -l on filehandle $fh at - line 6. ######## # doio.c [Perl_do_aexec5] use warnings 'io' ; diff --git a/t/lib/warnings/op b/t/lib/warnings/op index b3cb7d6bedf..a6876866d27 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -520,7 +520,6 @@ use constant U => undef; U; 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT print "boo\n" if U; # test OPpCONST_SHORTCIRCUIT -$[ = 2; # should not warn no warnings 'void' ; "abc"; # OP_CONST 7 ; # OP_CONST @@ -1005,7 +1004,6 @@ local(pos($x)); # OP_POS local(vec($x,0,1)); # OP_VEC local($a[$b]); # OP_AELEM ok local($a{$b}); # OP_HELEM ok -local($[); # OP_CONST no warnings 'syntax'; EXPECT @@ -1063,21 +1061,6 @@ Deprecated use of my() in false conditional at - line 7. Deprecated use of my() in false conditional at - line 8. ######## # op.c -$[ = 1; -($[) = 1; -use warnings 'deprecated'; -$[ = 2; -($[) = 2; -no warnings 'deprecated'; -$[ = 3; -($[) = 3; -EXPECT -Use of assignment to $[ is deprecated at - line 2. -Use of assignment to $[ is deprecated at - line 3. -Use of assignment to $[ is deprecated at - line 5. -Use of assignment to $[ is deprecated at - line 6. -######## -# op.c use warnings 'void'; @x = split /y/, "z"; $x = split /y/, "z"; diff --git a/t/lib/warnings/pp_sys b/t/lib/warnings/pp_sys index 243ca9774c5..51248ad0d4b 100644 --- a/t/lib/warnings/pp_sys +++ b/t/lib/warnings/pp_sys @@ -644,6 +644,8 @@ binmode() on unopened filehandle at - line 4. use warnings 'io'; open FH, "../harness" or die "# $!"; lstat FH; +lstat *FH; +lstat \*FH; open my $fh, $0 or die "# $!"; lstat $fh; no warnings 'io'; @@ -653,7 +655,9 @@ close FH; close $fh; EXPECT lstat() on filehandle FH at - line 4. -lstat() on filehandle $fh at - line 6. +lstat() on filehandle FH at - line 5. +lstat() on filehandle FH at - line 6. +lstat() on filehandle $fh at - line 8. ######## # pp_sys.c [pp_getc] use warnings qw(unopened closed) ; diff --git a/t/op/array.t b/t/op/array.t index aec4b301676..b53da804241 100644 --- a/t/op/array.t +++ b/t/op/array.t @@ -7,7 +7,7 @@ BEGIN { require 'test.pl'; -plan (131); +plan (123); # # @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them @@ -24,23 +24,6 @@ is(join('',@ary), '1234'); { no warnings 'deprecated'; -$[ = 1; -@ary = (1,2,3,4,5); -is(join('',@ary), '12345'); - -$tmp = $ary[$#ary]; --$#ary; -is($tmp, 5); -# Must do == here beacuse $[ isn't 0 -ok($#ary == 4); -is(join('',@ary), '1234'); - -is($ary[5], undef); - -$#ary += 1; # see if element 5 gone for good -ok($#ary == 5); -ok(!defined $ary[5]); - -$[ = 0; @foo = (); $r = join(',', $#foo, @foo); is($r, "-1"); @@ -254,22 +237,6 @@ sub foo { "a" } @foo=(foo())[0,0]; is ($foo[1], "a"); -# $[ should have the same effect regardless of whether the aelem -# op is optimized to aelemfast. - - - -sub tary { - no warnings 'deprecated'; - local $[ = 10; - my $five = 5; - is ($tary[5], $tary[$five]); -} - -@tary = (0..50); -tary(); - - # bugid #15439 - clearing an array calls destructors which may try # to modify the array - caused 'Attempt to free unreferenced scalar' diff --git a/t/op/array_base.aux b/t/op/array_base.aux deleted file mode 100644 index 79b6deed8cf..00000000000 --- a/t/op/array_base.aux +++ /dev/null @@ -1,5 +0,0 @@ -our($ra1, $ri1, $rf1, $rfe1); -$ra1 = $[; -BEGIN { $ri1 = $^H; $rf1 = $^H{foo}; $rfe1 = exists($^H{foo}); } - -1; diff --git a/t/op/array_base.t b/t/op/array_base.t index 3cc9b2425c4..369cf316141 100644 --- a/t/op/array_base.t +++ b/t/op/array_base.t @@ -3,80 +3,11 @@ use strict; require './test.pl'; -plan (tests => 24); -no warnings 'deprecated'; +plan (tests => 4); -# Bug #27024 -{ - # this used to segfault (because $[=1 is optimized away to a null block) - my $x; - $[ = 1 while $x; - pass('#27204'); - $[ = 0; # restore the original value for less side-effects -} +is(eval('$['), 0); +is(eval('$[ = 0; 123'), 123); +is(eval('$[ = 1; 123'), undef); +like($@, qr/\AAssigning non-zero to \$\[ is no longer possible/); -# [perl #36313] perl -e "1for$[=0" crash -{ - my $x; - $x = 1 for ($[) = 0; - pass('optimized assignment to $[ used to segfault in list context'); - if ($[ = 0) { $x = 1 } - pass('optimized assignment to $[ used to segfault in scalar context'); - $x = ($[=2.4); - is($x, 2, 'scalar assignment to $[ behaves like other variables'); - $x = (($[) = 0); - is($x, 1, 'list assignment to $[ behaves like other variables'); - $x = eval q{ ($[, $x) = (0) }; - like($@, qr/That use of \$\[ is unsupported/, - 'cannot assign to $[ in a list'); - eval q{ ($[) = (0, 1) }; - like($@, qr/That use of \$\[ is unsupported/, - 'cannot assign list of >1 elements to $['); - eval q{ ($[) = () }; - like($@, qr/That use of \$\[ is unsupported/, - 'cannot assign list of <1 elements to $['); -} - - -{ - $[ = 11; - cmp_ok($[ + 0, '==', 11, 'setting $[ affects $['); - our $t11; BEGIN { $t11 = $^H{'$['} } - cmp_ok($t11, '==', 11, 'setting $[ affects $^H{\'$[\'}'); - - BEGIN { $^H{'$['} = 22 } - cmp_ok($[ + 0, '==', 22, 'setting $^H{\'$\'} affects $['); - our $t22; BEGIN { $t22 = $^H{'$['} } - cmp_ok($t22, '==', 22, 'setting $^H{\'$[\'} affects $^H{\'$[\'}'); - - BEGIN { %^H = () } - my $val = do { - no warnings 'uninitialized'; - $[; - }; - cmp_ok($val, '==', 0, 'clearing %^H affects $['); - our $t0; BEGIN { $t0 = $^H{'$['} } - cmp_ok($t0, '==', 0, 'clearing %^H affects $^H{\'$[\'}'); -} - -{ - $[ = 13; - BEGIN { $^H |= 0x04000000; $^H{foo} = "z"; } - - our($ri0, $rf0); BEGIN { $ri0 = $^H; $rf0 = $^H{foo}; } - cmp_ok($[ + 0, '==', 13, '$[ correct before require'); - ok($ri0 & 0x04000000, '$^H correct before require'); - is($rf0, "z", '$^H{foo} correct before require'); - - our($ra1, $ri1, $rf1, $rfe1); - BEGIN { require "op/array_base.aux"; } - cmp_ok($ra1, '==', 0, '$[ cleared for require'); - ok(!($ri1 & 0x04000000), '$^H cleared for require'); - is($rf1, undef, '$^H{foo} cleared for require'); - ok(!$rfe1, '$^H{foo} cleared for require'); - - our($ri2, $rf2); BEGIN { $ri2 = $^H; $rf2 = $^H{foo}; } - cmp_ok($[ + 0, '==', 13, '$[ correct after require'); - ok($ri2 & 0x04000000, '$^H correct after require'); - is($rf2, "z", '$^H{foo} correct after require'); -} +1; diff --git a/t/op/auto.t b/t/op/auto.t index ecfe48bba18..00f7caa0774 100644 --- a/t/op/auto.t +++ b/t/op/auto.t @@ -3,10 +3,10 @@ BEGIN { chdir 't' if -d 't'; @INC = qw(. ../lib); + require "test.pl"; } -require "test.pl"; -plan( tests => 39 ); +plan( tests => 47 ); $x = 10000; cmp_ok(0 + ++$x - 1,'==',10000,'scalar ++x - 1'); @@ -55,3 +55,11 @@ cmp_ok(++($foo = 'zz'), 'eq','aaa','zzz incr aaa'); cmp_ok(++($foo = 'A99'),'eq','B00','A99 incr B00'); cmp_ok(++($foo = 'zi'), 'eq','zj','zi incr zj (EBCDIC i,j non-contiguous check)'); cmp_ok(++($foo = 'zr'), 'eq','zs','zr incr zs (EBCDIC r,s non-contiguous check)'); + +# test with glob copies + +for(qw '$x++ ++$x $x-- --$x') { + my $x = *foo; + ok eval "$_; 1", "$_ does not die on a glob copy"; + is $x, /-/ ? -1 : 1, "result of $_ on a glob copy"; +} diff --git a/t/op/coresubs.t b/t/op/coresubs.t index f0ebe8ed5b7..60aa1b78146 100644 --- a/t/op/coresubs.t +++ b/t/op/coresubs.t @@ -108,6 +108,19 @@ while(<$kh>) { } } +$tests++; +# This subroutine is outside the warnings scope: +sub foo { goto &CORE::abs } +use warnings; +$SIG{__WARN__} = sub { like shift, qr\^Use of uninitialized\ }; +foo(undef); + +$tests+=2; +is runperl(prog => 'print CORE->lc, qq-\n-'), "core\n", + 'methods calls autovivify coresubs'; +is runperl(prog => '@ISA=CORE; print main->uc, qq-\n-'), "MAIN\n", + 'inherted method calls autovivify coresubs'; + is curr_test, $tests+1, 'right number of tests'; done_testing; diff --git a/t/op/each_array.t b/t/op/each_array.t index 9a6073ab750..60528053bf3 100644 --- a/t/op/each_array.t +++ b/t/op/each_array.t @@ -10,7 +10,7 @@ use warnings; no warnings 'deprecated'; use vars qw(@array @r $k $v $c); -plan tests => 66; +plan tests => 57; @array = qw(crunch zam bloop); @@ -33,16 +33,8 @@ is ($r[0], 0); is ($r[1], 'crunch'); ($k) = each @array; is ($k, 1); -{ - $[ = 2; - my ($k, $v) = each @array; - is ($k, 4); - is ($v, 'bloop'); - (@r) = each @array; - is (scalar @r, 0); -} -my @lex_array = qw(PLOP SKLIZZORCH RATTLE PBLRBLPSFT); +my @lex_array = qw(PLOP SKLIZZORCH RATTLE); (@r) = each @lex_array; is (scalar @r, 2); @@ -53,12 +45,6 @@ is ($k, 1); is ($v, 'SKLIZZORCH'); ($k) = each @lex_array; is ($k, 2); -{ - $[ = -42; - my ($k, $v) = each @lex_array; - is ($k, -39); - is ($v, 'PBLRBLPSFT'); -} (@r) = each @lex_array; is (scalar @r, 0); @@ -80,17 +66,7 @@ my @keys; is ("@keys", "0 1 2"); @keys = keys @lex_array; -is ("@keys", "0 1 2 3"); - -{ - $[ = 1; - - @keys = keys @array; - is ("@keys", "1 2 3"); - - @keys = keys @lex_array; - is ("@keys", "1 2 3 4"); -} +is ("@keys", "0 1 2"); ($k, $v) = each @array; is ($k, 0); @@ -112,16 +88,6 @@ is ("@values", "@array"); @values = values @lex_array; is ("@values", "@lex_array"); -{ - $[ = 1; - - @values = values @array; - is ("@values", "@array"); - - @values = values @lex_array; - is ("@values", "@lex_array"); -} - ($k, $v) = each @array; is ($k, 0); is ($v, 'crunch'); @@ -134,7 +100,6 @@ is ($k, 0); is ($v, 'crunch'); # reset -$[ = 0; while (each @array) { } # each(ARRAY) in the conditional loop @@ -147,7 +112,7 @@ while (($k, $v) = each @array) { # each(ARRAY) on scalar context in conditional loop # should guarantee to be wrapped into defined() function. -# first return value will be $[ --> [#90888] +# first return value will be 0 --> [#90888] $c = 0; $k = 0; $v = 0; diff --git a/t/op/filetest.t b/t/op/filetest.t index f56264684f1..d013cce3276 100644 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -10,7 +10,7 @@ BEGIN { } use Config; -plan(tests => 28 + 27*14); +plan(tests => 34 + 27*14); ok( -d 'op' ); ok( -f 'TEST' ); @@ -89,6 +89,38 @@ is( -f -s $tempfile, 0 ); is( -s -f $tempfile, 0 ); unlink_all $tempfile; +# stacked -l +eval { -l -e "TEST" }; +like $@, qr/^The stat preceding -l _ wasn't an lstat at /, + 'stacked -l non-lstat error with warnings off'; +{ + local $^W = 1; + eval { -l -e "TEST" }; + like $@, qr/^The stat preceding -l _ wasn't an lstat at /, + 'stacked -l non-lstat error with warnings on'; +} +# Make sure -l is using the previous stat buffer, and not using the previ- +# ous op’s return value as a file name. +SKIP: { + use Perl::OSType 'os_type'; + if (os_type ne 'Unix') { skip "Not Unix", 2 } + if (-l "TEST") { skip "TEST is a symlink", 2 } + chomp(my $ln = `which ln`); + if ( ! -e $ln ) { skip "No ln" , 2 } + lstat "TEST"; + `ln -s TEST 1`; + ok ! -l -e _, 'stacked -l uses previous stat, not previous retval'; + unlink 1; + + # Since we already have our skip block set up, we might as well put this + # test here, too: + # -l always treats a non-bareword argument as a file name + system qw "ln -s TEST", \*foo; + local $^W = 1; + ok -l \*foo, '-l \*foo is a file name'; + unlink \*foo; +} + # test that _ is a bareword after filetest operators -f 'TEST'; @@ -198,3 +230,20 @@ for my $op (split //, "rwxoRWXOezsfdlpSbctugkTMBAC") { is( eval "-r -$op \$ft", "-r", "stacked overloaded -$op" ); is( eval "-$op -r \$ft", "-$op", "overloaded stacked -$op" ); } + +# -l stack corruption: this bug occurred from 5.8 to 5.14 +{ + push my @foo, "bar", -l baz; + is $foo[0], "bar", '-l bareword does not corrupt the stack'; +} + +# File test ops should not call get-magic on the topmost SV on the stack if +# it belongs to another op. +{ + my $w; + sub oon::TIESCALAR{bless[],'oon'} + sub oon::FETCH{$w++} + tie my $t, 'oon'; + push my @a, $t, -t; + is $w, 1, 'file test does not call FETCH on stack item not its own'; +} diff --git a/t/op/goto.t b/t/op/goto.t index 5fa3116e0be..f2f91629ec5 100644 --- a/t/op/goto.t +++ b/t/op/goto.t @@ -10,7 +10,7 @@ BEGIN { use warnings; use strict; -plan tests => 77; +plan tests => 78; our $TODO; my $deprecated = 0; @@ -415,7 +415,11 @@ sub recurse2 { my $x = shift; $_[0] ? +1 + recurse1($_[0] - 1) : 0 } +my $w = 0; +$SIG{__WARN__} = sub { ++$w }; is(recurse1(500), 500, 'recursive goto &foo'); +is $w, 0, 'no recursion warnings for "no warnings; goto &sub"'; +delete $SIG{__WARN__}; # [perl #32039] Chained goto &sub drops data too early. diff --git a/t/op/gv.t b/t/op/gv.t index 0b3a5439e71..8c0e31106c7 100644 --- a/t/op/gv.t +++ b/t/op/gv.t @@ -12,16 +12,16 @@ BEGIN { use warnings; -plan( tests => 236 ); +plan( tests => 238 ); -# type coersion on assignment +# type coercion on assignment $foo = 'foo'; $bar = *main::foo; $bar = $foo; is(ref(\$bar), 'SCALAR'); $foo = *main::bar; -# type coersion (not) on misc ops +# type coercion (not) on misc ops ok($foo); is(ref(\$foo), 'GLOB'); @@ -35,7 +35,7 @@ is(ref(\$foo), 'GLOB'); { no warnings; ${\*$foo} = undef; - is(ref(\$foo), 'GLOB', 'no type coersion when assigning to *{} retval'); + is(ref(\$foo), 'GLOB', 'no type coercion when assigning to *{} retval'); $::{phake} = *bar; is( \$::{phake}, \*{"phake"}, @@ -44,7 +44,7 @@ is(ref(\$foo), 'GLOB'); ${\*{"phake"}} = undef; is( ref(\$::{phake}), 'GLOB', - 'no type coersion when assigning to retval of symbolic *{}' + 'no type coercion when assigning to retval of symbolic *{}' ); $::{phaque} = *bar; eval ' @@ -56,11 +56,11 @@ is(ref(\$foo), 'GLOB'); '; is( ref(\$::{phaque}), 'GLOB', - 'no type coersion when assigning to retval of compile-time *{}' + 'no type coercion when assigning to retval of compile-time *{}' ); } -# type coersion on substitutions that match +# type coercion on substitutions that match $a = *main::foo; $b = $a; $a =~ s/^X//; @@ -906,6 +906,16 @@ eval { *{;undef} = 3 }; like $@, qr/^Can't use an undefined value as a symbol reference at /, '*{ ;undef } assignment'; +# [perl #99142] defined &{"foo"} when there is a constant stub +# If I break your module, you get to have it mentioned in Perl's tests. :-) +package HTTP::MobileAttribute::Plugin::Locator { + use constant LOCATOR_GPS => 1; + ::ok defined &{__PACKAGE__."::LOCATOR_GPS"}, + 'defined &{"name of constant"}'; + ::ok Internals::SvREFCNT(${__PACKAGE__."::"}{LOCATOR_GPS}), + "stash elem for slot is not freed prematurely"; +} + __END__ Perl Rules diff --git a/t/op/hash.t b/t/op/hash.t index fa66f4cbdb4..b8aeaa7d2e9 100644 --- a/t/op/hash.t +++ b/t/op/hash.t @@ -8,7 +8,7 @@ BEGIN { use strict; -plan tests => 9; +plan tests => 10; my %h; @@ -158,3 +158,13 @@ is($destroyed, 1, 'Timely hash destruction with lvalue keys'); delete $a{a}; ok $gone, 'deleting the current iterator in void context frees the val' } + +# [perl #99660] Deleted hash element visible to destructor +{ + my %h; + $h{k} = bless []; + my $normal_exit; + local *::DESTROY = sub { my $x = $h{k}; ++$normal_exit }; + delete $h{k}; # must be in void context to trigger the bug + ok $normal_exit, 'freed hash elems are not visible to DESTROY'; +} diff --git a/t/op/index.t b/t/op/index.t index b5b1005e6c7..de742a0e6d7 100644 --- a/t/op/index.t +++ b/t/op/index.t @@ -7,7 +7,7 @@ BEGIN { } use strict; -plan( tests => 122 ); +plan( tests => 114 ); run_tests() unless caller; @@ -128,19 +128,6 @@ is(rindex($a, "foo", ), 0); is (rindex($text, $search_octets), -1); } -foreach my $utf8 ('', ', utf-8') { - foreach my $arraybase (0, 1, -1, -2) { - my $expect_pos = 2 + $arraybase; - - my $prog = "no warnings 'deprecated';\n"; - $prog .= "\$[ = $arraybase; \$big = \"N\\xabN\\xab\"; "; - $prog .= '$big .= chr 256; chop $big; ' if $utf8; - $prog .= 'print rindex $big, "N", 2 + $['; - - fresh_perl_is($prog, $expect_pos, {}, "\$[ = $arraybase$utf8"); - } -} - SKIP: { skip "UTF-EBCDIC is limited to 0x7fffffff", 3 if ord("A") == 193; diff --git a/t/op/leaky-magic.t b/t/op/leaky-magic.t index 9e2d835a3dd..371f3acbd64 100644 --- a/t/op/leaky-magic.t +++ b/t/op/leaky-magic.t @@ -104,11 +104,6 @@ for(qw< S V >) { ok eval { ${"foo::$name"} = 'twor'}, "\$foo::^$_"; } -use tests 1; # $[ -# To avoid tests that are *too* weird, we’ll just check for definition. -${"foo::["}; # touch -ok !defined ${"foo::["}, '$foo::['; - use tests 4; # user/group vars # These are rw, but setting them is obviously going to make the test much # more complex than necessary. So, again, we check for definition. diff --git a/t/op/local.t b/t/op/local.t index d93306f0b01..d7a29756dfe 100644 --- a/t/op/local.t +++ b/t/op/local.t @@ -5,7 +5,7 @@ BEGIN { @INC = qw(. ../lib); require './test.pl'; } -plan tests => 307; +plan tests => 305; my $list_assignment_supported = 1; @@ -666,16 +666,6 @@ is($@, ""); eval { for("a") { for $x (1,2) { local $_="b"; s/(.*)/+$1/ } } }; is($@, ""); -# RT #4342 Special local() behavior for $[ -{ - no warnings 'deprecated'; - local $[ = 1; - ok(1 == $[, 'lexcical scope of local $['); - f(); -} - -sub f { ok(0 == $[); } - # sub localisation { package Other; diff --git a/t/op/pwent.t b/t/op/pwent.t index 2ebd5dce54c..970f4e9c589 100644 --- a/t/op/pwent.t +++ b/t/op/pwent.t @@ -74,6 +74,10 @@ if (!defined $where && $Config::Config{useperlio}) { chomp; if ($_ eq '-') { if (@rec) { + # Some records do not have all items. In particular, + # the macports user has no real name. Here it's an undef, + # in the password file it becomes an empty string. + no warnings 'uninitialized'; push @lines, join (':', @rec) . "\n"; @rec = (); } diff --git a/t/op/ref.t b/t/op/ref.t index 2266a74014d..75fb275d8f3 100644 --- a/t/op/ref.t +++ b/t/op/ref.t @@ -8,7 +8,7 @@ BEGIN { use strict qw(refs subs); -plan(221); +plan(222); # Test glob operations. @@ -748,6 +748,27 @@ EOF } +SKIP:{ + skip_if_miniperl "no Scalar::Util on miniperl", 1; + my $error; + *hassgropper::DESTROY = sub { + require Scalar::Util; + eval { Scalar::Util::weaken($_[0]) }; + $error = $@; + # This line caused a crash before weaken refused to weaken a + # read-only reference: + $do::not::overwrite::this = $_[0]; + }; + my $xs = bless [], "hassgropper"; + undef $xs; + like $error, qr/^Modification of a read-only/, + 'weaken refuses to weaken a read-only ref'; + # Now that the test has passed, avoid sabotaging global destruction: + undef *hassgropper::DESTROY; + undef $do::not::overwrite::this; +} + + # Bit of a hack to make test.pl happy. There are 3 more tests after it leaves. $test = curr_test(); curr_test($test + 3); diff --git a/t/op/sigdispatch.t b/t/op/sigdispatch.t index e08e35f3afe..6b8c7782037 100644 --- a/t/op/sigdispatch.t +++ b/t/op/sigdispatch.t @@ -9,7 +9,7 @@ BEGIN { use strict; use Config; -plan tests => 17; +plan tests => 23; watchdog(15); @@ -39,12 +39,15 @@ eval { is($@, "Alarm!\n", 'after the second loop'); SKIP: { - skip('We can\'t test blocking without sigprocmask', 11) + skip('We can\'t test blocking without sigprocmask', 17) if is_miniperl() || !$Config{d_sigprocmask}; - skip('This doesn\'t work on OpenBSD threaded builds RT#88814', 11) + skip('This doesn\'t work on OpenBSD threaded builds RT#88814', 17) if $^O eq 'openbsd' && $Config{useithreads}; require POSIX; + my $pending = POSIX::SigSet->new(); + is POSIX::sigpending($pending), '0 but true', 'sigpending'; + is $pending->ismember(&POSIX::SIGUSR1), 0, 'SIGUSR1 is not pending'; my $new = POSIX::SigSet->new(&POSIX::SIGUSR1); POSIX::sigprocmask(&POSIX::SIG_BLOCK, $new); @@ -52,10 +55,14 @@ SKIP: { $SIG{USR1} = sub { $gotit++ }; kill 'SIGUSR1', $$; is $gotit, 0, 'Haven\'t received third signal yet'; + is POSIX::sigpending($pending), '0 but true', 'sigpending'; + is $pending->ismember(&POSIX::SIGUSR1), 1, 'SIGUSR1 is pending'; my $old = POSIX::SigSet->new(); POSIX::sigsuspend($old); is $gotit, 1, 'Received third signal'; + is POSIX::sigpending($pending), '0 but true', 'sigpending'; + is $pending->ismember(&POSIX::SIGUSR1), 0, 'SIGUSR1 is no longer pending'; { kill 'SIGUSR1', $$; diff --git a/t/op/stat.t b/t/op/stat.t index 1808ee4ae4c..fccadbaaefe 100644 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -20,7 +20,7 @@ if(eval {require File::Spec; 1}) { } -plan tests => 107; +plan tests => 109; my $Perl = which_perl(); @@ -441,6 +441,12 @@ stat $0; eval { lstat _ }; like( $@, qr/^The stat preceding lstat\(\) wasn't an lstat/, 'lstat _ croaks after stat' ); +eval { lstat *_ }; +like( $@, qr/^The stat preceding lstat\(\) wasn't an lstat/, + 'lstat *_ croaks after stat' ); +eval { lstat \*_ }; +like( $@, qr/^The stat preceding lstat\(\) wasn't an lstat/, + 'lstat \*_ croaks after stat' ); eval { -l _ }; like( $@, qr/^The stat preceding -l _ wasn't an lstat/, '-l _ croaks after stat' ); diff --git a/t/op/taint.t b/t/op/taint.t index 02eac805130..ba327222503 100644 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -17,7 +17,7 @@ BEGIN { use strict; use Config; -plan tests => 784; +plan tests => 786; $| = 1; @@ -137,22 +137,6 @@ my $TEST = 'TEST'; { $ENV{'DCL$PATH'} = '' if $Is_VMS; - if ($Is_MSWin32 && $Config{ccname} =~ /bcc32/ && ! -f 'cc3250mt.dll') { - my $bcc_dir; - foreach my $dir (split /$Config{path_sep}/, $ENV{PATH}) { - if (-f "$dir/cc3250mt.dll") { - $bcc_dir = $dir and last; - } - } - if (defined $bcc_dir) { - require File::Copy; - File::Copy::copy("$bcc_dir/cc3250mt.dll", '.') or - die "$0: failed to copy cc3250mt.dll: $!\n"; - eval q{ - END { unlink "cc3250mt.dll" } - }; - } - } $ENV{PATH} = ($Is_Cygwin) ? '/usr/bin' : ''; delete @ENV{@MoreEnv}; $ENV{TERM} = 'dumb'; @@ -2180,6 +2164,10 @@ end ok(!tainted "", "tainting still works after index() of the constant"); } +# Tainted values with smartmatch +# [perl #93590] S_do_smartmatch stealing its own string buffers +ok "M$TAINT" ~~ ['m', 'M'], '$tainted ~~ ["whatever", "match"]'; +ok !("M$TAINT" ~~ ['m', undef]), '$tainted ~~ ["whatever", undef]'; # This may bomb out with the alarm signal so keep it last diff --git a/t/op/tie.t b/t/op/tie.t index d7a24540bda..3d4eb203943 100644 --- a/t/op/tie.t +++ b/t/op/tie.t @@ -1098,3 +1098,15 @@ $$elem = *bar; print &{\&$$elem}, "\n"; EXPECT 73 +######## + +# \&$tied with $tied holding a PVGV glob before the fetch (but not after) +local *72 = sub { 73 }; +sub TIESCALAR {bless[]} +sub STORE{} +sub FETCH { 72 } +tie my $x, "main"; +$x = *bar; +print &{\&$x}, "\n"; +EXPECT +73 diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t index adb02f3718f..ed070e0a2cf 100644 --- a/t/op/tie_fetch_count.t +++ b/t/op/tie_fetch_count.t @@ -7,7 +7,7 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require './test.pl'; - plan (tests => 219); + plan (tests => 283); } use strict; @@ -28,6 +28,7 @@ sub STORE { unshift @{$_[0]}, $_[1] } sub check_count { my $op = shift; my $expected = shift() // 1; + local $::Level = $::Level + 1; is $count, $expected, "FETCH called " . ( $expected == 1 ? "just once" : @@ -43,6 +44,7 @@ tie my $var => 'main', 1; # Assignment. $dummy = $var ; check_count "="; +*dummy = $var ; check_count '*glob = $tied'; # Unary +/- $dummy = +$var ; check_count "unary +"; @@ -117,33 +119,18 @@ $dummy = <$var0> ; check_count ''; $dummy = <${var}> ; check_count ''; # File operators -$dummy = -r $var ; check_count '-r'; -$dummy = -w $var ; check_count '-w'; -$dummy = -x $var ; check_count '-x'; -$dummy = -o $var ; check_count '-o'; -$dummy = -R $var ; check_count '-R'; -$dummy = -W $var ; check_count '-W'; -$dummy = -X $var ; check_count '-X'; -$dummy = -O $var ; check_count '-O'; -$dummy = -e $var ; check_count '-e'; -$dummy = -z $var ; check_count '-z'; -$dummy = -s $var ; check_count '-s'; -$dummy = -f $var ; check_count '-f'; -$dummy = -d $var ; check_count '-d'; +for (split //, 'rwxoRWXOezsfdpSbctugkTBMAC') { + no warnings 'unopened'; + $dummy = eval "-$_ \$var"; check_count "-$_"; + # Make $var hold a glob: + $var = *dummy; $dummy = $var; $count = 0; + $dummy = eval "-$_ \$var"; check_count "-$_ \$tied_glob"; + next if /[guk]/; + $var = *dummy; $dummy = $var; $count = 0; + eval "\$dummy = -$_ \\\$var"; + check_count "-$_ \\\$tied_glob"; +} $dummy = -l $var ; check_count '-l'; -$dummy = -p $var ; check_count '-p'; -$dummy = -S $var ; check_count '-S'; -$dummy = -b $var ; check_count '-b'; -$dummy = -c $var ; check_count '-c'; -$dummy = -t $var ; check_count '-t'; -$dummy = -u $var ; check_count '-u'; -$dummy = -g $var ; check_count '-g'; -$dummy = -k $var ; check_count '-k'; -$dummy = -T $var ; check_count '-T'; -$dummy = -B $var ; check_count '-B'; -$dummy = -M $var ; check_count '-M'; -$dummy = -A $var ; check_count '-A'; -$dummy = -C $var ; check_count '-C'; # Matching $_ = "foo"; @@ -206,6 +193,7 @@ tie my $var8 => 'main', 'main'; sub bolgy {} $var8->bolgy ; check_count '->method'; { + no warnings 'once'; () = *swibble; # This must be the name of an existing glob to trigger the maximum # number of fetches in 5.14: @@ -215,6 +203,19 @@ $var8->bolgy ; check_count '->method'; *$var9 = \&{"glumscrin"}; check_count '*$tied = \&{"name of const"}'; } +# Functions that operate on filenames or filehandles +for ([chdir=>''],[chmod=>'0,'],[chown=>'0,0,'],[utime=>'0,0,'], + [truncate=>'',',0'],[stat=>''],[lstat=>'']) { + my($op,$args,$postargs) = @$_; $postargs //= ''; + # This line makes $var8 hold a glob: + $var8 = *dummy; $dummy = $var8; $count = 0; + eval "$op $args \$var8 $postargs"; + check_count "$op $args\$tied_glob$postargs"; + $var8 = *dummy; $dummy = $var8; $count = 0; + eval "$op $args \\\$var8 $postargs"; + check_count "$op $args\\\$tied_glob$postargs"; +} + ############################################### # Tests for $foo binop $foo # ############################################### diff --git a/t/porting/checkcfgvar.t b/t/porting/checkcfgvar.t new file mode 100644 index 00000000000..10eab2d01fc --- /dev/null +++ b/t/porting/checkcfgvar.t @@ -0,0 +1,29 @@ +#!./perl -w + +# What does this test? +# This uses Porting/checkcfgvar.pl to check that none of the config.sh-like +# files are missing any entries. +# +# Why do we test this? +# We need them to be complete when we ship a release, and this way we catch +# problems as early as possible. (Instead of creating the potential for yet +# another last-minute job for the release manager). If a config file for a +# platform is incomplete, it can't be used to correctly regenerate config.h, +# because missing values result in invalid C code. We keep the files sorted +# as it makes it easy to automate adding defaults. +# +# It's broken - how do I fix it? +# The most likely reason that the test failed is because you've just added +# a new entry to Configure, config.sh and config_h.SH but nowhere else. +# Run something like: +# perl Porting/checkcfgvar.pl --regen --default=undef +# (the correct default might not always be undef) to do most of the work, and +# then hand-edit configure.com (as that's not automated). +# If this changes uconfig.sh, you'll also need to run perl regen/uconfig_h.pl + +BEGIN { + @INC = '..' if -f '../TestInit.pm'; +} +use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute + +system "$^X Porting/checkcfgvar.pl --tap"; diff --git a/t/porting/diag.t b/t/porting/diag.t index a3f627264ad..0a81b29eddf 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -486,13 +486,11 @@ Size magic not implemented %s%s on %s %s %s Starting Full Screen process with flag=%d, mytype=%d Starting PM process with flag=%d, mytype=%d -strxfrm() gets absurd SWASHNEW didn't return an HV ref -T and -B not implemented on filehandles The flock() function is not implemented on NetWare The rewinddir() function is not implemented on NetWare The seekdir() function is not implemented on NetWare -The stat preceding lstat() wasn't an lstat The telldir() function is not implemented on NetWare Too deeply nested ()-groups in %s Too late to run CHECK block diff --git a/t/porting/globvar.t b/t/porting/globvar.t index 23f5c488811..f34ab4323d4 100644 --- a/t/porting/globvar.t +++ b/t/porting/globvar.t @@ -7,7 +7,7 @@ use Config; require 't/test.pl'; skip_all("Code to read symbols not ported to $^O") - if $^O eq 'VMS' or $^O eq 'Win32'; + if $^O eq 'VMS' or $^O eq 'MSWin32'; # Not investigated *why* we don't export these, but we don't, and we've not # received any bug reports about it causing problems: diff --git a/t/porting/known_pod_issues.dat b/t/porting/known_pod_issues.dat index bee98ef34a3..fc9d85f4817 100644 --- a/t/porting/known_pod_issues.dat +++ b/t/porting/known_pod_issues.dat @@ -14,6 +14,7 @@ _control87(3) Algorithm::C3 Apache::MP3 +Array::Base Attribute::Constant basename(1) ByteLoader @@ -23,6 +24,7 @@ chcp(1) Class::C3 Class::ISA Class::PseudoHash +Classic::Perl Clone curl(1) Data::Float @@ -32,6 +34,7 @@ DB_File(3) DBIx::Profile Devel::DProf Devel::NYTProf +Devel::PPPort Devel::SawAmpersand dirname(1) Exporter::Easy @@ -225,7 +228,8 @@ pod/perlinterp.pod ? Should you be using L<...> instead of 1 pod/perlinterp.pod Verbatim line length including indents exceeds 79 by 1 pod/perlintro.pod Verbatim line length including indents exceeds 79 by 11 pod/perliol.pod Verbatim line length including indents exceeds 79 by 8 -pod/perlipc.pod Verbatim line length including indents exceeds 79 by 21 +pod/perlipc.pod Apparent broken link 1 +pod/perlipc.pod Verbatim line length including indents exceeds 79 by 19 pod/perlirix.pod Verbatim line length including indents exceeds 79 by 4 pod/perllocale.pod Verbatim line length including indents exceeds 79 by 4 pod/perllol.pod Verbatim line length including indents exceeds 79 by 4 @@ -237,6 +241,9 @@ pod/perlmpeix.pod Verbatim line length including indents exceeds 79 by 2 pod/perlmroapi.pod ? Should you be using L<...> instead of 1 pod/perlnetware.pod Verbatim line length including indents exceeds 79 by 4 pod/perlnewmod.pod Verbatim line length including indents exceeds 79 by 1 +pod/perlobj.pod Apparent broken link 1 +pod/perlootut.pod ? Should you be using F<...> or maybe L<...> instead of 1 +pod/perlootut.pod Apparent internal link is missing its forward slash 16 pod/perlop.pod Verbatim line length including indents exceeds 79 by 30 pod/perlos2.pod ? Should you be using L<...> instead of 2 pod/perlos2.pod Verbatim line length including indents exceeds 79 by 22 @@ -263,7 +270,6 @@ pod/perlthrtut.pod Verbatim line length including indents exceeds 79 by 5 pod/perltie.pod Verbatim line length including indents exceeds 79 by 13 pod/perltodo.pod Verbatim line length including indents exceeds 79 by 7 pod/perltodo.pod empty section in previous paragraph 2 -pod/perltoot.pod Verbatim line length including indents exceeds 79 by 1 pod/perltrap.pod ? Should you be using F<...> or maybe L<...> instead of 1 pod/perltrap.pod Verbatim line length including indents exceeds 79 by 15 pod/perltru64.pod ? Should you be using F<...> or maybe L<...> instead of 1 @@ -303,6 +309,7 @@ lib/dbm_filter/encode.pm Verbatim line length including indents exceeds 79 by 1 lib/dbm_filter/int32.pm Verbatim line length including indents exceeds 79 by 1 lib/dbm_filter/null.pm Verbatim line length including indents exceeds 79 by 1 lib/dbm_filter/utf8.pm Verbatim line length including indents exceeds 79 by 1 +lib/devel/ppport.pm Pod NAME already used 1 lib/english.pm Verbatim line length including indents exceeds 79 by 1 lib/exporter.pm Verbatim line length including indents exceeds 79 by 2 lib/extutils/embed.pm Verbatim line length including indents exceeds 79 by 2 diff --git a/t/porting/manifest.t b/t/porting/manifest.t index 292631ee2bd..068540c983c 100644 --- a/t/porting/manifest.t +++ b/t/porting/manifest.t @@ -59,7 +59,7 @@ SKIP: { chomp(my @repo= grep { !/\.gitignore$/ } `git ls-files`); skip("git ls-files didnt work",3) if !@repo; - is( 0+@repo, 0+@files, "git ls-files has a corresponding number of files as does MANIFEST"); + is( 0+@repo, 0+@files, "git ls-files gives the same number of files as MANIFEST lists"); my %repo= map { $_ => 1 } @repo; my %mani= map { $_ => 1 } @files; is( 0+keys %mani, 0+@files, "no duplicate files in MANIFEST"); diff --git a/t/porting/podcheck.t b/t/porting/podcheck.t index f266f3779c8..6aaab010959 100644 --- a/t/porting/podcheck.t +++ b/t/porting/podcheck.t @@ -1,5 +1,10 @@ #!/usr/bin/perl -w +BEGIN { + chdir 't'; + unshift @INC, "../lib"; +} + use strict; use warnings; use feature 'unicode_strings'; @@ -109,11 +114,13 @@ C...E> mark-up instead. A number of issues raised by podcheck.t and by the base Pod::Checker are not really problems, but merely potential problems. After inspecting them and deciding that they aren't real problems, it is possible to shut up this program -about them, unlike base Pod::Checker. To do this, call podcheck.t with the -C<--regen> option to regenerate the database. This tells it that all existing +about them, unlike base Pod::Checker. For a valid link to an outside module +or man page, call podcheck.t with the C<--add_link> option to add it to the +the database of known links; for other causes, call podcheck.t with the C<--regen> +option to regenerate the entire database. This tells it that all existing issues are to not be mentioned again. -This isn't fool-proof. The database merely keeps track of the number of these +C<--regen> isn't fool-proof. The database merely keeps track of the number of these potential problems of each type for each pod. If a new problem of a given type is introduced into the pod, podcheck.t will spit out all of them. You then have to figure out which is the new one, and should it be changed or not. @@ -125,9 +132,51 @@ Also, if the count of potential problems of a given type for a pod decreases, the database must be regenerated so that it knows the new number. The program gives instructions when this happens. -There is currently no check that modules listed as valid in the data base +Some pods will have varying numbers of problems of a given type. This can +be handled by manually editing the database file (see L), and setting +the number of those problems for that pod to a negative number. This will +cause the corresponding error to always be suppressed no matter how many there +actually are. + +Another problem is that there is currently no check that modules listed as +valid in the data base actually are. Thus any errors introduced there will remain there. +=head2 Specially handled pods + +=over + +=item perltoc + +This pod is generated by pasting bits from other pods. Errors in those bits +will show up as errors here, as well as for those other pods. Therefore +errors here are suppressed, and the pod is checked only to verify that nodes +within it actually exist that are externally linked to. + +=item perldelta + +The current perldelta pod is initialized from a template that contains +placeholder text. Some of this text is in the form of links that don't really +exist. Any such links that are listed in C<@perldelta_ignore_links> will not +generate messages. It is presumed that these links will be cleaned up when +the perldelta is cleaned up for release since they should be marked with +C. + +=item Porting/perldelta_template.pod + +This is not a pod, but a template for C. Any errors introduced +here will show up when C is created from it. + +=item cpan-upstream pods + +See the L option documentation + +=item old perldeltas + +See the L option documentation + +=back + =head1 OPTIONS =over @@ -196,6 +245,44 @@ L =cut +# VMS builds have a '.com' appended to utility and script names, and it adds a +# trailing dot for any other file name that doesn't have a dot in it. The db +# is stored without those things. This regex allows for these special file +# names to be dealt with. It needs to be interpolated into a larger regex +# that furnishes the closing boundary. +my $vms_re = qr/ \. (?: com )? /x; + +# Some filenames in the MANIFEST match $vms_re, and so must not be handled the +# same way that that the special vms ones are. This hash lists those. +my %special_vms_files; + +# This is to get this to work across multiple file systems, including those +# that are not case sensitive. The db is stored in lower case, Un*x style, +# and all file name comparisons are done that way. +sub canonicalize($) { + my $input = shift; + my ($volume, $directories, $file) + = File::Spec->splitpath(File::Spec->canonpath($input)); + # Assumes $volume is constant for everything in this directory structure + $directories = "" if ! $directories; + $file = "" if ! $file; + $file = lc join '/', File::Spec->splitdir($directories), $file; + $file =~ s! / /+ !/!gx; # Multiple slashes => single slash + + # The db is stored without the special suffixes that are there in VMS, so + # strip them off to get the comparable name. But some files on all + # platforms have these suffixes, so this shouldn't happen for them, as any + # of their db entries will have the suffixes in them. The hash has been + # populated with these files. + if ($^O eq 'VMS' + && $file =~ / ( $vms_re ) $ /x + && ! exists $special_vms_files{$file}) + { + $file =~ s/ $1 $ //x; + } + return $file; +} + ##################################################### # HOW IT WORKS (in general) # @@ -226,8 +313,14 @@ L # has many false positives; higher numbers give more messages. my $Warnings_Level = 200; +<<<<<<< HEAD # perldelta during construction may have place holder links. our @perldelta_ignore_links = ( "XXX", "perl5YYYdelta" ); +======= +# perldelta during construction may have place holder links. N.B. This +# variable is referred to by name in release_managers_guide.pod +our @perldelta_ignore_links = ( "XXX", "perl5YYYdelta", "perldiag/message" ); +>>>>>>> blead # To see if two pods with the same NAME are actually copies of the same pod, # which is not an error, it uses a checksum to save work. @@ -236,6 +329,7 @@ my $digest_type = "SHA-1"; my $original_dir = File::Spec->rel2abs(File::Spec->curdir); my $data_dir = File::Spec->catdir($original_dir, 'porting'); my $known_issues = File::Spec->catfile($data_dir, 'known_pod_issues.dat'); +my $MANIFEST = File::Spec->catfile(File::Spec->updir($original_dir), 'MANIFEST'); my $copy_fh; my $MAX_LINE_LENGTH = 79; # 79 columns @@ -264,8 +358,24 @@ my $lib_ext = $Config{'lib_ext'}; $lib_ext =~ tr/.//d; my $lib_so = $Config{'so'}; $lib_so =~ tr/.//d; my $dl_ext = $Config{'dlext'}; $dl_ext =~ tr/.//d; +# Not really pods, but can look like them. +my %excluded_files = ( + canonicalize("lib/unicore/mktables") => 1, + canonicalize("Porting/perldelta_template.pod") => 1, + canonicalize("autodoc.pl") => 1, + canonicalize("configpm") => 1, + canonicalize("miniperl") => 1, + canonicalize("perl") => 1, + ); + +# This list should not include anything for which case sensitivity is +# important, as it won't work on VMS, and won't show up until tested on VMS. +# All or almost all such files should be listed in the MANIFEST, so that can +# be examined for them, and each such file explicitly excluded, as is done for +# .PL files in the loop just below this. For files not catchable this way, +# is_pod_file() can be used to exclude these at a finer grained level. my $non_pods = qr/ (?: \. - (?: [achot] | zip | gz | bz2 | jar | tar | tgz | PL + (?: [achot] | zip | gz | bz2 | jar | tar | tgz | orig | rej | patch # Patch program output | sw[op] | \#.* # Editor droppings | old # buildtoc output @@ -294,6 +404,28 @@ my $non_pods = qr/ (?: \. | ^(?i:Makefile\.PL)$ /x; +# '.PL' files should be excluded, as they aren't final pods, but often contain +# material used in generating pods, and so can look like a pod. We can't use +# the regexp above because case sensisitivity is important for these, as some +# '.pl' files should be examined for pods. Instead look through the MANIFEST +# for .PL files and get their full path names, so we can exclude each such +# file explicitly. This works because other porting tests prohibit having two +# files with the same names except for case. +open my $manifest_fh, '<:bytes', $MANIFEST or die "Can't open $MANIFEST"; +while (<$manifest_fh>) { + + # While we have MANIFEST open, on VMS platforms, look for files that match + # the magic VMS file names that have to be handled specially. Add these + # to the list of them. + if ($^O eq 'VMS' && / ^ ( [^\t]* $vms_re ) \t /x) { + $special_vms_files{$1} = 1; + } + if (/ ^ ( [^\t]* \. PL ) \t /x) { + $excluded_files{canonicalize($1)} = 1; + } +} +close $manifest_fh, or die "Can't close $MANIFEST"; + # Pod::Checker messages to suppress my @suppressed_messages = ( @@ -302,7 +434,7 @@ my @suppressed_messages = ( # that are real problems. "unescaped <>", "Entity number out of range", # Checker outputs this for anything above - # 255, and all Unicode is valid + # 255, but in fact all Unicode is valid ); sub suppressed { @@ -367,23 +499,6 @@ sub suppressed { } } -# This is to get this to work across multiple file systems, including those -# that are not case sensitive. The db is stored in lower case, Un*x style, -# and all file name comparisons are done that way. -sub canonicalize($) { - my $input = shift; - my ($volume, $directories, $file) - = File::Spec->splitpath(File::Spec->canonpath($input)); - # Assumes $volume is constant for everything in this directory structure - $directories = "" if ! $directories; - $file = "" if ! $file; - $file =~ s/\.$// if $^O eq 'VMS'; - my $output = lc join '/', File::Spec->splitdir($directories), $file; - $output =~ s! / /+ !/!gx; # Multiple slashes => single slash - return $output; -} - - # List of known potential problems by pod and type. my %known_problems; @@ -1025,6 +1140,7 @@ if ($show_counts) { exit 0; } +<<<<<<< HEAD my %excluded_files = ( "lib/unicore/mktables" => 1, @@ -1041,6 +1157,8 @@ foreach my $file (keys %excluded_files) { $excluded_files{canonicalize($file)} = 1; } +======= +>>>>>>> blead # re to match files that are to be parsed only if there is an internal link # to them. It does not include cpan, as whether those are parsed depends # on a switch. Currently, only perltoc and the stable perldelta.pod's @@ -1154,7 +1272,6 @@ sub is_pod_file { return; } - my $filename = $File::Find::name; # Assumes that the path separator is exactly one character. @@ -1181,8 +1298,8 @@ sub is_pod_file { }; # If the file is a .pm or .pod, having any initial '=' on a line is - # grounds for testing it. Otherwise, require a head1 NAME line to view it - # as a potential pod + # grounds for testing it. Otherwise, require a head1 NAME line to + # consider it as a potential pod if ($filename =~ /\.(?:pm|pod)/) { return unless $contents =~ /^=/m; } else { @@ -1296,27 +1413,27 @@ plan (tests => scalar @files) if ! $regen; # are done here. @files = sort { if ($a =~ /^cpan/) { return 1 if $b !~ /^cpan/; - return $a cmp $b; + return lc $a cmp lc $b; } elsif ($b =~ /^cpan/) { return -1; } elsif ($a =~ /$only_for_interior_links_re/) { return 1 if $b !~ /$only_for_interior_links_re/; - return $a cmp $b; + return lc $a cmp lc $b; } elsif ($b =~ /$only_for_interior_links_re/) { return -1; } elsif ($a =~ /^lib/) { return 1 if $b !~ /^lib/; - return $a cmp $b; + return lc $a cmp lc $b; } elsif ($b =~ /^lib/) { return -1; } elsif ($a =~ /\breadme\b/i) { return 1 if $b !~ /\breadme\b/i; - return $a cmp $b; + return lc $a cmp lc $b; } elsif ($b =~ /\breadme\b/i) { return -1; @@ -1333,7 +1450,7 @@ foreach my $filename (@files) { note("parsing $filename") if DEBUG; # We may have already figured out some things in the process of generating - # the file list. If so, have a $checker object already. But if not, + # the file list. If so, we have a $checker object already. But if not, # generate one now. my $checker = $filename_to_checker{$filename}; if (! $checker) { @@ -1400,7 +1517,10 @@ foreach my $filename (@files) { $checker->set_skip("$prior_filename is a README apparently for $filename"); } elsif ($filename =~ /\breadme\b/i) { $checker->set_skip("$filename is a README apparently for $prior_filename"); - } elsif (! $do_upstream_cpan && $filename =~ /^cpan/) { + } elsif (! $do_upstream_cpan + && $filename =~ /^cpan/ + && $prior_filename =~ /^cpan/) + { $checker->set_skip("CPAN is upstream for $filename"); } else { # Here have two pods with identical names that differ $prior_checker->poderror( @@ -1575,7 +1695,6 @@ if ($regen) { # Now ready to output the messages. foreach my $filename (@files) { - my $test_name = "POD of $filename"; my $canonical = canonicalize($filename); SKIP: { my $skip = $filename_to_checker{$filename}->get_skip // ""; @@ -1593,7 +1712,7 @@ foreach my $filename (@files) { else { $count = @{$problems{$filename}{$message}}; } - my_safer_print($copy_fh, canonicalize($filename) . "\t$message\t$count\n"); + my_safer_print($copy_fh, $canonical . "\t$message\t$count\n"); } next; } diff --git a/t/porting/regen.t b/t/porting/regen.t index b644d700ad7..a1483820e93 100644 --- a/t/porting/regen.t +++ b/t/porting/regen.t @@ -2,23 +2,12 @@ # Verify that all files generated by perl scripts are up to date. -my ($in_t, $lib); - BEGIN { - $in_t = -f 'TEST' && -f '../regen.pl'; - $lib = $in_t ? '../lib' : 'lib'; - unshift @INC, $lib; + @INC = '..' if -f '../TestInit.pm'; } - +use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute use strict; -use File::Spec::Functions 'rel2abs'; -$^X = rel2abs($^X); -$ENV{PERL5LIB} = rel2abs($lib); - -chdir '..' if $in_t; - -$INC[0] = 'lib'; require 'regen/regen_lib.pl'; require 't/test.pl'; $::NO_ENDING = $::NO_ENDING = 1; diff --git a/t/re/fold_grind.t b/t/re/fold_grind.t index b8a1acba3b3..98fc3966c51 100644 --- a/t/re/fold_grind.t +++ b/t/re/fold_grind.t @@ -246,8 +246,9 @@ while (<$fh>) { # Lines look like (though without the initial '#') #0130; F; 0069 0307; # LATIN CAPITAL LETTER I WITH DOT ABOVE - my ($line, $comment) = split / \s+ \# \s+ /x, $_; - next if $line eq "" || $line =~ /^#/; + # Get rid of comments, ignore blank or comment-only lines + my $line = $_ =~ s/ (?: \s* \# .* )? $ //rx; + next unless length $line; my ($hex_from, $fold_type, @hex_folded) = split /[\s;]+/, $line; next if $fold_type eq 'T'; # Perl doesn't do Turkish folding diff --git a/t/re/re_tests b/t/re/re_tests index 5708de1dc96..5a4eaedb8ee 100644 --- a/t/re/re_tests +++ b/t/re/re_tests @@ -1535,4 +1535,10 @@ abc\N{def - c - \\N{NAME} must be resolved by the lexer /^\p{L_}/ \x{3400} n - - /^\p{L}/ \x{3400} y $& \x{3400} +# RT #89774 +/s\xDF/ui \xDFs yT $& \xDFs + +# RT #99928 +/^\R\x0A$/ \x0D\x0A yT $& \x0D\x0A + # vim: softtabstop=0 noexpandtab diff --git a/t/re/regexp.t b/t/re/regexp.t index 9c430ad248e..815b877a968 100644 --- a/t/re/regexp.t +++ b/t/re/regexp.t @@ -59,6 +59,11 @@ BEGIN { } +sub _comment { + return map { /^#/ ? "$_\n" : "# $_\n" } + map { split /\n/ } @_; +} + use strict; use warnings FATAL=>"all"; use vars qw($iters $numtests $bang $ffff $nulnul $OP); @@ -175,7 +180,7 @@ EOFCODE next TEST; } elsif ($@) { - print "not ok $test$todo $input => error `$err'\n$code\n$@\n"; next TEST; + print "not ok $test$todo $input => error `$err'\n", _comment("$code\n$@\n"); next TEST; } elsif ($result =~ /^n/) { if ($match) { print "not ok $test$todo ($study) $input => false positive\n"; next TEST } @@ -184,12 +189,12 @@ EOFCODE if (!$match || $got ne $expect) { eval { require Data::Dumper }; if ($@) { - print "not ok $test$todo ($study) $input => `$got', match=$match\n$code\n"; + print "not ok $test$todo ($study) $input => `$got', match=$match\n", _comment("$code\n"); } else { # better diagnostics my $s = Data::Dumper->new([$subject],['subject'])->Useqq(1)->Dump; my $g = Data::Dumper->new([$got],['got'])->Useqq(1)->Dump; - print "not ok $test$todo ($study) $input => `$got', match=$match\n$s\n$g\n$code\n"; + print "not ok $test$todo ($study) $input => `$got', match=$match\n", _comment("$s\n$g\n$code\n"); } next TEST; } diff --git a/t/re/substr.t b/t/re/substr.t index 341625619ac..b48cb8f00ca 100644 --- a/t/re/substr.t +++ b/t/re/substr.t @@ -24,7 +24,7 @@ $SIG{__WARN__} = sub { BEGIN { require './test.pl'; } -plan(363); +plan(356); run_tests() unless caller; @@ -44,20 +44,6 @@ like ($@, $FATAL_MSG); is(substr($a,0,-6), 'abc'); # P=Q R S is(substr($a,-3,1), 'x'); # P Q R S -$[ = 1; - -is(substr($a,1,3), 'abc' ); # P=Q R S -is(substr($a,4,3), 'def' ); # P Q R S -is(substr($a,7,999), 'xyz');# P Q S R -$b = substr($a,999,999) ; # warn # P R Q S -is($w--, 1); -eval{substr($a,999,999) = "" ; } ; # P R Q S -like ($@, $FATAL_MSG); -is(substr($a,1,-6), 'abc' );# P=Q R S -is(substr($a,-3,1), 'x' ); # P Q R S - -$[ = 0; - substr($a,3,3) = 'XYZ'; is($a, 'abcXYZxyz' ); substr($a,0,2) = ''; diff --git a/t/win32/system.t b/t/win32/system.t index 324035b285a..ba092105776 100644 --- a/t/win32/system.t +++ b/t/win32/system.t @@ -34,28 +34,10 @@ open(my $F, ">$testdir/$exename.c") or die "Can't create $testdir/$exename.c: $!"; print $F <<'EOT'; #include -#ifdef __BORLANDC__ -#include -#endif int main(int ac, char **av) { int i; -#ifdef __BORLANDC__ - char *s = GetCommandLine(); - int j=0; - av[0] = s; - if (s[0]=='"') { - for(;s[++j]!='"';) - ; - av[0]++; - } - else { - for(;s[++j]!=' ';) - ; - } - s[j]=0; -#endif for (i = 0; i < ac; i++) printf("[%s]", av[i]); printf("\n"); diff --git a/taint.c b/taint.c index 62c171fc238..fa1366ffd27 100644 --- a/taint.c +++ b/taint.c @@ -11,7 +11,7 @@ /* * '...we will have peace, when you and all your works have perished--and * the works of your dark master to whom you would deliver us. You are a - * liar, Saruman, and a corrupter of men's hearts.' --Thoden + * liar, Saruman, and a corrupter of men's hearts.' --Théoden * * [p.580 of _The Lord of the Rings_, III/x: "The Voice of Saruman"] */ diff --git a/toke.c b/toke.c index 1bf7e18c862..5261c6c3798 100644 --- a/toke.c +++ b/toke.c @@ -1417,7 +1417,10 @@ Perl_lex_read_unichar(pTHX_ U32 flags) if (c != -1) { if (c == '\n') CopLINE_inc(PL_curcop); - PL_parser->bufptr += UTF8SKIP(PL_parser->bufptr); + if (UTF) + PL_parser->bufptr += UTF8SKIP(PL_parser->bufptr); + else + ++(PL_parser->bufptr); } return c; } @@ -6023,14 +6026,6 @@ Perl_yylex(pTHX) PREREF('$'); } - /* This kludge not intended to be bulletproof. */ - if (PL_tokenbuf[1] == '[' && !PL_tokenbuf[2]) { - pl_yylval.opval = newSVOP(OP_CONST, 0, - newSViv(CopARYBASE_get(&PL_compiling))); - pl_yylval.opval->op_private = OPpCONST_ARYBASE; - TERM(THING); - } - d = s; { const char tmp = *s; @@ -6927,8 +6922,7 @@ Perl_yylex(pTHX) case KEY___FILE__: FUN0OP( - pl_yylval.opval = (OP*)newSVOP(OP_CONST, 0, - newSVpv(CopFILE(PL_curcop),0)) + (OP*)newSVOP(OP_CONST, 0, newSVpv(CopFILE(PL_curcop),0)) ); case KEY___LINE__: @@ -6987,12 +6981,6 @@ Perl_yylex(pTHX) #else if (PerlLIO_setmode(PerlIO_fileno(PL_rsfp), O_TEXT) != -1) { #endif /* NETWARE */ -#ifdef PERLIO_IS_STDIO /* really? */ -# if defined(__BORLANDC__) - /* XXX see note in do_binmode() */ - ((FILE*)PL_rsfp)->flags &= ~_F_BIN; -# endif -#endif if (loc > 0) PerlIO_seek(PL_rsfp, loc, 0); } diff --git a/uconfig.h b/uconfig.h index a74501732e6..10134236642 100644 --- a/uconfig.h +++ b/uconfig.h @@ -879,46 +879,18 @@ #define _V(args) () #endif -/* INTSIZE: - * This symbol contains the value of sizeof(int) so that the C - * preprocessor can make decisions based on it. - */ -/* LONGSIZE: - * This symbol contains the value of sizeof(long) so that the C - * preprocessor can make decisions based on it. - */ -/* SHORTSIZE: - * This symbol contains the value of sizeof(short) so that the C - * preprocessor can make decisions based on it. - */ -#define INTSIZE 4 /**/ -#define LONGSIZE 4 /**/ -#define SHORTSIZE 2 /**/ - -/* MULTIARCH: - * This symbol, if defined, signifies that the build - * process will produce some binary files that are going to be - * used in a cross-platform environment. This is the case for - * example with the NeXT "fat" binaries that contain executables - * for several CPUs. +/* OSNAME: + * This symbol contains the name of the operating system, as determined + * by Configure. You shouldn't rely on it too much; the specific + * feature tests from Configure are generally more reliable. */ -/*#define MULTIARCH / **/ - -/* HAS_QUAD: - * This symbol, if defined, tells that there's a 64-bit integer type, - * Quad_t, and its unsigned counterpart, Uquad_t. QUADKIND will be one - * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, or QUAD_IS_INT64_T. +/* OSVERS: + * This symbol contains the version of the operating system, as determined + * by Configure. You shouldn't rely on it too much; the specific + * feature tests from Configure are generally more reliable. */ -/*#define HAS_QUAD / **/ -#ifdef HAS_QUAD -# define Quad_t int64_t /**/ -# define Uquad_t uint64_t /**/ -# define QUADKIND 4 /**/ -# define QUAD_IS_INT 1 -# define QUAD_IS_LONG 2 -# define QUAD_IS_LONG_LONG 3 -# define QUAD_IS_INT64_T 4 -#endif +#define OSNAME "unknown" /**/ +#define OSVERS "unknown" /**/ /* USE_CROSS_COMPILE: * This symbol, if defined, indicates that Perl is being cross-compiled. @@ -932,6 +904,15 @@ #define PERL_TARGETARCH "" /**/ #endif +/* MULTIARCH: + * This symbol, if defined, signifies that the build + * process will produce some binary files that are going to be + * used in a cross-platform environment. This is the case for + * example with the NeXT "fat" binaries that contain executables + * for several CPUs. + */ +/*#define MULTIARCH / **/ + /* MEM_ALIGNBYTES: * This symbol contains the number of bytes required to align a * double, or a long double when applicable. Usual values are 2, @@ -983,6 +964,22 @@ #define BIN_EXP "/usr/local/bin" /**/ #define PERL_RELOCATABLE_INC "undef" /**/ +/* INTSIZE: + * This symbol contains the value of sizeof(int) so that the C + * preprocessor can make decisions based on it. + */ +/* LONGSIZE: + * This symbol contains the value of sizeof(long) so that the C + * preprocessor can make decisions based on it. + */ +/* SHORTSIZE: + * This symbol contains the value of sizeof(short) so that the C + * preprocessor can make decisions based on it. + */ +#define INTSIZE 4 /**/ +#define LONGSIZE 4 /**/ +#define SHORTSIZE 2 /**/ + /* BYTEORDER: * This symbol holds the hexadecimal constant defined in byteorder, * in a UV, i.e. 0x1234 or 0x4321 or 0x12345678, etc... @@ -1032,6 +1029,64 @@ */ #define CHARBITS 8 /**/ +/* CAT2: + * This macro concatenates 2 tokens together. + */ +/* STRINGIFY: + * This macro surrounds its token with double quotes. + */ +#if 42 == 1 +#define CAT2(a,b) a/**/b +#define STRINGIFY(a) "a" +#endif +#if 42 == 42 +#define PeRl_CaTiFy(a, b) a ## b +#define PeRl_StGiFy(a) #a +#define CAT2(a,b) PeRl_CaTiFy(a,b) +#define StGiFy(a) PeRl_StGiFy(a) +#define STRINGIFY(a) PeRl_StGiFy(a) +#endif +#if 42 != 1 && 42 != 42 +#include "Bletch: How does this C preprocessor concatenate tokens?" +#endif + +/* CPPSTDIN: + * This symbol contains the first part of the string which will invoke + * the C preprocessor on the standard input and produce to standard + * output. Typical value of "cc -E" or "/lib/cpp", but it can also + * call a wrapper. See CPPRUN. + */ +/* CPPMINUS: + * This symbol contains the second part of the string which will invoke + * the C preprocessor on the standard input and produce to standard + * output. This symbol will have the value "-" if CPPSTDIN needs a minus + * to specify standard input, otherwise the value is "". + */ +/* CPPRUN: + * This symbol contains the string which will invoke a C preprocessor on + * the standard input and produce to standard output. It needs to end + * with CPPLAST, after all other preprocessor flags have been specified. + * The main difference with CPPSTDIN is that this program will never be a + * pointer to a shell wrapper, i.e. it will be empty if no preprocessor is + * available directly to the user. Note that it may well be different from + * the preprocessor used to compile the C program. + */ +/* CPPLAST: + * This symbol is intended to be used along with CPPRUN in the same manner + * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "". + */ +#define CPPSTDIN "cc -E" +#define CPPMINUS "-" +#define CPPRUN "cc -E" +#define CPPLAST "-" + +/* HAS_ACCESS: + * This manifest constant lets the C program know that the access() + * system call is available to check for accessibility using real UID/GID. + * (always present on UNIX.) + */ +/*#define HAS_ACCESS / **/ + /* HAS_ACCESSX: * This symbol, if defined, indicates that the accessx routine is * available to do extended access checks. @@ -1051,6 +1106,43 @@ /*#define HAS_ASCTIME_R / **/ #define ASCTIME_R_PROTO 0 /**/ +/* HASATTRIBUTE_FORMAT: + * Can we handle GCC attribute for checking printf-style formats + */ +/* PRINTF_FORMAT_NULL_OK: + * Allows __printf__ format to be null when checking printf-style + */ +/* HASATTRIBUTE_MALLOC: + * Can we handle GCC attribute for malloc-style functions. + */ +/* HASATTRIBUTE_NONNULL: + * Can we handle GCC attribute for nonnull function parms. + */ +/* HASATTRIBUTE_NORETURN: + * Can we handle GCC attribute for functions that do not return + */ +/* HASATTRIBUTE_PURE: + * Can we handle GCC attribute for pure functions + */ +/* HASATTRIBUTE_UNUSED: + * Can we handle GCC attribute for unused variables and arguments + */ +/* HASATTRIBUTE_DEPRECATED: + * Can we handle GCC attribute for marking deprecated APIs + */ +/* HASATTRIBUTE_WARN_UNUSED_RESULT: + * Can we handle GCC attribute for warning on unused results + */ +/*#define HASATTRIBUTE_DEPRECATED / **/ +/*#define HASATTRIBUTE_FORMAT / **/ +/*#define PRINTF_FORMAT_NULL_OK / **/ +/*#define HASATTRIBUTE_NORETURN / **/ +/*#define HASATTRIBUTE_MALLOC / **/ +/*#define HASATTRIBUTE_NONNULL / **/ +/*#define HASATTRIBUTE_PURE / **/ +/*#define HASATTRIBUTE_UNUSED / **/ +/*#define HASATTRIBUTE_WARN_UNUSED_RESULT / **/ + /* CASTI32: * This symbol is defined if the C compiler can cast negative * or large floating point numbers to 32-bit ints. @@ -1078,6 +1170,17 @@ */ /*#define VOID_CLOSEDIR / **/ +/* HASCONST: + * This symbol, if defined, indicates that this C compiler knows about + * the const type. There is no need to actually test for that symbol + * within your programs. The mere use of the "const" keyword will + * trigger the necessary tests. + */ +/*#define HASCONST / **/ +#ifndef HASCONST +#define const +#endif + /* HAS_CRYPT_R: * This symbol, if defined, indicates that the crypt_r routine * is available to crypt re-entrantly. @@ -1091,6 +1194,17 @@ /*#define HAS_CRYPT_R / **/ #define CRYPT_R_PROTO 0 /**/ +/* HAS_CSH: + * This symbol, if defined, indicates that the C-shell exists. + */ +/* CSH: + * This symbol, if defined, contains the full pathname of csh. + */ +/*#define HAS_CSH / **/ +#ifdef HAS_CSH +#define CSH "" /**/ +#endif + /* HAS_CTERMID_R: * This symbol, if defined, indicates that the ctermid_r routine * is available to ctermid re-entrantly. @@ -1117,6 +1231,26 @@ /*#define HAS_CTIME_R / **/ #define CTIME_R_PROTO 0 /**/ +/* SETUID_SCRIPTS_ARE_SECURE_NOW: + * This symbol, if defined, indicates that the bug that prevents + * setuid scripts from being secure is not present in this kernel. + */ +/* DOSUID: + * This symbol, if defined, indicates that the C program should + * check the script that it is executing for setuid/setgid bits, and + * attempt to emulate setuid/setgid on systems that have disabled + * setuid #! scripts because the kernel can't do it securely. + * It is up to the package designer to make sure that this emulation + * is done securely. Among other things, it should do an fstat on + * the script it just opened to make sure it really is a setuid/setgid + * script, it should make sure the arguments passed correspond exactly + * to the argument on the #! line, and it should not trust any + * subprocesses to which it must pass the filename rather than the + * file descriptor of the script to be executed. + */ +/*#define SETUID_SCRIPTS_ARE_SECURE_NOW / **/ +/*#define DOSUID / **/ + /* HAS_DRAND48_R: * This symbol, if defined, indicates that the drand48_r routine * is available to drand48 re-entrantly. @@ -1130,12 +1264,26 @@ /*#define HAS_DRAND48_R / **/ #define DRAND48_R_PROTO 0 /**/ +/* HAS_DRAND48_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the drand48() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern double drand48(void); + */ +/*#define HAS_DRAND48_PROTO / **/ + /* HAS_EACCESS: * This symbol, if defined, indicates that the eaccess routine is * available to do extended access checks. */ /*#define HAS_EACCESS / **/ +/* HAS_ENDGRENT: + * This symbol, if defined, indicates that the getgrent routine is + * available for finalizing sequential access of the group database. + */ +/*#define HAS_ENDGRENT / **/ + /* HAS_ENDGRENT_R: * This symbol, if defined, indicates that the endgrent_r routine * is available to endgrent re-entrantly. @@ -1149,6 +1297,12 @@ /*#define HAS_ENDGRENT_R / **/ #define ENDGRENT_R_PROTO 0 /**/ +/* HAS_ENDHOSTENT: + * This symbol, if defined, indicates that the endhostent() routine is + * available to close whatever was being used for host queries. + */ +/*#define HAS_ENDHOSTENT / **/ + /* HAS_ENDHOSTENT_R: * This symbol, if defined, indicates that the endhostent_r routine * is available to endhostent re-entrantly. @@ -1162,6 +1316,12 @@ /*#define HAS_ENDHOSTENT_R / **/ #define ENDHOSTENT_R_PROTO 0 /**/ +/* HAS_ENDNETENT: + * This symbol, if defined, indicates that the endnetent() routine is + * available to close whatever was being used for network queries. + */ +/*#define HAS_ENDNETENT / **/ + /* HAS_ENDNETENT_R: * This symbol, if defined, indicates that the endnetent_r routine * is available to endnetent re-entrantly. @@ -1175,6 +1335,12 @@ /*#define HAS_ENDNETENT_R / **/ #define ENDNETENT_R_PROTO 0 /**/ +/* HAS_ENDPROTOENT: + * This symbol, if defined, indicates that the endprotoent() routine is + * available to close whatever was being used for protocol queries. + */ +/*#define HAS_ENDPROTOENT / **/ + /* HAS_ENDPROTOENT_R: * This symbol, if defined, indicates that the endprotoent_r routine * is available to endprotoent re-entrantly. @@ -1188,6 +1354,12 @@ /*#define HAS_ENDPROTOENT_R / **/ #define ENDPROTOENT_R_PROTO 0 /**/ +/* HAS_ENDPWENT: + * This symbol, if defined, indicates that the getgrent routine is + * available for finalizing sequential access of the passwd database. + */ +/*#define HAS_ENDPWENT / **/ + /* HAS_ENDPWENT_R: * This symbol, if defined, indicates that the endpwent_r routine * is available to endpwent re-entrantly. @@ -1201,6 +1373,12 @@ /*#define HAS_ENDPWENT_R / **/ #define ENDPWENT_R_PROTO 0 /**/ +/* HAS_ENDSERVENT: + * This symbol, if defined, indicates that the endservent() routine is + * available to close whatever was being used for service queries. + */ +/*#define HAS_ENDSERVENT / **/ + /* HAS_ENDSERVENT_R: * This symbol, if defined, indicates that the endservent_r routine * is available to endservent re-entrantly. @@ -1220,9 +1398,15 @@ */ /*#define HAS_FD_SET / **/ -/* Gconvert: - * This preprocessor macro is defined to convert a floating point - * number to a string without a trailing decimal point. This +/* FLEXFILENAMES: + * This symbol, if defined, indicates that the system supports filenames + * longer than 14 characters. + */ +/*#define FLEXFILENAMES / **/ + +/* Gconvert: + * This preprocessor macro is defined to convert a floating point + * number to a string without a trailing decimal point. This * emulates the behavior of sprintf("%g"), but is sometimes much more * efficient. If gconvert() is not available, but gcvt() drops the * trailing decimal point, then gcvt() is used. If all else fails, @@ -1237,6 +1421,12 @@ */ #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x)) +/* HAS_GETGRENT: + * This symbol, if defined, indicates that the getgrent routine is + * available for sequential access of the group database. + */ +/*#define HAS_GETGRENT / **/ + /* HAS_GETGRENT_R: * This symbol, if defined, indicates that the getgrent_r routine * is available to getgrent re-entrantly. @@ -1276,6 +1466,53 @@ /*#define HAS_GETGRNAM_R / **/ #define GETGRNAM_R_PROTO 0 /**/ +/* HAS_GETHOSTBYADDR: + * This symbol, if defined, indicates that the gethostbyaddr() routine is + * available to look up hosts by their IP addresses. + */ +/*#define HAS_GETHOSTBYADDR / **/ + +/* HAS_GETHOSTBYNAME: + * This symbol, if defined, indicates that the gethostbyname() routine is + * available to look up host names in some data base or other. + */ +/*#define HAS_GETHOSTBYNAME / **/ + +/* HAS_GETHOSTENT: + * This symbol, if defined, indicates that the gethostent() routine is + * available to look up host names in some data base or another. + */ +/*#define HAS_GETHOSTENT / **/ + +/* HAS_GETHOSTNAME: + * This symbol, if defined, indicates that the C program may use the + * gethostname() routine to derive the host name. See also HAS_UNAME + * and PHOSTNAME. + */ +/* HAS_UNAME: + * This symbol, if defined, indicates that the C program may use the + * uname() routine to derive the host name. See also HAS_GETHOSTNAME + * and PHOSTNAME. + */ +/* PHOSTNAME: + * This symbol, if defined, indicates the command to feed to the + * popen() routine to derive the host name. See also HAS_GETHOSTNAME + * and HAS_UNAME. Note that the command uses a fully qualified path, + * so that it is safe even if used by a process with super-user + * privileges. + */ +/* HAS_PHOSTNAME: + * This symbol, if defined, indicates that the C program may use the + * contents of PHOSTNAME as a command to feed to the popen() routine + * to derive the host name. + */ +/*#define HAS_GETHOSTNAME / **/ +/*#define HAS_UNAME / **/ +/*#define HAS_PHOSTNAME / **/ +#ifdef HAS_PHOSTNAME +#define PHOSTNAME "/bin/hostname" /* How to get the host name */ +#endif + /* HAS_GETHOSTBYADDR_R: * This symbol, if defined, indicates that the gethostbyaddr_r routine * is available to gethostbyaddr re-entrantly. @@ -1315,6 +1552,14 @@ /*#define HAS_GETHOSTENT_R / **/ #define GETHOSTENT_R_PROTO 0 /**/ +/* HAS_GETHOST_PROTOS: + * This symbol, if defined, indicates that includes + * prototypes for gethostent(), gethostbyname(), and + * gethostbyaddr(). Otherwise, it is up to the program to guess + * them. See netdbtype.U for probing for various Netdb_xxx_t types. + */ +/*#define HAS_GETHOST_PROTOS / **/ + /* HAS_GETLOGIN_R: * This symbol, if defined, indicates that the getlogin_r routine * is available to getlogin re-entrantly. @@ -1328,6 +1573,24 @@ /*#define HAS_GETLOGIN_R / **/ #define GETLOGIN_R_PROTO 0 /**/ +/* HAS_GETNETBYADDR: + * This symbol, if defined, indicates that the getnetbyaddr() routine is + * available to look up networks by their IP addresses. + */ +/*#define HAS_GETNETBYADDR / **/ + +/* HAS_GETNETBYNAME: + * This symbol, if defined, indicates that the getnetbyname() routine is + * available to look up networks by their names. + */ +/*#define HAS_GETNETBYNAME / **/ + +/* HAS_GETNETENT: + * This symbol, if defined, indicates that the getnetent() routine is + * available to look up network names in some data base or another. + */ +/*#define HAS_GETNETENT / **/ + /* HAS_GETNETBYADDR_R: * This symbol, if defined, indicates that the getnetbyaddr_r routine * is available to getnetbyaddr re-entrantly. @@ -1367,6 +1630,14 @@ /*#define HAS_GETNETENT_R / **/ #define GETNETENT_R_PROTO 0 /**/ +/* HAS_GETNET_PROTOS: + * This symbol, if defined, indicates that includes + * prototypes for getnetent(), getnetbyname(), and + * getnetbyaddr(). Otherwise, it is up to the program to guess + * them. See netdbtype.U for probing for various Netdb_xxx_t types. + */ +/*#define HAS_GETNET_PROTOS / **/ + /* HAS_GETPAGESIZE: * This symbol, if defined, indicates that the getpagesize system call * is available to get system page size, which is the granularity of @@ -1374,6 +1645,34 @@ */ /*#define HAS_GETPAGESIZE / **/ +/* HAS_GETPROTOENT: + * This symbol, if defined, indicates that the getprotoent() routine is + * available to look up protocols in some data base or another. + */ +/*#define HAS_GETPROTOENT / **/ + +/* HAS_GETPGRP: + * This symbol, if defined, indicates that the getpgrp routine is + * available to get the current process group. + */ +/* USE_BSD_GETPGRP: + * This symbol, if defined, indicates that getpgrp needs one + * arguments whereas USG one needs none. + */ +/*#define HAS_GETPGRP / **/ +/*#define USE_BSD_GETPGRP / **/ + +/* HAS_GETPROTOBYNAME: + * This symbol, if defined, indicates that the getprotobyname() + * routine is available to look up protocols by their name. + */ +/* HAS_GETPROTOBYNUMBER: + * This symbol, if defined, indicates that the getprotobynumber() + * routine is available to look up protocols by their number. + */ +/*#define HAS_GETPROTOBYNAME / **/ +/*#define HAS_GETPROTOBYNUMBER / **/ + /* HAS_GETPROTOBYNAME_R: * This symbol, if defined, indicates that the getprotobyname_r routine * is available to getprotobyname re-entrantly. @@ -1413,6 +1712,21 @@ /*#define HAS_GETPROTOENT_R / **/ #define GETPROTOENT_R_PROTO 0 /**/ +/* HAS_GETPROTO_PROTOS: + * This symbol, if defined, indicates that includes + * prototypes for getprotoent(), getprotobyname(), and + * getprotobyaddr(). Otherwise, it is up to the program to guess + * them. See netdbtype.U for probing for various Netdb_xxx_t types. + */ +/*#define HAS_GETPROTO_PROTOS / **/ + +/* HAS_GETPWENT: + * This symbol, if defined, indicates that the getpwent routine is + * available for sequential access of the passwd database. + * If this is not available, the older getpw() function may be available. + */ +/*#define HAS_GETPWENT / **/ + /* HAS_GETPWENT_R: * This symbol, if defined, indicates that the getpwent_r routine * is available to getpwent re-entrantly. @@ -1452,6 +1766,12 @@ /*#define HAS_GETPWUID_R / **/ #define GETPWUID_R_PROTO 0 /**/ +/* HAS_GETSERVENT: + * This symbol, if defined, indicates that the getservent() routine is + * available to look up network services in some data base or another. + */ +/*#define HAS_GETSERVENT / **/ + /* HAS_GETSERVBYNAME_R: * This symbol, if defined, indicates that the getservbyname_r routine * is available to getservbyname re-entrantly. @@ -1491,6 +1811,14 @@ /*#define HAS_GETSERVENT_R / **/ #define GETSERVENT_R_PROTO 0 /**/ +/* HAS_GETSERV_PROTOS: + * This symbol, if defined, indicates that includes + * prototypes for getservent(), getservbyname(), and + * getservbyaddr(). Otherwise, it is up to the program to guess + * them. See netdbtype.U for probing for various Netdb_xxx_t types. + */ +/*#define HAS_GETSERV_PROTOS / **/ + /* HAS_GETSPNAM_R: * This symbol, if defined, indicates that the getspnam_r routine * is available to getspnam re-entrantly. @@ -1504,6 +1832,17 @@ /*#define HAS_GETSPNAM_R / **/ #define GETSPNAM_R_PROTO 0 /**/ +/* HAS_GETSERVBYNAME: + * This symbol, if defined, indicates that the getservbyname() + * routine is available to look up services by their name. + */ +/* HAS_GETSERVBYPORT: + * This symbol, if defined, indicates that the getservbyport() + * routine is available to look up services by their port. + */ +/*#define HAS_GETSERVBYNAME / **/ +/*#define HAS_GETSERVBYPORT / **/ + /* HAS_GMTIME_R: * This symbol, if defined, indicates that the gmtime_r routine * is available to gmtime re-entrantly. @@ -1527,6 +1866,31 @@ # define _GNU_SOURCE #endif +/* HAS_HTONL: + * This symbol, if defined, indicates that the htonl() routine (and + * friends htons() ntohl() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_HTONS: + * This symbol, if defined, indicates that the htons() routine (and + * friends htonl() ntohl() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_NTOHL: + * This symbol, if defined, indicates that the ntohl() routine (and + * friends htonl() htons() ntohs()) are available to do network + * order byte swapping. + */ +/* HAS_NTOHS: + * This symbol, if defined, indicates that the ntohs() routine (and + * friends htonl() htons() ntohl()) are available to do network + * order byte swapping. + */ +/*#define HAS_HTONL / **/ +/*#define HAS_HTONS / **/ +/*#define HAS_NTOHL / **/ +/*#define HAS_NTOHS / **/ + /* HAS_ISASCII: * This manifest constant lets the C program know that isascii * is available. @@ -1566,6 +1930,72 @@ /*#define HAS_LOCALTIME_R / **/ #define LOCALTIME_R_PROTO 0 /**/ +/* HAS_LONG_DOUBLE: + * This symbol will be defined if the C compiler supports long + * doubles. + */ +/* LONG_DOUBLESIZE: + * This symbol contains the size of a long double, so that the + * C preprocessor can make decisions based on it. It is only + * defined if the system supports long doubles. + */ +/*#define HAS_LONG_DOUBLE / **/ +#ifdef HAS_LONG_DOUBLE +#define LONG_DOUBLESIZE 8 /**/ +#endif + +/* HAS_LONG_LONG: + * This symbol will be defined if the C compiler supports long long. + */ +/* LONGLONGSIZE: + * This symbol contains the size of a long long, so that the + * C preprocessor can make decisions based on it. It is only + * defined if the system supports long long. + */ +/*#define HAS_LONG_LONG / **/ +#ifdef HAS_LONG_LONG +#define LONGLONGSIZE 8 /**/ +#endif + +/* HAS_LSEEK_PROTO: + * This symbol, if defined, indicates that the system provides + * a prototype for the lseek() function. Otherwise, it is up + * to the program to supply one. A good guess is + * extern off_t lseek(int, off_t, int); + */ +/*#define HAS_LSEEK_PROTO / **/ + +/* HAS_MEMCHR: + * This symbol, if defined, indicates that the memchr routine is available + * to locate characters within a C string. + */ +#define HAS_MEMCHR /**/ + +/* HAS_MKSTEMP: + * This symbol, if defined, indicates that the mkstemp routine is + * available to exclusively create and open a uniquely named + * temporary file. + */ +/*#define HAS_MKSTEMP / **/ + +/* HAS_MMAP: + * This symbol, if defined, indicates that the mmap system call is + * available to map a file into memory. + */ +/* Mmap_t: + * This symbol holds the return type of the mmap() system call + * (and simultaneously the type of the first argument). + * Usually set to 'void *' or 'caddr_t'. + */ +/*#define HAS_MMAP / **/ +#define Mmap_t void * /**/ + +/* HAS_MSG: + * This symbol, if defined, indicates that the entire msg*(2) library is + * supported (IPC mechanism based on message queues). + */ +/*#define HAS_MSG / **/ + /* HAS_OPEN3: * This manifest constant lets the C program know that the three * argument form of open(2) is available. @@ -1669,7 +2099,19 @@ */ /*#define HAS_SANE_MEMCMP / **/ -/* HAS_SETGRENT_R: +/* HAS_SEM: + * This symbol, if defined, indicates that the entire sem*(2) library is + * supported. + */ +/*#define HAS_SEM / **/ + +/* HAS_SETGRENT: + * This symbol, if defined, indicates that the setgrent routine is + * available for initializing sequential access of the group database. + */ +/*#define HAS_SETGRENT / **/ + +/* HAS_SETGRENT_R: * This symbol, if defined, indicates that the setgrent_r routine * is available to setgrent re-entrantly. */ @@ -1682,6 +2124,12 @@ /*#define HAS_SETGRENT_R / **/ #define SETGRENT_R_PROTO 0 /**/ +/* HAS_SETHOSTENT: + * This symbol, if defined, indicates that the sethostent() routine is + * available. + */ +/*#define HAS_SETHOSTENT / **/ + /* HAS_SETHOSTENT_R: * This symbol, if defined, indicates that the sethostent_r routine * is available to sethostent re-entrantly. @@ -1708,6 +2156,12 @@ /*#define HAS_SETLOCALE_R / **/ #define SETLOCALE_R_PROTO 0 /**/ +/* HAS_SETNETENT: + * This symbol, if defined, indicates that the setnetent() routine is + * available. + */ +/*#define HAS_SETNETENT / **/ + /* HAS_SETNETENT_R: * This symbol, if defined, indicates that the setnetent_r routine * is available to setnetent re-entrantly. @@ -1721,6 +2175,24 @@ /*#define HAS_SETNETENT_R / **/ #define SETNETENT_R_PROTO 0 /**/ +/* HAS_SETPROTOENT: + * This symbol, if defined, indicates that the setprotoent() routine is + * available. + */ +/*#define HAS_SETPROTOENT / **/ + +/* HAS_SETPGRP: + * This symbol, if defined, indicates that the setpgrp routine is + * available to set the current process group. + */ +/* USE_BSD_SETPGRP: + * This symbol, if defined, indicates that setpgrp needs two + * arguments whereas USG one needs none. See also HAS_SETPGID + * for a POSIX interface. + */ +/*#define HAS_SETPGRP / **/ +/*#define USE_BSD_SETPGRP / **/ + /* HAS_SETPROTOENT_R: * This symbol, if defined, indicates that the setprotoent_r routine * is available to setprotoent re-entrantly. @@ -1734,6 +2206,12 @@ /*#define HAS_SETPROTOENT_R / **/ #define SETPROTOENT_R_PROTO 0 /**/ +/* HAS_SETPWENT: + * This symbol, if defined, indicates that the setpwent routine is + * available for initializing sequential access of the passwd database. + */ +/*#define HAS_SETPWENT / **/ + /* HAS_SETPWENT_R: * This symbol, if defined, indicates that the setpwent_r routine * is available to setpwent re-entrantly. @@ -1747,6 +2225,12 @@ /*#define HAS_SETPWENT_R / **/ #define SETPWENT_R_PROTO 0 /**/ +/* HAS_SETSERVENT: + * This symbol, if defined, indicates that the setservent() routine is + * available. + */ +/*#define HAS_SETSERVENT / **/ + /* HAS_SETSERVENT_R: * This symbol, if defined, indicates that the setservent_r routine * is available to setservent re-entrantly. @@ -1760,6 +2244,33 @@ /*#define HAS_SETSERVENT_R / **/ #define SETSERVENT_R_PROTO 0 /**/ +/* HAS_SETVBUF: + * This symbol, if defined, indicates that the setvbuf routine is + * available to change buffering on an open stdio stream. + * to a line-buffered mode. + */ +/*#define HAS_SETVBUF / **/ + +/* HAS_SHM: + * This symbol, if defined, indicates that the entire shm*(2) library is + * supported. + */ +/*#define HAS_SHM / **/ + +/* Shmat_t: + * This symbol holds the return type of the shmat() system call. + * Usually set to 'void *' or 'char *'. + */ +/* HAS_SHMAT_PROTOTYPE: + * This symbol, if defined, indicates that the sys/shm.h includes + * a prototype for shmat(). Otherwise, it is up to the program to + * guess one. Shmat_t shmat(int, Shmat_t, int) is a good guess, + * but not always right so it should be emitted by the program only + * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs. + */ +#define Shmat_t void * /**/ +/*#define HAS_SHMAT_PROTOTYPE / **/ + /* HAS_SIGACTION: * This symbol, if defined, indicates that Vr4's sigaction() routine * is available. @@ -1797,6 +2308,64 @@ #define Siglongjmp(buf,retval) longjmp((buf),(retval)) #endif +/* HAS_SOCKET: + * This symbol, if defined, indicates that the BSD socket interface is + * supported. + */ +/* HAS_SOCKETPAIR: + * This symbol, if defined, indicates that the BSD socketpair() call is + * supported. + */ +/* HAS_MSG_CTRUNC: + * This symbol, if defined, indicates that the MSG_CTRUNC is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_DONTROUTE: + * This symbol, if defined, indicates that the MSG_DONTROUTE is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_OOB: + * This symbol, if defined, indicates that the MSG_OOB is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_PEEK: + * This symbol, if defined, indicates that the MSG_PEEK is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_MSG_PROXY: + * This symbol, if defined, indicates that the MSG_PROXY is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_SCM_RIGHTS: + * This symbol, if defined, indicates that the SCM_RIGHTS is supported. + * Checking just with #ifdef might not be enough because this symbol + * has been known to be an enum. + */ +/* HAS_SOCKADDR_SA_LEN: + * This symbol, if defined, indicates that the struct sockaddr + * structure has a member called sa_len, indicating the length of + * the structure. + */ +/* HAS_SIN6_SCOPE_ID: + * This symbol, if defined, indicates that the struct sockaddr_in6 + * structure has a member called sin6_scope_id. + */ +/*#define HAS_SOCKET / **/ +/*#define HAS_SOCKETPAIR / **/ +/*#define HAS_SOCKADDR_SA_LEN / **/ +/*#define HAS_MSG_CTRUNC / **/ +/*#define HAS_MSG_DONTROUTE / **/ +/*#define HAS_MSG_OOB / **/ +/*#define HAS_MSG_PEEK / **/ +/*#define HAS_MSG_PROXY / **/ +/*#define HAS_SCM_RIGHTS / **/ +/*#define HAS_SIN6_SCOPE_ID / **/ + /* HAS_SRAND48_R: * This symbol, if defined, indicates that the srand48_r routine * is available to srand48 re-entrantly. @@ -1823,6 +2392,35 @@ /*#define HAS_SRANDOM_R / **/ #define SRANDOM_R_PROTO 0 /**/ +/* USE_STAT_BLOCKS: + * This symbol is defined if this system has a stat structure declaring + * st_blksize and st_blocks. + */ +#ifndef USE_STAT_BLOCKS +/*#define USE_STAT_BLOCKS / **/ +#endif + +/* HAS_STATIC_INLINE: + * This symbol, if defined, indicates that the C compiler supports + * C99-style static inline. That is, the function can't be called + * from another translation unit. + */ +/* PERL_STATIC_INLINE: + * This symbol gives the best-guess incantation to use for static + * inline functions. If HAS_STATIC_INLINE is defined, this will + * give C99-style inline. If HAS_STATIC_INLINE is not defined, + * this will give a plain 'static'. It will always be defined + * to something that gives static linkage. + * Possibilities include + * static inline (c99) + * static __inline__ (gcc -ansi) + * static __inline (MSVC) + * static _inline (older MSVC) + * static (c89 compilers) + */ +/*#define HAS_STATIC_INLINE / **/ +#define PERL_STATIC_INLINE static /**/ + /* USE_STDIO_PTR: * This symbol is defined if the _ptr and _cnt fields (or similar) * of the stdio FILE structure can be used to access the stdio buffer @@ -1893,6 +2491,32 @@ #define FILE_bufsiz(fp) ((fp)->_IO_read_end - (fp)->_IO_read_base) #endif +/* USE_STRUCT_COPY: + * This symbol, if defined, indicates that this C compiler knows how + * to copy structures. If undefined, you'll need to use a block copy + * routine of some sort instead. + */ +/*#define USE_STRUCT_COPY / **/ + +/* HAS_STRERROR: + * This symbol, if defined, indicates that the strerror routine is + * available to translate error numbers to strings. See the writeup + * of Strerror() in this file before you try to define your own. + */ +/* HAS_SYS_ERRLIST: + * This symbol, if defined, indicates that the sys_errlist array is + * available to translate error numbers to strings. The extern int + * sys_nerr gives the size of that table. + */ +/* Strerror: + * This preprocessor symbol is defined as a macro if strerror() is + * not available to translate error numbers to strings but sys_errlist[] + * array is there. + */ +/*#define HAS_STRERROR / **/ +/*#define HAS_SYS_ERRLIST / **/ +#define Strerror(e) strerror(e) + /* HAS_STRERROR_R: * This symbol, if defined, indicates that the strerror_r routine * is available to strerror re-entrantly. @@ -1906,6 +2530,30 @@ /*#define HAS_STRERROR_R / **/ #define STRERROR_R_PROTO 0 /**/ +/* HAS_STRTOUL: + * This symbol, if defined, indicates that the strtoul routine is + * available to provide conversion of strings to unsigned long. + */ +#define HAS_STRTOUL /**/ + +/* HAS_TIME: + * This symbol, if defined, indicates that the time() routine exists. + */ +/* Time_t: + * This symbol holds the type returned by time(). It can be long, + * or time_t on BSD sites (in which case should be + * included). + */ +#define HAS_TIME /**/ +#define Time_t time_t /* Time type */ + +/* HAS_TIMES: + * This symbol, if defined, indicates that the times() routine exists. + * Note that this became obsolete on some systems (SUNOS), which now + * use getrusage(). It may be necessary to include . + */ +/*#define HAS_TIMES / **/ + /* HAS_TMPNAM_R: * This symbol, if defined, indicates that the tmpnam_r routine * is available to tmpnam re-entrantly. @@ -1932,912 +2580,32 @@ /*#define HAS_TTYNAME_R / **/ #define TTYNAME_R_PROTO 0 /**/ -/* HAS_VPRINTF: - * This symbol, if defined, indicates that the vprintf routine is available - * to printf with a pointer to an argument list. If unavailable, you - * may need to write your own, probably in terms of _doprnt(). +/* HAS_UNION_SEMUN: + * This symbol, if defined, indicates that the union semun is + * defined by including . If not, the user code + * probably needs to define it as: + * union semun { + * int val; + * struct semid_ds *buf; + * unsigned short *array; + * } */ -/* USE_CHAR_VSPRINTF: - * This symbol is defined if this system has vsprintf() returning type - * (char*). The trend seems to be to declare it as "int vsprintf()". It - * is up to the package author to declare vsprintf correctly based on the - * symbol. +/* USE_SEMCTL_SEMUN: + * This symbol, if defined, indicates that union semun is + * used for semctl IPC_STAT. */ -#define HAS_VPRINTF /**/ -/*#define USE_CHAR_VSPRINTF / **/ +/* USE_SEMCTL_SEMID_DS: + * This symbol, if defined, indicates that struct semid_ds * is + * used for semctl IPC_STAT. + */ +/*#define HAS_UNION_SEMUN / **/ +/*#define USE_SEMCTL_SEMUN / **/ +/*#define USE_SEMCTL_SEMID_DS / **/ -/* DOUBLESIZE: - * This symbol contains the size of a double, so that the C preprocessor - * can make decisions based on it. +/* HAS_VFORK: + * This symbol, if defined, indicates that vfork() exists. */ -#define DOUBLESIZE 8 /**/ - -/* I_MACH_CTHREADS: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_MACH_CTHREADS / **/ - -/* I_PTHREAD: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_PTHREAD / **/ - -/* I_SYS_ACCESS: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SYS_ACCESS / **/ - -/* I_SYS_SECURITY: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SYS_SECURITY / **/ - -/* I_TIME: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/* I_SYS_TIME: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/* I_SYS_TIME_KERNEL: - * This symbol, if defined, indicates to the C program that it should - * include with KERNEL defined. - */ -/* HAS_TM_TM_ZONE: - * This symbol, if defined, indicates to the C program that - * the struct tm has a tm_zone field. - */ -/* HAS_TM_TM_GMTOFF: - * This symbol, if defined, indicates to the C program that - * the struct tm has a tm_gmtoff field. - */ -#define I_TIME /**/ -/*#define I_SYS_TIME / **/ -/*#define I_SYS_TIME_KERNEL / **/ -/*#define HAS_TM_TM_ZONE / **/ -/*#define HAS_TM_TM_GMTOFF / **/ - -/* PERL_INC_VERSION_LIST: - * This variable specifies the list of subdirectories in over - * which perl.c:incpush() and lib/lib.pm will automatically - * search when adding directories to @INC, in a format suitable - * for a C initialization string. See the inc_version_list entry - * in Porting/Glossary for more details. - */ -/*#define PERL_INC_VERSION_LIST NULL / **/ - -/* INSTALL_USR_BIN_PERL: - * This symbol, if defined, indicates that Perl is to be installed - * also as /usr/bin/perl. - */ -/*#define INSTALL_USR_BIN_PERL / **/ - -/* VAL_O_NONBLOCK: - * This symbol is to be used during open() or fcntl(F_SETFL) to turn on - * non-blocking I/O for the file descriptor. Note that there is no way - * back, i.e. you cannot turn it blocking again this way. If you wish to - * alternatively switch between blocking and non-blocking, use the - * ioctl(FIOSNBIO) call instead, but that is not supported by all devices. - */ -/* VAL_EAGAIN: - * This symbol holds the errno error code set by read() when no data was - * present on the non-blocking file descriptor. - */ -/* RD_NODATA: - * This symbol holds the return code from read() when no data is present - * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is - * not defined, then you can't distinguish between no data and EOF by - * issuing a read(). You'll have to find another way to tell for sure! - */ -/* EOF_NONBLOCK: - * This symbol, if defined, indicates to the C program that a read() on - * a non-blocking file descriptor will return 0 on EOF, and not the value - * held in RD_NODATA (-1 usually, in that case!). - */ -#define VAL_O_NONBLOCK O_NONBLOCK -#define VAL_EAGAIN EAGAIN -#define RD_NODATA -1 -#undef EOF_NONBLOCK - -/* PERL_OTHERLIBDIRS: - * This variable contains a colon-separated set of paths for the perl - * binary to search for additional library files or modules. - * These directories will be tacked to the end of @INC. - * Perl will automatically search below each path for version- - * and architecture-specific directories. See PERL_INC_VERSION_LIST - * for more details. - */ -/*#define PERL_OTHERLIBDIRS " " / **/ - -/* PRIVLIB: - * This symbol contains the name of the private library for this package. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. The program - * should be prepared to do ~ expansion. - */ -/* PRIVLIB_EXP: - * 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 "/usr/local/lib/perl5/5.15" /**/ -#define PRIVLIB_EXP "/usr/local/lib/perl5/5.15" /**/ - -/* PTRSIZE: - * This symbol contains the size of a pointer, so that the C preprocessor - * can make decisions based on it. It will be sizeof(void *) if - * the compiler supports (void *); otherwise it will be - * sizeof(char *). - */ -#define PTRSIZE 4 /**/ - -/* Drand01: - * This macro is to be used to generate uniformly distributed - * random numbers over the range [0., 1.[. You may have to supply - * an 'extern double drand48();' in your program since SunOS 4.1.3 - * doesn't provide you with anything relevant in its headers. - * See HAS_DRAND48_PROTO. - */ -/* Rand_seed_t: - * This symbol defines the type of the argument of the - * random seed function. - */ -/* seedDrand01: - * This symbol defines the macro to be used in seeding the - * random number generator (see Drand01). - */ -/* RANDBITS: - * This symbol indicates how many bits are produced by the - * function used to generate normalized random numbers. - * Values include 15, 16, 31, and 48. - */ -#define Drand01() ((rand() & 0x7FFF) / (double) ((unsigned long)1 << 15)) /**/ -#define Rand_seed_t int /**/ -#define seedDrand01(x) srand((Rand_seed_t)x) /**/ -#define RANDBITS 48 /**/ - -/* SITEARCH: - * This symbol contains the name of the private library for this package. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. The program - * should be prepared to do ~ expansion. - * The standard distribution will put nothing in this directory. - * After perl has been installed, users may install their own local - * architecture-dependent modules in this directory with - * MakeMaker Makefile.PL - * or equivalent. See INSTALL for details. - */ -/* SITEARCH_EXP: - * 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 "/usr/local/lib/perl5/5.15/unknown" / **/ -/*#define SITEARCH_EXP "/usr/local/lib/perl5/5.15/unknown" / **/ - -/* SITELIB: - * This symbol contains the name of the private library for this package. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. The program - * should be prepared to do ~ expansion. - * The standard distribution will put nothing in this directory. - * After perl has been installed, users may install their own local - * architecture-independent modules in this directory with - * MakeMaker Makefile.PL - * or equivalent. See INSTALL for details. - */ -/* SITELIB_EXP: - * This symbol contains the ~name expanded version of SITELIB, to be used - * in programs that are not prepared to deal with ~ expansion at run-time. - */ -/* SITELIB_STEM: - * This define is SITELIB_EXP with any trailing version-specific component - * 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 "/usr/local/lib/perl5/5.15" /**/ -#define SITELIB_EXP "/usr/local/lib/perl5/5.15" /**/ -#define SITELIB_STEM "/usr/local/lib/perl5" /**/ - -/* SSize_t: - * This symbol holds the type used by functions that return - * a count of bytes or an error condition. It must be a signed type. - * It is usually ssize_t, but may be long or int, etc. - * It may be necessary to include or - * to get any typedef'ed information. - * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t). - */ -#define SSize_t int /* signed count of bytes */ - -/* USE_ITHREADS: - * This symbol, if defined, indicates that Perl should be built to - * use the interpreter-based threading implementation. - */ -/* USE_5005THREADS: - * This symbol, if defined, indicates that Perl should be built to - * use the 5.005-based threading implementation. - * Only valid up to 5.8.x. - */ -/* OLD_PTHREADS_API: - * This symbol, if defined, indicates that Perl should - * be built to use the old draft POSIX threads API. - */ -/* USE_REENTRANT_API: - * This symbol, if defined, indicates that Perl should - * try to use the various _r versions of library functions. - * This is extremely experimental. - */ -/*#define USE_5005THREADS / **/ -/*#define USE_ITHREADS / **/ -#if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ -#endif -/*#define OLD_PTHREADS_API / **/ -/*#define USE_REENTRANT_API / **/ - -/* PERL_VENDORARCH: - * If defined, this symbol contains the name of a private library. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. - * It may have a ~ on the front. - * The standard distribution will put nothing in this directory. - * Vendors who distribute perl may wish to place their own - * architecture-dependent modules and extensions in this directory with - * MakeMaker Makefile.PL INSTALLDIRS=vendor - * or equivalent. See INSTALL for details. - */ -/* PERL_VENDORARCH_EXP: - * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used - * in programs that are not prepared to deal with ~ expansion at run-time. - */ -/*#define PERL_VENDORARCH "" / **/ -/*#define PERL_VENDORARCH_EXP "" / **/ - -/* PERL_VENDORLIB_EXP: - * This symbol contains the ~name expanded version of VENDORLIB, to be used - * in programs that are not prepared to deal with ~ expansion at run-time. - */ -/* PERL_VENDORLIB_STEM: - * This define is PERL_VENDORLIB_EXP with any trailing version-specific component - * 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 PERL_VENDORLIB_EXP "" / **/ -/*#define PERL_VENDORLIB_STEM "" / **/ - -/* HAS_STATIC_INLINE: - * This symbol, if defined, indicates that the C compiler supports - * C99-style static inline. That is, the function can't be called - * from another translation unit. - */ -/* PERL_STATIC_INLINE: - * This symbol gives the best-guess incantation to use for static - * inline functions. If HAS_STATIC_INLINE is defined, this will - * give C99-style inline. If HAS_STATIC_INLINE is not defined, - * this will give a plain 'static'. It will always be defined - * to something that gives static linkage. - * Possibilities include - * static inline (c99) - * static __inline__ (gcc -ansi) - * static __inline (MSVC) - * static _inline (older MSVC) - * static (c89 compilers) - */ -/*#define HAS_STATIC_INLINE / **/ -#define PERL_STATIC_INLINE static /**/ - -/* EBCDIC: - * This symbol, if defined, indicates that this system uses - * EBCDIC encoding. - */ -/*#define EBCDIC / **/ - -/* OSNAME: - * This symbol contains the name of the operating system, as determined - * by Configure. You shouldn't rely on it too much; the specific - * feature tests from Configure are generally more reliable. - */ -/* OSVERS: - * This symbol contains the version of the operating system, as determined - * by Configure. You shouldn't rely on it too much; the specific - * feature tests from Configure are generally more reliable. - */ -#define OSNAME "unknown" /**/ -#define OSVERS "unknown" /**/ - -/* CAT2: - * This macro concatenates 2 tokens together. - */ -/* STRINGIFY: - * This macro surrounds its token with double quotes. - */ -#if 42 == 1 -#define CAT2(a,b) a/**/b -#define STRINGIFY(a) "a" -#endif -#if 42 == 42 -#define PeRl_CaTiFy(a, b) a ## b -#define PeRl_StGiFy(a) #a -#define CAT2(a,b) PeRl_CaTiFy(a,b) -#define StGiFy(a) PeRl_StGiFy(a) -#define STRINGIFY(a) PeRl_StGiFy(a) -#endif -#if 42 != 1 && 42 != 42 -#include "Bletch: How does this C preprocessor concatenate tokens?" -#endif - -/* CPPSTDIN: - * This symbol contains the first part of the string which will invoke - * the C preprocessor on the standard input and produce to standard - * output. Typical value of "cc -E" or "/lib/cpp", but it can also - * call a wrapper. See CPPRUN. - */ -/* CPPMINUS: - * This symbol contains the second part of the string which will invoke - * the C preprocessor on the standard input and produce to standard - * output. This symbol will have the value "-" if CPPSTDIN needs a minus - * to specify standard input, otherwise the value is "". - */ -/* CPPRUN: - * This symbol contains the string which will invoke a C preprocessor on - * the standard input and produce to standard output. It needs to end - * with CPPLAST, after all other preprocessor flags have been specified. - * The main difference with CPPSTDIN is that this program will never be a - * pointer to a shell wrapper, i.e. it will be empty if no preprocessor is - * available directly to the user. Note that it may well be different from - * the preprocessor used to compile the C program. - */ -/* CPPLAST: - * This symbol is intended to be used along with CPPRUN in the same manner - * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "". - */ -#define CPPSTDIN "cc -E" -#define CPPMINUS "-" -#define CPPRUN "cc -E" -#define CPPLAST "-" - -/* HAS_ACCESS: - * This manifest constant lets the C program know that the access() - * system call is available to check for accessibility using real UID/GID. - * (always present on UNIX.) - */ -/*#define HAS_ACCESS / **/ - -/* HASATTRIBUTE_FORMAT: - * Can we handle GCC attribute for checking printf-style formats - */ -/* PRINTF_FORMAT_NULL_OK: - * Allows __printf__ format to be null when checking printf-style - */ -/* HASATTRIBUTE_MALLOC: - * Can we handle GCC attribute for malloc-style functions. - */ -/* HASATTRIBUTE_NONNULL: - * Can we handle GCC attribute for nonnull function parms. - */ -/* HASATTRIBUTE_NORETURN: - * Can we handle GCC attribute for functions that do not return - */ -/* HASATTRIBUTE_PURE: - * Can we handle GCC attribute for pure functions - */ -/* HASATTRIBUTE_UNUSED: - * Can we handle GCC attribute for unused variables and arguments - */ -/* HASATTRIBUTE_DEPRECATED: - * Can we handle GCC attribute for marking deprecated APIs - */ -/* HASATTRIBUTE_WARN_UNUSED_RESULT: - * Can we handle GCC attribute for warning on unused results - */ -/*#define HASATTRIBUTE_DEPRECATED / **/ -/*#define HASATTRIBUTE_FORMAT / **/ -/*#define PRINTF_FORMAT_NULL_OK / **/ -/*#define HASATTRIBUTE_NORETURN / **/ -/*#define HASATTRIBUTE_MALLOC / **/ -/*#define HASATTRIBUTE_NONNULL / **/ -/*#define HASATTRIBUTE_PURE / **/ -/*#define HASATTRIBUTE_UNUSED / **/ -/*#define HASATTRIBUTE_WARN_UNUSED_RESULT / **/ - -/* HASCONST: - * This symbol, if defined, indicates that this C compiler knows about - * the const type. There is no need to actually test for that symbol - * within your programs. The mere use of the "const" keyword will - * trigger the necessary tests. - */ -/*#define HASCONST / **/ -#ifndef HASCONST -#define const -#endif - -/* HAS_CSH: - * This symbol, if defined, indicates that the C-shell exists. - */ -/* CSH: - * This symbol, if defined, contains the full pathname of csh. - */ -/*#define HAS_CSH / **/ -#ifdef HAS_CSH -#define CSH "" /**/ -#endif - -/* SETUID_SCRIPTS_ARE_SECURE_NOW: - * This symbol, if defined, indicates that the bug that prevents - * setuid scripts from being secure is not present in this kernel. - */ -/* DOSUID: - * This symbol, if defined, indicates that the C program should - * check the script that it is executing for setuid/setgid bits, and - * attempt to emulate setuid/setgid on systems that have disabled - * setuid #! scripts because the kernel can't do it securely. - * It is up to the package designer to make sure that this emulation - * is done securely. Among other things, it should do an fstat on - * the script it just opened to make sure it really is a setuid/setgid - * script, it should make sure the arguments passed correspond exactly - * to the argument on the #! line, and it should not trust any - * subprocesses to which it must pass the filename rather than the - * file descriptor of the script to be executed. - */ -/*#define SETUID_SCRIPTS_ARE_SECURE_NOW / **/ -/*#define DOSUID / **/ - -/* HAS_ENDGRENT: - * This symbol, if defined, indicates that the getgrent routine is - * available for finalizing sequential access of the group database. - */ -/*#define HAS_ENDGRENT / **/ - -/* HAS_ENDHOSTENT: - * This symbol, if defined, indicates that the endhostent() routine is - * available to close whatever was being used for host queries. - */ -/*#define HAS_ENDHOSTENT / **/ - -/* HAS_ENDNETENT: - * This symbol, if defined, indicates that the endnetent() routine is - * available to close whatever was being used for network queries. - */ -/*#define HAS_ENDNETENT / **/ - -/* HAS_ENDPROTOENT: - * This symbol, if defined, indicates that the endprotoent() routine is - * available to close whatever was being used for protocol queries. - */ -/*#define HAS_ENDPROTOENT / **/ - -/* HAS_ENDPWENT: - * This symbol, if defined, indicates that the getgrent routine is - * available for finalizing sequential access of the passwd database. - */ -/*#define HAS_ENDPWENT / **/ - -/* HAS_ENDSERVENT: - * This symbol, if defined, indicates that the endservent() routine is - * available to close whatever was being used for service queries. - */ -/*#define HAS_ENDSERVENT / **/ - -/* FLEXFILENAMES: - * This symbol, if defined, indicates that the system supports filenames - * longer than 14 characters. - */ -/*#define FLEXFILENAMES / **/ - -/* HAS_GETGRENT: - * This symbol, if defined, indicates that the getgrent routine is - * available for sequential access of the group database. - */ -/*#define HAS_GETGRENT / **/ - -/* HAS_GETHOSTBYADDR: - * This symbol, if defined, indicates that the gethostbyaddr() routine is - * available to look up hosts by their IP addresses. - */ -/*#define HAS_GETHOSTBYADDR / **/ - -/* HAS_GETHOSTBYNAME: - * This symbol, if defined, indicates that the gethostbyname() routine is - * available to look up host names in some data base or other. - */ -/*#define HAS_GETHOSTBYNAME / **/ - -/* HAS_GETHOSTENT: - * This symbol, if defined, indicates that the gethostent() routine is - * available to look up host names in some data base or another. - */ -/*#define HAS_GETHOSTENT / **/ - -/* HAS_GETHOSTNAME: - * This symbol, if defined, indicates that the C program may use the - * gethostname() routine to derive the host name. See also HAS_UNAME - * and PHOSTNAME. - */ -/* HAS_UNAME: - * This symbol, if defined, indicates that the C program may use the - * uname() routine to derive the host name. See also HAS_GETHOSTNAME - * and PHOSTNAME. - */ -/* PHOSTNAME: - * This symbol, if defined, indicates the command to feed to the - * popen() routine to derive the host name. See also HAS_GETHOSTNAME - * and HAS_UNAME. Note that the command uses a fully qualified path, - * so that it is safe even if used by a process with super-user - * privileges. - */ -/* HAS_PHOSTNAME: - * This symbol, if defined, indicates that the C program may use the - * contents of PHOSTNAME as a command to feed to the popen() routine - * to derive the host name. - */ -/*#define HAS_GETHOSTNAME / **/ -/*#define HAS_UNAME / **/ -/*#define HAS_PHOSTNAME / **/ -#ifdef HAS_PHOSTNAME -#define PHOSTNAME "/bin/hostname" /* How to get the host name */ -#endif - -/* HAS_GETNETBYADDR: - * This symbol, if defined, indicates that the getnetbyaddr() routine is - * available to look up networks by their IP addresses. - */ -/*#define HAS_GETNETBYADDR / **/ - -/* HAS_GETNETBYNAME: - * This symbol, if defined, indicates that the getnetbyname() routine is - * available to look up networks by their names. - */ -/*#define HAS_GETNETBYNAME / **/ - -/* HAS_GETNETENT: - * This symbol, if defined, indicates that the getnetent() routine is - * available to look up network names in some data base or another. - */ -/*#define HAS_GETNETENT / **/ - -/* HAS_GETPROTOENT: - * This symbol, if defined, indicates that the getprotoent() routine is - * available to look up protocols in some data base or another. - */ -/*#define HAS_GETPROTOENT / **/ - -/* HAS_GETPGRP: - * This symbol, if defined, indicates that the getpgrp routine is - * available to get the current process group. - */ -/* USE_BSD_GETPGRP: - * This symbol, if defined, indicates that getpgrp needs one - * arguments whereas USG one needs none. - */ -/*#define HAS_GETPGRP / **/ -/*#define USE_BSD_GETPGRP / **/ - -/* HAS_GETPROTOBYNAME: - * This symbol, if defined, indicates that the getprotobyname() - * routine is available to look up protocols by their name. - */ -/* HAS_GETPROTOBYNUMBER: - * This symbol, if defined, indicates that the getprotobynumber() - * routine is available to look up protocols by their number. - */ -/*#define HAS_GETPROTOBYNAME / **/ -/*#define HAS_GETPROTOBYNUMBER / **/ - -/* HAS_GETPWENT: - * This symbol, if defined, indicates that the getpwent routine is - * available for sequential access of the passwd database. - * If this is not available, the older getpw() function may be available. - */ -/*#define HAS_GETPWENT / **/ - -/* HAS_GETSERVENT: - * This symbol, if defined, indicates that the getservent() routine is - * available to look up network services in some data base or another. - */ -/*#define HAS_GETSERVENT / **/ - -/* HAS_GETSERVBYNAME: - * This symbol, if defined, indicates that the getservbyname() - * routine is available to look up services by their name. - */ -/* HAS_GETSERVBYPORT: - * This symbol, if defined, indicates that the getservbyport() - * routine is available to look up services by their port. - */ -/*#define HAS_GETSERVBYNAME / **/ -/*#define HAS_GETSERVBYPORT / **/ - -/* HAS_HTONL: - * This symbol, if defined, indicates that the htonl() routine (and - * friends htons() ntohl() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_HTONS: - * This symbol, if defined, indicates that the htons() routine (and - * friends htonl() ntohl() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_NTOHL: - * This symbol, if defined, indicates that the ntohl() routine (and - * friends htonl() htons() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_NTOHS: - * This symbol, if defined, indicates that the ntohs() routine (and - * friends htonl() htons() ntohl()) are available to do network - * order byte swapping. - */ -/*#define HAS_HTONL / **/ -/*#define HAS_HTONS / **/ -/*#define HAS_NTOHL / **/ -/*#define HAS_NTOHS / **/ - -/* HAS_LONG_DOUBLE: - * This symbol will be defined if the C compiler supports long - * doubles. - */ -/* LONG_DOUBLESIZE: - * This symbol contains the size of a long double, so that the - * C preprocessor can make decisions based on it. It is only - * defined if the system supports long doubles. - */ -/*#define HAS_LONG_DOUBLE / **/ -#ifdef HAS_LONG_DOUBLE -#define LONG_DOUBLESIZE 8 /**/ -#endif - -/* HAS_LONG_LONG: - * This symbol will be defined if the C compiler supports long long. - */ -/* LONGLONGSIZE: - * This symbol contains the size of a long long, so that the - * C preprocessor can make decisions based on it. It is only - * defined if the system supports long long. - */ -/*#define HAS_LONG_LONG / **/ -#ifdef HAS_LONG_LONG -#define LONGLONGSIZE 8 /**/ -#endif - -/* HAS_MEMCHR: - * This symbol, if defined, indicates that the memchr routine is available - * to locate characters within a C string. - */ -#define HAS_MEMCHR /**/ - -/* HAS_MKSTEMP: - * This symbol, if defined, indicates that the mkstemp routine is - * available to exclusively create and open a uniquely named - * temporary file. - */ -/*#define HAS_MKSTEMP / **/ - -/* HAS_MMAP: - * This symbol, if defined, indicates that the mmap system call is - * available to map a file into memory. - */ -/* Mmap_t: - * This symbol holds the return type of the mmap() system call - * (and simultaneously the type of the first argument). - * Usually set to 'void *' or 'caddr_t'. - */ -/*#define HAS_MMAP / **/ -#define Mmap_t void * /**/ - -/* HAS_MSG: - * This symbol, if defined, indicates that the entire msg*(2) library is - * supported (IPC mechanism based on message queues). - */ -/*#define HAS_MSG / **/ - -/* HAS_SEM: - * This symbol, if defined, indicates that the entire sem*(2) library is - * supported. - */ -/*#define HAS_SEM / **/ - -/* HAS_SETGRENT: - * This symbol, if defined, indicates that the setgrent routine is - * available for initializing sequential access of the group database. - */ -/*#define HAS_SETGRENT / **/ - -/* HAS_SETHOSTENT: - * This symbol, if defined, indicates that the sethostent() routine is - * available. - */ -/*#define HAS_SETHOSTENT / **/ - -/* HAS_SETNETENT: - * This symbol, if defined, indicates that the setnetent() routine is - * available. - */ -/*#define HAS_SETNETENT / **/ - -/* HAS_SETPROTOENT: - * This symbol, if defined, indicates that the setprotoent() routine is - * available. - */ -/*#define HAS_SETPROTOENT / **/ - -/* HAS_SETPGRP: - * This symbol, if defined, indicates that the setpgrp routine is - * available to set the current process group. - */ -/* USE_BSD_SETPGRP: - * This symbol, if defined, indicates that setpgrp needs two - * arguments whereas USG one needs none. See also HAS_SETPGID - * for a POSIX interface. - */ -/*#define HAS_SETPGRP / **/ -/*#define USE_BSD_SETPGRP / **/ - -/* HAS_SETPWENT: - * This symbol, if defined, indicates that the setpwent routine is - * available for initializing sequential access of the passwd database. - */ -/*#define HAS_SETPWENT / **/ - -/* HAS_SETSERVENT: - * This symbol, if defined, indicates that the setservent() routine is - * available. - */ -/*#define HAS_SETSERVENT / **/ - -/* HAS_SETVBUF: - * This symbol, if defined, indicates that the setvbuf routine is - * available to change buffering on an open stdio stream. - * to a line-buffered mode. - */ -/*#define HAS_SETVBUF / **/ - -/* HAS_SHM: - * This symbol, if defined, indicates that the entire shm*(2) library is - * supported. - */ -/*#define HAS_SHM / **/ - -/* Shmat_t: - * This symbol holds the return type of the shmat() system call. - * Usually set to 'void *' or 'char *'. - */ -/* HAS_SHMAT_PROTOTYPE: - * This symbol, if defined, indicates that the sys/shm.h includes - * a prototype for shmat(). Otherwise, it is up to the program to - * guess one. Shmat_t shmat(int, Shmat_t, int) is a good guess, - * but not always right so it should be emitted by the program only - * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs. - */ -#define Shmat_t void * /**/ -/*#define HAS_SHMAT_PROTOTYPE / **/ - -/* HAS_SOCKET: - * This symbol, if defined, indicates that the BSD socket interface is - * supported. - */ -/* HAS_SOCKETPAIR: - * This symbol, if defined, indicates that the BSD socketpair() call is - * supported. - */ -/* HAS_MSG_CTRUNC: - * This symbol, if defined, indicates that the MSG_CTRUNC is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_DONTROUTE: - * This symbol, if defined, indicates that the MSG_DONTROUTE is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_OOB: - * This symbol, if defined, indicates that the MSG_OOB is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_PEEK: - * This symbol, if defined, indicates that the MSG_PEEK is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_PROXY: - * This symbol, if defined, indicates that the MSG_PROXY is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_SCM_RIGHTS: - * This symbol, if defined, indicates that the SCM_RIGHTS is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_SOCKADDR_SA_LEN: - * This symbol, if defined, indicates that the struct sockaddr - * structure has a member called sa_len, indicating the length of - * the structure. - */ -/* HAS_SIN6_SCOPE_ID: - * This symbol, if defined, indicates that the struct sockaddr_in6 - * structure has a member called sin6_scope_id. - */ -/*#define HAS_SOCKET / **/ -/*#define HAS_SOCKETPAIR / **/ -/*#define HAS_SOCKADDR_SA_LEN / **/ -/*#define HAS_MSG_CTRUNC / **/ -/*#define HAS_MSG_DONTROUTE / **/ -/*#define HAS_MSG_OOB / **/ -/*#define HAS_MSG_PEEK / **/ -/*#define HAS_MSG_PROXY / **/ -/*#define HAS_SCM_RIGHTS / **/ -/*#define HAS_SIN6_SCOPE_ID / **/ - -/* USE_STAT_BLOCKS: - * This symbol is defined if this system has a stat structure declaring - * st_blksize and st_blocks. - */ -#ifndef USE_STAT_BLOCKS -/*#define USE_STAT_BLOCKS / **/ -#endif - -/* USE_STRUCT_COPY: - * This symbol, if defined, indicates that this C compiler knows how - * to copy structures. If undefined, you'll need to use a block copy - * routine of some sort instead. - */ -/*#define USE_STRUCT_COPY / **/ - -/* HAS_STRERROR: - * This symbol, if defined, indicates that the strerror routine is - * available to translate error numbers to strings. See the writeup - * of Strerror() in this file before you try to define your own. - */ -/* HAS_SYS_ERRLIST: - * This symbol, if defined, indicates that the sys_errlist array is - * available to translate error numbers to strings. The extern int - * sys_nerr gives the size of that table. - */ -/* Strerror: - * This preprocessor symbol is defined as a macro if strerror() is - * not available to translate error numbers to strings but sys_errlist[] - * array is there. - */ -/*#define HAS_STRERROR / **/ -/*#define HAS_SYS_ERRLIST / **/ -#define Strerror(e) strerror(e) - -/* HAS_STRTOUL: - * This symbol, if defined, indicates that the strtoul routine is - * available to provide conversion of strings to unsigned long. - */ -#define HAS_STRTOUL /**/ - -/* HAS_UNION_SEMUN: - * This symbol, if defined, indicates that the union semun is - * defined by including . If not, the user code - * probably needs to define it as: - * union semun { - * int val; - * struct semid_ds *buf; - * unsigned short *array; - * } - */ -/* USE_SEMCTL_SEMUN: - * This symbol, if defined, indicates that union semun is - * used for semctl IPC_STAT. - */ -/* USE_SEMCTL_SEMID_DS: - * This symbol, if defined, indicates that struct semid_ds * is - * used for semctl IPC_STAT. - */ -/*#define HAS_UNION_SEMUN / **/ -/*#define USE_SEMCTL_SEMUN / **/ -/*#define USE_SEMCTL_SEMID_DS / **/ - -/* HAS_VFORK: - * This symbol, if defined, indicates that vfork() exists. - */ -/*#define HAS_VFORK / **/ +/*#define HAS_VFORK / **/ /* HAS_PSEUDOFORK: * This symbol, if defined, indicates that an emulation of the @@ -2862,6 +2630,64 @@ #define volatile #endif +/* HAS_VPRINTF: + * This symbol, if defined, indicates that the vprintf routine is available + * to printf with a pointer to an argument list. If unavailable, you + * may need to write your own, probably in terms of _doprnt(). + */ +/* USE_CHAR_VSPRINTF: + * This symbol is defined if this system has vsprintf() returning type + * (char*). The trend seems to be to declare it as "int vsprintf()". It + * is up to the package author to declare vsprintf correctly based on the + * symbol. + */ +#define HAS_VPRINTF /**/ +/*#define USE_CHAR_VSPRINTF / **/ + +/* DOUBLESIZE: + * This symbol contains the size of a double, so that the C preprocessor + * can make decisions based on it. + */ +#define DOUBLESIZE 8 /**/ + +/* EBCDIC: + * This symbol, if defined, indicates that this system uses + * EBCDIC encoding. + */ +/*#define EBCDIC / **/ + +/* Fpos_t: + * This symbol holds the type used to declare file positions in libc. + * It can be fpos_t, long, uint, etc... It may be necessary to include + * to get any typedef'ed information. + */ +#define Fpos_t int /* File position type */ + +/* Gid_t_f: + * This symbol defines the format string used for printing a Gid_t. + */ +#define Gid_t_f "lu" /**/ + +/* Gid_t_sign: + * This symbol holds the signedess of a Gid_t. + * 1 for unsigned, -1 for signed. + */ +#define Gid_t_sign 1 /* GID sign */ + +/* Gid_t_size: + * This symbol holds the size of a Gid_t in bytes. + */ +#define Gid_t_size 4 /* GID size */ + +/* Gid_t: + * This symbol holds the return type of getgid() and the type of + * argument to setrgid() and related functions. Typically, + * it is the type of group ids in the kernel. It can be int, ushort, + * gid_t, etc... It may be necessary to include to get + * any typedef'ed information. + */ +#define Gid_t int /* Type for getgid(), etc... */ + /* I_DIRENT: * This symbol, if defined, indicates to the C program that it should * include . Using this symbol also triggers the definition @@ -2893,6 +2719,12 @@ /*#define I_GRP / **/ /*#define GRPASSWD / **/ +/* I_MACH_CTHREADS: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/*#define I_MACH_CTHREADS / **/ + /* I_NDBM: * This symbol, if defined, indicates that exists and should * be included. @@ -2944,6 +2776,12 @@ */ /*#define I_NET_ERRNO / **/ +/* I_PTHREAD: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/*#define I_PTHREAD / **/ + /* I_PWD: * This symbol, if defined, indicates to the C program that it should * include . @@ -2980,52 +2818,206 @@ * This symbol, if defined, indicates to the C program that struct passwd * contains pw_passwd. */ -/*#define I_PWD / **/ -/*#define PWQUOTA / **/ -/*#define PWAGE / **/ -/*#define PWCHANGE / **/ -/*#define PWCLASS / **/ -/*#define PWEXPIRE / **/ -/*#define PWCOMMENT / **/ -/*#define PWGECOS / **/ -/*#define PWPASSWD / **/ +/*#define I_PWD / **/ +/*#define PWQUOTA / **/ +/*#define PWAGE / **/ +/*#define PWCHANGE / **/ +/*#define PWCLASS / **/ +/*#define PWEXPIRE / **/ +/*#define PWCOMMENT / **/ +/*#define PWGECOS / **/ +/*#define PWPASSWD / **/ + +/* I_SYS_ACCESS: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/*#define I_SYS_ACCESS / **/ + +/* I_SYS_SECURITY: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/*#define I_SYS_SECURITY / **/ + +/* I_SYSUIO: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_SYSUIO / **/ + +/* I_TIME: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/* I_SYS_TIME: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +/* I_SYS_TIME_KERNEL: + * This symbol, if defined, indicates to the C program that it should + * include with KERNEL defined. + */ +/* HAS_TM_TM_ZONE: + * This symbol, if defined, indicates to the C program that + * the struct tm has a tm_zone field. + */ +/* HAS_TM_TM_GMTOFF: + * This symbol, if defined, indicates to the C program that + * the struct tm has a tm_gmtoff field. + */ +#define I_TIME /**/ +/*#define I_SYS_TIME / **/ +/*#define I_SYS_TIME_KERNEL / **/ +/*#define HAS_TM_TM_ZONE / **/ +/*#define HAS_TM_TM_GMTOFF / **/ + +/* I_STDARG: + * This symbol, if defined, indicates that exists and should + * be included. + */ +/* I_VARARGS: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#define I_STDARG /**/ +/*#define I_VARARGS / **/ + +/* PERL_INC_VERSION_LIST: + * This variable specifies the list of subdirectories in over + * which perl.c:incpush() and lib/lib.pm will automatically + * search when adding directories to @INC, in a format suitable + * for a C initialization string. See the inc_version_list entry + * in Porting/Glossary for more details. + */ +/*#define PERL_INC_VERSION_LIST NULL / **/ + +/* INSTALL_USR_BIN_PERL: + * This symbol, if defined, indicates that Perl is to be installed + * also as /usr/bin/perl. + */ +/*#define INSTALL_USR_BIN_PERL / **/ + +/* Off_t: + * This symbol holds the type used to declare offsets in the kernel. + * It can be int, long, off_t, etc... It may be necessary to include + * to get any typedef'ed information. + */ +/* LSEEKSIZE: + * This symbol holds the number of bytes used by the Off_t. + */ +/* Off_t_size: + * This symbol holds the number of bytes used by the Off_t. + */ +#define Off_t int /* type */ +#define LSEEKSIZE 4 /* size */ +#define Off_t_size 4 /* size */ + +/* Free_t: + * This variable contains the return type of free(). It is usually + * void, but occasionally int. + */ +/* Malloc_t: + * This symbol is the type of pointer returned by malloc and realloc. + */ +#define Malloc_t void * /**/ +#define Free_t void /**/ + +/* PERL_MALLOC_WRAP: + * This symbol, if defined, indicates that we'd like malloc wrap checks. + */ +/*#define PERL_MALLOC_WRAP / **/ + +/* MYMALLOC: + * This symbol, if defined, indicates that we're using our own malloc. + */ +/*#define MYMALLOC / **/ + +/* Mode_t: + * This symbol holds the type used to declare file modes + * for systems calls. It is usually mode_t, but may be + * int or unsigned short. It may be necessary to include + * to get any typedef'ed information. + */ +#define Mode_t int /* file mode parameter for system calls */ + +/* VAL_O_NONBLOCK: + * This symbol is to be used during open() or fcntl(F_SETFL) to turn on + * non-blocking I/O for the file descriptor. Note that there is no way + * back, i.e. you cannot turn it blocking again this way. If you wish to + * alternatively switch between blocking and non-blocking, use the + * ioctl(FIOSNBIO) call instead, but that is not supported by all devices. + */ +/* VAL_EAGAIN: + * This symbol holds the errno error code set by read() when no data was + * present on the non-blocking file descriptor. + */ +/* RD_NODATA: + * This symbol holds the return code from read() when no data is present + * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is + * not defined, then you can't distinguish between no data and EOF by + * issuing a read(). You'll have to find another way to tell for sure! + */ +/* EOF_NONBLOCK: + * This symbol, if defined, indicates to the C program that a read() on + * a non-blocking file descriptor will return 0 on EOF, and not the value + * held in RD_NODATA (-1 usually, in that case!). + */ +#define VAL_O_NONBLOCK O_NONBLOCK +#define VAL_EAGAIN EAGAIN +#define RD_NODATA -1 +#undef EOF_NONBLOCK -/* I_SYSUIO: - * This symbol, if defined, indicates that exists and - * should be included. +/* Netdb_host_t: + * This symbol holds the type used for the 1st argument + * to gethostbyaddr(). */ -/*#define I_SYSUIO / **/ - -/* I_STDARG: - * This symbol, if defined, indicates that exists and should - * be included. +/* Netdb_hlen_t: + * This symbol holds the type used for the 2nd argument + * to gethostbyaddr(). */ -/* I_VARARGS: - * This symbol, if defined, indicates to the C program that it should - * include . +/* Netdb_name_t: + * This symbol holds the type used for the argument to + * gethostbyname(). */ -#define I_STDARG /**/ -/*#define I_VARARGS / **/ - -/* Free_t: - * This variable contains the return type of free(). It is usually - * void, but occasionally int. +/* Netdb_net_t: + * This symbol holds the type used for the 1st argument to + * getnetbyaddr(). */ -/* Malloc_t: - * This symbol is the type of pointer returned by malloc and realloc. +#define Netdb_host_t const char * /**/ +#define Netdb_hlen_t int /**/ +#define Netdb_name_t const char * /**/ +#define Netdb_net_t unsigned long /**/ + +/* PERL_OTHERLIBDIRS: + * This variable contains a colon-separated set of paths for the perl + * binary to search for additional library files or modules. + * These directories will be tacked to the end of @INC. + * Perl will automatically search below each path for version- + * and architecture-specific directories. See PERL_INC_VERSION_LIST + * for more details. */ -#define Malloc_t void * /**/ -#define Free_t void /**/ +/*#define PERL_OTHERLIBDIRS " " / **/ -/* PERL_MALLOC_WRAP: - * This symbol, if defined, indicates that we'd like malloc wrap checks. +/* Pid_t: + * This symbol holds the type used to declare process ids in the kernel. + * It can be int, uint, pid_t, etc... It may be necessary to include + * to get any typedef'ed information. */ -/*#define PERL_MALLOC_WRAP / **/ +#define Pid_t int /* PID type */ -/* MYMALLOC: - * This symbol, if defined, indicates that we're using our own malloc. +/* PRIVLIB: + * This symbol contains the name of the private library for this package. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. The program + * should be prepared to do ~ expansion. */ -/*#define MYMALLOC / **/ +/* PRIVLIB_EXP: + * 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 "/usr/local/lib/perl5/5.15" /**/ +#define PRIVLIB_EXP "/usr/local/lib/perl5/5.15" /**/ /* CAN_PROTOTYPE: * If defined, this macro indicates that the C compiler can handle @@ -3045,6 +3037,65 @@ #define _(args) () #endif +/* PTRSIZE: + * This symbol contains the size of a pointer, so that the C preprocessor + * can make decisions based on it. It will be sizeof(void *) if + * the compiler supports (void *); otherwise it will be + * sizeof(char *). + */ +#define PTRSIZE 4 /**/ + +/* HAS_QUAD: + * This symbol, if defined, tells that there's a 64-bit integer type, + * Quad_t, and its unsigned counterpart, Uquad_t. QUADKIND will be one + * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, QUAD_IS_INT64_T, + * or QUAD_IS___INT64. + */ +/*#define HAS_QUAD / **/ +#ifdef HAS_QUAD +# define Quad_t int64_t /**/ +# define Uquad_t uint64_t /**/ +# define QUADKIND 4 /**/ +# define QUAD_IS_INT 1 +# define QUAD_IS_LONG 2 +# define QUAD_IS_LONG_LONG 3 +# define QUAD_IS_INT64_T 4 +# define QUAD_IS___INT64 5 +#endif + +/* Drand01: + * This macro is to be used to generate uniformly distributed + * random numbers over the range [0., 1.[. You may have to supply + * an 'extern double drand48();' in your program since SunOS 4.1.3 + * doesn't provide you with anything relevant in its headers. + * See HAS_DRAND48_PROTO. + */ +/* Rand_seed_t: + * This symbol defines the type of the argument of the + * random seed function. + */ +/* seedDrand01: + * This symbol defines the macro to be used in seeding the + * random number generator (see Drand01). + */ +/* RANDBITS: + * This symbol indicates how many bits are produced by the + * function used to generate normalized random numbers. + * Values include 15, 16, 31, and 48. + */ +#define Drand01() ((rand() & 0x7FFF) / (double) ((unsigned long)1 << 15)) /**/ +#define Rand_seed_t int /**/ +#define seedDrand01(x) srand((Rand_seed_t)x) /**/ +#define RANDBITS 48 /**/ + +/* Select_fd_set_t: + * This symbol holds the type used for the 2nd, 3rd, and 4th + * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET + * is defined, and 'int *' otherwise. This is only useful if you + * have select(), of course. + */ +#define Select_fd_set_t int /**/ + /* SH_PATH: * This symbol contains the full pathname to the shell used on this * on this system to execute Bourne shell scripts. Usually, this will be @@ -3086,19 +3137,169 @@ * Note that this variable is initialized from the sig_num_init, * not from sig_num (which is unused). */ -/* SIG_SIZE: - * This variable contains the number of elements of the SIG_NAME - * and SIG_NUM arrays, excluding the final NULL entry. +/* SIG_SIZE: + * This variable contains the number of elements of the SIG_NAME + * and SIG_NUM arrays, excluding the final NULL entry. + */ +#define SIG_NAME 0 /**/ +#define SIG_NUM 0 /**/ +#define SIG_SIZE 1 /**/ + +/* SITEARCH: + * This symbol contains the name of the private library for this package. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. The program + * should be prepared to do ~ expansion. + * The standard distribution will put nothing in this directory. + * After perl has been installed, users may install their own local + * architecture-dependent modules in this directory with + * MakeMaker Makefile.PL + * or equivalent. See INSTALL for details. + */ +/* SITEARCH_EXP: + * 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 "/usr/local/lib/perl5/5.15/unknown" / **/ +/*#define SITEARCH_EXP "/usr/local/lib/perl5/5.15/unknown" / **/ + +/* SITELIB: + * This symbol contains the name of the private library for this package. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. The program + * should be prepared to do ~ expansion. + * The standard distribution will put nothing in this directory. + * After perl has been installed, users may install their own local + * architecture-independent modules in this directory with + * MakeMaker Makefile.PL + * or equivalent. See INSTALL for details. + */ +/* SITELIB_EXP: + * This symbol contains the ~name expanded version of SITELIB, to be used + * in programs that are not prepared to deal with ~ expansion at run-time. + */ +/* SITELIB_STEM: + * This define is SITELIB_EXP with any trailing version-specific component + * 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 "/usr/local/lib/perl5/5.15" /**/ +#define SITELIB_EXP "/usr/local/lib/perl5/5.15" /**/ +#define SITELIB_STEM "/usr/local/lib/perl5" /**/ + +/* Size_t_size: + * This symbol holds the size of a Size_t in bytes. + */ +#define Size_t_size 4 /**/ + +/* Size_t: + * This symbol holds the type used to declare length parameters + * for string functions. It is usually size_t, but may be + * unsigned long, int, etc. It may be necessary to include + * to get any typedef'ed information. + */ +#define Size_t size_t /* length parameter for string functions */ + +/* Sock_size_t: + * This symbol holds the type used for the size argument of + * various socket calls (just the base type, not the pointer-to). + */ +#define Sock_size_t int /**/ + +/* SSize_t: + * This symbol holds the type used by functions that return + * a count of bytes or an error condition. It must be a signed type. + * It is usually ssize_t, but may be long or int, etc. + * It may be necessary to include or + * to get any typedef'ed information. + * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t). + */ +#define SSize_t int /* signed count of bytes */ + +/* STDCHAR: + * This symbol is defined to be the type of char used in stdio.h. + * It has the values "unsigned char" or "char". + */ +#define STDCHAR char /**/ + +/* Uid_t_f: + * This symbol defines the format string used for printing a Uid_t. + */ +#define Uid_t_f "lu" /**/ + +/* Uid_t_sign: + * This symbol holds the signedess of a Uid_t. + * 1 for unsigned, -1 for signed. + */ +#define Uid_t_sign 1 /* UID sign */ + +/* Uid_t_size: + * This symbol holds the size of a Uid_t in bytes. + */ +#define Uid_t_size 4 /* UID size */ + +/* Uid_t: + * This symbol holds the type used to declare user ids in the kernel. + * It can be int, ushort, uid_t, etc... It may be necessary to include + * to get any typedef'ed information. + */ +#define Uid_t int /* UID type */ + +/* USE_ITHREADS: + * This symbol, if defined, indicates that Perl should be built to + * use the interpreter-based threading implementation. + */ +/* USE_5005THREADS: + * This symbol, if defined, indicates that Perl should be built to + * use the 5.005-based threading implementation. + * Only valid up to 5.8.x. + */ +/* OLD_PTHREADS_API: + * This symbol, if defined, indicates that Perl should + * be built to use the old draft POSIX threads API. */ -#define SIG_NAME 0 /**/ -#define SIG_NUM 0 /**/ -#define SIG_SIZE 1 /**/ +/* USE_REENTRANT_API: + * This symbol, if defined, indicates that Perl should + * try to use the various _r versions of library functions. + * This is extremely experimental. + */ +/*#define USE_5005THREADS / **/ +/*#define USE_ITHREADS / **/ +#if defined(USE_5005THREADS) && !defined(USE_ITHREADS) +#define USE_THREADS /* until src is revised*/ +#endif +/*#define OLD_PTHREADS_API / **/ +/*#define USE_REENTRANT_API / **/ -/* STDCHAR: - * This symbol is defined to be the type of char used in stdio.h. - * It has the values "unsigned char" or "char". +/* PERL_VENDORARCH: + * If defined, this symbol contains the name of a private library. + * The library is private in the sense that it needn't be in anyone's + * execution path, but it should be accessible by the world. + * It may have a ~ on the front. + * The standard distribution will put nothing in this directory. + * Vendors who distribute perl may wish to place their own + * architecture-dependent modules and extensions in this directory with + * MakeMaker Makefile.PL INSTALLDIRS=vendor + * or equivalent. See INSTALL for details. */ -#define STDCHAR char /**/ +/* PERL_VENDORARCH_EXP: + * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used + * in programs that are not prepared to deal with ~ expansion at run-time. + */ +/*#define PERL_VENDORARCH "" / **/ +/*#define PERL_VENDORARCH_EXP "" / **/ + +/* PERL_VENDORLIB_EXP: + * This symbol contains the ~name expanded version of VENDORLIB, to be used + * in programs that are not prepared to deal with ~ expansion at run-time. + */ +/* PERL_VENDORLIB_STEM: + * This define is PERL_VENDORLIB_EXP with any trailing version-specific component + * 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 PERL_VENDORLIB_EXP "" / **/ +/*#define PERL_VENDORLIB_STEM "" / **/ /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this @@ -3519,7 +3720,7 @@ * of significant digits in a long double precision number. Unlike * for DBL_DIG, there's no good guess for LDBL_DIG if it is undefined. */ -/*#define HAS_LDBL_DIG / **/ +/*#define HAS_LDBL_DIG / * */ /* LIBM_LIB_VERSION: * This symbol, if defined, indicates that libm exports _LIB_VERSION @@ -4085,6 +4286,12 @@ */ /*#define I_SOCKS / **/ +/* I_STDBOOL: + * This symbol, if defined, indicates that exists and + * can be included. + */ +/*#define I_STDBOOL / **/ + /* I_SUNMATH: * This symbol, if defined, indicates that exists and * should be included. @@ -4494,208 +4701,9 @@ /*#define USE_SOCKS / **/ #endif -/* HAS_DRAND48_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the drand48() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern double drand48(void); - */ -/*#define HAS_DRAND48_PROTO / **/ - -/* HAS_GETHOST_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for gethostent(), gethostbyname(), and - * gethostbyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -/*#define HAS_GETHOST_PROTOS / **/ - -/* HAS_GETNET_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for getnetent(), getnetbyname(), and - * getnetbyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -/*#define HAS_GETNET_PROTOS / **/ - -/* HAS_GETPROTO_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for getprotoent(), getprotobyname(), and - * getprotobyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -/*#define HAS_GETPROTO_PROTOS / **/ - -/* HAS_GETSERV_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for getservent(), getservbyname(), and - * getservbyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -/*#define HAS_GETSERV_PROTOS / **/ - -/* HAS_LSEEK_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the lseek() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern off_t lseek(int, off_t, int); - */ -/*#define HAS_LSEEK_PROTO / **/ - -/* Netdb_host_t: - * This symbol holds the type used for the 1st argument - * to gethostbyaddr(). - */ -/* Netdb_hlen_t: - * This symbol holds the type used for the 2nd argument - * to gethostbyaddr(). - */ -/* Netdb_name_t: - * This symbol holds the type used for the argument to - * gethostbyname(). - */ -/* Netdb_net_t: - * This symbol holds the type used for the 1st argument to - * getnetbyaddr(). - */ -#define Netdb_host_t const char * /**/ -#define Netdb_hlen_t int /**/ -#define Netdb_name_t const char * /**/ -#define Netdb_net_t unsigned long /**/ - -/* Select_fd_set_t: - * This symbol holds the type used for the 2nd, 3rd, and 4th - * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET - * is defined, and 'int *' otherwise. This is only useful if you - * have select(), of course. - */ -#define Select_fd_set_t int /**/ - -/* Sock_size_t: - * This symbol holds the type used for the size argument of - * various socket calls (just the base type, not the pointer-to). - */ -#define Sock_size_t int /**/ - -/* HAS_TIME: - * This symbol, if defined, indicates that the time() routine exists. - */ -/* Time_t: - * This symbol holds the type returned by time(). It can be long, - * or time_t on BSD sites (in which case should be - * included). - */ -#define HAS_TIME /**/ -#define Time_t time_t /* Time type */ - -/* HAS_TIMES: - * This symbol, if defined, indicates that the times() routine exists. - * Note that this became obsolete on some systems (SUNOS), which now - * use getrusage(). It may be necessary to include . - */ -/*#define HAS_TIMES / **/ - -/* Fpos_t: - * This symbol holds the type used to declare file positions in libc. - * It can be fpos_t, long, uint, etc... It may be necessary to include - * to get any typedef'ed information. - */ -#define Fpos_t int /* File position type */ - -/* Gid_t_f: - * This symbol defines the format string used for printing a Gid_t. - */ -#define Gid_t_f "lu" /**/ - -/* Gid_t_sign: - * This symbol holds the signedess of a Gid_t. - * 1 for unsigned, -1 for signed. - */ -#define Gid_t_sign 1 /* GID sign */ - -/* Gid_t_size: - * This symbol holds the size of a Gid_t in bytes. - */ -#define Gid_t_size 4 /* GID size */ - -/* Gid_t: - * This symbol holds the return type of getgid() and the type of - * argument to setrgid() and related functions. Typically, - * it is the type of group ids in the kernel. It can be int, ushort, - * gid_t, etc... It may be necessary to include to get - * any typedef'ed information. - */ -#define Gid_t int /* Type for getgid(), etc... */ - -/* Off_t: - * This symbol holds the type used to declare offsets in the kernel. - * It can be int, long, off_t, etc... It may be necessary to include - * to get any typedef'ed information. - */ -/* LSEEKSIZE: - * This symbol holds the number of bytes used by the Off_t. - */ -/* Off_t_size: - * This symbol holds the number of bytes used by the Off_t. - */ -#define Off_t int /* type */ -#define LSEEKSIZE 4 /* size */ -#define Off_t_size 4 /* size */ - -/* Mode_t: - * This symbol holds the type used to declare file modes - * for systems calls. It is usually mode_t, but may be - * int or unsigned short. It may be necessary to include - * to get any typedef'ed information. - */ -#define Mode_t int /* file mode parameter for system calls */ - -/* Pid_t: - * This symbol holds the type used to declare process ids in the kernel. - * It can be int, uint, pid_t, etc... It may be necessary to include - * to get any typedef'ed information. - */ -#define Pid_t int /* PID type */ - -/* Size_t_size: - * This symbol holds the size of a Size_t in bytes. - */ -#define Size_t_size 4 /**/ - -/* Size_t: - * This symbol holds the type used to declare length parameters - * for string functions. It is usually size_t, but may be - * unsigned long, int, etc. It may be necessary to include - * to get any typedef'ed information. - */ -#define Size_t size_t /* length parameter for string functions */ - -/* Uid_t_f: - * This symbol defines the format string used for printing a Uid_t. - */ -#define Uid_t_f "lu" /**/ - -/* Uid_t_sign: - * This symbol holds the signedess of a Uid_t. - * 1 for unsigned, -1 for signed. - */ -#define Uid_t_sign 1 /* UID sign */ - -/* Uid_t_size: - * This symbol holds the size of a Uid_t in bytes. - */ -#define Uid_t_size 4 /* UID size */ - -/* Uid_t: - * This symbol holds the type used to declare user ids in the kernel. - * It can be int, ushort, uid_t, etc... It may be necessary to include - * to get any typedef'ed information. - */ -#define Uid_t int /* UID type */ - #endif /* Generated from: - * 31a462b40046313b877734092b49f853190d949d609c56fc0f03085f3aedc382 config_h.SH - * 9ea5c7e8b0b32c76caab5a89a371b8cdce6efcf690a5a74962b9b856fab49fed uconfig.sh + * 5c3a0864433ad4da7f3248b108cf8e17c19bd4d71799cd56b6c2a73bb647561a config_h.SH + * e5d6d7ffdf6717946996c0807aa7a247b46adf41f2d98c62cdd7c1bb8ffe19f2 uconfig.sh * ex: set ro: */ diff --git a/uconfig.sh b/uconfig.sh index 1798d0d6d44..74a1b9143ec 100644 --- a/uconfig.sh +++ b/uconfig.sh @@ -1,4 +1,5 @@ #!/bin/sh +Author='' _a='.a' _o='.o' afs='false' @@ -17,11 +18,11 @@ cf_by='root@localhost' cf_time='Thu Jan 1 00:00:00 GMT 1970' charbits='8' clocktype='clock_t' +cpp_stuff='42' cpplast='-' cppminus='-' cpprun='cc -E' cppstdin='cc -E' -cpp_stuff='42' crypt_r_proto='0' ctermid_r_proto='0' ctime_r_proto='0' @@ -59,9 +60,9 @@ d_attribute_unused='undef' d_attribute_warn_unused_result='undef' d_bcmp='undef' d_bcopy='undef' +d_bsd='undef' d_bsdgetpgrp='undef' d_bsdsetpgrp='undef' -d_bsd='undef' d_builtin_choose_expr='undef' d_builtin_expect='undef' d_bzero='undef' @@ -79,11 +80,11 @@ d_cmsghdr_s='undef' d_const='undef' d_copysignl='undef' d_cplusplus='undef' -d_crypt_r='undef' d_crypt='undef' +d_crypt_r='undef' d_csh='undef' -d_ctermid_r='undef' d_ctermid='undef' +d_ctermid_r='undef' d_ctime64='undef' d_ctime_r='undef' d_cuserid='undef' @@ -98,20 +99,20 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' -d_drand48proto='undef' d_drand48_r='undef' +d_drand48proto='undef' d_dup2='undef' d_eaccess='undef' -d_endgrent_r='undef' d_endgrent='undef' +d_endgrent_r='undef' d_endhent='undef' d_endhostent_r='undef' d_endnent='undef' d_endnetent_r='undef' d_endpent='undef' d_endprotoent_r='undef' -d_endpwent_r='undef' d_endpwent='undef' +d_endpwent_r='undef' d_endsent='undef' d_endservent_r='undef' d_eofnblk='undef' @@ -120,23 +121,23 @@ d_faststdio='undef' d_fchdir='undef' d_fchmod='undef' d_fchown='undef' -d_fcntl_can_lock='undef' d_fcntl='undef' +d_fcntl_can_lock='undef' d_fd_macros='undef' -d_fds_bits='undef' d_fd_set='undef' +d_fds_bits='undef' d_fgetpos='undef' -d_finitel='undef' d_finite='undef' +d_finitel='undef' d_flexfnam='undef' -d_flockproto='undef' d_flock='undef' +d_flockproto='undef' d_fork='define' +d_fp_class='undef' d_fpathconf='undef' +d_fpclass='undef' d_fpclassify='undef' d_fpclassl='undef' -d_fp_class='undef' -d_fpclass='undef' d_fpos64_t='undef' d_frexpl='undef' d_fs_data_s='undef' @@ -154,8 +155,8 @@ d_getaddrinfo='undef' d_getcwd='undef' d_getespwnam='undef' d_getfsstat='undef' -d_getgrent_r='undef' d_getgrent='undef' +d_getgrent_r='undef' d_getgrgid_r='undef' d_getgrnam_r='undef' d_getgrps='undef' @@ -168,10 +169,10 @@ d_gethostbyname_r='undef' d_gethostent_r='undef' d_gethostprotos='undef' d_getitimer='undef' -d_getlogin_r='undef' d_getlogin='undef' -d_getmntent='undef' +d_getlogin_r='undef' d_getmnt='undef' +d_getmntent='undef' d_getnameinfo='undef' d_getnbyaddr='undef' d_getnbyname='undef' @@ -194,8 +195,8 @@ d_getprotobynumber_r='undef' d_getprotoent_r='undef' d_getprotoprotos='undef' d_getprpwnam='undef' -d_getpwent_r='undef' d_getpwent='undef' +d_getpwent_r='undef' d_getpwnam_r='undef' d_getpwuid_r='undef' d_getsbyname='undef' @@ -206,8 +207,8 @@ d_getservbyport_r='undef' d_getservent_r='undef' d_getservprotos='undef' d_getspent='undef' -d_getspnam_r='undef' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='undef' d_gmtime64='undef' d_gmtime_r='undef' @@ -225,16 +226,16 @@ d_int64_t='undef' d_isascii='undef' d_isfinite='undef' d_isinf='undef' -d_isnanl='undef' d_isnan='undef' +d_isnanl='undef' d_killpg='undef' d_lchown='undef' d_ldbl_dig='undef' d_libm_lib_version='undef' d_link='undef' d_localtime64='undef' -d_localtime_r_needs_tzset='undef' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='undef' d_lockf='undef' d_longdbl='undef' @@ -255,26 +256,26 @@ d_memset='define' d_mkdir='undef' d_mkdtemp='undef' d_mkfifo='undef' -d_mkstemps='undef' d_mkstemp='undef' +d_mkstemps='undef' d_mktime64='undef' d_mktime='undef' d_mmap='undef' +d_modfl='undef' d_modfl_pow32_bug='undef' d_modflproto='undef' -d_modfl='undef' d_mprotect='undef' -d_msgctl='undef' +d_msg='undef' d_msg_ctrunc='undef' d_msg_dontroute='undef' -d_msgget='undef' -d_msghdr_s='undef' d_msg_oob='undef' d_msg_peek='undef' d_msg_proxy='undef' +d_msgctl='undef' +d_msgget='undef' +d_msghdr_s='undef' d_msgrcv='undef' d_msgsnd='undef' -d_msg='undef' d_msync='undef' d_munmap='undef' d_mymalloc='undef' @@ -288,8 +289,6 @@ d_old_pthread_create_joinable='undef' d_oldpthreads='undef' d_oldsock='undef' d_open3='undef' -nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' -nv_preserves_uv_bits='0' d_pathconf='undef' d_pause='undef' d_perl_otherlibdirs='undef' @@ -584,6 +583,7 @@ i_sgtty='undef' i_shadow='undef' i_socks='undef' i_stdarg='define' +i_stdbool='undef' i_stddef='define' i_stdlib='define' i_string='define' @@ -657,6 +657,8 @@ netdb_host_type='const char *' netdb_name_type='const char *' netdb_net_type='unsigned long' nroff='nroff' +nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' +nv_preserves_uv_bits='0' nveformat='"e"' nvfformat='"f"' nvgformat='"g"' @@ -692,18 +694,18 @@ sGMTIME_max='2147483647' sGMTIME_min='0' sLOCALTIME_max='2147483647' sLOCALTIME_min='0' +sPRIEUldbl='"llE"' +sPRIFUldbl='"llF"' +sPRIGUldbl='"llG"' +sPRIXU64='"LX"' sPRId64='"Ld"' sPRIeldbl='"lle"' -sPRIEUldbl='"llE"' sPRIfldbl='"llf"' -sPRIFUldbl='"llF"' sPRIgldbl='"llg"' -sPRIGUldbl='"llG"' sPRIi64='"Li"' sPRIo64='"Lo"' sPRIu64='"Lu"' sPRIx64='"Lx"' -sPRIXU64='"LX"' sSCNfldbl='"llf"' sched_yield='sched_yield()' scriptdir='/usr/local/bin' @@ -737,6 +739,8 @@ srand48_r_proto='0' srandom_r_proto='0' src='.' ssizetype=int +st_ino_sign='1' +st_ino_size='4' startperl='#!perl' stdchar=char stdio_base='((fp)->_IO_read_base)' @@ -745,8 +749,6 @@ stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)' stdio_filbuf='' stdio_ptr='((fp)->_IO_read_ptr)' stdio_stream_array='' -st_ino_sign='1' -st_ino_size='4' strerror_r_proto='0' targetarch='' timetype=time_t @@ -807,3 +809,4 @@ vendorlib_stem='' vendorlibexp='' versiononly='undef' voidflags=1 +zip='' diff --git a/uconfig64.sh b/uconfig64.sh index 38784313b06..784d0f010eb 100644 --- a/uconfig64.sh +++ b/uconfig64.sh @@ -1,4 +1,5 @@ #!/bin/sh +Author='' _a='.a' _o='.o' afs='false' @@ -18,11 +19,11 @@ cf_by='root@localhost' cf_time='Thu Jan 1 00:00:00 GMT 1970' charbits='8' clocktype='clock_t' +cpp_stuff='42' cpplast='-' cppminus='-' cpprun='cc -E' cppstdin='cc -E' -cpp_stuff='42' crypt_r_proto='0' ctermid_r_proto='0' ctime_r_proto='0' @@ -60,9 +61,9 @@ d_attribute_unused='undef' d_attribute_warn_unused_result='undef' d_bcmp='undef' d_bcopy='undef' +d_bsd='undef' d_bsdgetpgrp='undef' d_bsdsetpgrp='undef' -d_bsd='undef' d_builtin_choose_expr='undef' d_builtin_expect='undef' d_bzero='undef' @@ -80,11 +81,11 @@ d_cmsghdr_s='undef' d_const='undef' d_copysignl='undef' d_cplusplus='undef' -d_crypt_r='undef' d_crypt='undef' +d_crypt_r='undef' d_csh='undef' -d_ctermid_r='undef' d_ctermid='undef' +d_ctermid_r='undef' d_ctime64='undef' d_ctime_r='undef' d_cuserid='undef' @@ -99,20 +100,20 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' -d_drand48proto='undef' d_drand48_r='undef' +d_drand48proto='undef' d_dup2='undef' d_eaccess='undef' -d_endgrent_r='undef' d_endgrent='undef' +d_endgrent_r='undef' d_endhent='undef' d_endhostent_r='undef' d_endnent='undef' d_endnetent_r='undef' d_endpent='undef' d_endprotoent_r='undef' -d_endpwent_r='undef' d_endpwent='undef' +d_endpwent_r='undef' d_endsent='undef' d_endservent_r='undef' d_eofnblk='undef' @@ -121,23 +122,23 @@ d_faststdio='undef' d_fchdir='undef' d_fchmod='undef' d_fchown='undef' -d_fcntl_can_lock='undef' d_fcntl='undef' +d_fcntl_can_lock='undef' d_fd_macros='undef' -d_fds_bits='undef' d_fd_set='undef' +d_fds_bits='undef' d_fgetpos='undef' -d_finitel='undef' d_finite='undef' +d_finitel='undef' d_flexfnam='undef' -d_flockproto='undef' d_flock='undef' +d_flockproto='undef' d_fork='define' +d_fp_class='undef' d_fpathconf='undef' +d_fpclass='undef' d_fpclassify='undef' d_fpclassl='undef' -d_fp_class='undef' -d_fpclass='undef' d_fpos64_t='undef' d_frexpl='undef' d_fs_data_s='undef' @@ -155,8 +156,8 @@ d_getaddrinfo='undef' d_getcwd='undef' d_getespwnam='undef' d_getfsstat='undef' -d_getgrent_r='undef' d_getgrent='undef' +d_getgrent_r='undef' d_getgrgid_r='undef' d_getgrnam_r='undef' d_getgrps='undef' @@ -169,10 +170,10 @@ d_gethostbyname_r='undef' d_gethostent_r='undef' d_gethostprotos='undef' d_getitimer='undef' -d_getlogin_r='undef' d_getlogin='undef' -d_getmntent='undef' +d_getlogin_r='undef' d_getmnt='undef' +d_getmntent='undef' d_getnameinfo='undef' d_getnbyaddr='undef' d_getnbyname='undef' @@ -195,8 +196,8 @@ d_getprotobynumber_r='undef' d_getprotoent_r='undef' d_getprotoprotos='undef' d_getprpwnam='undef' -d_getpwent_r='undef' d_getpwent='undef' +d_getpwent_r='undef' d_getpwnam_r='undef' d_getpwuid_r='undef' d_getsbyname='undef' @@ -207,8 +208,8 @@ d_getservbyport_r='undef' d_getservent_r='undef' d_getservprotos='undef' d_getspent='undef' -d_getspnam_r='undef' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='undef' d_gmtime64='undef' d_gmtime_r='undef' @@ -226,16 +227,16 @@ d_int64_t='undef' d_isascii='undef' d_isfinite='undef' d_isinf='undef' -d_isnanl='undef' d_isnan='undef' +d_isnanl='undef' d_killpg='undef' d_lchown='undef' d_ldbl_dig='undef' d_libm_lib_version='undef' d_link='undef' d_localtime64='undef' -d_localtime_r_needs_tzset='undef' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='undef' d_lockf='undef' d_longdbl='undef' @@ -256,26 +257,26 @@ d_memset='define' d_mkdir='undef' d_mkdtemp='undef' d_mkfifo='undef' -d_mkstemps='undef' d_mkstemp='undef' +d_mkstemps='undef' d_mktime64='undef' d_mktime='undef' d_mmap='undef' +d_modfl='undef' d_modfl_pow32_bug='undef' d_modflproto='undef' -d_modfl='undef' d_mprotect='undef' -d_msgctl='undef' +d_msg='undef' d_msg_ctrunc='undef' d_msg_dontroute='undef' -d_msgget='undef' -d_msghdr_s='undef' d_msg_oob='undef' d_msg_peek='undef' d_msg_proxy='undef' +d_msgctl='undef' +d_msgget='undef' +d_msghdr_s='undef' d_msgrcv='undef' d_msgsnd='undef' -d_msg='undef' d_msync='undef' d_munmap='undef' d_mymalloc='undef' @@ -289,8 +290,6 @@ d_old_pthread_create_joinable='undef' d_oldpthreads='undef' d_oldsock='undef' d_open3='undef' -nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' -nv_preserves_uv_bits='0' d_pathconf='undef' d_pause='undef' d_perl_otherlibdirs='undef' @@ -585,6 +584,7 @@ i_sgtty='undef' i_shadow='undef' i_socks='undef' i_stdarg='define' +i_stdbool='undef' i_stddef='define' i_stdlib='define' i_string='define' @@ -658,6 +658,8 @@ netdb_host_type='const char *' netdb_name_type='const char *' netdb_net_type='unsigned long' nroff='nroff' +nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' +nv_preserves_uv_bits='0' nveformat='"e"' nvfformat='"f"' nvgformat='"g"' @@ -693,18 +695,18 @@ sGMTIME_max='2147483647' sGMTIME_min='0' sLOCALTIME_max='2147483647' sLOCALTIME_min='0' +sPRIEUldbl='"llE"' +sPRIFUldbl='"llF"' +sPRIGUldbl='"llG"' +sPRIXU64='"lX"' sPRId64='"ld"' sPRIeldbl='"lle"' -sPRIEUldbl='"llE"' sPRIfldbl='"llf"' -sPRIFUldbl='"llF"' sPRIgldbl='"llg"' -sPRIGUldbl='"llG"' sPRIi64='"li"' sPRIo64='"lo"' sPRIu64='"lu"' sPRIx64='"lx"' -sPRIXU64='"lX"' sSCNfldbl='"llf"' sched_yield='sched_yield()' scriptdir='/usr/local/bin' @@ -808,3 +810,4 @@ vendorlib_stem='' vendorlibexp='' versiononly='undef' voidflags=1 +zip='' diff --git a/utf8.c b/utf8.c index 797c8112e94..4bab3a9b841 100644 --- a/utf8.c +++ b/utf8.c @@ -13,12 +13,12 @@ * heard of that we don't want to see any closer; and that's the one place * we're trying to get to! And that's just where we can't get, nohow.' * - * [p.603 of _The Lord of the Rings_, IV/I: "The Taming of Smagol"] + * [p.603 of _The Lord of the Rings_, IV/I: "The Taming of Sméagol"] * * 'Well do I understand your speech,' he answered in the same language; * 'yet few strangers do so. Why then do you not speak in the Common Tongue, * as is the custom in the West, if you wish to be answered?' - * --Gandalf, addressing Thoden's door wardens + * --Gandalf, addressing Théoden's door wardens * * [p.508 of _The Lord of the Rings_, III/vi: "The King of the Golden Hall"] * diff --git a/util.c b/util.c index b6193409426..8f02a4bc383 100644 --- a/util.c +++ b/util.c @@ -12,7 +12,7 @@ * 'Very useful, no doubt, that was to Saruman; yet it seems that he was * not content.' --Gandalf to Pippin * - * [p.598 of _The Lord of the Rings_, III/xi: "The Palantr"] + * [p.598 of _The Lord of the Rings_, III/xi: "The Palantír"] */ /* This file contains assorted utility routines. @@ -41,10 +41,6 @@ int putenv(char *); #endif -#ifdef I_SYS_WAIT -# include -#endif - #ifdef HAS_SELECT # ifdef I_SYS_SELECT # include diff --git a/utils/h2ph.PL b/utils/h2ph.PL index 4545d6d1f35..e0b5e3aa9f1 100644 --- a/utils/h2ph.PL +++ b/utils/h2ph.PL @@ -151,24 +151,22 @@ while (defined (my $file = next_file())) { } else { s/^\s+//; expr(); + $new = 1 if $new eq ''; + + # Shunt around such directives as `#define FOO FOO': + next if $new =~ /^\s*&\Q$name\E\s*\z/; + $new = reindent($new); $args = reindent($args); - if ($t ne '') { - $new =~ s/(['\\])/\\$1/g; #']); - - if ($opt_h) { - print OUT $t,"eval \"\\n#line $eval_index $outfile\\n\" . 'sub $name () {",$new,";}' unless defined(\&$name);\n"; - $eval_index++; - } else { - print OUT $t,"eval 'sub $name () {",$new,";}' unless defined(\&$name);\n"; - } - } else { - # Shunt around such directives as `#define FOO FOO': - next if " \&$name" eq $new; + $new =~ s/(['\\])/\\$1/g; #']); - print OUT $t,"unless(defined(\&$name)) {\n sub $name () {\t",$new,";}\n}\n"; + print OUT $t, 'eval '; + if ($opt_h) { + print OUT "\"\\n#line $eval_index $outfile\\n\" . "; + $eval_index++; } + print OUT "'sub $name () {$new;}' unless defined(&$name);\n"; } } elsif (/^(include|import|include_next)\s*([<\"])(.*)[>\"]/) { $incl_type = $1; diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index 8e5debfa29b..89b4d359685 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -345,7 +345,7 @@ x2p : [.x2p]$(DBG)a2p$(E) [.x2p]s2p.com [.x2p]find2perl.com extra.pods : miniperl @ @extra_pods.com -PERLDELTA_CURRENT = [.pod]perl5153delta.pod +PERLDELTA_CURRENT = [.pod]perl5154delta.pod $(PERLDELTA_CURRENT) : [.pod]perldelta.pod Copy/NoConfirm/Log $(MMS$SOURCE) $(MMS$TARGET) diff --git a/win32/Makefile b/win32/Makefile index 5fd2f9812e0..55def99bb55 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -37,7 +37,7 @@ INST_TOP = $(INST_DRV)\perl # versioned installation can be obtained by setting INST_TOP above to a # path that includes an arbitrary version string. # -#INST_VER = \5.15.2 +#INST_VER = \5.15.3 # # Comment this out if you DON'T want your perl installation to have @@ -843,13 +843,13 @@ config.w32 : $(CFGSH_TMPL) # this target is for when changes to the main config.sh happen. # edit config.vc, then make perl in a minimal configuration (i.e. with MULTI, -# ITHREADS, IMP_SYS, LARGE_FILES, PERLIO and CRYPT off), then make this target +# ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make this target # to regenerate config_H.vc. +# unfortunately, some further manual editing is also then required to restore all +# the special __GNUC__ handling that is otherwise lost. # repeat for config.vc64 and config_H.vc64 if you have a suitable build # environment, otherwise hand-edit them to maintain the same differences with # config.vc and config_H.vc as before. -# unfortunately, some further manual editing is also then required to restore all -# the special __GNUC__ handling that is otherwise lost. regen_config_h: $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh $(MINIPERL) -I..\lib ..\configpm --chdir=.. @@ -1073,7 +1073,7 @@ utils: $(PERLEXE) $(X2P) copy ..\README.vmesa ..\pod\perlvmesa.pod copy ..\README.vos ..\pod\perlvos.pod copy ..\README.win32 ..\pod\perlwin32.pod - copy ..\pod\perldelta.pod ..\pod\perl5153delta.pod + copy ..\pod\perldelta.pod ..\pod\perl5154delta.pod cd ..\win32 $(PERLEXE) $(PL2BAT) $(UTILS) $(PERLEXE) $(ICWD) ..\autodoc.pl .. @@ -1166,7 +1166,7 @@ distclean: realclean -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API -cd $(PODDIR) && del /f *.html *.bat \ - perl5153delta.pod perlaix.pod perlamiga.pod perlapi.pod \ + perl5154delta.pod perlaix.pod perlamiga.pod perlapi.pod \ perlbeos.pod perlbs2000.pod perlce.pod perlcn.pod \ perlcygwin.pod perldgux.pod perldos.pod perlepoc.pod \ perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \ diff --git a/win32/Makefile.ce b/win32/Makefile.ce index e81dd3a8948..b219ae6f580 100644 --- a/win32/Makefile.ce +++ b/win32/Makefile.ce @@ -6,7 +6,7 @@ SRCDIR = .. PV = 59 -INST_VER = 5.15.2 +INST_VER = 5.15.3 # INSTALL_ROOT specifies a path where this perl will be installed on CE device INSTALL_ROOT=/netzwerk/sprache/perl diff --git a/win32/config.bc b/win32/config.bc deleted file mode 100644 index 2dc5063838e..00000000000 --- a/win32/config.bc +++ /dev/null @@ -1,1086 +0,0 @@ -## Configured by: ~cf_email~ -## Target system: WIN32 -Author='' -Date='$Date' -Header='' -Id='$Id' -Locker='' -Log='$Log' -RCSfile='$RCSfile' -Revision='$Revision' -Source='' -State='' -_a='.lib' -_exe='.exe' -_o='.obj' -afs='false' -afsroot='/afs' -alignbytes='8' -ansi2knr='' -aphostname='' -api_revision='~PERL_API_REVISION~' -api_subversion='~PERL_API_SUBVERSION~' -api_version='~PERL_API_VERSION~' -api_versionstring='~PERL_API_REVISION~.~PERL_API_VERSION~.~PERL_API_SUBVERSION~' -ar='tlib /P128' -archlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~' -archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~' -archname64='' -archname='MSWin32' -archobjs='' -asctime_r_proto='0' -awk='awk' -baserev='5' -bash='' -bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' -binexp='~INST_TOP~~INST_VER~\bin~INST_ARCH~' -bison='' -byacc='byacc' -byteorder='1234' -c='' -castflags='0' -cat='type' -cc='bcc32' -cccdlflags=' ' -ccdlflags='-tWD' -ccflags='-DWIN32' -ccflags_uselargefiles='' -ccname='~cc~' -ccsymbols='' -ccversion='' -cf_by='nobody' -cf_email='nobody@no.where.net' -cf_time='' -charbits='8' -chgrp='' -chmod='' -chown='' -clocktype='clock_t' -comm='' -compress='' -contains='grep' -cp='copy' -cpio='' -cpp='cpp32 -oCON' -cpp_stuff='42' -cppccsymbols='' -cppflags='-DWIN32' -cpplast='' -cppminus='' -cpprun='cpp32 -oCON' -cppstdin='cppstdin' -cppsymbols='' -crypt_r_proto='0' -cryptlib='' -csh='undef' -ctermid_r_proto='0' -ctime_r_proto='0' -d_Gconvert='gcvt((x),(n),(b))' -d_PRIEUldbl='undef' -d_PRIFUldbl='undef' -d_PRIGUldbl='undef' -d_PRIXU64='undef' -d_PRId64='undef' -d_PRIeldbl='undef' -d_PRIfldbl='undef' -d_PRIgldbl='undef' -d_PRIi64='undef' -d_PRIo64='undef' -d_PRIu64='undef' -d_PRIx64='undef' -d_SCNfldbl='undef' -d__fwalk='undef' -d_access='define' -d_accessx='undef' -d_aintl='undef' -d_alarm='define' -d_archlib='define' -d_asctime64='undef' -d_asctime_r='undef' -d_atolf='undef' -d_atoll='undef' -d_attribute_deprecated='undef' -d_attribute_format='undef' -d_attribute_malloc='undef' -d_attribute_nonnull='undef' -d_attribute_noreturn='undef' -d_attribute_pure='undef' -d_attribute_unused='undef' -d_attribute_warn_unused_result='undef' -d_bcmp='undef' -d_bcopy='undef' -d_bsd='define' -d_bsdgetpgrp='undef' -d_bsdsetpgrp='undef' -d_builtin_choose_expr='undef' -d_builtin_expect='undef' -d_bzero='undef' -d_c99_variadic_macros='undef' -d_casti32='define' -d_castneg='define' -d_charvspr='undef' -d_chown='undef' -d_chroot='undef' -d_chsize='define' -d_class='undef' -d_clearenv='undef' -d_closedir='define' -d_cmsghdr_s='undef' -d_const='define' -d_copysignl='undef' -d_cplusplus='undef' -d_crypt='define' -d_crypt_r='undef' -d_csh='undef' -d_ctermid='undef' -d_ctermid_r='undef' -d_ctime64='undef' -d_ctime_r='undef' -d_cuserid='undef' -d_dbl_dig='define' -d_dbminitproto='undef' -d_difftime64='undef' -d_difftime='define' -d_dir_dd_fd='undef' -d_dirfd='undef' -d_dirnamlen='define' -d_dlerror='define' -d_dlopen='define' -d_dlsymun='undef' -d_dosuid='undef' -d_drand48_r='undef' -d_drand48proto='undef' -d_dup2='define' -d_eaccess='undef' -d_endgrent='undef' -d_endgrent_r='undef' -d_endhent='undef' -d_endhostent_r='undef' -d_endnent='undef' -d_endnetent_r='undef' -d_endpent='undef' -d_endprotoent_r='undef' -d_endpwent='undef' -d_endpwent_r='undef' -d_endsent='undef' -d_endservent_r='undef' -d_eofnblk='define' -d_eunice='undef' -d_faststdio='define' -d_fchdir='undef' -d_fchmod='undef' -d_fchown='undef' -d_fcntl_can_lock='undef' -d_fcntl='undef' -d_fd_macros='define' -d_fd_set='define' -d_fds_bits='define' -d_fgetpos='define' -d_finitel='undef' -d_finite='undef' -d_flexfnam='define' -d_flock='define' -d_flockproto='define' -d_fork='undef' -d_fp_class='undef' -d_fpathconf='undef' -d_fpclass='undef' -d_fpclassify='undef' -d_fpclassl='undef' -d_fpos64_t='undef' -d_frexpl='undef' -d_fs_data_s='undef' -d_fseeko='undef' -d_fsetpos='define' -d_fstatfs='undef' -d_fstatvfs='undef' -d_fsync='undef' -d_ftello='undef' -d_ftime='define' -d_futimes='undef' -d_gdbm_ndbm_h_uses_prototypes='undef' -d_gdbmndbm_h_uses_prototypes='undef' -d_getaddrinfo='undef' -d_getcwd='define' -d_getespwnam='undef' -d_getfsstat='undef' -d_getgrent='undef' -d_getgrent_r='undef' -d_getgrgid_r='undef' -d_getgrnam_r='undef' -d_getgrps='undef' -d_gethbyaddr='define' -d_gethbyname='define' -d_gethent='undef' -d_gethname='define' -d_gethostbyaddr_r='undef' -d_gethostbyname_r='undef' -d_gethostent_r='undef' -d_gethostprotos='define' -d_getitimer='undef' -d_getlogin='define' -d_getlogin_r='undef' -d_getmnt='undef' -d_getmntent='undef' -d_getnameinfo='undef' -d_getnbyaddr='undef' -d_getnbyname='undef' -d_getnent='undef' -d_getnetbyaddr_r='undef' -d_getnetbyname_r='undef' -d_getnetent_r='undef' -d_getnetprotos='undef' -d_getpagsz='undef' -d_getpbyname='define' -d_getpbynumber='define' -d_getpent='undef' -d_getpgid='undef' -d_getpgrp2='undef' -d_getpgrp='undef' -d_getppid='undef' -d_getprior='undef' -d_getprotobyname_r='undef' -d_getprotobynumber_r='undef' -d_getprotoent_r='undef' -d_getprotoprotos='define' -d_getprpwnam='undef' -d_getpwent='undef' -d_getpwent_r='undef' -d_getpwnam_r='undef' -d_getpwuid_r='undef' -d_getsbyname='define' -d_getsbyport='define' -d_getsent='undef' -d_getservbyname_r='undef' -d_getservbyport_r='undef' -d_getservent_r='undef' -d_getservprotos='define' -d_getspnam='undef' -d_getspnam_r='undef' -d_gettimeod='define' -d_gmtime64='undef' -d_gmtime_r='undef' -d_gnulibc='undef' -d_grpasswd='undef' -d_hasmntopt='undef' -d_htonl='define' -d_ilogbl='undef' -d_inc_version_list='undef' -d_index='undef' -d_inetaton='undef' -d_inetntop='undef' -d_inetpton='undef' -d_int64_t='undef' -d_isascii='define' -d_isfinite='undef' -d_isinf='undef' -d_isnan='define' -d_isnanl='undef' -d_killpg='define' -d_lchown='undef' -d_ldbl_dig='define' -d_libm_lib_version='undef' -d_link='define' -d_localtime64='undef' -d_localtime_r='undef' -d_localtime_r_needs_tzset='undef' -d_locconv='define' -d_lockf='undef' -d_longdbl='define' -d_longlong='undef' -d_lseekproto='define' -d_lstat='undef' -d_madvise='undef' -d_malloc_good_size='undef' -d_malloc_size='undef' -d_mblen='define' -d_mbstowcs='define' -d_mbtowc='define' -d_memchr='define' -d_memcmp='define' -d_memcpy='define' -d_memmove='define' -d_memset='define' -d_mkdir='define' -d_mkdtemp='undef' -d_mkfifo='undef' -d_mkstemp='undef' -d_mkstemps='undef' -d_mktime64='undef' -d_mktime='define' -d_mmap='undef' -d_modfl='undef' -d_modfl_pow32_bug='undef' -d_modflproto='undef' -d_mprotect='undef' -d_msgctl='undef' -d_msg_ctrunc='undef' -d_msg_dontroute='undef' -d_msgget='undef' -d_msghdr_s='undef' -d_msg_oob='undef' -d_msg_peek='undef' -d_msg_proxy='undef' -d_msgrcv='undef' -d_msgsnd='undef' -d_msg='undef' -d_msync='undef' -d_munmap='undef' -d_mymalloc='undef' -d_ndbm='undef' -d_ndbm_h_uses_prototypes='undef' -d_nice='undef' -d_nl_langinfo='undef' -d_nv_preserves_uv='define' -d_nv_zero_is_allbits_zero='define' -d_off64_t='undef' -d_old_pthread_create_joinable='undef' -d_oldpthreads='undef' -d_oldsock='undef' -d_open3='undef' -d_pathconf='undef' -d_pause='define' -d_perl_otherlibdirs='undef' -d_phostname='undef' -d_pipe='define' -d_poll='undef' -d_portable='define' -d_prctl='undef' -d_prctl_set_name='undef' -d_printf_format_null='undef' -d_procselfexe='undef' -d_pseudofork='undef' -d_pthread_atfork='undef' -d_pthread_attr_setscope='undef' -d_pthread_yield='undef' -d_pwage='undef' -d_pwchange='undef' -d_pwclass='undef' -d_pwcomment='undef' -d_pwexpire='undef' -d_pwgecos='undef' -d_pwpasswd='undef' -d_pwquota='undef' -d_qgcvt='undef' -d_quad='define' -d_random_r='undef' -d_readdir64_r='undef' -d_readdir='define' -d_readdir_r='undef' -d_readlink='undef' -d_readv='undef' -d_recvmsg='undef' -d_rename='define' -d_rewinddir='define' -d_rmdir='define' -d_safebcpy='undef' -d_safemcpy='undef' -d_sanemcmp='define' -d_sbrkproto='undef' -d_scalbnl='undef' -d_sched_yield='undef' -d_scm_rights='undef' -d_seekdir='define' -d_select='define' -d_sem='undef' -d_semctl='undef' -d_semctl_semid_ds='undef' -d_semctl_semun='undef' -d_semget='undef' -d_semop='undef' -d_sendmsg='undef' -d_setegid='undef' -d_seteuid='undef' -d_setgrent='undef' -d_setgrent_r='undef' -d_setgrps='undef' -d_sethent='undef' -d_sethostent_r='undef' -d_setitimer='undef' -d_setlinebuf='undef' -d_setlocale='define' -d_setlocale_r='undef' -d_setnent='undef' -d_setnetent_r='undef' -d_setpent='undef' -d_setpgid='undef' -d_setpgrp2='undef' -d_setpgrp='undef' -d_setprior='undef' -d_setproctitle='undef' -d_setprotoent_r='undef' -d_setpwent='undef' -d_setpwent_r='undef' -d_setregid='undef' -d_setresgid='undef' -d_setresuid='undef' -d_setreuid='undef' -d_setrgid='undef' -d_setruid='undef' -d_setsent='undef' -d_setservent_r='undef' -d_setsid='undef' -d_setvbuf='define' -d_sfio='undef' -d_shm='undef' -d_shmat='undef' -d_shmatprototype='undef' -d_shmctl='undef' -d_shmdt='undef' -d_shmget='undef' -d_sigaction='undef' -d_signbit='undef' -d_sigprocmask='undef' -d_sigsetjmp='undef' -d_sin6_scope_id='define' -d_sitearch='define' -d_snprintf='define' -d_sockaddr_sa_len='undef' -d_sockatmark='undef' -d_sockatmarkproto='undef' -d_socket='define' -d_socklen_t='undef' -d_sockpair='undef' -d_socks5_init='undef' -d_sprintf_returns_strlen='define' -d_sqrtl='undef' -d_srand48_r='undef' -d_srandom_r='undef' -d_sresgproto='undef' -d_sresuproto='undef' -d_statblks='undef' -d_static_inline='undef' -d_statfs_f_flags='undef' -d_statfs_s='undef' -d_statvfs='undef' -d_stdio_cnt_lval='define' -d_stdio_ptr_lval='define' -d_stdio_ptr_lval_nochange_cnt='define' -d_stdio_ptr_lval_sets_cnt='undef' -d_stdio_stream_array='undef' -d_stdiobase='define' -d_stdstdio='define' -d_strchr='define' -d_strcoll='define' -d_strctcpy='define' -d_strerrm='strerror(e)' -d_strerror='define' -d_strerror_r='undef' -d_strftime='define' -d_strlcat='undef' -d_strlcpy='undef' -d_strtod='define' -d_strtol='define' -d_strtold='undef' -d_strtoll='undef' -d_strtoq='undef' -d_strtoul='define' -d_strtoull='undef' -d_strtouq='undef' -d_strxfrm='define' -d_suidsafe='undef' -d_symlink='undef' -d_syscall='undef' -d_syscallproto='undef' -d_sysconf='undef' -d_sysernlst='' -d_syserrlst='define' -d_system='define' -d_tcgetpgrp='undef' -d_tcsetpgrp='undef' -d_telldir='define' -d_telldirproto='define' -d_time='define' -d_timegm='undef' -d_times='define' -d_tm_tm_gmtoff='undef' -d_tm_tm_zone='undef' -d_tmpnam_r='undef' -d_truncate='undef' -d_ttyname_r='undef' -d_tzname='define' -d_u32align='define' -d_ualarm='undef' -d_umask='define' -d_uname='define' -d_union_semun='define' -d_unordered='undef' -d_unsetenv='undef' -d_usleep='undef' -d_usleepproto='undef' -d_ustat='undef' -d_vendorarch='undef' -d_vendorbin='undef' -d_vendorlib='undef' -d_vendorscript='undef' -d_vfork='undef' -d_void_closedir='undef' -d_voidsig='define' -d_voidtty='' -d_volatile='define' -d_vprintf='define' -d_vsnprintf='define' -d_wait4='undef' -d_waitpid='define' -d_wcstombs='define' -d_wctomb='define' -d_writev='undef' -d_xenix='undef' -date='date' -db_hashtype='int' -db_prefixtype='int' -db_version_major='0' -db_version_minor='0' -db_version_patch='0' -defvoidused='15' -direntrytype='struct direct' -dlext='dll' -dlsrc='dl_win32.xs' -doublesize='8' -drand01='(rand()/(double)((unsigned)1< - * or defines the symbol DBL_DIG, which is the number - * of significant digits in a double precision number. If this - * symbol is not defined, a guess of 15 is usually pretty good. - */ -#define HAS_DBL_DIG /**/ - -/* HAS_DIFFTIME: - * This symbol, if defined, indicates that the difftime routine is - * available. - */ -#define HAS_DIFFTIME /**/ - -/* HAS_DLERROR: - * This symbol, if defined, indicates that the dlerror routine is - * available to return a string describing the last error that - * occurred from a call to dlopen(), dlclose() or dlsym(). - */ -#define HAS_DLERROR /**/ - -/* HAS_DUP2: - * This symbol, if defined, indicates that the dup2 routine is - * available to duplicate file descriptors. - */ -#define HAS_DUP2 /**/ - -/* HAS_FCHMOD: - * This symbol, if defined, indicates that the fchmod routine is available - * to change mode of opened files. If unavailable, use chmod(). - */ -/*#define HAS_FCHMOD / **/ - -/* HAS_FCHOWN: - * This symbol, if defined, indicates that the fchown routine is available - * to change ownership of opened files. If unavailable, use chown(). - */ -/*#define HAS_FCHOWN / **/ - -/* HAS_FCNTL: - * This symbol, if defined, indicates to the C program that - * the fcntl() function exists. - */ -/*#define HAS_FCNTL / **/ - -/* HAS_FGETPOS: - * This symbol, if defined, indicates that the fgetpos routine is - * available to get the file position indicator, similar to ftell(). - */ -#define HAS_FGETPOS /**/ - -/* HAS_FLOCK: - * This symbol, if defined, indicates that the flock routine is - * available to do file locking. - */ -#define HAS_FLOCK /**/ - -/* HAS_FORK: - * This symbol, if defined, indicates that the fork routine is - * available. - */ -/*#define HAS_FORK / **/ - -/* HAS_FSETPOS: - * This symbol, if defined, indicates that the fsetpos routine is - * available to set the file position indicator, similar to fseek(). - */ -#define HAS_FSETPOS /**/ - -/* HAS_GETTIMEOFDAY: - * This symbol, if defined, indicates that the gettimeofday() system - * call is available for a sub-second accuracy clock. Usually, the file - * needs to be included (see I_SYS_RESOURCE). - * The type "Timeval" should be used to refer to "struct timeval". - */ -#define HAS_GETTIMEOFDAY /**/ -#ifdef HAS_GETTIMEOFDAY -#define Timeval struct timeval /* Structure used by gettimeofday() */ -#endif - -/* HAS_GETGROUPS: - * This symbol, if defined, indicates that the getgroups() routine is - * available to get the list of process groups. If unavailable, multiple - * groups are probably not supported. - */ -/*#define HAS_GETGROUPS / **/ - -/* HAS_GETLOGIN: - * This symbol, if defined, indicates that the getlogin routine is - * available to get the login name. - */ -#define HAS_GETLOGIN /**/ - -/* HAS_GETPGID: - * This symbol, if defined, indicates to the C program that - * the getpgid(pid) function is available to get the - * process group id. - */ -/*#define HAS_GETPGID / **/ - -/* HAS_GETPGRP2: - * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX) - * routine is available to get the current process group. - */ -/*#define HAS_GETPGRP2 / **/ - -/* HAS_GETPPID: - * This symbol, if defined, indicates that the getppid routine is - * available to get the parent process ID. - */ -/*#define HAS_GETPPID / **/ - -/* HAS_GETPRIORITY: - * This symbol, if defined, indicates that the getpriority routine is - * available to get a process's priority. - */ -/*#define HAS_GETPRIORITY / **/ - -/* HAS_INET_ATON: - * This symbol, if defined, indicates to the C program that the - * inet_aton() function is available to parse IP address "dotted-quad" - * strings. - */ -/*#define HAS_INET_ATON / **/ - -/* HAS_KILLPG: - * This symbol, if defined, indicates that the killpg routine is available - * to kill process groups. If unavailable, you probably should use kill - * with a negative process number. - */ -#define HAS_KILLPG /**/ - -/* HAS_LINK: - * This symbol, if defined, indicates that the link routine is - * available to create hard links. - */ -#define HAS_LINK /**/ - -/* HAS_LOCALECONV: - * This symbol, if defined, indicates that the localeconv routine is - * available for numeric and monetary formatting conventions. - */ -#define HAS_LOCALECONV /**/ - -/* HAS_LOCKF: - * This symbol, if defined, indicates that the lockf routine is - * available to do file locking. - */ -/*#define HAS_LOCKF / **/ - -/* HAS_LSTAT: - * This symbol, if defined, indicates that the lstat routine is - * available to do file stats on symbolic links. - */ -/*#define HAS_LSTAT / **/ - -/* HAS_MBLEN: - * This symbol, if defined, indicates that the mblen routine is available - * to find the number of bytes in a multibye character. - */ -#define HAS_MBLEN /**/ - -/* HAS_MBSTOWCS: - * This symbol, if defined, indicates that the mbstowcs routine is - * available to covert a multibyte string into a wide character string. - */ -#define HAS_MBSTOWCS /**/ - -/* HAS_MBTOWC: - * This symbol, if defined, indicates that the mbtowc routine is available - * to covert a multibyte to a wide character. - */ -#define HAS_MBTOWC /**/ - -/* HAS_MEMCMP: - * This symbol, if defined, indicates that the memcmp routine is available - * to compare blocks of memory. - */ -#define HAS_MEMCMP /**/ - -/* HAS_MEMCPY: - * This symbol, if defined, indicates that the memcpy routine is available - * to copy blocks of memory. - */ -#define HAS_MEMCPY /**/ - -/* HAS_MEMMOVE: - * This symbol, if defined, indicates that the memmove routine is available - * to copy potentially overlapping blocks of memory. This should be used - * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your - * own version. - */ -#define HAS_MEMMOVE /**/ - -/* HAS_MEMSET: - * This symbol, if defined, indicates that the memset routine is available - * to set blocks of memory. - */ -#define HAS_MEMSET /**/ - -/* HAS_MKDIR: - * This symbol, if defined, indicates that the mkdir routine is available - * to create directories. Otherwise you should fork off a new process to - * exec /bin/mkdir. - */ -#define HAS_MKDIR /**/ - -/* HAS_MKFIFO: - * This symbol, if defined, indicates that the mkfifo routine is - * available to create FIFOs. Otherwise, mknod should be able to - * do it for you. However, if mkfifo is there, mknod might require - * super-user privileges which mkfifo will not. - */ -/*#define HAS_MKFIFO / **/ - -/* HAS_MKTIME: - * This symbol, if defined, indicates that the mktime routine is - * available. - */ -#define HAS_MKTIME /**/ - -/* HAS_MSYNC: - * This symbol, if defined, indicates that the msync system call is - * available to synchronize a mapped file. - */ -/*#define HAS_MSYNC / **/ - -/* HAS_MUNMAP: - * This symbol, if defined, indicates that the munmap system call is - * available to unmap a region, usually mapped by mmap(). - */ -/*#define HAS_MUNMAP / **/ - -/* HAS_NICE: - * This symbol, if defined, indicates that the nice routine is - * available. - */ -/*#define HAS_NICE / **/ - -/* HAS_PATHCONF: - * This symbol, if defined, indicates that pathconf() is available - * to determine file-system related limits and options associated - * with a given filename. - */ -/* HAS_FPATHCONF: - * This symbol, if defined, indicates that pathconf() is available - * to determine file-system related limits and options associated - * with a given open file descriptor. - */ -/*#define HAS_PATHCONF / **/ -/*#define HAS_FPATHCONF / **/ - -/* HAS_PAUSE: - * This symbol, if defined, indicates that the pause routine is - * available to suspend a process until a signal is received. - */ -#define HAS_PAUSE /**/ - -/* HAS_PIPE: - * This symbol, if defined, indicates that the pipe routine is - * available to create an inter-process channel. - */ -#define HAS_PIPE /**/ - -/* HAS_POLL: - * This symbol, if defined, indicates that the poll routine is - * available to poll active file descriptors. Please check I_POLL and - * I_SYS_POLL to know which header should be included as well. - */ -/*#define HAS_POLL / **/ - -/* HAS_READDIR: - * This symbol, if defined, indicates that the readdir routine is - * available to read directory entries. You may have to include - * . See I_DIRENT. - */ -#define HAS_READDIR /**/ - -/* HAS_SEEKDIR: - * This symbol, if defined, indicates that the seekdir routine is - * available. You may have to include . See I_DIRENT. - */ -#define HAS_SEEKDIR /**/ - -/* HAS_TELLDIR: - * This symbol, if defined, indicates that the telldir routine is - * available. You may have to include . See I_DIRENT. - */ -#define HAS_TELLDIR /**/ - -/* HAS_REWINDDIR: - * This symbol, if defined, indicates that the rewinddir routine is - * available. You may have to include . See I_DIRENT. - */ -#define HAS_REWINDDIR /**/ - -/* HAS_READLINK: - * This symbol, if defined, indicates that the readlink routine is - * available to read the value of a symbolic link. - */ -/*#define HAS_READLINK / **/ - -/* HAS_RENAME: - * This symbol, if defined, indicates that the rename routine is available - * to rename files. Otherwise you should do the unlink(), link(), unlink() - * trick. - */ -#define HAS_RENAME /**/ - -/* HAS_RMDIR: - * This symbol, if defined, indicates that the rmdir routine is - * available to remove directories. Otherwise you should fork off a - * new process to exec /bin/rmdir. - */ -#define HAS_RMDIR /**/ - -/* HAS_SELECT: - * This symbol, if defined, indicates that the select routine is - * available to select active file descriptors. If the timeout field - * is used, may need to be included. - */ -#define HAS_SELECT /**/ - -/* HAS_SETEGID: - * This symbol, if defined, indicates that the setegid routine is available - * to change the effective gid of the current program. - */ -/*#define HAS_SETEGID / **/ - -/* HAS_SETEUID: - * This symbol, if defined, indicates that the seteuid routine is available - * to change the effective uid of the current program. - */ -/*#define HAS_SETEUID / **/ - -/* HAS_SETGROUPS: - * This symbol, if defined, indicates that the setgroups() routine is - * available to set the list of process groups. If unavailable, multiple - * groups are probably not supported. - */ -/*#define HAS_SETGROUPS / **/ - -/* HAS_SETLINEBUF: - * This symbol, if defined, indicates that the setlinebuf routine is - * available to change stderr or stdout from block-buffered or unbuffered - * to a line-buffered mode. - */ -/*#define HAS_SETLINEBUF / **/ - -/* HAS_SETLOCALE: - * This symbol, if defined, indicates that the setlocale routine is - * available to handle locale-specific ctype implementations. - */ -#define HAS_SETLOCALE /**/ - -/* HAS_SETPGID: - * This symbol, if defined, indicates that the setpgid(pid, gpid) - * routine is available to set process group ID. - */ -/*#define HAS_SETPGID / **/ - -/* HAS_SETPGRP2: - * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX) - * routine is available to set the current process group. - */ -/*#define HAS_SETPGRP2 / **/ - -/* HAS_SETPRIORITY: - * This symbol, if defined, indicates that the setpriority routine is - * available to set a process's priority. - */ -/*#define HAS_SETPRIORITY / **/ - -/* HAS_SETREGID: - * This symbol, if defined, indicates that the setregid routine is - * available to change the real and effective gid of the current - * process. - */ -/* HAS_SETRESGID: - * This symbol, if defined, indicates that the setresgid routine is - * available to change the real, effective and saved gid of the current - * process. - */ -/*#define HAS_SETREGID / **/ -/*#define HAS_SETRESGID / **/ - -/* HAS_SETREUID: - * This symbol, if defined, indicates that the setreuid routine is - * available to change the real and effective uid of the current - * process. - */ -/* HAS_SETRESUID: - * This symbol, if defined, indicates that the setresuid routine is - * available to change the real, effective and saved uid of the current - * process. - */ -/*#define HAS_SETREUID / **/ -/*#define HAS_SETRESUID / **/ - -/* HAS_SETRGID: - * This symbol, if defined, indicates that the setrgid routine is available - * to change the real gid of the current program. - */ -/*#define HAS_SETRGID / **/ - -/* HAS_SETRUID: - * This symbol, if defined, indicates that the setruid routine is available - * to change the real uid of the current program. - */ -/*#define HAS_SETRUID / **/ - -/* HAS_SETSID: - * This symbol, if defined, indicates that the setsid routine is - * available to set the process group ID. - */ -/*#define HAS_SETSID / **/ - -/* HAS_STRCHR: - * This symbol is defined to indicate that the strchr()/strrchr() - * functions are available for string searching. If not, try the - * index()/rindex() pair. - */ -/* HAS_INDEX: - * This symbol is defined to indicate that the index()/rindex() - * functions are available for string searching. - */ -#define HAS_STRCHR /**/ -/*#define HAS_INDEX / **/ - -/* HAS_STRCOLL: - * This symbol, if defined, indicates that the strcoll routine is - * available to compare strings using collating information. - */ -#define HAS_STRCOLL /**/ - -/* HAS_STRTOD: - * This symbol, if defined, indicates that the strtod routine is - * available to provide better numeric string conversion than atof(). - */ -#define HAS_STRTOD /**/ - -/* HAS_STRTOL: - * This symbol, if defined, indicates that the strtol routine is available - * to provide better numeric string conversion than atoi() and friends. - */ -#define HAS_STRTOL /**/ - -/* HAS_STRXFRM: - * This symbol, if defined, indicates that the strxfrm() routine is - * available to transform strings. - */ -#define HAS_STRXFRM /**/ - -/* HAS_SYMLINK: - * This symbol, if defined, indicates that the symlink routine is available - * to create symbolic links. - */ -/*#define HAS_SYMLINK / **/ - -/* HAS_SYSCALL: - * This symbol, if defined, indicates that the syscall routine is - * available to call arbitrary system calls. If undefined, that's tough. - */ -/*#define HAS_SYSCALL / **/ - -/* HAS_SYSCONF: - * This symbol, if defined, indicates that sysconf() is available - * to determine system related limits and options. - */ -/*#define HAS_SYSCONF / **/ - -/* HAS_SYSTEM: - * This symbol, if defined, indicates that the system routine is - * available to issue a shell command. - */ -#define HAS_SYSTEM /**/ - -/* HAS_TCGETPGRP: - * This symbol, if defined, indicates that the tcgetpgrp routine is - * available to get foreground process group ID. - */ -/*#define HAS_TCGETPGRP / **/ - -/* HAS_TCSETPGRP: - * This symbol, if defined, indicates that the tcsetpgrp routine is - * available to set foreground process group ID. - */ -/*#define HAS_TCSETPGRP / **/ - -/* HAS_TRUNCATE: - * This symbol, if defined, indicates that the truncate routine is - * available to truncate files. - */ -/*#define HAS_TRUNCATE / **/ - -/* HAS_TZNAME: - * This symbol, if defined, indicates that the tzname[] array is - * available to access timezone names. - */ -#define HAS_TZNAME /**/ - -/* HAS_UMASK: - * This symbol, if defined, indicates that the umask routine is - * available to set and get the value of the file creation mask. - */ -#define HAS_UMASK /**/ - -/* HAS_USLEEP: - * This symbol, if defined, indicates that the usleep routine is - * available to let the process sleep on a sub-second accuracy. - */ -/*#define HAS_USLEEP / **/ - -/* HAS_WAIT4: - * This symbol, if defined, indicates that wait4() exists. - */ -/*#define HAS_WAIT4 / **/ - -/* HAS_WAITPID: - * This symbol, if defined, indicates that the waitpid routine is - * available to wait for child process. - */ -#define HAS_WAITPID /**/ - -/* HAS_WCSTOMBS: - * This symbol, if defined, indicates that the wcstombs routine is - * available to convert wide character strings to multibyte strings. - */ -#define HAS_WCSTOMBS /**/ - -/* HAS_WCTOMB: - * This symbol, if defined, indicates that the wctomb routine is available - * to covert a wide character to a multibyte. - */ -#define HAS_WCTOMB /**/ - -/* Groups_t: - * This symbol holds the type used for the second argument to - * getgroups() and setgroups(). Usually, this is the same as - * gidtype (gid_t) , but sometimes it isn't. - * It can be int, ushort, gid_t, etc... - * It may be necessary to include to get any - * typedef'ed information. This is only required if you have - * getgroups() or setgroups().. - */ -#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS) -#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */ -#endif - -/* I_ARPA_INET: - * This symbol, if defined, indicates to the C program that it should - * include to get inet_addr and friends declarations. - */ -#define I_ARPA_INET /**/ - -/* I_DBM: - * This symbol, if defined, indicates that exists and should - * be included. - */ -/* I_RPCSVC_DBM: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_DBM / **/ -#define I_RPCSVC_DBM /**/ - -/* I_DLFCN: - * This symbol, if defined, indicates that exists and should - * be included. - */ -#define I_DLFCN /**/ - -/* I_FCNTL: - * This manifest constant tells the C program to include . - */ -#define I_FCNTL /**/ - -/* I_FLOAT: - * This symbol, if defined, indicates to the C program that it should - * include to get definition of symbols like DBL_MAX or - * DBL_MIN, i.e. machine dependent floating point values. - */ -#define I_FLOAT /**/ - -/* I_GDBM: - * This symbol, if defined, indicates that exists and should - * be included. - */ -/*#define I_GDBM / **/ - -/* I_LIMITS: - * This symbol, if defined, indicates to the C program that it should - * include to get definition of symbols like WORD_BIT or - * LONG_MAX, i.e. machine dependant limitations. - */ -#define I_LIMITS /**/ - -/* I_LOCALE: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -#define I_LOCALE /**/ - -/* I_MATH: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -#define I_MATH /**/ - -/* I_MEMORY: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_MEMORY / **/ - -/* I_NETINET_IN: - * This symbol, if defined, indicates to the C program that it should - * include . Otherwise, you may try . - */ -/*#define I_NETINET_IN / **/ - -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SFIO / **/ - -/* I_STDDEF: - * This symbol, if defined, indicates that exists and should - * be included. - */ -#define I_STDDEF /**/ - -/* I_STDLIB: - * This symbol, if defined, indicates that exists and should - * be included. - */ -#define I_STDLIB /**/ - -/* I_STRING: - * This symbol, if defined, indicates to the C program that it should - * include (USG systems) instead of (BSD systems). - */ -#define I_STRING /**/ - -/* I_SYS_DIR: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SYS_DIR / **/ - -/* I_SYS_FILE: - * This symbol, if defined, indicates to the C program that it should - * include to get definition of R_OK and friends. - */ -/*#define I_SYS_FILE / **/ - -/* I_SYS_IOCTL: - * This symbol, if defined, indicates that exists and should - * be included. Otherwise, include or . - */ -/* I_SYS_SOCKIO: - * This symbol, if defined, indicates the should be included - * to get socket ioctl options, like SIOCATMARK. - */ -/*#define I_SYS_IOCTL / **/ -/*#define I_SYS_SOCKIO / **/ - -/* I_SYS_NDIR: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SYS_NDIR / **/ - -/* I_SYS_PARAM: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SYS_PARAM / **/ - -/* I_SYS_POLL: - * This symbol, if defined, indicates that the program may include - * . When I_POLL is also defined, it's probably safest - * to only include . - */ -/*#define I_SYS_POLL / **/ - -/* I_SYS_RESOURCE: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SYS_RESOURCE / **/ - -/* I_SYS_SELECT: - * This symbol, if defined, indicates to the C program that it should - * include in order to get definition of struct timeval. - */ -/*#define I_SYS_SELECT / **/ - -/* I_SYS_STAT: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -#define I_SYS_STAT /**/ - -/* I_SYS_TIMES: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SYS_TIMES / **/ - -/* I_SYS_TYPES: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -#define I_SYS_TYPES /**/ - -/* I_SYS_UN: - * This symbol, if defined, indicates to the C program that it should - * include to get UNIX domain socket definitions. - */ -/*#define I_SYS_UN / **/ - -/* I_SYS_WAIT: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SYS_WAIT / **/ - -/* I_TERMIO: - * This symbol, if defined, indicates that the program should include - * rather than . There are also differences in - * the ioctl() calls that depend on the value of this symbol. - */ -/* I_TERMIOS: - * This symbol, if defined, indicates that the program should include - * the POSIX termios.h rather than sgtty.h or termio.h. - * There are also differences in the ioctl() calls that depend on the - * value of this symbol. - */ -/* I_SGTTY: - * This symbol, if defined, indicates that the program should include - * rather than . There are also differences in - * the ioctl() calls that depend on the value of this symbol. - */ -/*#define I_TERMIO / **/ -/*#define I_TERMIOS / **/ -/*#define I_SGTTY / **/ - -/* I_UNISTD: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_UNISTD / **/ - -/* I_UTIME: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -#define I_UTIME /**/ - -/* I_VALUES: - * This symbol, if defined, indicates to the C program that it should - * include to get definition of symbols like MINFLOAT or - * MAXLONG, i.e. machine dependant limitations. Probably, you - * should use instead, if it is available. - */ -/*#define I_VALUES / **/ - -/* I_VFORK: - * This symbol, if defined, indicates to the C program that it should - * include vfork.h. - */ -/*#define I_VFORK / **/ - -/* CAN_VAPROTO: - * This variable is defined on systems supporting prototype declaration - * of functions with a variable number of arguments. - */ -/* _V: - * This macro is used to declare function parameters in prototypes for - * functions with a variable number of parameters. Use double parentheses. - * For example: - * - * int printf _V((char *fmt, ...)); - * - * Remember to use the plain simple _() macro when declaring a function - * with no variable number of arguments, since it might be possible to - * have a non-effect _V() macro and still get prototypes via _(). - */ -/*#define CAN_VAPROTO / **/ -#ifdef CAN_VAPROTO -#define _V(args) args -#else -#define _V(args) () -#endif - -/* INTSIZE: - * This symbol contains the value of sizeof(int) so that the C - * preprocessor can make decisions based on it. - */ -/* LONGSIZE: - * This symbol contains the value of sizeof(long) so that the C - * preprocessor can make decisions based on it. - */ -/* SHORTSIZE: - * This symbol contains the value of sizeof(short) so that the C - * preprocessor can make decisions based on it. - */ -#define INTSIZE 4 /**/ -#define LONGSIZE 4 /**/ -#define SHORTSIZE 2 /**/ - -/* MULTIARCH: - * This symbol, if defined, signifies that the build - * process will produce some binary files that are going to be - * used in a cross-platform environment. This is the case for - * example with the NeXT "fat" binaries that contain executables - * for several CPUs. - */ -/*#define MULTIARCH / **/ - -/* HAS_QUAD: - * This symbol, if defined, tells that there's a 64-bit integer type, - * Quad_t, and its unsigned counterpart, Uquad_t. QUADKIND will be one - * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, QUAD_IS_INT64_T, - * or QUAD_IS___INT64. - */ -#define HAS_QUAD /**/ -#ifdef HAS_QUAD -# define Quad_t __int64 /**/ -# define Uquad_t unsigned __int64 /**/ -# define QUADKIND 5 /**/ -# define QUAD_IS_INT 1 -# define QUAD_IS_LONG 2 -# define QUAD_IS_LONG_LONG 3 -# define QUAD_IS_INT64_T 4 -# define QUAD_IS___INT64 5 -#endif - -/* USE_CROSS_COMPILE: - * This symbol, if defined, indicates that Perl is being cross-compiled. - */ -/* PERL_TARGETARCH: - * This symbol, if defined, indicates the target architecture - * Perl has been cross-compiled to. Undefined if not a cross-compile. - */ -#ifndef USE_CROSS_COMPILE -/*#define USE_CROSS_COMPILE / **/ -#define PERL_TARGETARCH "" /**/ -#endif - -/* MEM_ALIGNBYTES: - * This symbol contains the number of bytes required to align a - * double, or a long double when applicable. Usual values are 2, - * 4 and 8. The default is eight, for safety. - */ -#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH) -# define MEM_ALIGNBYTES 8 -#else -#define MEM_ALIGNBYTES 8 -#endif - -/* ARCHLIB: - * This variable, if defined, holds the name of the directory in - * which the user wants to put architecture-dependent public - * library files for perl5. It is most often a local directory - * such as /usr/local/lib. Programs using this variable must be - * prepared to deal with filename expansion. If ARCHLIB is the - * same as PRIVLIB, it is not defined, since presumably the - * program already searches PRIVLIB. - */ -/* ARCHLIB_EXP: - * 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\\lib" /**/ -/*#define ARCHLIB_EXP "" / **/ - -/* ARCHNAME: - * This symbol holds a string representing the architecture name. - * It may be used to construct an architecture-dependant pathname - * where library files may be held under a private library, for - * instance. - */ -#define ARCHNAME "MSWin32-x86" /**/ - -/* BIN: - * This symbol holds the path of the bin directory where the package will - * be installed. Program must be prepared to deal with ~name substitution. - */ -/* BIN_EXP: - * This symbol is the filename expanded version of the BIN symbol, for - * programs that do not want to deal with that at run-time. - */ -/* PERL_RELOCATABLE_INC: - * This symbol, if defined, indicates that we'd like to relocate entries - * in @INC at run time based on the location of the perl binary. - */ -#define BIN "c:\\perl\\bin" /**/ -#define BIN_EXP "c:\\perl\\bin" /**/ -#define PERL_RELOCATABLE_INC "undef" /**/ - -/* BYTEORDER: - * This symbol holds the hexadecimal constant defined in byteorder, - * in a UV, i.e. 0x1234 or 0x4321 or 0x12345678, etc... - * If the compiler supports cross-compiling or multiple-architecture - * binaries (eg. on NeXT systems), use compiler-defined macros to - * determine the byte order. - * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture - * Binaries (MAB) on either big endian or little endian machines. - * The endian-ness is available at compile-time. This only matters - * for perl, where the config.h can be generated and installed on - * one system, and used by a different architecture to build an - * extension. Older versions of NeXT that might not have - * defined either *_ENDIAN__ were all on Motorola 680x0 series, - * so the default case (for NeXT) is big endian to catch them. - * This might matter for NeXT 3.0. - */ -#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH) -# ifdef __LITTLE_ENDIAN__ -# if LONGSIZE == 4 -# define BYTEORDER 0x1234 -# else -# if LONGSIZE == 8 -# define BYTEORDER 0x12345678 -# endif -# endif -# else -# ifdef __BIG_ENDIAN__ -# if LONGSIZE == 4 -# define BYTEORDER 0x4321 -# else -# if LONGSIZE == 8 -# define BYTEORDER 0x87654321 -# endif -# endif -# endif -# endif -# if !defined(BYTEORDER) && (defined(NeXT) || defined(__NeXT__)) -# define BYTEORDER 0x4321 -# endif -#else -#define BYTEORDER 0x1234 /* large digits for MSB */ -#endif /* NeXT */ - -/* CHARBITS: - * This symbol contains the size of a char, so that the C preprocessor - * can make decisions based on it. - */ -#define CHARBITS 8 /**/ - -/* HAS_ACCESSX: - * This symbol, if defined, indicates that the accessx routine is - * available to do extended access checks. - */ -/*#define HAS_ACCESSX / **/ - -/* HAS_ASCTIME_R: - * This symbol, if defined, indicates that the asctime_r routine - * is available to asctime re-entrantly. - */ -/* ASCTIME_R_PROTO: - * This symbol encodes the prototype of asctime_r. - * It is zero if d_asctime_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_asctime_r - * is defined. - */ -/*#define HAS_ASCTIME_R / **/ -#define ASCTIME_R_PROTO 0 /**/ - -/* CASTI32: - * This symbol is defined if the C compiler can cast negative - * or large floating point numbers to 32-bit ints. - */ -#define CASTI32 /**/ - -/* CASTNEGFLOAT: - * This symbol is defined if the C compiler can cast negative - * numbers to unsigned longs, ints and shorts. - */ -/* CASTFLAGS: - * This symbol contains flags that say what difficulties the compiler - * has casting odd floating values to unsigned long: - * 0 = ok - * 1 = couldn't cast < 0 - * 2 = couldn't cast >= 0x80000000 - * 4 = couldn't cast in argument expression list - */ -#define CASTNEGFLOAT /**/ -#define CASTFLAGS 0 /**/ - -/* VOID_CLOSEDIR: - * This symbol, if defined, indicates that the closedir() routine - * does not return a value. - */ -/*#define VOID_CLOSEDIR / **/ - -/* HAS_CRYPT_R: - * This symbol, if defined, indicates that the crypt_r routine - * is available to crypt re-entrantly. - */ -/* CRYPT_R_PROTO: - * This symbol encodes the prototype of crypt_r. - * It is zero if d_crypt_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_crypt_r - * is defined. - */ -/*#define HAS_CRYPT_R / **/ -#define CRYPT_R_PROTO 0 /**/ - -/* HAS_CTERMID_R: - * This symbol, if defined, indicates that the ctermid_r routine - * is available to ctermid re-entrantly. - */ -/* CTERMID_R_PROTO: - * This symbol encodes the prototype of ctermid_r. - * It is zero if d_ctermid_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctermid_r - * is defined. - */ -/*#define HAS_CTERMID_R / **/ -#define CTERMID_R_PROTO 0 /**/ - -/* HAS_CTIME_R: - * This symbol, if defined, indicates that the ctime_r routine - * is available to ctime re-entrantly. - */ -/* CTIME_R_PROTO: - * This symbol encodes the prototype of ctime_r. - * It is zero if d_ctime_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctime_r - * is defined. - */ -/*#define HAS_CTIME_R / **/ -#define CTIME_R_PROTO 0 /**/ - -/* HAS_DRAND48_R: - * This symbol, if defined, indicates that the drand48_r routine - * is available to drand48 re-entrantly. - */ -/* DRAND48_R_PROTO: - * This symbol encodes the prototype of drand48_r. - * It is zero if d_drand48_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_drand48_r - * is defined. - */ -/*#define HAS_DRAND48_R / **/ -#define DRAND48_R_PROTO 0 /**/ - -/* HAS_EACCESS: - * This symbol, if defined, indicates that the eaccess routine is - * available to do extended access checks. - */ -/*#define HAS_EACCESS / **/ - -/* HAS_ENDGRENT_R: - * This symbol, if defined, indicates that the endgrent_r routine - * is available to endgrent re-entrantly. - */ -/* ENDGRENT_R_PROTO: - * This symbol encodes the prototype of endgrent_r. - * It is zero if d_endgrent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endgrent_r - * is defined. - */ -/*#define HAS_ENDGRENT_R / **/ -#define ENDGRENT_R_PROTO 0 /**/ - -/* HAS_ENDHOSTENT_R: - * This symbol, if defined, indicates that the endhostent_r routine - * is available to endhostent re-entrantly. - */ -/* ENDHOSTENT_R_PROTO: - * This symbol encodes the prototype of endhostent_r. - * It is zero if d_endhostent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endhostent_r - * is defined. - */ -/*#define HAS_ENDHOSTENT_R / **/ -#define ENDHOSTENT_R_PROTO 0 /**/ - -/* HAS_ENDNETENT_R: - * This symbol, if defined, indicates that the endnetent_r routine - * is available to endnetent re-entrantly. - */ -/* ENDNETENT_R_PROTO: - * This symbol encodes the prototype of endnetent_r. - * It is zero if d_endnetent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endnetent_r - * is defined. - */ -/*#define HAS_ENDNETENT_R / **/ -#define ENDNETENT_R_PROTO 0 /**/ - -/* HAS_ENDPROTOENT_R: - * This symbol, if defined, indicates that the endprotoent_r routine - * is available to endprotoent re-entrantly. - */ -/* ENDPROTOENT_R_PROTO: - * This symbol encodes the prototype of endprotoent_r. - * It is zero if d_endprotoent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endprotoent_r - * is defined. - */ -/*#define HAS_ENDPROTOENT_R / **/ -#define ENDPROTOENT_R_PROTO 0 /**/ - -/* HAS_ENDPWENT_R: - * This symbol, if defined, indicates that the endpwent_r routine - * is available to endpwent re-entrantly. - */ -/* ENDPWENT_R_PROTO: - * This symbol encodes the prototype of endpwent_r. - * It is zero if d_endpwent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endpwent_r - * is defined. - */ -/*#define HAS_ENDPWENT_R / **/ -#define ENDPWENT_R_PROTO 0 /**/ - -/* HAS_ENDSERVENT_R: - * This symbol, if defined, indicates that the endservent_r routine - * is available to endservent re-entrantly. - */ -/* ENDSERVENT_R_PROTO: - * This symbol encodes the prototype of endservent_r. - * It is zero if d_endservent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endservent_r - * is defined. - */ -/*#define HAS_ENDSERVENT_R / **/ -#define ENDSERVENT_R_PROTO 0 /**/ - -/* HAS_FD_SET: - * This symbol, when defined, indicates presence of the fd_set typedef - * in - */ -#define HAS_FD_SET /**/ - -/* Gconvert: - * This preprocessor macro is defined to convert a floating point - * number to a string without a trailing decimal point. This - * emulates the behavior of sprintf("%g"), but is sometimes much more - * efficient. If gconvert() is not available, but gcvt() drops the - * trailing decimal point, then gcvt() is used. If all else fails, - * a macro using sprintf("%g") is used. Arguments for the Gconvert - * macro are: value, number of digits, whether trailing zeros should - * be retained, and the output buffer. - * The usual values are: - * d_Gconvert='gconvert((x),(n),(t),(b))' - * d_Gconvert='gcvt((x),(n),(b))' - * d_Gconvert='sprintf((b),"%.*g",(n),(x))' - * The last two assume trailing zeros should not be kept. - */ -#define Gconvert(x,n,t,b) gcvt((x),(n),(b)) - -/* HAS_GETGRENT_R: - * This symbol, if defined, indicates that the getgrent_r routine - * is available to getgrent re-entrantly. - */ -/* GETGRENT_R_PROTO: - * This symbol encodes the prototype of getgrent_r. - * It is zero if d_getgrent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrent_r - * is defined. - */ -/*#define HAS_GETGRENT_R / **/ -#define GETGRENT_R_PROTO 0 /**/ - -/* HAS_GETGRGID_R: - * This symbol, if defined, indicates that the getgrgid_r routine - * is available to getgrgid re-entrantly. - */ -/* GETGRGID_R_PROTO: - * This symbol encodes the prototype of getgrgid_r. - * It is zero if d_getgrgid_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrgid_r - * is defined. - */ -/*#define HAS_GETGRGID_R / **/ -#define GETGRGID_R_PROTO 0 /**/ - -/* HAS_GETGRNAM_R: - * This symbol, if defined, indicates that the getgrnam_r routine - * is available to getgrnam re-entrantly. - */ -/* GETGRNAM_R_PROTO: - * This symbol encodes the prototype of getgrnam_r. - * It is zero if d_getgrnam_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrnam_r - * is defined. - */ -/*#define HAS_GETGRNAM_R / **/ -#define GETGRNAM_R_PROTO 0 /**/ - -/* HAS_GETHOSTBYADDR_R: - * This symbol, if defined, indicates that the gethostbyaddr_r routine - * is available to gethostbyaddr re-entrantly. - */ -/* GETHOSTBYADDR_R_PROTO: - * This symbol encodes the prototype of gethostbyaddr_r. - * It is zero if d_gethostbyaddr_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyaddr_r - * is defined. - */ -/*#define HAS_GETHOSTBYADDR_R / **/ -#define GETHOSTBYADDR_R_PROTO 0 /**/ - -/* HAS_GETHOSTBYNAME_R: - * This symbol, if defined, indicates that the gethostbyname_r routine - * is available to gethostbyname re-entrantly. - */ -/* GETHOSTBYNAME_R_PROTO: - * This symbol encodes the prototype of gethostbyname_r. - * It is zero if d_gethostbyname_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyname_r - * is defined. - */ -/*#define HAS_GETHOSTBYNAME_R / **/ -#define GETHOSTBYNAME_R_PROTO 0 /**/ - -/* HAS_GETHOSTENT_R: - * This symbol, if defined, indicates that the gethostent_r routine - * is available to gethostent re-entrantly. - */ -/* GETHOSTENT_R_PROTO: - * This symbol encodes the prototype of gethostent_r. - * It is zero if d_gethostent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostent_r - * is defined. - */ -/*#define HAS_GETHOSTENT_R / **/ -#define GETHOSTENT_R_PROTO 0 /**/ - -/* HAS_GETLOGIN_R: - * This symbol, if defined, indicates that the getlogin_r routine - * is available to getlogin re-entrantly. - */ -/* GETLOGIN_R_PROTO: - * This symbol encodes the prototype of getlogin_r. - * It is zero if d_getlogin_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getlogin_r - * is defined. - */ -/*#define HAS_GETLOGIN_R / **/ -#define GETLOGIN_R_PROTO 0 /**/ - -/* HAS_GETNETBYADDR_R: - * This symbol, if defined, indicates that the getnetbyaddr_r routine - * is available to getnetbyaddr re-entrantly. - */ -/* GETNETBYADDR_R_PROTO: - * This symbol encodes the prototype of getnetbyaddr_r. - * It is zero if d_getnetbyaddr_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyaddr_r - * is defined. - */ -/*#define HAS_GETNETBYADDR_R / **/ -#define GETNETBYADDR_R_PROTO 0 /**/ - -/* HAS_GETNETBYNAME_R: - * This symbol, if defined, indicates that the getnetbyname_r routine - * is available to getnetbyname re-entrantly. - */ -/* GETNETBYNAME_R_PROTO: - * This symbol encodes the prototype of getnetbyname_r. - * It is zero if d_getnetbyname_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyname_r - * is defined. - */ -/*#define HAS_GETNETBYNAME_R / **/ -#define GETNETBYNAME_R_PROTO 0 /**/ - -/* HAS_GETNETENT_R: - * This symbol, if defined, indicates that the getnetent_r routine - * is available to getnetent re-entrantly. - */ -/* GETNETENT_R_PROTO: - * This symbol encodes the prototype of getnetent_r. - * It is zero if d_getnetent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetent_r - * is defined. - */ -/*#define HAS_GETNETENT_R / **/ -#define GETNETENT_R_PROTO 0 /**/ - -/* HAS_GETPAGESIZE: - * This symbol, if defined, indicates that the getpagesize system call - * is available to get system page size, which is the granularity of - * many memory management calls. - */ -/*#define HAS_GETPAGESIZE / **/ - -/* HAS_GETPROTOBYNAME_R: - * This symbol, if defined, indicates that the getprotobyname_r routine - * is available to getprotobyname re-entrantly. - */ -/* GETPROTOBYNAME_R_PROTO: - * This symbol encodes the prototype of getprotobyname_r. - * It is zero if d_getprotobyname_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobyname_r - * is defined. - */ -/*#define HAS_GETPROTOBYNAME_R / **/ -#define GETPROTOBYNAME_R_PROTO 0 /**/ - -/* HAS_GETPROTOBYNUMBER_R: - * This symbol, if defined, indicates that the getprotobynumber_r routine - * is available to getprotobynumber re-entrantly. - */ -/* GETPROTOBYNUMBER_R_PROTO: - * This symbol encodes the prototype of getprotobynumber_r. - * It is zero if d_getprotobynumber_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobynumber_r - * is defined. - */ -/*#define HAS_GETPROTOBYNUMBER_R / **/ -#define GETPROTOBYNUMBER_R_PROTO 0 /**/ - -/* HAS_GETPROTOENT_R: - * This symbol, if defined, indicates that the getprotoent_r routine - * is available to getprotoent re-entrantly. - */ -/* GETPROTOENT_R_PROTO: - * This symbol encodes the prototype of getprotoent_r. - * It is zero if d_getprotoent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotoent_r - * is defined. - */ -/*#define HAS_GETPROTOENT_R / **/ -#define GETPROTOENT_R_PROTO 0 /**/ - -/* HAS_GETPWENT_R: - * This symbol, if defined, indicates that the getpwent_r routine - * is available to getpwent re-entrantly. - */ -/* GETPWENT_R_PROTO: - * This symbol encodes the prototype of getpwent_r. - * It is zero if d_getpwent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwent_r - * is defined. - */ -/*#define HAS_GETPWENT_R / **/ -#define GETPWENT_R_PROTO 0 /**/ - -/* HAS_GETPWNAM_R: - * This symbol, if defined, indicates that the getpwnam_r routine - * is available to getpwnam re-entrantly. - */ -/* GETPWNAM_R_PROTO: - * This symbol encodes the prototype of getpwnam_r. - * It is zero if d_getpwnam_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwnam_r - * is defined. - */ -/*#define HAS_GETPWNAM_R / **/ -#define GETPWNAM_R_PROTO 0 /**/ - -/* HAS_GETPWUID_R: - * This symbol, if defined, indicates that the getpwuid_r routine - * is available to getpwuid re-entrantly. - */ -/* GETPWUID_R_PROTO: - * This symbol encodes the prototype of getpwuid_r. - * It is zero if d_getpwuid_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwuid_r - * is defined. - */ -/*#define HAS_GETPWUID_R / **/ -#define GETPWUID_R_PROTO 0 /**/ - -/* HAS_GETSERVBYNAME_R: - * This symbol, if defined, indicates that the getservbyname_r routine - * is available to getservbyname re-entrantly. - */ -/* GETSERVBYNAME_R_PROTO: - * This symbol encodes the prototype of getservbyname_r. - * It is zero if d_getservbyname_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyname_r - * is defined. - */ -/*#define HAS_GETSERVBYNAME_R / **/ -#define GETSERVBYNAME_R_PROTO 0 /**/ - -/* HAS_GETSERVBYPORT_R: - * This symbol, if defined, indicates that the getservbyport_r routine - * is available to getservbyport re-entrantly. - */ -/* GETSERVBYPORT_R_PROTO: - * This symbol encodes the prototype of getservbyport_r. - * It is zero if d_getservbyport_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyport_r - * is defined. - */ -/*#define HAS_GETSERVBYPORT_R / **/ -#define GETSERVBYPORT_R_PROTO 0 /**/ - -/* HAS_GETSERVENT_R: - * This symbol, if defined, indicates that the getservent_r routine - * is available to getservent re-entrantly. - */ -/* GETSERVENT_R_PROTO: - * This symbol encodes the prototype of getservent_r. - * It is zero if d_getservent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservent_r - * is defined. - */ -/*#define HAS_GETSERVENT_R / **/ -#define GETSERVENT_R_PROTO 0 /**/ - -/* HAS_GETSPNAM_R: - * This symbol, if defined, indicates that the getspnam_r routine - * is available to getspnam re-entrantly. - */ -/* GETSPNAM_R_PROTO: - * This symbol encodes the prototype of getspnam_r. - * It is zero if d_getspnam_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getspnam_r - * is defined. - */ -/*#define HAS_GETSPNAM_R / **/ -#define GETSPNAM_R_PROTO 0 /**/ - -/* HAS_GMTIME_R: - * This symbol, if defined, indicates that the gmtime_r routine - * is available to gmtime re-entrantly. - */ -/* GMTIME_R_PROTO: - * This symbol encodes the prototype of gmtime_r. - * It is zero if d_gmtime_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gmtime_r - * is defined. - */ -/*#define HAS_GMTIME_R / **/ -#define GMTIME_R_PROTO 0 /**/ - -/* HAS_GNULIBC: - * This symbol, if defined, indicates to the C program that - * the GNU C library is being used. A better check is to use - * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc. - */ -/*#define HAS_GNULIBC / **/ -#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE) -# define _GNU_SOURCE -#endif - -/* HAS_ISASCII: - * This manifest constant lets the C program know that isascii - * is available. - */ -#define HAS_ISASCII /**/ - -/* HAS_LCHOWN: - * This symbol, if defined, indicates that the lchown routine is - * available to operate on a symbolic link (instead of following the - * link). - */ -/*#define HAS_LCHOWN / **/ - -/* HAS_LOCALTIME_R: - * This symbol, if defined, indicates that the localtime_r routine - * is available to localtime re-entrantly. - */ -/* LOCALTIME_R_NEEDS_TZSET: - * Many libc's localtime_r implementations do not call tzset, - * making them differ from localtime(), and making timezone - * changes using \undef{TZ} without explicitly calling tzset - * impossible. This symbol makes us call tzset before localtime_r - */ -/*#define LOCALTIME_R_NEEDS_TZSET / **/ -#ifdef LOCALTIME_R_NEEDS_TZSET -#define L_R_TZSET tzset(), -#else -#define L_R_TZSET -#endif - -/* LOCALTIME_R_PROTO: - * This symbol encodes the prototype of localtime_r. - * It is zero if d_localtime_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_localtime_r - * is defined. - */ -/*#define HAS_LOCALTIME_R / **/ -#define LOCALTIME_R_PROTO 0 /**/ - -/* HAS_OPEN3: - * This manifest constant lets the C program know that the three - * argument form of open(2) is available. - */ -/*#define HAS_OPEN3 / **/ - -/* OLD_PTHREAD_CREATE_JOINABLE: - * This symbol, if defined, indicates how to create pthread - * in joinable (aka undetached) state. NOTE: not defined - * if pthread.h already has defined PTHREAD_CREATE_JOINABLE - * (the new version of the constant). - * If defined, known values are PTHREAD_CREATE_UNDETACHED - * and __UNDETACHED. - */ -/*#define OLD_PTHREAD_CREATE_JOINABLE / **/ - -/* HAS_PTHREAD_ATFORK: - * This symbol, if defined, indicates that the pthread_atfork routine - * is available to setup fork handlers. - */ -/*#define HAS_PTHREAD_ATFORK / **/ - -/* HAS_PTHREAD_YIELD: - * This symbol, if defined, indicates that the pthread_yield - * routine is available to yield the execution of the current - * thread. sched_yield is preferable to pthread_yield. - */ -/* SCHED_YIELD: - * This symbol defines the way to yield the execution of - * the current thread. Known ways are sched_yield, - * pthread_yield, and pthread_yield with NULL. - */ -/* HAS_SCHED_YIELD: - * This symbol, if defined, indicates that the sched_yield - * routine is available to yield the execution of the current - * thread. sched_yield is preferable to pthread_yield. - */ -/*#define HAS_PTHREAD_YIELD / **/ -#define SCHED_YIELD /**/ -/*#define HAS_SCHED_YIELD / **/ - -/* HAS_RANDOM_R: - * This symbol, if defined, indicates that the random_r routine - * is available to random re-entrantly. - */ -/* RANDOM_R_PROTO: - * This symbol encodes the prototype of random_r. - * It is zero if d_random_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_random_r - * is defined. - */ -/*#define HAS_RANDOM_R / **/ -#define RANDOM_R_PROTO 0 /**/ - -/* HAS_READDIR64_R: - * This symbol, if defined, indicates that the readdir64_r routine - * is available to readdir64 re-entrantly. - */ -/* READDIR64_R_PROTO: - * This symbol encodes the prototype of readdir64_r. - * It is zero if d_readdir64_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir64_r - * is defined. - */ -/*#define HAS_READDIR64_R / **/ -#define READDIR64_R_PROTO 0 /**/ - -/* HAS_READDIR_R: - * This symbol, if defined, indicates that the readdir_r routine - * is available to readdir re-entrantly. - */ -/* READDIR_R_PROTO: - * This symbol encodes the prototype of readdir_r. - * It is zero if d_readdir_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir_r - * is defined. - */ -/*#define HAS_READDIR_R / **/ -#define READDIR_R_PROTO 0 /**/ - -/* HAS_SAFE_BCOPY: - * This symbol, if defined, indicates that the bcopy routine is available - * to copy potentially overlapping memory blocks. Normally, you should - * probably use memmove() or memcpy(). If neither is defined, roll your - * own version. - */ -/*#define HAS_SAFE_BCOPY / **/ - -/* HAS_SAFE_MEMCPY: - * This symbol, if defined, indicates that the memcpy routine is available - * to copy potentially overlapping memory blocks. If you need to - * copy overlapping memory blocks, you should check HAS_MEMMOVE and - * use memmove() instead, if available. - */ -/*#define HAS_SAFE_MEMCPY / **/ - -/* HAS_SANE_MEMCMP: - * This symbol, if defined, indicates that the memcmp routine is available - * and can be used to compare relative magnitudes of chars with their high - * bits set. If it is not defined, roll your own version. - */ -#define HAS_SANE_MEMCMP /**/ - -/* HAS_SETGRENT_R: - * This symbol, if defined, indicates that the setgrent_r routine - * is available to setgrent re-entrantly. - */ -/* SETGRENT_R_PROTO: - * This symbol encodes the prototype of setgrent_r. - * It is zero if d_setgrent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setgrent_r - * is defined. - */ -/*#define HAS_SETGRENT_R / **/ -#define SETGRENT_R_PROTO 0 /**/ - -/* HAS_SETHOSTENT_R: - * This symbol, if defined, indicates that the sethostent_r routine - * is available to sethostent re-entrantly. - */ -/* SETHOSTENT_R_PROTO: - * This symbol encodes the prototype of sethostent_r. - * It is zero if d_sethostent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_sethostent_r - * is defined. - */ -/*#define HAS_SETHOSTENT_R / **/ -#define SETHOSTENT_R_PROTO 0 /**/ - -/* HAS_SETLOCALE_R: - * This symbol, if defined, indicates that the setlocale_r routine - * is available to setlocale re-entrantly. - */ -/* SETLOCALE_R_PROTO: - * This symbol encodes the prototype of setlocale_r. - * It is zero if d_setlocale_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setlocale_r - * is defined. - */ -/*#define HAS_SETLOCALE_R / **/ -#define SETLOCALE_R_PROTO 0 /**/ - -/* HAS_SETNETENT_R: - * This symbol, if defined, indicates that the setnetent_r routine - * is available to setnetent re-entrantly. - */ -/* SETNETENT_R_PROTO: - * This symbol encodes the prototype of setnetent_r. - * It is zero if d_setnetent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setnetent_r - * is defined. - */ -/*#define HAS_SETNETENT_R / **/ -#define SETNETENT_R_PROTO 0 /**/ - -/* HAS_SETPROTOENT_R: - * This symbol, if defined, indicates that the setprotoent_r routine - * is available to setprotoent re-entrantly. - */ -/* SETPROTOENT_R_PROTO: - * This symbol encodes the prototype of setprotoent_r. - * It is zero if d_setprotoent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setprotoent_r - * is defined. - */ -/*#define HAS_SETPROTOENT_R / **/ -#define SETPROTOENT_R_PROTO 0 /**/ - -/* HAS_SETPWENT_R: - * This symbol, if defined, indicates that the setpwent_r routine - * is available to setpwent re-entrantly. - */ -/* SETPWENT_R_PROTO: - * This symbol encodes the prototype of setpwent_r. - * It is zero if d_setpwent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setpwent_r - * is defined. - */ -/*#define HAS_SETPWENT_R / **/ -#define SETPWENT_R_PROTO 0 /**/ - -/* HAS_SETSERVENT_R: - * This symbol, if defined, indicates that the setservent_r routine - * is available to setservent re-entrantly. - */ -/* SETSERVENT_R_PROTO: - * This symbol encodes the prototype of setservent_r. - * It is zero if d_setservent_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setservent_r - * is defined. - */ -/*#define HAS_SETSERVENT_R / **/ -#define SETSERVENT_R_PROTO 0 /**/ - -/* HAS_SIGACTION: - * This symbol, if defined, indicates that Vr4's sigaction() routine - * is available. - */ -/*#define HAS_SIGACTION / **/ - -/* HAS_SIGSETJMP: - * This variable indicates to the C program that the sigsetjmp() - * routine is available to save the calling process's registers - * and stack environment for later use by siglongjmp(), and - * to optionally save the process's signal mask. See - * Sigjmp_buf, Sigsetjmp, and Siglongjmp. - */ -/* Sigjmp_buf: - * This is the buffer type to be used with Sigsetjmp and Siglongjmp. - */ -/* Sigsetjmp: - * This macro is used in the same way as sigsetjmp(), but will invoke - * traditional setjmp() if sigsetjmp isn't available. - * See HAS_SIGSETJMP. - */ -/* Siglongjmp: - * This macro is used in the same way as siglongjmp(), but will invoke - * traditional longjmp() if siglongjmp isn't available. - * See HAS_SIGSETJMP. - */ -/*#define HAS_SIGSETJMP / **/ -#ifdef HAS_SIGSETJMP -#define Sigjmp_buf sigjmp_buf -#define Sigsetjmp(buf,save_mask) sigsetjmp((buf),(save_mask)) -#define Siglongjmp(buf,retval) siglongjmp((buf),(retval)) -#else -#define Sigjmp_buf jmp_buf -#define Sigsetjmp(buf,save_mask) setjmp((buf)) -#define Siglongjmp(buf,retval) longjmp((buf),(retval)) -#endif - -/* HAS_SRAND48_R: - * This symbol, if defined, indicates that the srand48_r routine - * is available to srand48 re-entrantly. - */ -/* SRAND48_R_PROTO: - * This symbol encodes the prototype of srand48_r. - * It is zero if d_srand48_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_srand48_r - * is defined. - */ -/*#define HAS_SRAND48_R / **/ -#define SRAND48_R_PROTO 0 /**/ - -/* HAS_SRANDOM_R: - * This symbol, if defined, indicates that the srandom_r routine - * is available to srandom re-entrantly. - */ -/* SRANDOM_R_PROTO: - * This symbol encodes the prototype of srandom_r. - * It is zero if d_srandom_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_srandom_r - * is defined. - */ -/*#define HAS_SRANDOM_R / **/ -#define SRANDOM_R_PROTO 0 /**/ - -/* USE_STDIO_PTR: - * This symbol is defined if the _ptr and _cnt fields (or similar) - * of the stdio FILE structure can be used to access the stdio buffer - * for a file handle. If this is defined, then the FILE_ptr(fp) - * and FILE_cnt(fp) macros will also be defined and should be used - * to access these fields. - */ -/* FILE_ptr: - * This macro is used to access the _ptr field (or equivalent) of the - * FILE structure pointed to by its argument. This macro will always be - * defined if USE_STDIO_PTR is defined. - */ -/* STDIO_PTR_LVALUE: - * This symbol is defined if the FILE_ptr macro can be used as an - * lvalue. - */ -/* FILE_cnt: - * This macro is used to access the _cnt field (or equivalent) of the - * FILE structure pointed to by its argument. This macro will always be - * defined if USE_STDIO_PTR is defined. - */ -/* STDIO_CNT_LVALUE: - * This symbol is defined if the FILE_cnt macro can be used as an - * lvalue. - */ -/* STDIO_PTR_LVAL_SETS_CNT: - * This symbol is defined if using the FILE_ptr macro as an lvalue - * to increase the pointer by n has the side effect of decreasing the - * value of File_cnt(fp) by n. - */ -/* STDIO_PTR_LVAL_NOCHANGE_CNT: - * This symbol is defined if using the FILE_ptr macro as an lvalue - * to increase the pointer by n leaves File_cnt(fp) unchanged. - */ -#define USE_STDIO_PTR /**/ -#ifdef USE_STDIO_PTR -#define FILE_ptr(fp) ((fp)->curp) -#define STDIO_PTR_LVALUE /**/ -#define FILE_cnt(fp) ((fp)->level) -#define STDIO_CNT_LVALUE /**/ -/*#define STDIO_PTR_LVAL_SETS_CNT / **/ -#define STDIO_PTR_LVAL_NOCHANGE_CNT /**/ -#endif - -/* USE_STDIO_BASE: - * This symbol is defined if the _base field (or similar) of the - * stdio FILE structure can be used to access the stdio buffer for - * a file handle. If this is defined, then the FILE_base(fp) macro - * will also be defined and should be used to access this field. - * Also, the FILE_bufsiz(fp) macro will be defined and should be used - * to determine the number of bytes in the buffer. USE_STDIO_BASE - * will never be defined unless USE_STDIO_PTR is. - */ -/* FILE_base: - * This macro is used to access the _base field (or equivalent) of the - * FILE structure pointed to by its argument. This macro will always be - * defined if USE_STDIO_BASE is defined. - */ -/* FILE_bufsiz: - * This macro is used to determine the number of bytes in the I/O - * buffer pointed to by _base field (or equivalent) of the FILE - * structure pointed to its argument. This macro will always be defined - * if USE_STDIO_BASE is defined. - */ -#define USE_STDIO_BASE /**/ -#ifdef USE_STDIO_BASE -#define FILE_base(fp) ((fp)->buffer) -#define FILE_bufsiz(fp) ((fp)->level + (fp)->curp - (fp)->buffer) -#endif - -/* HAS_STRERROR_R: - * This symbol, if defined, indicates that the strerror_r routine - * is available to strerror re-entrantly. - */ -/* STRERROR_R_PROTO: - * This symbol encodes the prototype of strerror_r. - * It is zero if d_strerror_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_strerror_r - * is defined. - */ -/*#define HAS_STRERROR_R / **/ -#define STRERROR_R_PROTO 0 /**/ - -/* HAS_TMPNAM_R: - * This symbol, if defined, indicates that the tmpnam_r routine - * is available to tmpnam re-entrantly. - */ -/* TMPNAM_R_PROTO: - * This symbol encodes the prototype of tmpnam_r. - * It is zero if d_tmpnam_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_tmpnam_r - * is defined. - */ -/*#define HAS_TMPNAM_R / **/ -#define TMPNAM_R_PROTO 0 /**/ - -/* HAS_TTYNAME_R: - * This symbol, if defined, indicates that the ttyname_r routine - * is available to ttyname re-entrantly. - */ -/* TTYNAME_R_PROTO: - * This symbol encodes the prototype of ttyname_r. - * It is zero if d_ttyname_r is undef, and one of the - * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ttyname_r - * is defined. - */ -/*#define HAS_TTYNAME_R / **/ -#define TTYNAME_R_PROTO 0 /**/ - -/* HAS_VPRINTF: - * This symbol, if defined, indicates that the vprintf routine is available - * to printf with a pointer to an argument list. If unavailable, you - * may need to write your own, probably in terms of _doprnt(). - */ -/* USE_CHAR_VSPRINTF: - * This symbol is defined if this system has vsprintf() returning type - * (char*). The trend seems to be to declare it as "int vsprintf()". It - * is up to the package author to declare vsprintf correctly based on the - * symbol. - */ -#define HAS_VPRINTF /**/ -/*#define USE_CHAR_VSPRINTF / **/ - -/* DOUBLESIZE: - * This symbol contains the size of a double, so that the C preprocessor - * can make decisions based on it. - */ -#define DOUBLESIZE 8 /**/ - -/* I_MACH_CTHREADS: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_MACH_CTHREADS / **/ - -/* I_PTHREAD: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_PTHREAD / **/ - -/* I_SYS_ACCESS: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SYS_ACCESS / **/ - -/* I_SYS_SECURITY: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_SYS_SECURITY / **/ - -/* I_TIME: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/* I_SYS_TIME: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/* I_SYS_TIME_KERNEL: - * This symbol, if defined, indicates to the C program that it should - * include with KERNEL defined. - */ -/* HAS_TM_TM_ZONE: - * This symbol, if defined, indicates to the C program that - * the struct tm has a tm_zone field. - */ -/* HAS_TM_TM_GMTOFF: - * This symbol, if defined, indicates to the C program that - * the struct tm has a tm_gmtoff field. - */ -#define I_TIME /**/ -/*#define I_SYS_TIME / **/ -/*#define I_SYS_TIME_KERNEL / **/ -/*#define HAS_TM_TM_ZONE / **/ -/*#define HAS_TM_TM_GMTOFF / **/ - -/* PERL_INC_VERSION_LIST: - * This variable specifies the list of subdirectories in over - * which perl.c:incpush() and lib/lib.pm will automatically - * search when adding directories to @INC, in a format suitable - * for a C initialization string. See the inc_version_list entry - * in Porting/Glossary for more details. - */ -/*#define PERL_INC_VERSION_LIST 0 / **/ - -/* INSTALL_USR_BIN_PERL: - * This symbol, if defined, indicates that Perl is to be installed - * also as /usr/bin/perl. - */ -/*#define INSTALL_USR_BIN_PERL / **/ - -/* VAL_O_NONBLOCK: - * This symbol is to be used during open() or fcntl(F_SETFL) to turn on - * non-blocking I/O for the file descriptor. Note that there is no way - * back, i.e. you cannot turn it blocking again this way. If you wish to - * alternatively switch between blocking and non-blocking, use the - * ioctl(FIOSNBIO) call instead, but that is not supported by all devices. - */ -/* VAL_EAGAIN: - * This symbol holds the errno error code set by read() when no data was - * present on the non-blocking file descriptor. - */ -/* RD_NODATA: - * This symbol holds the return code from read() when no data is present - * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is - * not defined, then you can't distinguish between no data and EOF by - * issuing a read(). You'll have to find another way to tell for sure! - */ -/* EOF_NONBLOCK: - * This symbol, if defined, indicates to the C program that a read() on - * a non-blocking file descriptor will return 0 on EOF, and not the value - * held in RD_NODATA (-1 usually, in that case!). - */ -#define VAL_O_NONBLOCK O_NONBLOCK -#define VAL_EAGAIN EAGAIN -#define RD_NODATA -1 -#define EOF_NONBLOCK - -/* PERL_OTHERLIBDIRS: - * This variable contains a colon-separated set of paths for the perl - * binary to search for additional library files or modules. - * These directories will be tacked to the end of @INC. - * Perl will automatically search below each path for version- - * and architecture-specific directories. See PERL_INC_VERSION_LIST - * for more details. - */ -/*#define PERL_OTHERLIBDIRS "" / **/ - -/* PRIVLIB: - * This symbol contains the name of the private library for this package. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. The program - * should be prepared to do ~ expansion. - */ -/* PRIVLIB_EXP: - * 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 "c:\\perl\\lib" /**/ -#define PRIVLIB_EXP (win32_get_privlib(PERL_VERSION_STRING, NULL)) /**/ - -/* PTRSIZE: - * This symbol contains the size of a pointer, so that the C preprocessor - * can make decisions based on it. It will be sizeof(void *) if - * the compiler supports (void *); otherwise it will be - * sizeof(char *). - */ -#define PTRSIZE 4 /**/ - -/* Drand01: - * This macro is to be used to generate uniformly distributed - * random numbers over the range [0., 1.[. You may have to supply - * an 'extern double drand48();' in your program since SunOS 4.1.3 - * doesn't provide you with anything relevant in its headers. - * See HAS_DRAND48_PROTO. - */ -/* Rand_seed_t: - * This symbol defines the type of the argument of the - * random seed function. - */ -/* seedDrand01: - * This symbol defines the macro to be used in seeding the - * random number generator (see Drand01). - */ -/* RANDBITS: - * This symbol indicates how many bits are produced by the - * function used to generate normalized random numbers. - * Values include 15, 16, 31, and 48. - */ -#define Drand01() (rand()/(double)((unsigned)1< or - * to get any typedef'ed information. - * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t). - */ -#define SSize_t int /* signed count of bytes */ - -/* USE_ITHREADS: - * This symbol, if defined, indicates that Perl should be built to - * use the interpreter-based threading implementation. - */ -/* USE_5005THREADS: - * This symbol, if defined, indicates that Perl should be built to - * use the 5.005-based threading implementation. - * Only valid up to 5.8.x. - */ -/* OLD_PTHREADS_API: - * This symbol, if defined, indicates that Perl should - * be built to use the old draft POSIX threads API. - */ -/* USE_REENTRANT_API: - * This symbol, if defined, indicates that Perl should - * try to use the various _r versions of library functions. - * This is extremely experimental. - */ -/*#define USE_5005THREADS / **/ -/*#define USE_ITHREADS / **/ -#if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ -#endif -/*#define OLD_PTHREADS_API / **/ -/*#define USE_REENTRANT_API / **/ - -/* PERL_VENDORARCH: - * If defined, this symbol contains the name of a private library. - * The library is private in the sense that it needn't be in anyone's - * execution path, but it should be accessible by the world. - * It may have a ~ on the front. - * The standard distribution will put nothing in this directory. - * Vendors who distribute perl may wish to place their own - * architecture-dependent modules and extensions in this directory with - * MakeMaker Makefile.PL INSTALLDIRS=vendor - * or equivalent. See INSTALL for details. - */ -/* PERL_VENDORARCH_EXP: - * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used - * in programs that are not prepared to deal with ~ expansion at run-time. - */ -/*#define PERL_VENDORARCH "" / **/ -/*#define PERL_VENDORARCH_EXP "" / **/ - -/* PERL_VENDORLIB_EXP: - * This symbol contains the ~name expanded version of VENDORLIB, to be used - * in programs that are not prepared to deal with ~ expansion at run-time. - */ -/* PERL_VENDORLIB_STEM: - * This define is PERL_VENDORLIB_EXP with any trailing version-specific component - * 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 PERL_VENDORLIB_EXP "" / **/ -/*#define PERL_VENDORLIB_STEM "" / **/ - -/* HAS_STATIC_INLINE: - * This symbol, if defined, indicates that the C compiler supports - * C99-style static inline. That is, the function can't be called - * from another translation unit. - */ -/* PERL_STATIC_INLINE: - * This symbol gives the best-guess incantation to use for static - * inline functions. If HAS_STATIC_INLINE is defined, this will - * give C99-style inline. If HAS_STATIC_INLINE is not defined, - * this will give a plain 'static'. It will always be defined - * to something that gives static linkage. - * Possibilities include - * static inline (c99) - * static __inline__ (gcc -ansi) - * static __inline (MSVC) - * static _inline (older MSVC) - * static (c89 compilers) - */ -/*#define HAS_STATIC_INLINE / **/ -#define PERL_STATIC_INLINE static /**/ - -/* EBCDIC: - * This symbol, if defined, indicates that this system uses - * EBCDIC encoding. - */ -/*#define EBCDIC / **/ - -/* OSNAME: - * This symbol contains the name of the operating system, as determined - * by Configure. You shouldn't rely on it too much; the specific - * feature tests from Configure are generally more reliable. - */ -/* OSVERS: - * This symbol contains the version of the operating system, as determined - * by Configure. You shouldn't rely on it too much; the specific - * feature tests from Configure are generally more reliable. - */ -#define OSNAME "MSWin32" /**/ -#define OSVERS "5.1" /**/ - -/* CAT2: - * This macro concatenates 2 tokens together. - */ -/* STRINGIFY: - * This macro surrounds its token with double quotes. - */ -#if 42 == 1 -#define CAT2(a,b) a/**/b -#define STRINGIFY(a) "a" -#endif -#if 42 == 42 -#define PeRl_CaTiFy(a, b) a ## b -#define PeRl_StGiFy(a) #a -#define CAT2(a,b) PeRl_CaTiFy(a,b) -#define StGiFy(a) PeRl_StGiFy(a) -#define STRINGIFY(a) PeRl_StGiFy(a) -#endif -#if 42 != 1 && 42 != 42 -#include "Bletch: How does this C preprocessor concatenate tokens?" -#endif - -/* CPPSTDIN: - * This symbol contains the first part of the string which will invoke - * the C preprocessor on the standard input and produce to standard - * output. Typical value of "cc -E" or "/lib/cpp", but it can also - * call a wrapper. See CPPRUN. - */ -/* CPPMINUS: - * This symbol contains the second part of the string which will invoke - * the C preprocessor on the standard input and produce to standard - * output. This symbol will have the value "-" if CPPSTDIN needs a minus - * to specify standard input, otherwise the value is "". - */ -/* CPPRUN: - * This symbol contains the string which will invoke a C preprocessor on - * the standard input and produce to standard output. It needs to end - * with CPPLAST, after all other preprocessor flags have been specified. - * The main difference with CPPSTDIN is that this program will never be a - * pointer to a shell wrapper, i.e. it will be empty if no preprocessor is - * available directly to the user. Note that it may well be different from - * the preprocessor used to compile the C program. - */ -/* CPPLAST: - * This symbol is intended to be used along with CPPRUN in the same manner - * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "". - */ -#define CPPSTDIN "cppstdin" -#define CPPMINUS "" -#define CPPRUN "cpp32 -oCON" -#define CPPLAST "" - -/* HAS_ACCESS: - * This manifest constant lets the C program know that the access() - * system call is available to check for accessibility using real UID/GID. - * (always present on UNIX.) - */ -#define HAS_ACCESS /**/ - -/* HASATTRIBUTE_FORMAT: - * Can we handle GCC attribute for checking printf-style formats - */ -/* PRINTF_FORMAT_NULL_OK: - * Allows __printf__ format to be null when checking printf-style - */ -/* HASATTRIBUTE_MALLOC: - * Can we handle GCC attribute for malloc-style functions. - */ -/* HASATTRIBUTE_NONNULL: - * Can we handle GCC attribute for nonnull function parms. - */ -/* HASATTRIBUTE_NORETURN: - * Can we handle GCC attribute for functions that do not return - */ -/* HASATTRIBUTE_PURE: - * Can we handle GCC attribute for pure functions - */ -/* HASATTRIBUTE_UNUSED: - * Can we handle GCC attribute for unused variables and arguments - */ -/* HASATTRIBUTE_DEPRECATED: - * Can we handle GCC attribute for marking deprecated APIs - */ -/* HASATTRIBUTE_WARN_UNUSED_RESULT: - * Can we handle GCC attribute for warning on unused results - */ -/*#define HASATTRIBUTE_DEPRECATED / **/ -/*#define HASATTRIBUTE_FORMAT / **/ -/*#define PRINTF_FORMAT_NULL_OK / **/ -/*#define HASATTRIBUTE_NORETURN / **/ -/*#define HASATTRIBUTE_MALLOC / **/ -/*#define HASATTRIBUTE_NONNULL / **/ -/*#define HASATTRIBUTE_PURE / **/ -/*#define HASATTRIBUTE_UNUSED / **/ -/*#define HASATTRIBUTE_WARN_UNUSED_RESULT / **/ - -/* HASCONST: - * This symbol, if defined, indicates that this C compiler knows about - * the const type. There is no need to actually test for that symbol - * within your programs. The mere use of the "const" keyword will - * trigger the necessary tests. - */ -#define HASCONST /**/ -#ifndef HASCONST -#define const -#endif - -/* HAS_CSH: - * This symbol, if defined, indicates that the C-shell exists. - */ -/* CSH: - * This symbol, if defined, contains the full pathname of csh. - */ -/*#define HAS_CSH / **/ -#ifdef HAS_CSH -#define CSH "" /**/ -#endif - -/* SETUID_SCRIPTS_ARE_SECURE_NOW: - * This symbol, if defined, indicates that the bug that prevents - * setuid scripts from being secure is not present in this kernel. - */ -/* DOSUID: - * This symbol, if defined, indicates that the C program should - * check the script that it is executing for setuid/setgid bits, and - * attempt to emulate setuid/setgid on systems that have disabled - * setuid #! scripts because the kernel can't do it securely. - * It is up to the package designer to make sure that this emulation - * is done securely. Among other things, it should do an fstat on - * the script it just opened to make sure it really is a setuid/setgid - * script, it should make sure the arguments passed correspond exactly - * to the argument on the #! line, and it should not trust any - * subprocesses to which it must pass the filename rather than the - * file descriptor of the script to be executed. - */ -/*#define SETUID_SCRIPTS_ARE_SECURE_NOW / **/ -/*#define DOSUID / **/ - -/* HAS_ENDGRENT: - * This symbol, if defined, indicates that the getgrent routine is - * available for finalizing sequential access of the group database. - */ -/*#define HAS_ENDGRENT / **/ - -/* HAS_ENDHOSTENT: - * This symbol, if defined, indicates that the endhostent() routine is - * available to close whatever was being used for host queries. - */ -/*#define HAS_ENDHOSTENT / **/ - -/* HAS_ENDNETENT: - * This symbol, if defined, indicates that the endnetent() routine is - * available to close whatever was being used for network queries. - */ -/*#define HAS_ENDNETENT / **/ - -/* HAS_ENDPROTOENT: - * This symbol, if defined, indicates that the endprotoent() routine is - * available to close whatever was being used for protocol queries. - */ -/*#define HAS_ENDPROTOENT / **/ - -/* HAS_ENDPWENT: - * This symbol, if defined, indicates that the getgrent routine is - * available for finalizing sequential access of the passwd database. - */ -/*#define HAS_ENDPWENT / **/ - -/* HAS_ENDSERVENT: - * This symbol, if defined, indicates that the endservent() routine is - * available to close whatever was being used for service queries. - */ -/*#define HAS_ENDSERVENT / **/ - -/* FLEXFILENAMES: - * This symbol, if defined, indicates that the system supports filenames - * longer than 14 characters. - */ -#define FLEXFILENAMES /**/ - -/* HAS_GETGRENT: - * This symbol, if defined, indicates that the getgrent routine is - * available for sequential access of the group database. - */ -/*#define HAS_GETGRENT / **/ - -/* HAS_GETHOSTBYADDR: - * This symbol, if defined, indicates that the gethostbyaddr() routine is - * available to look up hosts by their IP addresses. - */ -#define HAS_GETHOSTBYADDR /**/ - -/* HAS_GETHOSTBYNAME: - * This symbol, if defined, indicates that the gethostbyname() routine is - * available to look up host names in some data base or other. - */ -#define HAS_GETHOSTBYNAME /**/ - -/* HAS_GETHOSTENT: - * This symbol, if defined, indicates that the gethostent() routine is - * available to look up host names in some data base or another. - */ -/*#define HAS_GETHOSTENT / **/ - -/* HAS_GETHOSTNAME: - * This symbol, if defined, indicates that the C program may use the - * gethostname() routine to derive the host name. See also HAS_UNAME - * and PHOSTNAME. - */ -/* HAS_UNAME: - * This symbol, if defined, indicates that the C program may use the - * uname() routine to derive the host name. See also HAS_GETHOSTNAME - * and PHOSTNAME. - */ -/* PHOSTNAME: - * This symbol, if defined, indicates the command to feed to the - * popen() routine to derive the host name. See also HAS_GETHOSTNAME - * and HAS_UNAME. Note that the command uses a fully qualified path, - * so that it is safe even if used by a process with super-user - * privileges. - */ -/* HAS_PHOSTNAME: - * This symbol, if defined, indicates that the C program may use the - * contents of PHOSTNAME as a command to feed to the popen() routine - * to derive the host name. - */ -#define HAS_GETHOSTNAME /**/ -#define HAS_UNAME /**/ -/*#define HAS_PHOSTNAME / **/ -#ifdef HAS_PHOSTNAME -#define PHOSTNAME "" /* How to get the host name */ -#endif - -/* HAS_GETNETBYADDR: - * This symbol, if defined, indicates that the getnetbyaddr() routine is - * available to look up networks by their IP addresses. - */ -/*#define HAS_GETNETBYADDR / **/ - -/* HAS_GETNETBYNAME: - * This symbol, if defined, indicates that the getnetbyname() routine is - * available to look up networks by their names. - */ -/*#define HAS_GETNETBYNAME / **/ - -/* HAS_GETNETENT: - * This symbol, if defined, indicates that the getnetent() routine is - * available to look up network names in some data base or another. - */ -/*#define HAS_GETNETENT / **/ - -/* HAS_GETPROTOENT: - * This symbol, if defined, indicates that the getprotoent() routine is - * available to look up protocols in some data base or another. - */ -/*#define HAS_GETPROTOENT / **/ - -/* HAS_GETPGRP: - * This symbol, if defined, indicates that the getpgrp routine is - * available to get the current process group. - */ -/* USE_BSD_GETPGRP: - * This symbol, if defined, indicates that getpgrp needs one - * arguments whereas USG one needs none. - */ -/*#define HAS_GETPGRP / **/ -/*#define USE_BSD_GETPGRP / **/ - -/* HAS_GETPROTOBYNAME: - * This symbol, if defined, indicates that the getprotobyname() - * routine is available to look up protocols by their name. - */ -/* HAS_GETPROTOBYNUMBER: - * This symbol, if defined, indicates that the getprotobynumber() - * routine is available to look up protocols by their number. - */ -#define HAS_GETPROTOBYNAME /**/ -#define HAS_GETPROTOBYNUMBER /**/ - -/* HAS_GETPWENT: - * This symbol, if defined, indicates that the getpwent routine is - * available for sequential access of the passwd database. - * If this is not available, the older getpw() function may be available. - */ -/*#define HAS_GETPWENT / **/ - -/* HAS_GETSERVENT: - * This symbol, if defined, indicates that the getservent() routine is - * available to look up network services in some data base or another. - */ -/*#define HAS_GETSERVENT / **/ - -/* HAS_GETSERVBYNAME: - * This symbol, if defined, indicates that the getservbyname() - * routine is available to look up services by their name. - */ -/* HAS_GETSERVBYPORT: - * This symbol, if defined, indicates that the getservbyport() - * routine is available to look up services by their port. - */ -#define HAS_GETSERVBYNAME /**/ -#define HAS_GETSERVBYPORT /**/ - -/* HAS_HTONL: - * This symbol, if defined, indicates that the htonl() routine (and - * friends htons() ntohl() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_HTONS: - * This symbol, if defined, indicates that the htons() routine (and - * friends htonl() ntohl() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_NTOHL: - * This symbol, if defined, indicates that the ntohl() routine (and - * friends htonl() htons() ntohs()) are available to do network - * order byte swapping. - */ -/* HAS_NTOHS: - * This symbol, if defined, indicates that the ntohs() routine (and - * friends htonl() htons() ntohl()) are available to do network - * order byte swapping. - */ -#define HAS_HTONL /**/ -#define HAS_HTONS /**/ -#define HAS_NTOHL /**/ -#define HAS_NTOHS /**/ - -/* HAS_LONG_DOUBLE: - * This symbol will be defined if the C compiler supports long - * doubles. - */ -/* LONG_DOUBLESIZE: - * This symbol contains the size of a long double, so that the - * C preprocessor can make decisions based on it. It is only - * defined if the system supports long doubles. - */ -#define HAS_LONG_DOUBLE /**/ -#ifdef HAS_LONG_DOUBLE -#define LONG_DOUBLESIZE 10 /**/ -#endif - -/* HAS_LONG_LONG: - * This symbol will be defined if the C compiler supports long long. - */ -/* LONGLONGSIZE: - * This symbol contains the size of a long long, so that the - * C preprocessor can make decisions based on it. It is only - * defined if the system supports long long. - */ -/*#define HAS_LONG_LONG / **/ -#ifdef HAS_LONG_LONG -#define LONGLONGSIZE 8 /**/ -#endif - -/* HAS_MEMCHR: - * This symbol, if defined, indicates that the memchr routine is available - * to locate characters within a C string. - */ -#define HAS_MEMCHR /**/ - -/* HAS_MKSTEMP: - * This symbol, if defined, indicates that the mkstemp routine is - * available to exclusively create and open a uniquely named - * temporary file. - */ -/*#define HAS_MKSTEMP / **/ - -/* HAS_MMAP: - * This symbol, if defined, indicates that the mmap system call is - * available to map a file into memory. - */ -/* Mmap_t: - * This symbol holds the return type of the mmap() system call - * (and simultaneously the type of the first argument). - * Usually set to 'void *' or 'caddr_t'. - */ -/*#define HAS_MMAP / **/ -#define Mmap_t void * /**/ - -/* HAS_MSG: - * This symbol, if defined, indicates that the entire msg*(2) library is - * supported (IPC mechanism based on message queues). - */ -/*#define HAS_MSG / **/ - -/* HAS_SEM: - * This symbol, if defined, indicates that the entire sem*(2) library is - * supported. - */ -/*#define HAS_SEM / **/ - -/* HAS_SETGRENT: - * This symbol, if defined, indicates that the setgrent routine is - * available for initializing sequential access of the group database. - */ -/*#define HAS_SETGRENT / **/ - -/* HAS_SETHOSTENT: - * This symbol, if defined, indicates that the sethostent() routine is - * available. - */ -/*#define HAS_SETHOSTENT / **/ - -/* HAS_SETNETENT: - * This symbol, if defined, indicates that the setnetent() routine is - * available. - */ -/*#define HAS_SETNETENT / **/ - -/* HAS_SETPROTOENT: - * This symbol, if defined, indicates that the setprotoent() routine is - * available. - */ -/*#define HAS_SETPROTOENT / **/ - -/* HAS_SETPGRP: - * This symbol, if defined, indicates that the setpgrp routine is - * available to set the current process group. - */ -/* USE_BSD_SETPGRP: - * This symbol, if defined, indicates that setpgrp needs two - * arguments whereas USG one needs none. See also HAS_SETPGID - * for a POSIX interface. - */ -/*#define HAS_SETPGRP / **/ -/*#define USE_BSD_SETPGRP / **/ - -/* HAS_SETPWENT: - * This symbol, if defined, indicates that the setpwent routine is - * available for initializing sequential access of the passwd database. - */ -/*#define HAS_SETPWENT / **/ - -/* HAS_SETSERVENT: - * This symbol, if defined, indicates that the setservent() routine is - * available. - */ -/*#define HAS_SETSERVENT / **/ - -/* HAS_SETVBUF: - * This symbol, if defined, indicates that the setvbuf routine is - * available to change buffering on an open stdio stream. - * to a line-buffered mode. - */ -#define HAS_SETVBUF /**/ - -/* HAS_SHM: - * This symbol, if defined, indicates that the entire shm*(2) library is - * supported. - */ -/*#define HAS_SHM / **/ - -/* Shmat_t: - * This symbol holds the return type of the shmat() system call. - * Usually set to 'void *' or 'char *'. - */ -/* HAS_SHMAT_PROTOTYPE: - * This symbol, if defined, indicates that the sys/shm.h includes - * a prototype for shmat(). Otherwise, it is up to the program to - * guess one. Shmat_t shmat(int, Shmat_t, int) is a good guess, - * but not always right so it should be emitted by the program only - * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs. - */ -#define Shmat_t void * /**/ -/*#define HAS_SHMAT_PROTOTYPE / **/ - -/* HAS_SOCKET: - * This symbol, if defined, indicates that the BSD socket interface is - * supported. - */ -/* HAS_SOCKETPAIR: - * This symbol, if defined, indicates that the BSD socketpair() call is - * supported. - */ -/* HAS_MSG_CTRUNC: - * This symbol, if defined, indicates that the MSG_CTRUNC is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_DONTROUTE: - * This symbol, if defined, indicates that the MSG_DONTROUTE is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_OOB: - * This symbol, if defined, indicates that the MSG_OOB is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_PEEK: - * This symbol, if defined, indicates that the MSG_PEEK is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_MSG_PROXY: - * This symbol, if defined, indicates that the MSG_PROXY is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_SCM_RIGHTS: - * This symbol, if defined, indicates that the SCM_RIGHTS is supported. - * Checking just with #ifdef might not be enough because this symbol - * has been known to be an enum. - */ -/* HAS_SOCKADDR_SA_LEN: - * This symbol, if defined, indicates that the struct sockaddr - * structure has a member called sa_len, indicating the length of - * the structure. - */ -/* HAS_SIN6_SCOPE_ID: - * This symbol, if defined, indicates that the struct sockaddr_in6 - * structure has a member called sin6_scope_id. - */ -#define HAS_SOCKET /**/ -/*#define HAS_SOCKETPAIR / **/ -/*#define HAS_SOCKADDR_SA_LEN / **/ -/*#define HAS_MSG_CTRUNC / **/ -/*#define HAS_MSG_DONTROUTE / **/ -/*#define HAS_MSG_OOB / **/ -/*#define HAS_MSG_PEEK / **/ -/*#define HAS_MSG_PROXY / **/ -/*#define HAS_SCM_RIGHTS / **/ -#define HAS_SIN6_SCOPE_ID /**/ - -/* USE_STAT_BLOCKS: - * This symbol is defined if this system has a stat structure declaring - * st_blksize and st_blocks. - */ -#ifndef USE_STAT_BLOCKS -/*#define USE_STAT_BLOCKS / **/ -#endif - -/* USE_STRUCT_COPY: - * This symbol, if defined, indicates that this C compiler knows how - * to copy structures. If undefined, you'll need to use a block copy - * routine of some sort instead. - */ -#define USE_STRUCT_COPY /**/ - -/* HAS_STRERROR: - * This symbol, if defined, indicates that the strerror routine is - * available to translate error numbers to strings. See the writeup - * of Strerror() in this file before you try to define your own. - */ -/* HAS_SYS_ERRLIST: - * This symbol, if defined, indicates that the sys_errlist array is - * available to translate error numbers to strings. The extern int - * sys_nerr gives the size of that table. - */ -/* Strerror: - * This preprocessor symbol is defined as a macro if strerror() is - * not available to translate error numbers to strings but sys_errlist[] - * array is there. - */ -#define HAS_STRERROR /**/ -#define HAS_SYS_ERRLIST /**/ -#define Strerror(e) strerror(e) - -/* HAS_STRTOUL: - * This symbol, if defined, indicates that the strtoul routine is - * available to provide conversion of strings to unsigned long. - */ -#define HAS_STRTOUL /**/ - -/* HAS_UNION_SEMUN: - * This symbol, if defined, indicates that the union semun is - * defined by including . If not, the user code - * probably needs to define it as: - * union semun { - * int val; - * struct semid_ds *buf; - * unsigned short *array; - * } - */ -/* USE_SEMCTL_SEMUN: - * This symbol, if defined, indicates that union semun is - * used for semctl IPC_STAT. - */ -/* USE_SEMCTL_SEMID_DS: - * This symbol, if defined, indicates that struct semid_ds * is - * used for semctl IPC_STAT. - */ -#define HAS_UNION_SEMUN /**/ -/*#define USE_SEMCTL_SEMUN / **/ -/*#define USE_SEMCTL_SEMID_DS / **/ - -/* HAS_VFORK: - * This symbol, if defined, indicates that vfork() exists. - */ -/*#define HAS_VFORK / **/ - -/* HAS_PSEUDOFORK: - * This symbol, if defined, indicates that an emulation of the - * fork routine is available. - */ -/*#define HAS_PSEUDOFORK / **/ - -/* Signal_t: - * This symbol's value is either "void" or "int", corresponding to the - * appropriate return type of a signal handler. Thus, you can declare - * a signal handler using "Signal_t (*handler)()", and define the - * handler using "Signal_t handler(sig)". - */ -#define Signal_t void /* Signal handler's return type */ - -/* HASVOLATILE: - * This symbol, if defined, indicates that this C compiler knows about - * the volatile declaration. - */ -#define HASVOLATILE /**/ -#ifndef HASVOLATILE -#define volatile -#endif - -/* I_DIRENT: - * This symbol, if defined, indicates to the C program that it should - * include . Using this symbol also triggers the definition - * of the Direntry_t define which ends up being 'struct dirent' or - * 'struct direct' depending on the availability of . - */ -/* DIRNAMLEN: - * This symbol, if defined, indicates to the C program that the length - * of directory entry names is provided by a d_namlen field. Otherwise - * you need to do strlen() on the d_name field. - */ -/* Direntry_t: - * This symbol is set to 'struct direct' or 'struct dirent' depending on - * whether dirent is available or not. You should use this pseudo type to - * portably declare your directory entries. - */ -#define I_DIRENT /**/ -#define DIRNAMLEN /**/ -#define Direntry_t struct direct - -/* I_GRP: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/* GRPASSWD: - * This symbol, if defined, indicates to the C program that struct group - * in contains gr_passwd. - */ -/*#define I_GRP / **/ -/*#define GRPASSWD / **/ - -/* I_NDBM: - * This symbol, if defined, indicates that exists and should - * be included. - */ -/* I_GDBMNDBM: - * This symbol, if defined, indicates that exists and should - * be included. This was the location of the ndbm.h compatibility file - * in RedHat 7.1. - */ -/* I_GDBM_NDBM: - * This symbol, if defined, indicates that exists and should - * be included. This is the location of the ndbm.h compatibility file - * in Debian 4.0. - */ -/* NDBM_H_USES_PROTOTYPES: - * This symbol, if defined, indicates that uses real ANSI C - * prototypes instead of K&R style function declarations without any - * parameter information. While ANSI C prototypes are supported in C++, - * K&R style function declarations will yield errors. - */ -/* GDBMNDBM_H_USES_PROTOTYPES: - * This symbol, if defined, indicates that uses real ANSI C - * prototypes instead of K&R style function declarations without any - * parameter information. While ANSI C prototypes are supported in C++, - * K&R style function declarations will yield errors. - */ -/* GDBM_NDBM_H_USES_PROTOTYPES: - * This symbol, if defined, indicates that uses real ANSI C - * prototypes instead of K&R style function declarations without any - * parameter information. While ANSI C prototypes are supported in C++, - * K&R style function declarations will yield errors. - */ -/*#define I_NDBM / **/ -/*#define I_GDBMNDBM / **/ -/*#define I_GDBM_NDBM / **/ -/*#define NDBM_H_USES_PROTOTYPES / **/ -/*#define GDBMNDBM_H_USES_PROTOTYPES / **/ -/*#define GDBM_NDBM_H_USES_PROTOTYPES / **/ - -/* I_NETDB: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_NETDB / **/ - -/* I_NET_ERRNO: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_NET_ERRNO / **/ - -/* I_PWD: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/* PWQUOTA: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_quota. - */ -/* PWAGE: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_age. - */ -/* PWCHANGE: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_change. - */ -/* PWCLASS: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_class. - */ -/* PWEXPIRE: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_expire. - */ -/* PWCOMMENT: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_comment. - */ -/* PWGECOS: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_gecos. - */ -/* PWPASSWD: - * This symbol, if defined, indicates to the C program that struct passwd - * contains pw_passwd. - */ -/*#define I_PWD / **/ -/*#define PWQUOTA / **/ -/*#define PWAGE / **/ -/*#define PWCHANGE / **/ -/*#define PWCLASS / **/ -/*#define PWEXPIRE / **/ -/*#define PWCOMMENT / **/ -/*#define PWGECOS / **/ -/*#define PWPASSWD / **/ - -/* I_SYSUIO: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_SYSUIO / **/ - -/* I_STDARG: - * This symbol, if defined, indicates that exists and should - * be included. - */ -/* I_VARARGS: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -#define I_STDARG /**/ -/*#define I_VARARGS / **/ - -/* Free_t: - * This variable contains the return type of free(). It is usually - * void, but occasionally int. - */ -/* Malloc_t: - * This symbol is the type of pointer returned by malloc and realloc. - */ -#define Malloc_t void * /**/ -#define Free_t void /**/ - -/* PERL_MALLOC_WRAP: - * This symbol, if defined, indicates that we'd like malloc wrap checks. - */ -#define PERL_MALLOC_WRAP /**/ - -/* MYMALLOC: - * This symbol, if defined, indicates that we're using our own malloc. - */ -/*#define MYMALLOC / **/ - -/* CAN_PROTOTYPE: - * If defined, this macro indicates that the C compiler can handle - * function prototypes. - */ -/* _: - * This macro is used to declare function parameters for folks who want - * to make declarations with prototypes using a different style than - * the above macros. Use double parentheses. For example: - * - * int main _((int argc, char *argv[])); - */ -#define CAN_PROTOTYPE /**/ -#ifdef CAN_PROTOTYPE -#define _(args) args -#else -#define _(args) () -#endif - -/* SH_PATH: - * This symbol contains the full pathname to the shell used on this - * on this system to execute Bourne shell scripts. Usually, this will be - * /bin/sh, though it's possible that some systems will have /bin/ksh, - * /bin/pdksh, /bin/ash, /bin/bash, or even something such as - * D:/bin/sh.exe. - */ -#define SH_PATH "cmd /x /c" /**/ - -/* SIG_NAME: - * This symbol contains a list of signal names in order of - * signal number. This is intended - * to be used as a static array initialization, like this: - * char *sig_name[] = { SIG_NAME }; - * The signals in the list are separated with commas, and each signal - * is surrounded by double quotes. There is no leading SIG in the signal - * name, i.e. SIGQUIT is known as "QUIT". - * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn, - * etc., where nn is the actual signal number (e.g. NUM37). - * The signal number for sig_name[i] is stored in sig_num[i]. - * The last element is 0 to terminate the list with a NULL. This - * corresponds to the 0 at the end of the sig_name_init list. - * Note that this variable is initialized from the sig_name_init, - * not from sig_name (which is unused). - */ -/* SIG_NUM: - * This symbol contains a list of signal numbers, in the same order as the - * SIG_NAME list. It is suitable for static array initialization, as in: - * int sig_num[] = { SIG_NUM }; - * The signals in the list are separated with commas, and the indices - * within that list and the SIG_NAME list match, so it's easy to compute - * the signal name from a number or vice versa at the price of a small - * dynamic linear lookup. - * Duplicates are allowed, but are moved to the end of the list. - * The signal number corresponding to sig_name[i] is sig_number[i]. - * if (i < NSIG) then sig_number[i] == i. - * The last element is 0, corresponding to the 0 at the end of - * the sig_name_init list. - * Note that this variable is initialized from the sig_num_init, - * not from sig_num (which is unused). - */ -/* SIG_SIZE: - * This variable contains the number of elements of the SIG_NAME - * and SIG_NUM arrays, excluding the final NULL entry. - */ -#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "NUM19", "USR3", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/ -#define SIG_NUM 0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 0 /**/ -#define SIG_SIZE 27 /**/ - -/* STDCHAR: - * This symbol is defined to be the type of char used in stdio.h. - * It has the values "unsigned char" or "char". - */ -#define STDCHAR unsigned char /**/ - -/* VOIDFLAGS: - * This symbol indicates how much support of the void type is given by this - * compiler. What various bits mean: - * - * 1 = supports declaration of void - * 2 = supports arrays of pointers to functions returning void - * 4 = supports comparisons between pointers to void functions and - * addresses of void functions - * 8 = supports declaration of generic void pointers - * - * The package designer should define VOIDUSED to indicate the requirements - * of the package. This can be done either by #defining VOIDUSED before - * including config.h, or by defining defvoidused in Myinit.U. If the - * latter approach is taken, only those flags will be tested. If the - * level of void support necessary is not present, defines void to int. - */ -#ifndef VOIDUSED -#define VOIDUSED 15 -#endif -#define VOIDFLAGS 15 -#if (VOIDFLAGS & VOIDUSED) != VOIDUSED -#define void int /* is void to be avoided? */ -#define M_VOID /* Xenix strikes again */ -#endif - -/* PERL_USE_DEVEL: - * This symbol, if defined, indicates that Perl was configured with - * -Dusedevel, to enable development features. This should not be - * done for production builds. - */ -/*#define PERL_USE_DEVEL / **/ - -/* HAS_ATOLF: - * This symbol, if defined, indicates that the atolf routine is - * available to convert strings into long doubles. - */ -/*#define HAS_ATOLF / **/ - -/* HAS_ATOLL: - * This symbol, if defined, indicates that the atoll routine is - * available to convert strings into long longs. - */ -/*#define HAS_ATOLL / **/ - -/* HAS__FWALK: - * This symbol, if defined, indicates that the _fwalk system call is - * available to apply a function to all the file handles. - */ -/*#define HAS__FWALK / **/ - -/* HAS_AINTL: - * This symbol, if defined, indicates that the aintl routine is - * available. If copysignl is also present we can emulate modfl. - */ -/*#define HAS_AINTL / **/ - -/* HAS_BUILTIN_CHOOSE_EXPR: - * Can we handle GCC builtin for compile-time ternary-like expressions - */ -/* HAS_BUILTIN_EXPECT: - * Can we handle GCC builtin for telling that certain values are more - * likely - */ -/*#define HAS_BUILTIN_EXPECT / **/ -/*#define HAS_BUILTIN_CHOOSE_EXPR / **/ - -/* HAS_C99_VARIADIC_MACROS: - * If defined, the compiler supports C99 variadic macros. - */ -/*#define HAS_C99_VARIADIC_MACROS / **/ - -/* HAS_CLASS: - * This symbol, if defined, indicates that the class routine is - * available to classify doubles. Available for example in AIX. - * The returned values are defined in and are: - * - * FP_PLUS_NORM Positive normalized, nonzero - * FP_MINUS_NORM Negative normalized, nonzero - * FP_PLUS_DENORM Positive denormalized, nonzero - * FP_MINUS_DENORM Negative denormalized, nonzero - * FP_PLUS_ZERO +0.0 - * FP_MINUS_ZERO -0.0 - * FP_PLUS_INF +INF - * FP_MINUS_INF -INF - * FP_NANS Signaling Not a Number (NaNS) - * FP_NANQ Quiet Not a Number (NaNQ) - */ -/*#define HAS_CLASS / **/ - -/* HAS_CLEARENV: - * This symbol, if defined, indicates that the clearenv () routine is - * available for use. - */ -/*#define HAS_CLEARENV / **/ - -/* HAS_STRUCT_CMSGHDR: - * This symbol, if defined, indicates that the struct cmsghdr - * is supported. - */ -/*#define HAS_STRUCT_CMSGHDR / **/ - -/* HAS_COPYSIGNL: - * This symbol, if defined, indicates that the copysignl routine is - * available. If aintl is also present we can emulate modfl. - */ -/*#define HAS_COPYSIGNL / **/ - -/* USE_CPLUSPLUS: - * This symbol, if defined, indicates that a C++ compiler was - * used to compiled Perl and will be used to compile extensions. - */ -/*#define USE_CPLUSPLUS / **/ - -/* HAS_DBMINIT_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the dbminit() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern int dbminit(char *); - */ -/*#define HAS_DBMINIT_PROTO / **/ - -/* HAS_DIR_DD_FD: - * This symbol, if defined, indicates that the the DIR* dirstream - * structure contains a member variable named dd_fd. - */ -/*#define HAS_DIR_DD_FD / **/ - -/* HAS_DIRFD: - * This manifest constant lets the C program know that dirfd - * is available. - */ -/*#define HAS_DIRFD / **/ - -/* DLSYM_NEEDS_UNDERSCORE: - * This symbol, if defined, indicates that we need to prepend an - * underscore to the symbol name before calling dlsym(). This only - * makes sense if you *have* dlsym, which we will presume is the - * case if you're using dl_dlopen.xs. - */ -/*#define DLSYM_NEEDS_UNDERSCORE / **/ - -/* HAS_FAST_STDIO: - * This symbol, if defined, indicates that the "fast stdio" - * is available to manipulate the stdio buffers directly. - */ -#define HAS_FAST_STDIO /**/ - -/* HAS_FCHDIR: - * This symbol, if defined, indicates that the fchdir routine is - * available to change directory using a file descriptor. - */ -/*#define HAS_FCHDIR / **/ - -/* FCNTL_CAN_LOCK: - * This symbol, if defined, indicates that fcntl() can be used - * for file locking. Normally on Unix systems this is defined. - * It may be undefined on VMS. - */ -/*#define FCNTL_CAN_LOCK / **/ - -/* HAS_FINITE: - * This symbol, if defined, indicates that the finite routine is - * available to check whether a double is finite (non-infinity non-NaN). - */ -/*#define HAS_FINITE / **/ - -/* HAS_FINITEL: - * This symbol, if defined, indicates that the finitel routine is - * available to check whether a long double is finite - * (non-infinity non-NaN). - */ -/*#define HAS_FINITEL / **/ - -/* HAS_FLOCK_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the flock() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern int flock(int, int); - */ -#define HAS_FLOCK_PROTO /**/ - -/* HAS_FP_CLASS: - * This symbol, if defined, indicates that the fp_class routine is - * available to classify doubles. Available for example in Digital UNIX. - * The returned values are defined in and are: - * - * FP_SNAN Signaling NaN (Not-a-Number) - * FP_QNAN Quiet NaN (Not-a-Number) - * FP_POS_INF +infinity - * FP_NEG_INF -infinity - * FP_POS_NORM Positive normalized - * FP_NEG_NORM Negative normalized - * FP_POS_DENORM Positive denormalized - * FP_NEG_DENORM Negative denormalized - * FP_POS_ZERO +0.0 (positive zero) - * FP_NEG_ZERO -0.0 (negative zero) - */ -/*#define HAS_FP_CLASS / **/ - -/* HAS_FPCLASS: - * This symbol, if defined, indicates that the fpclass routine is - * available to classify doubles. Available for example in Solaris/SVR4. - * The returned values are defined in and are: - * - * FP_SNAN signaling NaN - * FP_QNAN quiet NaN - * FP_NINF negative infinity - * FP_PINF positive infinity - * FP_NDENORM negative denormalized non-zero - * FP_PDENORM positive denormalized non-zero - * FP_NZERO negative zero - * FP_PZERO positive zero - * FP_NNORM negative normalized non-zero - * FP_PNORM positive normalized non-zero - */ -/*#define HAS_FPCLASS / **/ - -/* HAS_FPCLASSIFY: - * This symbol, if defined, indicates that the fpclassify routine is - * available to classify doubles. Available for example in HP-UX. - * The returned values are defined in and are - * - * FP_NORMAL Normalized - * FP_ZERO Zero - * FP_INFINITE Infinity - * FP_SUBNORMAL Denormalized - * FP_NAN NaN - * - */ -/*#define HAS_FPCLASSIFY / **/ - -/* HAS_FPCLASSL: - * This symbol, if defined, indicates that the fpclassl routine is - * available to classify long doubles. Available for example in IRIX. - * The returned values are defined in and are: - * - * FP_SNAN signaling NaN - * FP_QNAN quiet NaN - * FP_NINF negative infinity - * FP_PINF positive infinity - * FP_NDENORM negative denormalized non-zero - * FP_PDENORM positive denormalized non-zero - * FP_NZERO negative zero - * FP_PZERO positive zero - * FP_NNORM negative normalized non-zero - * FP_PNORM positive normalized non-zero - */ -/*#define HAS_FPCLASSL / **/ - -/* HAS_FPOS64_T: - * This symbol will be defined if the C compiler supports fpos64_t. - */ -/*#define HAS_FPOS64_T / **/ - -/* HAS_FREXPL: - * This symbol, if defined, indicates that the frexpl routine is - * available to break a long double floating-point number into - * a normalized fraction and an integral power of 2. - */ -/*#define HAS_FREXPL / **/ - -/* HAS_STRUCT_FS_DATA: - * This symbol, if defined, indicates that the struct fs_data - * to do statfs() is supported. - */ -/*#define HAS_STRUCT_FS_DATA / **/ - -/* HAS_FSEEKO: - * This symbol, if defined, indicates that the fseeko routine is - * available to fseek beyond 32 bits (useful for ILP32 hosts). - */ -/*#define HAS_FSEEKO / **/ - -/* HAS_FSTATFS: - * This symbol, if defined, indicates that the fstatfs routine is - * available to stat filesystems by file descriptors. - */ -/*#define HAS_FSTATFS / **/ - -/* HAS_FSYNC: - * This symbol, if defined, indicates that the fsync routine is - * available to write a file's modified data and attributes to - * permanent storage. - */ -/*#define HAS_FSYNC / **/ - -/* HAS_FTELLO: - * This symbol, if defined, indicates that the ftello routine is - * available to ftell beyond 32 bits (useful for ILP32 hosts). - */ -/*#define HAS_FTELLO / **/ - -/* HAS_FUTIMES: - * This symbol, if defined, indicates that the futimes routine is - * available to change file descriptor time stamps with struct timevals. - */ -/*#define HAS_FUTIMES / **/ - -/* HAS_GETADDRINFO: - * This symbol, if defined, indicates that the getaddrinfo() function - * is available for use. - */ -/*#define HAS_GETADDRINFO / **/ - -/* HAS_GETCWD: - * This symbol, if defined, indicates that the getcwd routine is - * available to get the current working directory. - */ -#define HAS_GETCWD /**/ - -/* HAS_GETESPWNAM: - * This symbol, if defined, indicates that the getespwnam system call is - * available to retrieve enhanced (shadow) password entries by name. - */ -/*#define HAS_GETESPWNAM / **/ - -/* HAS_GETFSSTAT: - * This symbol, if defined, indicates that the getfsstat routine is - * available to stat filesystems in bulk. - */ -/*#define HAS_GETFSSTAT / **/ - -/* HAS_GETITIMER: - * This symbol, if defined, indicates that the getitimer routine is - * available to return interval timers. - */ -/*#define HAS_GETITIMER / **/ - -/* HAS_GETMNT: - * This symbol, if defined, indicates that the getmnt routine is - * available to get filesystem mount info by filename. - */ -/*#define HAS_GETMNT / **/ - -/* HAS_GETMNTENT: - * This symbol, if defined, indicates that the getmntent routine is - * available to iterate through mounted file systems to get their info. - */ -/*#define HAS_GETMNTENT / **/ - -/* HAS_GETNAMEINFO: - * This symbol, if defined, indicates that the getnameinfo() function - * is available for use. - */ -/*#define HAS_GETNAMEINFO / **/ - -/* HAS_GETPRPWNAM: - * This symbol, if defined, indicates that the getprpwnam system call is - * available to retrieve protected (shadow) password entries by name. - */ -/*#define HAS_GETPRPWNAM / **/ - -/* HAS_GETSPNAM: - * This symbol, if defined, indicates that the getspnam system call is - * available to retrieve SysV shadow password entries by name. - */ -/*#define HAS_GETSPNAM / **/ - -/* HAS_HASMNTOPT: - * This symbol, if defined, indicates that the hasmntopt routine is - * available to query the mount options of file systems. - */ -/*#define HAS_HASMNTOPT / **/ - -/* HAS_ILOGBL: - * This symbol, if defined, indicates that the ilogbl routine is - * available. If scalbnl is also present we can emulate frexpl. - */ -/*#define HAS_ILOGBL / **/ - -/* HAS_INETNTOP: - * This symbol, if defined, indicates that the inet_ntop() function - * is available to parse IPv4 and IPv6 strings. - */ -/*#define HAS_INETNTOP / **/ - -/* HAS_INETPTON: - * This symbol, if defined, indicates that the inet_pton() function - * is available to parse IPv4 and IPv6 strings. - */ -/*#define HAS_INETPTON / **/ - -/* HAS_INT64_T: - * This symbol will defined if the C compiler supports int64_t. - * Usually the needs to be included, but sometimes - * is enough. - */ -/*#define HAS_INT64_T / **/ - -/* HAS_ISFINITE: - * This symbol, if defined, indicates that the isfinite routine is - * available to check whether a double is finite (non-infinity non-NaN). - */ -/*#define HAS_ISFINITE / **/ - -/* HAS_ISINF: - * This symbol, if defined, indicates that the isinf routine is - * available to check whether a double is an infinity. - */ -/*#define HAS_ISINF / **/ - -/* HAS_ISNAN: - * This symbol, if defined, indicates that the isnan routine is - * available to check whether a double is a NaN. - */ -#define HAS_ISNAN /**/ - -/* HAS_ISNANL: - * This symbol, if defined, indicates that the isnanl routine is - * available to check whether a long double is a NaN. - */ -/*#define HAS_ISNANL / **/ - -/* HAS_LDBL_DIG: - * This symbol, if defined, indicates that this system's - * or defines the symbol LDBL_DIG, which is the number - * of significant digits in a long double precision number. Unlike - * for DBL_DIG, there's no good guess for LDBL_DIG if it is undefined. - */ -#define HAS_LDBL_DIG /**/ - -/* LIBM_LIB_VERSION: - * This symbol, if defined, indicates that libm exports _LIB_VERSION - * and that math.h defines the enum to manipulate it. - */ -/*#define LIBM_LIB_VERSION / **/ - -/* HAS_MADVISE: - * This symbol, if defined, indicates that the madvise system call is - * available to map a file into memory. - */ -/*#define HAS_MADVISE / **/ - -/* HAS_MALLOC_SIZE: - * This symbol, if defined, indicates that the malloc_size - * routine is available for use. - */ -/*#define HAS_MALLOC_SIZE / **/ - -/* HAS_MALLOC_GOOD_SIZE: - * This symbol, if defined, indicates that the malloc_good_size - * routine is available for use. - */ -/*#define HAS_MALLOC_GOOD_SIZE / **/ - -/* HAS_MKDTEMP: - * This symbol, if defined, indicates that the mkdtemp routine is - * available to exclusively create a uniquely named temporary directory. - */ -/*#define HAS_MKDTEMP / **/ - -/* HAS_MKSTEMPS: - * This symbol, if defined, indicates that the mkstemps routine is - * available to exclusively create and open a uniquely named - * (with a suffix) temporary file. - */ -/*#define HAS_MKSTEMPS / **/ - -/* HAS_MODFL: - * This symbol, if defined, indicates that the modfl routine is - * available to split a long double x into a fractional part f and - * an integer part i such that |f| < 1.0 and (f + i) = x. - */ -/* HAS_MODFL_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the modfl() function. Otherwise, it is up - * to the program to supply one. - */ -/* HAS_MODFL_POW32_BUG: - * This symbol, if defined, indicates that the modfl routine is - * broken for long doubles >= pow(2, 32). - * For example from 4294967303.150000 one would get 4294967302.000000 - * and 1.150000. The bug has been seen in certain versions of glibc, - * release 2.2.2 is known to be okay. - */ -/*#define HAS_MODFL / **/ -/*#define HAS_MODFL_PROTO / **/ -/*#define HAS_MODFL_POW32_BUG / **/ - -/* HAS_MPROTECT: - * This symbol, if defined, indicates that the mprotect system call is - * available to modify the access protection of a memory mapped file. - */ -/*#define HAS_MPROTECT / **/ - -/* HAS_STRUCT_MSGHDR: - * This symbol, if defined, indicates that the struct msghdr - * is supported. - */ -/*#define HAS_STRUCT_MSGHDR / **/ - -/* HAS_NL_LANGINFO: - * This symbol, if defined, indicates that the nl_langinfo routine is - * available to return local data. You will also need - * and therefore I_LANGINFO. - */ -/*#define HAS_NL_LANGINFO / **/ - -/* HAS_OFF64_T: - * This symbol will be defined if the C compiler supports off64_t. - */ -/*#define HAS_OFF64_T / **/ - -/* HAS_PRCTL: - * This symbol, if defined, indicates that the prctl routine is - * available to set process title. - */ -/* HAS_PRCTL_SET_NAME: - * This symbol, if defined, indicates that the prctl routine is - * available to set process title and supports PR_SET_NAME. - */ -/*#define HAS_PRCTL / **/ -/*#define HAS_PRCTL_SET_NAME / **/ - -/* HAS_PROCSELFEXE: - * This symbol is defined if PROCSELFEXE_PATH is a symlink - * to the absolute pathname of the executing program. - */ -/* PROCSELFEXE_PATH: - * If HAS_PROCSELFEXE is defined this symbol is the filename - * of the symbolic link pointing to the absolute pathname of - * the executing program. - */ -/*#define HAS_PROCSELFEXE / **/ -#if defined(HAS_PROCSELFEXE) && !defined(PROCSELFEXE_PATH) -#define PROCSELFEXE_PATH /**/ -#endif - -/* HAS_PTHREAD_ATTR_SETSCOPE: - * This symbol, if defined, indicates that the pthread_attr_setscope - * system call is available to set the contention scope attribute of - * a thread attribute object. - */ -/*#define HAS_PTHREAD_ATTR_SETSCOPE / **/ - -/* HAS_READV: - * This symbol, if defined, indicates that the readv routine is - * available to do gather reads. You will also need - * and there I_SYSUIO. - */ -/*#define HAS_READV / **/ - -/* HAS_RECVMSG: - * This symbol, if defined, indicates that the recvmsg routine is - * available to send structured socket messages. - */ -/*#define HAS_RECVMSG / **/ - -/* HAS_SBRK_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the sbrk() function. Otherwise, it is up - * to the program to supply one. Good guesses are - * extern void* sbrk(int); - * extern void* sbrk(size_t); - */ -/*#define HAS_SBRK_PROTO / **/ - -/* HAS_SCALBNL: - * This symbol, if defined, indicates that the scalbnl routine is - * available. If ilogbl is also present we can emulate frexpl. - */ -/*#define HAS_SCALBNL / **/ - -/* HAS_SENDMSG: - * This symbol, if defined, indicates that the sendmsg routine is - * available to send structured socket messages. - */ -/*#define HAS_SENDMSG / **/ - -/* HAS_SETITIMER: - * This symbol, if defined, indicates that the setitimer routine is - * available to set interval timers. - */ -/*#define HAS_SETITIMER / **/ - -/* HAS_SETPROCTITLE: - * This symbol, if defined, indicates that the setproctitle routine is - * available to set process title. - */ -/*#define HAS_SETPROCTITLE / **/ - -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO / **/ - -/* HAS_SIGNBIT: - * This symbol, if defined, indicates that the signbit routine is - * available to check if the given number has the sign bit set. - * This should include correct testing of -0.0. This will only be set - * if the signbit() routine is safe to use with the NV type used internally - * in perl. Users should call Perl_signbit(), which will be #defined to - * the system's signbit() function or macro if this symbol is defined. - */ -/*#define HAS_SIGNBIT / **/ - -/* HAS_SIGPROCMASK: - * This symbol, if defined, indicates that the sigprocmask - * system call is available to examine or change the signal mask - * of the calling process. - */ -/*#define HAS_SIGPROCMASK / **/ - -/* USE_SITECUSTOMIZE: - * This symbol, if defined, indicates that sitecustomize should - * be used. - */ -#ifndef USE_SITECUSTOMIZE -/*#define USE_SITECUSTOMIZE / **/ -#endif - -/* HAS_SNPRINTF: - * This symbol, if defined, indicates that the snprintf () library - * function is available for use. - */ -/* HAS_VSNPRINTF: - * This symbol, if defined, indicates that the vsnprintf () library - * function is available for use. - */ -#define HAS_SNPRINTF /**/ -#define HAS_VSNPRINTF /**/ - -/* HAS_SOCKATMARK: - * This symbol, if defined, indicates that the sockatmark routine is - * available to test whether a socket is at the out-of-band mark. - */ -/*#define HAS_SOCKATMARK / **/ - -/* HAS_SOCKATMARK_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the sockatmark() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern int sockatmark(int); - */ -/*#define HAS_SOCKATMARK_PROTO / **/ - -/* HAS_SOCKS5_INIT: - * This symbol, if defined, indicates that the socks5_init routine is - * available to initialize SOCKS 5. - */ -/*#define HAS_SOCKS5_INIT / **/ - -/* SPRINTF_RETURNS_STRLEN: - * This variable defines whether sprintf returns the length of the string - * (as per the ANSI spec). Some C libraries retain compatibility with - * pre-ANSI C and return a pointer to the passed in buffer; for these - * this variable will be undef. - */ -#define SPRINTF_RETURNS_STRLEN /**/ - -/* HAS_SQRTL: - * This symbol, if defined, indicates that the sqrtl routine is - * available to do long double square roots. - */ -/*#define HAS_SQRTL / **/ - -/* HAS_SETRESGID_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the setresgid() function. Otherwise, it is up - * to the program to supply one. Good guesses are - * extern int setresgid(uid_t ruid, uid_t euid, uid_t suid); - */ -/*#define HAS_SETRESGID_PROTO / **/ - -/* HAS_SETRESUID_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the setresuid() function. Otherwise, it is up - * to the program to supply one. Good guesses are - * extern int setresuid(uid_t ruid, uid_t euid, uid_t suid); - */ -/*#define HAS_SETRESUID_PROTO / **/ - -/* HAS_STRUCT_STATFS_F_FLAGS: - * This symbol, if defined, indicates that the struct statfs - * does have the f_flags member containing the mount flags of - * the filesystem containing the file. - * This kind of struct statfs is coming from (BSD 4.3), - * not from (SYSV). Older BSDs (like Ultrix) do not - * have statfs() and struct statfs, they have ustat() and getmnt() - * with struct ustat and struct fs_data. - */ -/*#define HAS_STRUCT_STATFS_F_FLAGS / **/ - -/* HAS_STRUCT_STATFS: - * This symbol, if defined, indicates that the struct statfs - * to do statfs() is supported. - */ -/*#define HAS_STRUCT_STATFS / **/ - -/* HAS_FSTATVFS: - * This symbol, if defined, indicates that the fstatvfs routine is - * available to stat filesystems by file descriptors. - */ -/*#define HAS_FSTATVFS / **/ - -/* HAS_STRFTIME: - * This symbol, if defined, indicates that the strftime routine is - * available to do time formatting. - */ -#define HAS_STRFTIME /**/ - -/* HAS_STRLCAT: - * This symbol, if defined, indicates that the strlcat () routine is - * available to do string concatenation. - */ -/*#define HAS_STRLCAT / **/ - -/* HAS_STRLCPY: - * This symbol, if defined, indicates that the strlcpy () routine is - * available to do string copying. - */ -/*#define HAS_STRLCPY / **/ - -/* HAS_STRTOLD: - * This symbol, if defined, indicates that the strtold routine is - * available to convert strings to long doubles. - */ -/*#define HAS_STRTOLD / **/ - -/* HAS_STRTOLL: - * This symbol, if defined, indicates that the strtoll routine is - * available to convert strings to long longs. - */ -/*#define HAS_STRTOLL / **/ - -/* HAS_STRTOQ: - * This symbol, if defined, indicates that the strtoq routine is - * available to convert strings to long longs (quads). - */ -/*#define HAS_STRTOQ / **/ - -/* HAS_STRTOULL: - * This symbol, if defined, indicates that the strtoull routine is - * available to convert strings to unsigned long longs. - */ -/*#define HAS_STRTOULL / **/ - -/* HAS_STRTOUQ: - * This symbol, if defined, indicates that the strtouq routine is - * available to convert strings to unsigned long longs (quads). - */ -/*#define HAS_STRTOUQ / **/ - -/* HAS_SYSCALL_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the syscall() function. Otherwise, it is up - * to the program to supply one. Good guesses are - * extern int syscall(int, ...); - * extern int syscall(long, ...); - */ -/*#define HAS_SYSCALL_PROTO / **/ - -/* HAS_TELLDIR_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the telldir() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern long telldir(DIR*); - */ -#define HAS_TELLDIR_PROTO /**/ - -/* HAS_CTIME64: - * This symbol, if defined, indicates that the ctime64 () routine is - * available to do the 64bit variant of ctime () - */ -/* HAS_LOCALTIME64: - * This symbol, if defined, indicates that the localtime64 () routine is - * available to do the 64bit variant of localtime () - */ -/* HAS_GMTIME64: - * This symbol, if defined, indicates that the gmtime64 () routine is - * available to do the 64bit variant of gmtime () - */ -/* HAS_MKTIME64: - * This symbol, if defined, indicates that the mktime64 () routine is - * available to do the 64bit variant of mktime () - */ -/* HAS_DIFFTIME64: - * This symbol, if defined, indicates that the difftime64 () routine is - * available to do the 64bit variant of difftime () - */ -/* HAS_ASCTIME64: - * This symbol, if defined, indicates that the asctime64 () routine is - * available to do the 64bit variant of asctime () - */ -/*#define HAS_CTIME64 / **/ -/*#define HAS_LOCALTIME64 / **/ -/*#define HAS_GMTIME64 / **/ -/*#define HAS_MKTIME64 / **/ -/*#define HAS_DIFFTIME64 / **/ -/*#define HAS_ASCTIME64 / **/ - -/* HAS_TIMEGM: - * This symbol, if defined, indicates that the timegm routine is - * available to do the opposite of gmtime () - */ -/*#define HAS_TIMEGM / **/ - -/* U32_ALIGNMENT_REQUIRED: - * This symbol, if defined, indicates that you must access - * character data through U32-aligned pointers. - */ -#ifndef U32_ALIGNMENT_REQUIRED -#define U32_ALIGNMENT_REQUIRED /**/ -#endif - -/* HAS_UALARM: - * This symbol, if defined, indicates that the ualarm routine is - * available to do alarms with microsecond granularity. - */ -/*#define HAS_UALARM / **/ - -/* HAS_UNORDERED: - * This symbol, if defined, indicates that the unordered routine is - * available to check whether two doubles are unordered - * (effectively: whether either of them is NaN) - */ -/*#define HAS_UNORDERED / **/ - -/* HAS_UNSETENV: - * This symbol, if defined, indicates that the unsetenv () routine is - * available for use. - */ -/*#define HAS_UNSETENV / **/ - -/* HAS_USLEEP_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the usleep() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern int usleep(useconds_t); - */ -/*#define HAS_USLEEP_PROTO / **/ - -/* HAS_USTAT: - * This symbol, if defined, indicates that the ustat system call is - * available to query file system statistics by dev_t. - */ -/*#define HAS_USTAT / **/ - -/* HAS_WRITEV: - * This symbol, if defined, indicates that the writev routine is - * available to do scatter writes. - */ -/*#define HAS_WRITEV / **/ - -/* USE_DYNAMIC_LOADING: - * This symbol, if defined, indicates that dynamic loading of - * some sort is available. - */ -#define USE_DYNAMIC_LOADING /**/ - -/* FFLUSH_NULL: - * This symbol, if defined, tells that fflush(NULL) does flush - * all pending stdio output. - */ -/* FFLUSH_ALL: - * This symbol, if defined, tells that to flush - * all pending stdio output one must loop through all - * the stdio file handles stored in an array and fflush them. - * Note that if fflushNULL is defined, fflushall will not - * even be probed for and will be left undefined. - */ -#define FFLUSH_NULL /**/ -/*#define FFLUSH_ALL / **/ - -/* I_ASSERT: - * This symbol, if defined, indicates that exists and - * could be included by the C program to get the assert() macro. - */ -#define I_ASSERT /**/ - -/* I_CRYPT: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_CRYPT / **/ - -/* DB_Prefix_t: - * This symbol contains the type of the prefix structure element - * in the header file. In older versions of DB, it was - * int, while in newer ones it is u_int32_t. - */ -/* DB_Hash_t: - * This symbol contains the type of the prefix structure element - * in the header file. In older versions of DB, it was - * int, while in newer ones it is size_t. - */ -/* DB_VERSION_MAJOR_CFG: - * This symbol, if defined, defines the major version number of - * Berkeley DB found in the header when Perl was configured. - */ -/* DB_VERSION_MINOR_CFG: - * This symbol, if defined, defines the minor version number of - * Berkeley DB found in the header when Perl was configured. - * For DB version 1 this is always 0. - */ -/* DB_VERSION_PATCH_CFG: - * This symbol, if defined, defines the patch version number of - * Berkeley DB found in the header when Perl was configured. - * For DB version 1 this is always 0. - */ -#define DB_Hash_t int /**/ -#define DB_Prefix_t int /**/ -#define DB_VERSION_MAJOR_CFG 0 /**/ -#define DB_VERSION_MINOR_CFG 0 /**/ -#define DB_VERSION_PATCH_CFG 0 /**/ - -/* I_FP: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_FP / **/ - -/* I_FP_CLASS: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_FP_CLASS / **/ - -/* I_IEEEFP: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_IEEEFP / **/ - -/* I_INTTYPES: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_INTTYPES / **/ - -/* I_LANGINFO: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_LANGINFO / **/ - -/* I_LIBUTIL: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_LIBUTIL / **/ - -/* I_MALLOCMALLOC: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_MALLOCMALLOC / **/ - -/* I_MNTENT: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_MNTENT / **/ - -/* I_NETINET_TCP: - * This symbol, if defined, indicates to the C program that it should - * include . - */ -/*#define I_NETINET_TCP / **/ - -/* I_POLL: - * This symbol, if defined, indicates that exists and - * should be included. (see also HAS_POLL) - */ -/*#define I_POLL / **/ - -/* I_PROT: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_PROT / **/ - -/* I_SHADOW: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_SHADOW / **/ - -/* I_SOCKS: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_SOCKS / **/ - -/* I_SUNMATH: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_SUNMATH / **/ - -/* I_SYSLOG: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_SYSLOG / **/ - -/* I_SYSMODE: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_SYSMODE / **/ - -/* I_SYS_MOUNT: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_SYS_MOUNT / **/ - -/* I_SYS_STATFS: - * This symbol, if defined, indicates that exists. - */ -/*#define I_SYS_STATFS / **/ - -/* I_SYS_STATVFS: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_SYS_STATVFS / **/ - -/* I_SYSUTSNAME: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_SYSUTSNAME / **/ - -/* I_SYS_VFS: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_SYS_VFS / **/ - -/* I_USTAT: - * This symbol, if defined, indicates that exists and - * should be included. - */ -/*#define I_USTAT / **/ - -/* PERL_PRIfldbl: - * This symbol, if defined, contains the string used by stdio to - * format long doubles (format 'f') for output. - */ -/* PERL_PRIgldbl: - * This symbol, if defined, contains the string used by stdio to - * format long doubles (format 'g') for output. - */ -/* PERL_PRIeldbl: - * This symbol, if defined, contains the string used by stdio to - * format long doubles (format 'e') for output. - */ -/* PERL_SCNfldbl: - * This symbol, if defined, contains the string used by stdio to - * format long doubles (format 'f') for input. - */ -/*#define PERL_PRIfldbl "Lf" / **/ -/*#define PERL_PRIgldbl "Lg" / **/ -/*#define PERL_PRIeldbl "Le" / **/ -/*#define PERL_SCNfldbl "Lf" / **/ - -/* PERL_MAD: - * This symbol, if defined, indicates that the Misc Attribution - * Declaration code should be conditionally compiled. - */ -/*#define PERL_MAD / **/ - -/* NEED_VA_COPY: - * This symbol, if defined, indicates that the system stores - * the variable argument list datatype, va_list, in a format - * that cannot be copied by simple assignment, so that some - * other means must be used when copying is required. - * As such systems vary in their provision (or non-provision) - * of copying mechanisms, handy.h defines a platform- - * independent macro, Perl_va_copy(src, dst), to do the job. - */ -/*#define NEED_VA_COPY / **/ - -/* IVTYPE: - * This symbol defines the C type used for Perl's IV. - */ -/* UVTYPE: - * This symbol defines the C type used for Perl's UV. - */ -/* I8TYPE: - * This symbol defines the C type used for Perl's I8. - */ -/* U8TYPE: - * This symbol defines the C type used for Perl's U8. - */ -/* I16TYPE: - * This symbol defines the C type used for Perl's I16. - */ -/* U16TYPE: - * This symbol defines the C type used for Perl's U16. - */ -/* I32TYPE: - * This symbol defines the C type used for Perl's I32. - */ -/* U32TYPE: - * This symbol defines the C type used for Perl's U32. - */ -/* I64TYPE: - * This symbol defines the C type used for Perl's I64. - */ -/* U64TYPE: - * This symbol defines the C type used for Perl's U64. - */ -/* NVTYPE: - * This symbol defines the C type used for Perl's NV. - */ -/* IVSIZE: - * This symbol contains the sizeof(IV). - */ -/* UVSIZE: - * This symbol contains the sizeof(UV). - */ -/* I8SIZE: - * This symbol contains the sizeof(I8). - */ -/* U8SIZE: - * This symbol contains the sizeof(U8). - */ -/* I16SIZE: - * This symbol contains the sizeof(I16). - */ -/* U16SIZE: - * This symbol contains the sizeof(U16). - */ -/* I32SIZE: - * This symbol contains the sizeof(I32). - */ -/* U32SIZE: - * This symbol contains the sizeof(U32). - */ -/* I64SIZE: - * This symbol contains the sizeof(I64). - */ -/* U64SIZE: - * This symbol contains the sizeof(U64). - */ -/* NVSIZE: - * This symbol contains the sizeof(NV). - */ -/* NV_PRESERVES_UV: - * This symbol, if defined, indicates that a variable of type NVTYPE - * can preserve all the bits of a variable of type UVTYPE. - */ -/* NV_PRESERVES_UV_BITS: - * This symbol contains the number of bits a variable of type NVTYPE - * can preserve of a variable of type UVTYPE. - */ -/* NV_OVERFLOWS_INTEGERS_AT: - * This symbol gives the largest integer value that NVs can hold. This - * value + 1.0 cannot be stored accurately. It is expressed as constant - * floating point expression to reduce the chance of decimal/binary - * conversion issues. If it can not be determined, the value 0 is given. - */ -/* NV_ZERO_IS_ALLBITS_ZERO: - * This symbol, if defined, indicates that a variable of type NVTYPE - * stores 0.0 in memory as all bits zero. - */ -#define IVTYPE long /**/ -#define UVTYPE unsigned long /**/ -#define I8TYPE char /**/ -#define U8TYPE unsigned char /**/ -#define I16TYPE short /**/ -#define U16TYPE unsigned short /**/ -#define I32TYPE long /**/ -#define U32TYPE unsigned long /**/ -#ifdef HAS_QUAD -#define I64TYPE __int64 /**/ -#define U64TYPE unsigned __int64 /**/ -#endif -#define NVTYPE double /**/ -#define IVSIZE 4 /**/ -#define UVSIZE 4 /**/ -#define I8SIZE 1 /**/ -#define U8SIZE 1 /**/ -#define I16SIZE 2 /**/ -#define U16SIZE 2 /**/ -#define I32SIZE 4 /**/ -#define U32SIZE 4 /**/ -#ifdef HAS_QUAD -#define I64SIZE 8 /**/ -#define U64SIZE 8 /**/ -#endif -#define NVSIZE 8 /**/ -#define NV_PRESERVES_UV -#define NV_PRESERVES_UV_BITS 32 -#define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0 -#define NV_ZERO_IS_ALLBITS_ZERO -#if UVSIZE == 8 -# ifdef BYTEORDER -# if BYTEORDER == 0x1234 -# undef BYTEORDER -# define BYTEORDER 0x12345678 -# else -# if BYTEORDER == 0x4321 -# undef BYTEORDER -# define BYTEORDER 0x87654321 -# endif -# endif -# endif -#endif - -/* IVdf: - * This symbol defines the format string used for printing a Perl IV - * as a signed decimal integer. - */ -/* UVuf: - * This symbol defines the format string used for printing a Perl UV - * as an unsigned decimal integer. - */ -/* UVof: - * This symbol defines the format string used for printing a Perl UV - * as an unsigned octal integer. - */ -/* UVxf: - * This symbol defines the format string used for printing a Perl UV - * as an unsigned hexadecimal integer in lowercase abcdef. - */ -/* UVXf: - * This symbol defines the format string used for printing a Perl UV - * as an unsigned hexadecimal integer in uppercase ABCDEF. - */ -/* NVef: - * This symbol defines the format string used for printing a Perl NV - * using %e-ish floating point format. - */ -/* NVff: - * This symbol defines the format string used for printing a Perl NV - * using %f-ish floating point format. - */ -/* NVgf: - * This symbol defines the format string used for printing a Perl NV - * using %g-ish floating point format. - */ -#define IVdf "ld" /**/ -#define UVuf "lu" /**/ -#define UVof "lo" /**/ -#define UVxf "lx" /**/ -#define UVXf "lX" /**/ -#define NVef "e" /**/ -#define NVff "f" /**/ -#define NVgf "g" /**/ - -/* SELECT_MIN_BITS: - * This symbol holds the minimum number of bits operated by select. - * That is, if you do select(n, ...), how many bits at least will be - * cleared in the masks if some activity is detected. Usually this - * is either n or 32*ceil(n/32), especially many little-endians do - * the latter. This is only useful if you have select(), naturally. - */ -#define SELECT_MIN_BITS 32 /**/ - -/* ST_INO_SIZE: - * This variable contains the size of struct stat's st_ino in bytes. - */ -/* ST_INO_SIGN: - * This symbol holds the signedess of struct stat's st_ino. - * 1 for unsigned, -1 for signed. - */ -#define ST_INO_SIGN 1 /* st_ino sign */ -#define ST_INO_SIZE 4 /* st_ino size */ - -/* STARTPERL: - * This variable contains the string to put in front of a perl - * script to make sure (one hopes) that it runs with perl and not - * some shell. - */ -#define STARTPERL "#!perl" /**/ - -/* HAS_STDIO_STREAM_ARRAY: - * This symbol, if defined, tells that there is an array - * holding the stdio streams. - */ -/* STDIO_STREAM_ARRAY: - * This symbol tells the name of the array holding the stdio streams. - * Usual values include _iob, __iob, and __sF. - */ -/*#define HAS_STDIO_STREAM_ARRAY / **/ -#ifdef HAS_STDIO_STREAM_ARRAY -#define STDIO_STREAM_ARRAY -#endif - -/* GMTIME_MAX: - * This symbol contains the maximum value for the time_t offset that - * the system function gmtime () accepts, and defaults to 0 - */ -/* GMTIME_MIN: - * This symbol contains the minimum value for the time_t offset that - * the system function gmtime () accepts, and defaults to 0 - */ -/* LOCALTIME_MAX: - * This symbol contains the maximum value for the time_t offset that - * the system function localtime () accepts, and defaults to 0 - */ -/* LOCALTIME_MIN: - * This symbol contains the minimum value for the time_t offset that - * the system function localtime () accepts, and defaults to 0 - */ -#define GMTIME_MAX 2147483647 /**/ -#define GMTIME_MIN 0 /**/ -#define LOCALTIME_MAX 2147483647 /**/ -#define LOCALTIME_MIN 0 /**/ - -/* USE_64_BIT_INT: - * This symbol, if defined, indicates that 64-bit integers should - * be used when available. If not defined, the native integers - * will be employed (be they 32 or 64 bits). The minimal possible - * 64-bitness is used, just enough to get 64-bit integers into Perl. - * This may mean using for example "long longs", while your memory - * may still be limited to 2 gigabytes. - */ -/* USE_64_BIT_ALL: - * This symbol, if defined, indicates that 64-bit integers should - * be used when available. If not defined, the native integers - * will be used (be they 32 or 64 bits). The maximal possible - * 64-bitness is employed: LP64 or ILP64, meaning that you will - * be able to use more than 2 gigabytes of memory. This mode is - * even more binary incompatible than USE_64_BIT_INT. You may not - * be able to run the resulting executable in a 32-bit CPU at all or - * you may need at least to reboot your OS to 64-bit mode. - */ -#ifndef USE_64_BIT_INT -/*#define USE_64_BIT_INT / **/ -#endif -#ifndef USE_64_BIT_ALL -/*#define USE_64_BIT_ALL / **/ -#endif - -/* USE_DTRACE: - * This symbol, if defined, indicates that Perl should - * be built with support for DTrace. - */ -/*#define USE_DTRACE / **/ - -/* USE_FAST_STDIO: - * This symbol, if defined, indicates that Perl should - * be built to use 'fast stdio'. - * Defaults to define in Perls 5.8 and earlier, to undef later. - */ -#ifndef USE_FAST_STDIO -/*#define USE_FAST_STDIO / **/ -#endif - -/* USE_LARGE_FILES: - * This symbol, if defined, indicates that large file support - * should be used when available. - */ -#ifndef USE_LARGE_FILES -/*#define USE_LARGE_FILES / **/ -#endif - -/* USE_LONG_DOUBLE: - * This symbol, if defined, indicates that long doubles should - * be used when available. - */ -#ifndef USE_LONG_DOUBLE -/*#define USE_LONG_DOUBLE / **/ -#endif - -/* USE_MORE_BITS: - * This symbol, if defined, indicates that 64-bit interfaces and - * long doubles should be used when available. - */ -#ifndef USE_MORE_BITS -/*#define USE_MORE_BITS / **/ -#endif - -/* MULTIPLICITY: - * This symbol, if defined, indicates that Perl should - * be built to use multiplicity. - */ -#ifndef MULTIPLICITY -/*#define MULTIPLICITY / **/ -#endif - -/* USE_PERLIO: - * This symbol, if defined, indicates that the PerlIO abstraction should - * be used throughout. If not defined, stdio should be - * used in a fully backward compatible manner. - */ -#ifndef USE_PERLIO -/*#define USE_PERLIO / **/ -#endif - -/* USE_SOCKS: - * This symbol, if defined, indicates that Perl should - * be built to use socks. - */ -#ifndef USE_SOCKS -/*#define USE_SOCKS / **/ -#endif - -/* HAS_DRAND48_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the drand48() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern double drand48(void); - */ -/*#define HAS_DRAND48_PROTO / **/ - -/* HAS_GETHOST_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for gethostent(), gethostbyname(), and - * gethostbyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -#define HAS_GETHOST_PROTOS /**/ - -/* HAS_GETNET_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for getnetent(), getnetbyname(), and - * getnetbyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -/*#define HAS_GETNET_PROTOS / **/ - -/* HAS_GETPROTO_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for getprotoent(), getprotobyname(), and - * getprotobyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -#define HAS_GETPROTO_PROTOS /**/ - -/* HAS_GETSERV_PROTOS: - * This symbol, if defined, indicates that includes - * prototypes for getservent(), getservbyname(), and - * getservbyaddr(). Otherwise, it is up to the program to guess - * them. See netdbtype.U for probing for various Netdb_xxx_t types. - */ -#define HAS_GETSERV_PROTOS /**/ - -/* HAS_LSEEK_PROTO: - * This symbol, if defined, indicates that the system provides - * a prototype for the lseek() function. Otherwise, it is up - * to the program to supply one. A good guess is - * extern off_t lseek(int, off_t, int); - */ -#define HAS_LSEEK_PROTO /**/ - -/* Netdb_host_t: - * This symbol holds the type used for the 1st argument - * to gethostbyaddr(). - */ -/* Netdb_hlen_t: - * This symbol holds the type used for the 2nd argument - * to gethostbyaddr(). - */ -/* Netdb_name_t: - * This symbol holds the type used for the argument to - * gethostbyname(). - */ -/* Netdb_net_t: - * This symbol holds the type used for the 1st argument to - * getnetbyaddr(). - */ -#define Netdb_host_t char * /**/ -#define Netdb_hlen_t int /**/ -#define Netdb_name_t char * /**/ -#define Netdb_net_t long /**/ - -/* Select_fd_set_t: - * This symbol holds the type used for the 2nd, 3rd, and 4th - * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET - * is defined, and 'int *' otherwise. This is only useful if you - * have select(), of course. - */ -#define Select_fd_set_t Perl_fd_set * /**/ - -/* Sock_size_t: - * This symbol holds the type used for the size argument of - * various socket calls (just the base type, not the pointer-to). - */ -#define Sock_size_t int /**/ - -/* HAS_TIME: - * This symbol, if defined, indicates that the time() routine exists. - */ -/* Time_t: - * This symbol holds the type returned by time(). It can be long, - * or time_t on BSD sites (in which case should be - * included). - */ -#define HAS_TIME /**/ -#define Time_t time_t /* Time type */ - -/* HAS_TIMES: - * This symbol, if defined, indicates that the times() routine exists. - * Note that this became obsolete on some systems (SUNOS), which now - * use getrusage(). It may be necessary to include . - */ -#define HAS_TIMES /**/ - -/* Fpos_t: - * This symbol holds the type used to declare file positions in libc. - * It can be fpos_t, long, uint, etc... It may be necessary to include - * to get any typedef'ed information. - */ -#define Fpos_t fpos_t /* File position type */ - -/* Gid_t_f: - * This symbol defines the format string used for printing a Gid_t. - */ -#define Gid_t_f "d" /**/ - -/* Gid_t_sign: - * This symbol holds the signedess of a Gid_t. - * 1 for unsigned, -1 for signed. - */ -#define Gid_t_sign -1 /* GID sign */ - -/* Gid_t_size: - * This symbol holds the size of a Gid_t in bytes. - */ -#define Gid_t_size 4 /* GID size */ - -/* Gid_t: - * This symbol holds the return type of getgid() and the type of - * argument to setrgid() and related functions. Typically, - * it is the type of group ids in the kernel. It can be int, ushort, - * gid_t, etc... It may be necessary to include to get - * any typedef'ed information. - */ -#define Gid_t gid_t /* Type for getgid(), etc... */ - -/* Off_t: - * This symbol holds the type used to declare offsets in the kernel. - * It can be int, long, off_t, etc... It may be necessary to include - * to get any typedef'ed information. - */ -/* LSEEKSIZE: - * This symbol holds the number of bytes used by the Off_t. - */ -/* Off_t_size: - * This symbol holds the number of bytes used by the Off_t. - */ -#define Off_t long /* type */ -#define LSEEKSIZE 4 /* size */ -#define Off_t_size 4 /* size */ - -/* Mode_t: - * This symbol holds the type used to declare file modes - * for systems calls. It is usually mode_t, but may be - * int or unsigned short. It may be necessary to include - * to get any typedef'ed information. - */ -#define Mode_t mode_t /* file mode parameter for system calls */ - -/* Pid_t: - * This symbol holds the type used to declare process ids in the kernel. - * It can be int, uint, pid_t, etc... It may be necessary to include - * to get any typedef'ed information. - */ -#define Pid_t int /* PID type */ - -/* Size_t_size: - * This symbol holds the size of a Size_t in bytes. - */ -#define Size_t_size 4 /**/ - -/* Size_t: - * This symbol holds the type used to declare length parameters - * for string functions. It is usually size_t, but may be - * unsigned long, int, etc. It may be necessary to include - * to get any typedef'ed information. - */ -#define Size_t size_t /* length parameter for string functions */ - -/* Uid_t_f: - * This symbol defines the format string used for printing a Uid_t. - */ -#define Uid_t_f "d" /**/ - -/* Uid_t_sign: - * This symbol holds the signedess of a Uid_t. - * 1 for unsigned, -1 for signed. - */ -#define Uid_t_sign -1 /* UID sign */ - -/* Uid_t_size: - * This symbol holds the size of a Uid_t in bytes. - */ -#define Uid_t_size 4 /* UID size */ - -/* Uid_t: - * This symbol holds the type used to declare user ids in the kernel. - * It can be int, ushort, uid_t, etc... It may be necessary to include - * to get any typedef'ed information. - */ -#define Uid_t uid_t /* UID type */ - -#endif diff --git a/win32/config_sh.PL b/win32/config_sh.PL index 2c319b5e7e5..9b260277d13 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -90,15 +90,11 @@ else { } if (exists $opt{cc}) { - # cl and bcc32 version detection borrowed from Test::Smoke's configsmoke.pl + # cl version detection borrowed from Test::Smoke's configsmoke.pl if ($opt{cc} eq 'cl') { my $output = `cl --version 2>&1`; $opt{ccversion} = $output =~ /^.*Version\s+([\d.]+)/ ? $1 : '?'; } - elsif ($opt{cc} eq 'bcc32') { - my $output = `bcc32 --version 2>&1`; - $opt{ccversion} = $output =~ /([\d.]+)/ ? $1 : '?'; - } elsif ($opt{cc} =~ /\bgcc\b/) { chomp($opt{gccversion} = `$opt{cc} -dumpversion`); } @@ -120,9 +116,8 @@ unless (defined $ENV{SYSTEMROOT}) { # SystemRoot has been introduced by WinNT # change the lseeksize and lseektype from their canned default values (which # are set-up for a non-uselargefiles build) if we are building with -# uselargefiles. don't do this for bcc32: the code contains special handling -# for bcc32 and the lseeksize and lseektype should not be changed. -if ($opt{uselargefiles} eq 'define' and $opt{cc} ne 'bcc32') { +# uselargefiles. +if ($opt{uselargefiles} eq 'define') { $opt{lseeksize} = 8; if ($opt{cc} eq 'cl') { $opt{lseektype} = '__int64'; diff --git a/win32/fcrypt.c b/win32/fcrypt.c index ff132d338d8..4c9f2733f60 100644 --- a/win32/fcrypt.c +++ b/win32/fcrypt.c @@ -9,10 +9,6 @@ * eay@psych.psy.uq.oz.au */ -#if defined(__BORLANDC__) -#pragma warn -8004 /* "'foo' is assigned a value that is never used" */ -#endif - typedef unsigned char des_cblock[8]; typedef struct des_ks_struct diff --git a/win32/genmk95.pl b/win32/genmk95.pl deleted file mode 100644 index cf31457ab10..00000000000 --- a/win32/genmk95.pl +++ /dev/null @@ -1,87 +0,0 @@ -# genmk95.pl - uses miniperl to generate a makefile that command.com will -# understand given one that cmd.exe will understand - -# Author: Benjamin K. Stuhl -# Date: 10-16-1999 - -# how it works: -# dmake supports an alternative form for its recipes, called "group -# recipes", in which all elements of a recipe are run with only one shell. -# This program converts the standard dmake makefile.mk to one using group -# recipes. This is done so that lines using && or || (which command.com -# doesn't understand) may be split into two lines that will still be run -# with one shell. - -my ($filein, $fileout) = @ARGV; - -open my $in, $filein or die "Error opening input file: $!\n"; -open my $out, "> $fileout" or die "Error opening output file: $!\n"; - -print $out <<_EOH_; -# *** Warning: this file is autogenerated from $filein by $0 *** -# *** Do not edit this file - edit $filein instead *** - -_HOME_DIR := \$(PWD) - -_EOH_ - -my $inrec = 0; - -while (<$in>) -{ - chomp; - if (/^[^#.\t][^#=]*?:(?:[^=]|$)/) - { - if (! $inrec) - { - print $out "$_\n"; - while (/\\\s*$/) - { - chomp($_ = <$in>); - print $out "$_\n"; - } - print $out "@[\n"; - $inrec = 1; - next; - } - else { - if (!/^\t/) { - seek ($out, -4, 2); # no recipe, so back up and undo grouping - # should be -3, but MS has its CR/LF thing... - $inrec = 0; - } - print $out "$_\n"; - next; - } - } - if ((/^\s*$/ || /^[^#.\t][^#=]*?:/) && $inrec) - { - print $out "]\n"; - print $out "$_\n"; - $inrec = 0; - next; - } - if (/^(.*?)(&&|\|\|)(.*)$/) # two commands separated by && or || - { - my ($one, $sep, $two) = ($1, $2, $3); - $one =~ s/^\t(?:-(?!-))?\@?(.*?)$/\t$1/; # no -,@ in group recipes -LINE_CONT: - if ($two =~ /\\\s*$/) - { - chomp ($two .= "\n" . scalar <$in>); - goto LINE_CONT; - } - s/^\s*// for ($one, $two); - print $out "\t$one\n\t$two\n" if ($sep eq "&&"); - print $out "\t$one\n\tif errorlevel 1 $two\n" if ($sep eq "||"); - print $out "\tcd \$(_HOME_DIR)\n"; - next; - } - # fall through - no need for special handling - s/^\t(?:-(?!-))?\@?(.*?)$/\t$1/; # no -,@ in group recipes - print $out "$_\n"; -} -print $out "]\n" if ($inrec); - -close $in or warn "Error closing \$in: $!\n"; -close $out or warn "Error closing \$out: $!\n"; diff --git a/win32/makefile.mk b/win32/makefile.mk index 945ca9edefd..77e98d5afce 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -2,7 +2,6 @@ # Makefile to build perl on Windows using DMAKE. # Supported compilers: # Microsoft Visual C++ 6.0 or later -# Borland C++ 5.02 or later # MinGW with gcc-3.2 or later # Windows SDK 64-bit compiler and tools # @@ -39,7 +38,7 @@ INST_TOP *= $(INST_DRV)\perl # versioned installation can be obtained by setting INST_TOP above to a # path that includes an arbitrary version string. # -#INST_VER *= \5.15.2 +#INST_VER *= \5.15.3 # # Comment this out if you DON'T want your perl installation to have @@ -117,23 +116,9 @@ USE_LARGE_FILES *= define #CCTYPE = MSVC100FREE # Visual C++ 2010 (aka Visual C++ 10.x) (full version) #CCTYPE = MSVC100 -# Borland 5.02 or later -#CCTYPE *= BORLAND # MinGW or mingw-w64 with gcc-3.2 or later CCTYPE *= GCC -# -# uncomment this if your Borland compiler is older than v5.4. -#BCCOLD *= define -# -# uncomment this if you want to use Borland's VCL as your CRT -#BCCVCL *= define - -# -# uncomment this if you are compiling under Windows 95/98 and command.com -# (not needed if you're running under 4DOS/NT 6.01 or later) -#IS_WIN95 *= define - # # uncomment next line if you want debug version of perl (big,slow) # If not enabled, we automatically try to use maximum optimization @@ -191,9 +176,7 @@ CCTYPE *= GCC # so you may have to set CCHOME explicitly (spaces in the path name should # not be quoted) # -.IF "$(CCTYPE)" == "BORLAND" -CCHOME *= C:\Borland\BCC55 -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" CCHOME *= C:\MinGW .ELSE CCHOME *= $(MSVCDIR) @@ -400,65 +383,7 @@ INST_HTML = $(INST_TOP)$(INST_VER)\html .USESHELL : -.IF "$(CCTYPE)" == "BORLAND" - -CC = bcc32 -.IF "$(BCCOLD)" != "define" -LINK32 = ilink32 -.ELSE -LINK32 = tlink32 -.ENDIF -LIB32 = tlib /a /P128 -IMPLIB = implib -c -RSC = brcc32 - -# -# Options -# -INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)" -#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch -DEFINES = -DWIN32 -LOCDEFS = -DPERLDLL -DPERL_CORE -SUBSYS = console -CXX_FLAG = -P - -LIBC = cw32mti.lib - -# same libs as MSVC, except Borland doesn't have oldnames.lib -LIBFILES = \ - kernel32.lib user32.lib gdi32.lib winspool.lib \ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ - netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \ - version.lib odbc32.lib odbccp32.lib comctl32.lib \ - import32.lib $(LIBC) - -.IF "$(CFG)" == "Debug" -OPTIMIZE = -v -D_RTLDLL -DDEBUGGING -LINK_DBG = -v -.ELSE -OPTIMIZE = -O2 -D_RTLDLL -LINK_DBG = -.ENDIF - -EXTRACFLAGS = -CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \ - $(PCHFLAGS) $(OPTIMIZE) -LINK_FLAGS = $(LINK_DBG) -x -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" \ - -L"$(CCLIBDIR)\PSDK" -OBJOUT_FLAG = -o -EXEOUT_FLAG = -e -LIBOUT_FLAG = -.IF "$(BCCOLD)" != "define" -LINK_FLAGS += -Gn -DEFINES += -D_MT -D__USELOCALES__ -D_WIN32_WINNT=0x0410 -.END -.IF "$(BCCVCL)" == "define" -LIBC = cp32mti.lib vcl.lib vcl50.lib vclx50.lib vcle50.lib -LINK_FLAGS += -L"$(CCLIBDIR)\Release" -.END - - -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" .IF "$(GCCCROSS)" == "define" ARCHPREFIX = x86_64-w64-mingw32- @@ -670,10 +595,7 @@ LKPOST = ) $(NOOP) $(o).dll: -.IF "$(CCTYPE)" == "BORLAND" - $(LINK32) -Tpd -ap $(BLINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def - $(IMPLIB) $(*B).lib $@ -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES) $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@ .ELSE @@ -729,7 +651,6 @@ PERLDEP = perldll.def PL2BAT = bin\pl2bat.pl -GLOBBAT = bin\perlglob.bat UTILS = \ ..\utils\h2ph \ @@ -768,12 +689,7 @@ UTILS = \ bin\perlglob.pl \ bin\search.pl -.IF "$(CCTYPE)" == "BORLAND" - -CFGSH_TMPL = config.bc -CFGH_TMPL = config_H.bc - -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" .IF "$(WIN64)" == "define" .IF "$(GCCCROSS)" == "define" @@ -993,37 +909,14 @@ CFG_VARS = \ LINK_FLAGS=$(LINK_FLAGS) ~ \ optimize=$(OPTIMIZE) -# -# set up targets varying between Win95 and WinNT builds -# - -.IF "$(IS_WIN95)" == "define" -MK2 = .\makefile.95 -RIGHTMAKE = __switch_makefiles -.ELSE -MK2 = __not_needed -RIGHTMAKE = -.ENDIF - -.IMPORT .IGNORE : SystemRoot windir - -# Don't just .IMPORT OS from the environment because dmake sets OS itself. -ENV_OS=$(subst,OS=, $(shell @set OS)) - -.IF "$(ENV_OS)" == "Windows_NT" -ODBCCP32_DLL = $(SystemRoot)\system32\odbccp32.dll -.ELSE -ODBCCP32_DLL = $(windir)\system\odbccp32.dll -.ENDIF - ICWD = -I..\dist\Cwd -I..\dist\Cwd\lib # # Top targets # -all : CHECKDMAKE .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) $(MK2) \ - $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) MakePPPort \ +all : CHECKDMAKE .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \ + $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) MakePPPort \ $(PERLEXE) $(X2P) Extensions Extensions_nonxs $(PERLSTATIC) regnodes : ..\regnodes.h @@ -1032,60 +925,14 @@ regnodes : ..\regnodes.h ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h -reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) $(MK2) \ - $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \ +reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \ + $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \ $(X2P) Extensions_reonly static: $(PERLEXESTATIC) #---------------------------------------------------------------- -#-------------------- BEGIN Win95 SPECIFIC ---------------------- - -# this target is a jump-off point for Win95 -# 1. it switches to the Win95-specific makefile if it exists -# (__do_switch_makefiles) -# 2. it prints a message when the Win95-specific one finishes (__done) -# 3. it then kills this makefile by trying to make __no_such_target - -__switch_makefiles: __do_switch_makefiles __done __no_such_target - -__do_switch_makefiles: -.IF "$(NOTFIRST)" != "true" - if exist $(MK2) $(MAKE:s/-S//) -f $(MK2) $(MAKETARGETS) NOTFIRST=true -.ELSE - $(NOOP) -.ENDIF - -.IF "$(NOTFIRST)" != "true" -__done: - @echo Build process complete. Ignore any errors after this message. - @echo Run "dmake test" to test and "dmake install" to install - -.ELSE -# dummy targets for Win95-specific makefile - -__done: - $(NOOP) - -__no_such_target: - $(NOOP) - -.ENDIF - -# This target is used to generate the new makefile (.\makefile.95) for Win95 - -.\makefile.95: .\makefile.mk - $(MINIPERL) genmk95.pl makefile.mk $(MK2) - -#--------------------- END Win95 SPECIFIC --------------------- - -# a blank target for when builds don't need to do certain things -# this target added for Win95 port but used to keep the WinNT port able to -# use this file -__not_needed: - $(NOOP) - CHECKDMAKE : .IF "$(NEWDMAKE)" == "define" $(NOOP) @@ -1096,11 +943,7 @@ CHECKDMAKE : .ENDIF $(GLOBEXE) : perlglob$(o) -.IF "$(CCTYPE)" == "BORLAND" - $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c - $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \ - "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib, -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES) .ELSE $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ @@ -1129,12 +972,13 @@ config.w32 : $(CFGSH_TMPL) # this target is for when changes to the main config.sh happen. # edit config.gc, then make perl using GCC in a minimal configuration (i.e. -# with MULTI, ITHREADS, IMP_SYS, LARGE_FILES, PERLIO and CRYPT off), then make +# with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make # this target to regenerate config_H.gc. # unfortunately, some further manual editing is also then required to restore all # the special _MSC_VER handling that is otherwise lost. -# repeat for config.bc and config_H.bc (using BORLAND), except that there is no -# _MSC_VER stuff in that case. +# repeat for config.gc64 and config_H.gc64, and again for config.gc64nox and +# config_H.gc64nox, if you have suitable build environments, otherwise hand-edit +# them to maintain the same differences with config.gc and config_H.gc as before. regen_config_h: $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \ $(CFGSH_TMPL) > ..\config.sh @@ -1157,12 +1001,7 @@ $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl $(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) -.IF "$(CCTYPE)" == "BORLAND" - if not exist $(CCLIBDIR)\PSDK\odbccp32.lib \ - cd $(CCLIBDIR)\PSDK && implib odbccp32.lib $(ODBCCP32_DLL) - $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ - @$(mktmp c0x32$(o) $(MINI_OBJ),$@,,$(LIBFILES),) -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \ $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST)) .ELSE @@ -1211,12 +1050,7 @@ perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibs $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static -.IF "$(CCTYPE)" == "BORLAND" - $(LINK32) -Tpd -ap $(BLINK_FLAGS) \ - @$(mktmp c0d32$(o) $(PERLDLL_OBJ),$@,, \ - $(shell @type Extensions_static) $(LIBFILES),perldll.def) - $(IMPLIB) $*.lib $@ -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \ $(mktmp $(LKPRE) $(PERLDLL_OBJ) \ $(shell @type Extensions_static) \ @@ -1240,11 +1074,7 @@ $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static $(XCOPY) $(PERLIMPLIB) $(COREDIR) $(PERLSTATICLIB): Extensions_static -.IF "$(CCTYPE)" == "BORLAND" - $(LIB32) $(LIB_FLAGS) $@ \ - @$(mktmp $(shell @type Extensions_static) \ - $(PERLDLL_OBJ)) -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" # XXX: It would be nice if MinGW's ar accepted a temporary file, but this # doesn't seem to work: # $(LIB32) $(LIB_FLAGS) $@ \ @@ -1282,10 +1112,7 @@ $(MINIMOD) : $(MINIPERL) ..\minimod.pl $(X2P) : $(MINIPERL) $(X2P_OBJ) Extensions $(MINIPERL) -I..\lib ..\x2p\find2perl.PL $(MINIPERL) -I..\lib ..\x2p\s2p.PL -.IF "$(CCTYPE)" == "BORLAND" - $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ - @$(mktmp c0x32$(o) $(X2P_OBJ),$@,,$(LIBFILES),) -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" $(LINK32) -v -o $@ $(BLINK_FLAGS) \ $(mktmp $(LKPRE) $(X2P_OBJ) $(LIBFILES) $(LKPOST)) .ELSE @@ -1304,10 +1131,7 @@ $(BITCOUNT_H) : $(GENUUDMAP) $(GENUUDMAP_OBJ) : ..\mg_raw.h $(GENUUDMAP) : $(GENUUDMAP_OBJ) -.IF "$(CCTYPE)" == "BORLAND" - $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ - @$(mktmp c0x32$(o) $(GENUUDMAP_OBJ),$@,,$(LIBFILES),) -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" $(LINK32) -v -o $@ $(BLINK_FLAGS) \ $(mktmp $(LKPRE) $(GENUUDMAP_OBJ) $(LIBFILES) $(LKPOST)) .ELSE @@ -1329,11 +1153,7 @@ perlmainst$(o) : perlmainst.c $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) -.IF "$(CCTYPE)" == "BORLAND" - $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ - @$(mktmp c0x32$(o) $(PERLEXE_OBJ),$@,, \ - $(PERLIMPLIB) $(LIBFILES),,$(PERLEXE_RES)) -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) .ELSE @@ -1345,12 +1165,7 @@ $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES) -.IF "$(CCTYPE)" == "BORLAND" - $(LINK32) -Tpe -ap $(BLINK_FLAGS) \ - @$(mktmp c0x32$(o) $(PERLEXEST_OBJ),$@,, \ - $(shell @type Extensions_static) $(PERLSTATICLIB) $(LIBFILES),, \ - $(PERLEXE_RES)) -.ELIF "$(CCTYPE)" == "GCC" +.IF "$(CCTYPE)" == "GCC" $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \ $(mktmp $(LKPRE) $(shell @type Extensions_static) \ $(PERLSTATICLIB) $(LIBFILES) $(PERLEXEST_OBJ) \ @@ -1444,7 +1259,7 @@ utils: $(PERLEXE) $(X2P) copy ..\README.vmesa ..\pod\perlvmesa.pod copy ..\README.vos ..\pod\perlvos.pod copy ..\README.win32 ..\pod\perlwin32.pod - copy ..\pod\perldelta.pod ..\pod\perl5153delta.pod + copy ..\pod\perldelta.pod ..\pod\perl5154delta.pod $(PERLEXE) $(PL2BAT) $(UTILS) $(PERLEXE) $(ICWD) ..\autodoc.pl .. $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q @@ -1536,7 +1351,7 @@ distclean: realclean -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API -cd $(PODDIR) && del /f *.html *.bat \ - perl5153delta.pod perlaix.pod perlamiga.pod perlapi.pod \ + perl5154delta.pod perlaix.pod perlamiga.pod perlapi.pod \ perlbeos.pod perlbs2000.pod perlce.pod perlcn.pod \ perlcygwin.pod perldgux.pod perldos.pod perlepoc.pod \ perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \ @@ -1571,7 +1386,7 @@ distclean: realclean install : all installbare installhtml -installbare : $(RIGHTMAKE) utils ..\pod\perltoc.pod +installbare : utils ..\pod\perltoc.pod $(PERLEXE) ..\installperl if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.* if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.* @@ -1594,11 +1409,7 @@ minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils $(XCOPY) $(MINIPERL) ..\t\$(NULL) if exist ..\t\perl.exe del /f ..\t\perl.exe rename ..\t\miniperl.exe perl.exe -.IF "$(CCTYPE)" == "BORLAND" - $(XCOPY) $(GLOBBAT) ..\t\$(NULL) -.ELSE $(XCOPY) $(GLOBEXE) ..\t\$(NULL) -.ENDIF attrib -r ..\t\*.* cd ..\t && \ $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t @@ -1606,11 +1417,7 @@ minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils test-prep : all utils ..\pod\perltoc.pod $(XCOPY) $(PERLEXE) ..\t\$(NULL) $(XCOPY) $(PERLDLL) ..\t\$(NULL) -.IF "$(CCTYPE)" == "BORLAND" - $(XCOPY) $(GLOBBAT) ..\t\$(NULL) -.ELSE $(XCOPY) $(GLOBEXE) ..\t\$(NULL) -.ENDIF .IF "$(CCTYPE)" == "GCC" # If building with gcc versions 4.x.x or greater, then @@ -1626,7 +1433,7 @@ test-prep : all utils ..\pod\perltoc.pod if exist $(CCHOME)\bin\libstdc++-6.dll $(XCOPY) $(CCHOME)\bin\libstdc++-6.dll ..\t\$(NULL) .ENDIF -test : $(RIGHTMAKE) test-prep +test : test-prep set PERL_STATIC_EXT=$(STATIC_EXT) && \ cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) @@ -1646,14 +1453,10 @@ test-notty : test-prep set PERL_SKIP_TTY_TEST=1 && \ cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES) -_test : $(RIGHTMAKE) +_test : $(XCOPY) $(PERLEXE) ..\t\$(NULL) $(XCOPY) $(PERLDLL) ..\t\$(NULL) -.IF "$(CCTYPE)" == "BORLAND" - $(XCOPY) $(GLOBBAT) ..\t\$(NULL) -.ELSE $(XCOPY) $(GLOBEXE) ..\t\$(NULL) -.ENDIF set PERL_STATIC_EXT=$(STATIC_EXT) && \ cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) diff --git a/win32/perlhost.h b/win32/perlhost.h index 677da4d3e51..02ecf109a1a 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -840,21 +840,6 @@ PerlStdIOFdupopen(struct IPerlStdIO* piPerl, FILE* pf) int fileno = win32_dup(win32_fileno(pf)); /* open the file in the same mode */ -#ifdef __BORLANDC__ - if((pf)->flags & _F_READ) { - mode[0] = 'r'; - mode[1] = 0; - } - else if((pf)->flags & _F_WRIT) { - mode[0] = 'a'; - mode[1] = 0; - } - else if((pf)->flags & _F_RDWR) { - mode[0] = 'r'; - mode[1] = '+'; - mode[2] = 0; - } -#else if((pf)->_flag & _IOREAD) { mode[0] = 'r'; mode[1] = 0; @@ -868,7 +853,6 @@ PerlStdIOFdupopen(struct IPerlStdIO* piPerl, FILE* pf) mode[1] = '+'; mode[2] = 0; } -#endif /* it appears that the binmode is attached to the * file descriptor so binmode files will be handled diff --git a/win32/perllib.c b/win32/perllib.c index 526a4a18d53..e838d0c6db4 100644 --- a/win32/perllib.c +++ b/win32/perllib.c @@ -281,7 +281,7 @@ RunPerl(int argc, char **argv, char **env) } #endif - /* At least the Borland RTL wants to free argv[] after main() returns. */ + /* Some RTLs may want to free argv[] after main() returns. */ argv[0] = arg0; if (ansi) win32_free(ansi); diff --git a/win32/pod.mak b/win32/pod.mak index 6cdabad36e6..fac6afe4539 100644 --- a/win32/pod.mak +++ b/win32/pod.mak @@ -20,41 +20,21 @@ POD = perl.pod \ perl5005delta.pod \ perl5100delta.pod \ perl5101delta.pod \ - perl5110delta.pod \ - perl5111delta.pod \ - perl5112delta.pod \ - perl5113delta.pod \ - perl5114delta.pod \ - perl5115delta.pod \ perl5120delta.pod \ perl5121delta.pod \ perl5122delta.pod \ perl5123delta.pod \ perl5124delta.pod \ - perl5130delta.pod \ - perl51310delta.pod \ - perl51311delta.pod \ - perl5131delta.pod \ - perl5132delta.pod \ - perl5133delta.pod \ - perl5134delta.pod \ - perl5135delta.pod \ - perl5136delta.pod \ - perl5137delta.pod \ - perl5138delta.pod \ - perl5139delta.pod \ perl5140delta.pod \ perl5141delta.pod \ + perl5142delta.pod \ perl5150delta.pod \ perl5151delta.pod \ perl5152delta.pod \ perl5153delta.pod \ + perl5154delta.pod \ perl561delta.pod \ perl56delta.pod \ - perl570delta.pod \ - perl571delta.pod \ - perl572delta.pod \ - perl573delta.pod \ perl581delta.pod \ perl582delta.pod \ perl583delta.pod \ @@ -65,12 +45,6 @@ POD = perl.pod \ perl588delta.pod \ perl589delta.pod \ perl58delta.pod \ - perl590delta.pod \ - perl591delta.pod \ - perl592delta.pod \ - perl593delta.pod \ - perl594delta.pod \ - perl595delta.pod \ perlapi.pod \ perlapio.pod \ perlartistic.pod \ @@ -98,7 +72,6 @@ POD = perl.pod \ perlform.pod \ perlfunc.pod \ perlgit.pod \ - perlglossary.pod \ perlgpl.pod \ perlguts.pod \ perlhack.pod \ @@ -121,6 +94,7 @@ POD = perl.pod \ perlnewmod.pod \ perlnumber.pod \ perlobj.pod \ + perlootut.pod \ perlop.pod \ perlopentut.pod \ perlpacktut.pod \ @@ -168,41 +142,21 @@ MAN = perl.man \ perl5005delta.man \ perl5100delta.man \ perl5101delta.man \ - perl5110delta.man \ - perl5111delta.man \ - perl5112delta.man \ - perl5113delta.man \ - perl5114delta.man \ - perl5115delta.man \ perl5120delta.man \ perl5121delta.man \ perl5122delta.man \ perl5123delta.man \ perl5124delta.man \ - perl5130delta.man \ - perl51310delta.man \ - perl51311delta.man \ - perl5131delta.man \ - perl5132delta.man \ - perl5133delta.man \ - perl5134delta.man \ - perl5135delta.man \ - perl5136delta.man \ - perl5137delta.man \ - perl5138delta.man \ - perl5139delta.man \ perl5140delta.man \ perl5141delta.man \ + perl5142delta.man \ perl5150delta.man \ perl5151delta.man \ perl5152delta.man \ perl5153delta.man \ + perl5154delta.man \ perl561delta.man \ perl56delta.man \ - perl570delta.man \ - perl571delta.man \ - perl572delta.man \ - perl573delta.man \ perl581delta.man \ perl582delta.man \ perl583delta.man \ @@ -213,12 +167,6 @@ MAN = perl.man \ perl588delta.man \ perl589delta.man \ perl58delta.man \ - perl590delta.man \ - perl591delta.man \ - perl592delta.man \ - perl593delta.man \ - perl594delta.man \ - perl595delta.man \ perlapi.man \ perlapio.man \ perlartistic.man \ @@ -246,7 +194,6 @@ MAN = perl.man \ perlform.man \ perlfunc.man \ perlgit.man \ - perlglossary.man \ perlgpl.man \ perlguts.man \ perlhack.man \ @@ -269,6 +216,7 @@ MAN = perl.man \ perlnewmod.man \ perlnumber.man \ perlobj.man \ + perlootut.man \ perlop.man \ perlopentut.man \ perlpacktut.man \ @@ -316,41 +264,21 @@ HTML = perl.html \ perl5005delta.html \ perl5100delta.html \ perl5101delta.html \ - perl5110delta.html \ - perl5111delta.html \ - perl5112delta.html \ - perl5113delta.html \ - perl5114delta.html \ - perl5115delta.html \ perl5120delta.html \ perl5121delta.html \ perl5122delta.html \ perl5123delta.html \ perl5124delta.html \ - perl5130delta.html \ - perl51310delta.html \ - perl51311delta.html \ - perl5131delta.html \ - perl5132delta.html \ - perl5133delta.html \ - perl5134delta.html \ - perl5135delta.html \ - perl5136delta.html \ - perl5137delta.html \ - perl5138delta.html \ - perl5139delta.html \ perl5140delta.html \ perl5141delta.html \ + perl5142delta.html \ perl5150delta.html \ perl5151delta.html \ perl5152delta.html \ perl5153delta.html \ + perl5154delta.html \ perl561delta.html \ perl56delta.html \ - perl570delta.html \ - perl571delta.html \ - perl572delta.html \ - perl573delta.html \ perl581delta.html \ perl582delta.html \ perl583delta.html \ @@ -361,12 +289,6 @@ HTML = perl.html \ perl588delta.html \ perl589delta.html \ perl58delta.html \ - perl590delta.html \ - perl591delta.html \ - perl592delta.html \ - perl593delta.html \ - perl594delta.html \ - perl595delta.html \ perlapi.html \ perlapio.html \ perlartistic.html \ @@ -394,7 +316,6 @@ HTML = perl.html \ perlform.html \ perlfunc.html \ perlgit.html \ - perlglossary.html \ perlgpl.html \ perlguts.html \ perlhack.html \ @@ -417,6 +338,7 @@ HTML = perl.html \ perlnewmod.html \ perlnumber.html \ perlobj.html \ + perlootut.html \ perlop.html \ perlopentut.html \ perlpacktut.html \ @@ -464,41 +386,21 @@ TEX = perl.tex \ perl5005delta.tex \ perl5100delta.tex \ perl5101delta.tex \ - perl5110delta.tex \ - perl5111delta.tex \ - perl5112delta.tex \ - perl5113delta.tex \ - perl5114delta.tex \ - perl5115delta.tex \ perl5120delta.tex \ perl5121delta.tex \ perl5122delta.tex \ perl5123delta.tex \ perl5124delta.tex \ - perl5130delta.tex \ - perl51310delta.tex \ - perl51311delta.tex \ - perl5131delta.tex \ - perl5132delta.tex \ - perl5133delta.tex \ - perl5134delta.tex \ - perl5135delta.tex \ - perl5136delta.tex \ - perl5137delta.tex \ - perl5138delta.tex \ - perl5139delta.tex \ perl5140delta.tex \ perl5141delta.tex \ + perl5142delta.tex \ perl5150delta.tex \ perl5151delta.tex \ perl5152delta.tex \ perl5153delta.tex \ + perl5154delta.tex \ perl561delta.tex \ perl56delta.tex \ - perl570delta.tex \ - perl571delta.tex \ - perl572delta.tex \ - perl573delta.tex \ perl581delta.tex \ perl582delta.tex \ perl583delta.tex \ @@ -509,12 +411,6 @@ TEX = perl.tex \ perl588delta.tex \ perl589delta.tex \ perl58delta.tex \ - perl590delta.tex \ - perl591delta.tex \ - perl592delta.tex \ - perl593delta.tex \ - perl594delta.tex \ - perl595delta.tex \ perlapi.tex \ perlapio.tex \ perlartistic.tex \ @@ -542,7 +438,6 @@ TEX = perl.tex \ perlform.tex \ perlfunc.tex \ perlgit.tex \ - perlglossary.tex \ perlgpl.tex \ perlguts.tex \ perlhack.tex \ @@ -565,6 +460,7 @@ TEX = perl.tex \ perlnewmod.tex \ perlnumber.tex \ perlobj.tex \ + perlootut.tex \ perlop.tex \ perlopentut.tex \ perlpacktut.tex \ diff --git a/win32/sync_ext.pl b/win32/sync_ext.pl deleted file mode 100644 index cb09285561b..00000000000 --- a/win32/sync_ext.pl +++ /dev/null @@ -1,71 +0,0 @@ -=begin comment - -Synchronize filename cases for extensions. - -This script could be used to perform following renaming: -if there exist file, for example, "FiLeNaME.c" and -filename.obj then it renames "filename.obj" to "FiLeNaME.obj". -There is a problem when some compilers (e.g.Borland) generate -such .obj files and then "make" process will not treat them -as dependant and already maked files. - -This script takes two arguments - first and second extensions to -synchronize filename cases with. - -There may be specified following options: - --verbose <== say everything what is going on - --recurse <== recurse subdirectories - --dummy <== do not perform actual renaming - --say-subdir -Every such option can be specified with an optional "no" prefix to negate it. - -Typically, it is invoked as: - perl sync_ext.pl c obj --verbose - -=cut - -use strict; - -my ($ext1, $ext2) = map {quotemeta} grep {!/^--/} @ARGV; -my %opts = ( - #defaults - 'verbose' => 0, - 'recurse' => 1, - 'dummy' => 0, - 'say-subdir' => 0, - #options itself - (map {/^--([\-_\w]+)=(.*)$/} @ARGV), # --opt=smth - (map {/^no-?(.*)$/i?($1=>0):($_=>1)} map {/^--([\-_\w]+)$/} @ARGV), # --opt --no-opt --noopt - ); - -my $sp = ''; -sub xx { - opendir DIR, '.'; - my @t = readdir DIR; - my @f = map {/^(.*)\.$ext1$/i} @t; - my %f = map {lc($_)=>$_} map {/^(.*)\.$ext2$/i} @t; - for (@f) { - my $lc = lc($_); - if (exists $f{$lc} and $f{$lc} ne $_) { - print STDERR "$sp$f{$lc}.$ext2 <==> $_.$ext1\n" if $opts{verbose}; - if ($opts{dummy}) { - print STDERR "ren $f{$lc}.$ext2 $_.$ext2\n"; - } - else { - system "ren $f{$lc}.$ext2 $_.$ext2"; - } - } - } - if ($opts{recurse}) { - for (grep {-d&&!/^\.\.?$/} @t) { - print STDERR "$sp\\$_\n" if $opts{'say-subdir'}; - $sp .= ' '; - chdir $_ or die; - xx(); - chdir ".." or die; - chop $sp; - } - } -} - -xx(); diff --git a/win32/win32.c b/win32/win32.c index e67a7352bea..89413fc28c3 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -89,11 +89,6 @@ int _fcloseall(); END_EXTERN_C #endif -#if defined(__BORLANDC__) -# define _stat stat -# define _utimbuf utimbuf -#endif - #define EXECF_EXEC 1 #define EXECF_SPAWN 2 #define EXECF_SPAWN_NOWAIT 3 @@ -137,16 +132,6 @@ END_EXTERN_C static OSVERSIONINFO g_osver = {0, 0, 0, 0, 0, ""}; -#ifdef __BORLANDC__ -/* Silence STDERR grumblings from Borland's math library. */ -DllExport int -_matherr(struct _exception *a) -{ - PERL_UNUSED_VAR(a); - return 1; -} -#endif - /* VS2005 (MSC version 14) provides a mechanism to set an invalid * parameter handler. This functionality is not available in the * 64-bit compiler from the Platform SDK, which unfortunately also @@ -1483,8 +1468,8 @@ win32_stat(const char *path, Stat_t *sbuf) } if (S_ISDIR(sbuf->st_mode)) { /* Ensure the "write" bit is switched off in the mode for - * directories with the read-only attribute set. Borland (at least) - * switches it on for directories, which is technically correct + * directories with the read-only attribute set. Some compilers + * switch it on for directories, which is technically correct * (directories are indeed always writable unless denied by DACLs), * but we want stat() and -w to reflect the state of the read-only * attribute for symmetry with chmod(). */ @@ -1493,29 +1478,6 @@ win32_stat(const char *path, Stat_t *sbuf) sbuf->st_mode &= ~S_IWRITE; } } -#ifdef __BORLANDC__ - if (S_ISDIR(sbuf->st_mode)) { - sbuf->st_mode |= S_IEXEC; - } - else if (S_ISREG(sbuf->st_mode)) { - int perms; - if (l >= 4 && path[l-4] == '.') { - const char *e = path + l - 3; - if (strnicmp(e,"exe",3) - && strnicmp(e,"bat",3) - && strnicmp(e,"com",3) - && strnicmp(e,"cmd",3)) - sbuf->st_mode &= ~S_IEXEC; - else - sbuf->st_mode |= S_IEXEC; - } - else - sbuf->st_mode &= ~S_IEXEC; - /* Propagate permissions to _group_ and _others_ */ - perms = sbuf->st_mode & (S_IREAD|S_IWRITE|S_IEXEC); - sbuf->st_mode |= (perms>>3) | (perms>>6); - } -#endif } return res; } @@ -1997,8 +1959,7 @@ win32_uname(struct utsname *name) char *arch; GetSystemInfo(&info); -#if (defined(__BORLANDC__)&&(__BORLANDC__<=0x520)) \ - || (defined(__MINGW32__) && !defined(_ANONYMOUS_UNION) && !defined(__MINGW_EXTENSION)) +#if (defined(__MINGW32__) && !defined(_ANONYMOUS_UNION) && !defined(__MINGW_EXTENSION)) procarch = info.u.s.wProcessorArchitecture; #else procarch = info.wProcessorArchitecture; @@ -2464,7 +2425,7 @@ win32_feof(FILE *fp) DllExport char * win32_strerror(int e) { -#if !defined __BORLANDC__ && !defined __MINGW32__ /* compiler intolerance */ +#if !defined __MINGW32__ /* compiler intolerance */ extern int sys_nerr; #endif @@ -2662,14 +2623,10 @@ DllExport Off_t win32_ftell(FILE *pf) { #if defined(WIN64) || defined(USE_LARGE_FILES) -#if defined(__BORLANDC__) /* buk */ - return win32_tell( fileno( pf ) ); -#else fpos_t pos; if (fgetpos(pf, &pos)) return -1; return (Off_t)pos; -#endif #else return ftell(pf); #endif @@ -2679,13 +2636,6 @@ DllExport int win32_fseek(FILE *pf, Off_t offset,int origin) { #if defined(WIN64) || defined(USE_LARGE_FILES) -#if defined(__BORLANDC__) /* buk */ - return win32_lseek( - fileno(pf), - offset, - origin - ); -#else fpos_t pos; switch (origin) { case SEEK_CUR: @@ -2705,7 +2655,6 @@ win32_fseek(FILE *pf, Off_t offset,int origin) return -1; } return fsetpos(pf, &offset); -#endif #else return fseek(pf, (long)offset, origin); #endif @@ -2714,25 +2663,13 @@ win32_fseek(FILE *pf, Off_t offset,int origin) DllExport int win32_fgetpos(FILE *pf,fpos_t *p) { -#if defined(__BORLANDC__) && defined(USE_LARGE_FILES) /* buk */ - if( win32_tell(fileno(pf)) == -1L ) { - errno = EBADF; - return -1; - } - return 0; -#else return fgetpos(pf, p); -#endif } DllExport int win32_fsetpos(FILE *pf,const fpos_t *p) { -#if defined(__BORLANDC__) && defined(USE_LARGE_FILES) /* buk */ - return win32_lseek(fileno(pf), *p, SEEK_CUR); -#else return fsetpos(pf, p); -#endif } DllExport void @@ -2762,9 +2699,6 @@ win32_tmpfd(void) if (fh != INVALID_HANDLE_VALUE) { int fd = win32_open_osfhandle((intptr_t)fh, 0); if (fd >= 0) { -#if defined(__BORLANDC__) - setmode(fd,O_BINARY); -#endif DEBUG_p(PerlIO_printf(Perl_debug_log, "Created tmpfile=%s\n",filename)); return fd; @@ -2794,50 +2728,10 @@ win32_abort(void) DllExport int win32_fstat(int fd, Stat_t *sbufptr) { -#ifdef __BORLANDC__ - /* A file designated by filehandle is not shown as accessible - * for write operations, probably because it is opened for reading. - * --Vadim Konovalov - */ - BY_HANDLE_FILE_INFORMATION bhfi; -# if defined(WIN64) || defined(USE_LARGE_FILES) - /* Borland 5.5.1 has a 64-bit stat, but only a 32-bit fstat */ - struct stat tmp; - int rc = fstat(fd,&tmp); - - sbufptr->st_dev = tmp.st_dev; - sbufptr->st_ino = tmp.st_ino; - sbufptr->st_mode = tmp.st_mode; - sbufptr->st_nlink = tmp.st_nlink; - sbufptr->st_uid = tmp.st_uid; - sbufptr->st_gid = tmp.st_gid; - sbufptr->st_rdev = tmp.st_rdev; - sbufptr->st_size = tmp.st_size; - sbufptr->st_atime = tmp.st_atime; - sbufptr->st_mtime = tmp.st_mtime; - sbufptr->st_ctime = tmp.st_ctime; -# else - int rc = fstat(fd,sbufptr); -# endif - - if (GetFileInformationByHandle((HANDLE)_get_osfhandle(fd), &bhfi)) { -# if defined(WIN64) || defined(USE_LARGE_FILES) - sbufptr->st_size = ((__int64)bhfi.nFileSizeHigh << 32) | bhfi.nFileSizeLow ; -# endif - sbufptr->st_mode &= 0xFE00; - if (bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY) - sbufptr->st_mode |= (S_IREAD + (S_IREAD >> 3) + (S_IREAD >> 6)); - else - sbufptr->st_mode |= ((S_IREAD|S_IWRITE) + ((S_IREAD|S_IWRITE) >> 3) - + ((S_IREAD|S_IWRITE) >> 6)); - } - return rc; -#else -# if defined(WIN64) || defined(USE_LARGE_FILES) +#if defined(WIN64) || defined(USE_LARGE_FILES) return _fstati64(fd, sbufptr); -# else +#else return fstat(fd, sbufptr); -# endif #endif } @@ -3129,23 +3023,7 @@ DllExport Off_t win32_lseek(int fd, Off_t offset, int origin) { #if defined(WIN64) || defined(USE_LARGE_FILES) -#if defined(__BORLANDC__) /* buk */ - LARGE_INTEGER pos; - pos.QuadPart = offset; - pos.LowPart = SetFilePointer( - (HANDLE)_get_osfhandle(fd), - pos.LowPart, - &pos.HighPart, - origin - ); - if (pos.LowPart == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR) { - pos.QuadPart = -1; - } - - return pos.QuadPart; -#else return _lseeki64(fd, offset, origin); -#endif #else return lseek(fd, (long)offset, origin); #endif @@ -3155,24 +3033,7 @@ DllExport Off_t win32_tell(int fd) { #if defined(WIN64) || defined(USE_LARGE_FILES) -#if defined(__BORLANDC__) /* buk */ - LARGE_INTEGER pos; - pos.QuadPart = 0; - pos.LowPart = SetFilePointer( - (HANDLE)_get_osfhandle(fd), - pos.LowPart, - &pos.HighPart, - FILE_CURRENT - ); - if (pos.LowPart == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR) { - pos.QuadPart = -1; - } - - return pos.QuadPart; - /* return tell(fd); */ -#else return _telli64(fd); -#endif #else return tell(fd); #endif @@ -3774,17 +3635,9 @@ win32_execv(const char *cmdname, const char *const *argv) /* if this is a pseudo-forked child, we just want to spawn * the new program, and return */ if (w32_pseudo_id) -# ifdef __BORLANDC__ - return spawnv(P_WAIT, cmdname, (char *const *)argv); -# else return spawnv(P_WAIT, cmdname, argv); -# endif #endif -#ifdef __BORLANDC__ - return execv(cmdname, (char *const *)argv); -#else return execv(cmdname, argv); -#endif } DllExport int @@ -3804,11 +3657,7 @@ win32_execvp(const char *cmdname, const char *const *argv) return status; } #endif -#ifdef __BORLANDC__ - return execvp(cmdname, (char *const *)argv); -#else return execvp(cmdname, argv); -#endif } DllExport void @@ -4027,21 +3876,6 @@ win32_fdupopen(FILE *pf) int fileno = win32_dup(win32_fileno(pf)); /* open the file in the same mode */ -#ifdef __BORLANDC__ - if((pf)->flags & _F_READ) { - mode[0] = 'r'; - mode[1] = 0; - } - else if((pf)->flags & _F_WRIT) { - mode[0] = 'a'; - mode[1] = 0; - } - else if((pf)->flags & _F_RDWR) { - mode[0] = 'r'; - mode[1] = '+'; - mode[2] = 0; - } -#else if((pf)->_flag & _IOREAD) { mode[0] = 'r'; mode[1] = 0; @@ -4055,7 +3889,6 @@ win32_fdupopen(FILE *pf) mode[1] = '+'; mode[2] = 0; } -#endif /* it appears that the binmode is attached to the * file descriptor so binmode files will be handled @@ -4129,12 +3962,7 @@ Perl_init_os_extras(void) /* Initialize Win32CORE if it has been statically linked. */ void (*pfn_init)(pTHX); -#if defined(__BORLANDC__) - /* makedef.pl seems to have given up on fixing this issue in the .def file */ - pfn_init = (void (*)(pTHX))GetProcAddress((HMODULE)w32_perldll_handle, "_init_Win32CORE"); -#else pfn_init = (void (*)(pTHX))GetProcAddress((HMODULE)w32_perldll_handle, "init_Win32CORE"); -#endif if (pfn_init) pfn_init(aTHX); @@ -4298,7 +4126,7 @@ ansify_path(void) */ SetEnvironmentVariableA("PATH", ansi_path+5); /* We are intentionally leaking the ansi_path string here because - * the Borland runtime library puts it directly into the environ + * the some runtime libraries puts it directly into the environ * array. The Microsoft runtime library seems to make a copy, * but will leak the copy should it be replaced again later. * Since this code is only called once during PERL_SYS_INIT this @@ -4319,7 +4147,7 @@ Perl_win32_init(int *argcp, char ***argvp) #endif /* Disable floating point errors, Perl will trap the ones we * care about. VC++ RTL defaults to switching these off - * already, but the Borland RTL doesn't. Since we don't + * already, but some RTLs don't. Since we don't * want to be at the vendor's whim on the default, we set * it explicitly here. */ diff --git a/win32/win32.h b/win32/win32.h index 4c58b8c2520..e906266a4ad 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -200,38 +200,6 @@ struct utsname { # define PERL_BITFIELD32 unsigned int #endif -#ifdef __BORLANDC__ /* Borland C++ */ - -#if (__BORLANDC__ <= 0x520) -#define _access access -#define _chdir chdir -#endif - -#define _getpid getpid -#define wcsicmp _wcsicmp -#include - -#ifndef DllMain -#define DllMain DllEntryPoint -#endif - -#pragma warn -8004 /* "'foo' is assigned a value that is never used" */ -#pragma warn -8008 /* "condition is always true/false" */ -#pragma warn -8012 /* "comparing signed and unsigned values" */ -#pragma warn -8027 /* "functions containing %s are not expanded inline" */ -#pragma warn -8057 /* "parameter 'foo' is never used" */ -#pragma warn -8060 /* "possibly incorrect assignment" */ -#pragma warn -8066 /* "unreachable code" */ -#pragma warn -8071 /* "conversion may lose significant digits" */ -#pragma warn -8080 /* "'foo' is declared but never used" */ - -/* Borland C thinks that a pointer to a member variable is 12 bytes in size. */ -#define PERL_MEMBER_PTR_SIZE 12 - -#define isnan _isnan - -#endif - #ifdef _MSC_VER /* Microsoft Visual C++ */ #ifndef UNDER_CE diff --git a/win32/win32iop-o.h b/win32/win32iop-o.h index 57b073ba874..6633f7a76ba 100644 --- a/win32/win32iop-o.h +++ b/win32/win32iop-o.h @@ -178,15 +178,6 @@ END_EXTERN_C #undef uname #undef wait -#ifdef __BORLANDC__ -#undef ungetc -#undef getc -#undef putc -#undef getchar -#undef putchar -#undef fileno -#endif - #define stderr win32_stderr() #define stdout win32_stdout() #define stdin win32_stdin() diff --git a/win32/win32iop.h b/win32/win32iop.h index 45207900de5..373e3e37ce9 100644 --- a/win32/win32iop.h +++ b/win32/win32iop.h @@ -190,15 +190,7 @@ END_EXTERN_C #undef uname #undef wait -#ifdef __BORLANDC__ -#undef ungetc -#undef getc -#undef putc -#undef getchar -#undef putchar -#endif - -#if defined(__MINGW32__) || defined(__BORLANDC__) +#if defined(__MINGW32__) #undef fileno #endif diff --git a/win32/win32sck.c b/win32/win32sck.c index 22cc72eefa4..4ceb03c4431 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -738,11 +738,9 @@ win32_savecopyservent(struct servent*d, struct servent*s, const char *proto) d->s_name = s->s_name; d->s_aliases = s->s_aliases; d->s_port = s->s_port; -#ifndef __BORLANDC__ /* Buggy on WinNT-with-Borland-WSOCK */ if (s->s_proto && strlen(s->s_proto)) d->s_proto = s->s_proto; else -#endif if (proto && strlen(proto)) d->s_proto = (char *)proto; else diff --git a/win32/win32thread.h b/win32/win32thread.h index c6f93097ffa..9af3aa3ea2b 100644 --- a/win32/win32thread.h +++ b/win32/win32thread.h @@ -109,10 +109,9 @@ typedef HANDLE perl_mutex; /* XXX Docs mention that the RTL versions of thread creation routines * should be used, but that advice only seems applicable when the RTL - * is not in a DLL. RTL DLLs in both Borland and VC seem to do all of - * the init/deinit required upon DLL_THREAD_ATTACH/DETACH. So we seem - * to be completely safe using straight Win32 API calls, rather than - * the much braindamaged RTL calls. + * is not in a DLL. RTL DLLs seem to do all of the init/deinit required + * upon DLL_THREAD_ATTACH/DETACH. So we seem to be completely safe using + * straight Win32 API calls, rather than the much braindamaged RTL calls. * * _beginthread() in the RTLs call CloseHandle() just after the thread * function returns, which means: 1) we have a race on our hands @@ -123,11 +122,7 @@ typedef HANDLE perl_mutex; */ #ifdef USE_RTL_THREAD_API # include -# if defined(__BORLANDC__) - /* Borland RTL doesn't allow a return value from thread function! */ -# define THREAD_RET_TYPE void _USERENTRY -# define THREAD_RET_CAST(p) ((void)(thr->i.retv = (void *)(p))) -# elif defined (_MSC_VER) +# if defined (_MSC_VER) # define THREAD_RET_TYPE unsigned __stdcall # define THREAD_RET_CAST(p) ((unsigned)(p)) # else @@ -145,7 +140,7 @@ typedef THREAD_RET_TYPE thread_func_t(void *); START_EXTERN_C -#if defined(PERLDLL) && defined(USE_DECLSPEC_THREAD) && (!defined(__BORLANDC__) || defined(_DLL)) +#if defined(PERLDLL) && defined(USE_DECLSPEC_THREAD) extern __declspec(thread) void *PL_current_context; #define PERL_SET_CONTEXT(t) (PL_current_context = t) #define PERL_GET_CONTEXT PL_current_context diff --git a/win32/wince.c b/win32/wince.c index b9163d75c02..8a8721951bb 100644 --- a/win32/wince.c +++ b/win32/wince.c @@ -1498,9 +1498,6 @@ win32_tmpfd(void) if (fh != INVALID_HANDLE_VALUE) { int fd = win32_open_osfhandle((intptr_t)fh, 0); if (fd >= 0) { -#if defined(__BORLANDC__) - setmode(fd,O_BINARY); -#endif DEBUG_p(PerlIO_printf(Perl_debug_log, "Created tmpfile=%s\n",filename)); return fd; diff --git a/win32/wincesck.c b/win32/wincesck.c index 7f9e0df5103..9ef025d46cb 100644 --- a/win32/wincesck.c +++ b/win32/wincesck.c @@ -483,11 +483,9 @@ win32_savecopyservent(struct servent*d, struct servent*s, const char *proto) d->s_name = s->s_name; d->s_aliases = s->s_aliases; d->s_port = s->s_port; -#ifndef __BORLANDC__ /* Buggy on Win95 and WinNT-with-Borland-WSOCK */ if (!IsWin95() && s->s_proto && strlen(s->s_proto)) d->s_proto = s->s_proto; else -#endif if (proto && strlen(proto)) d->s_proto = (char *)proto; else diff --git a/x2p/a2p.c b/x2p/a2p.c index 4186cdf19bb..1a7a77851e0 100644 --- a/x2p/a2p.c +++ b/x2p/a2p.c @@ -2181,7 +2181,7 @@ int yyparse (void); #define YYERROR goto yyerrlab #if YYDEBUG -# if defined(WIN32) && !defined(__BORLANDC__) +# if defined(WIN32) EXTERN_C _CRTIMP char *getenv(const char *); # else EXTERN_C char *getenv(const char *); diff --git a/x2p/a2p.h b/x2p/a2p.h index 3a01df5856a..af3c6e33491 100644 --- a/x2p/a2p.h +++ b/x2p/a2p.h @@ -30,19 +30,6 @@ # ifndef STANDARD_C # define STANDARD_C # endif -# if defined(__BORLANDC__) -# pragma warn -ccc -# pragma warn -rch -# pragma warn -sig -# pragma warn -pia -# pragma warn -par -# pragma warn -aus -# pragma warn -use -# pragma warn -csu -# pragma warn -pro -# elif defined(_MSC_VER) -# elif defined(__MINGW32__) -# endif #endif /* Use all the "standard" definitions? */