In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/d9961b0ec89be9cdb4c32b2cf52e2cf8352453c1?hp=daeedd11505fef28f5a8174cd4fc89fe306801a1>
- Log ----------------------------------------------------------------- commit d9961b0ec89be9cdb4c32b2cf52e2cf8352453c1 Merge: daeedd1 5aad5c5 Author: H.Merijn Brand <[email protected]> Date: Fri Nov 11 23:18:51 2016 +0100 Allow "." to be excluded from @INC Build with -Ddefault_inc_excludes_dot to have exclude . from @INC. The *current* default is set to be effectively no change. A future change will most likely revert the default to the safer exclusion of . ----------------------------------------------------------------------- Summary of changes: Configure | 30 ++++++++++++++++++++++++++++++ Cross/config.sh-arm-linux | 1 + Makefile.SH | 2 +- NetWare/config.wc | 1 + Porting/Glossary | 3 +++ Porting/checkcfgvar.pl | 2 +- Porting/config.sh | 1 + Porting/makemeta | 2 +- Porting/new-perldelta.pl | 2 +- Porting/pod_rules.pl | 4 ++-- TestInit.pm | 2 +- autodoc.pl | 4 ++-- charclass_invlists.h | 2 +- config_h.SH | 6 ++++++ configure.com | 1 + cpan/Devel-PPPort/devel/mktodo | 2 +- cpan/Devel-PPPort/devel/mktodo.pl | 2 +- cpan/Devel-PPPort/devel/regenerate | 2 +- cpan/Devel-PPPort/devel/scanprov | 2 +- cpan/Devel-PPPort/parts/apicheck.pl | 2 +- cpan/Math-BigInt/t/bare_mbf.t | 2 +- cpan/Math-BigInt/t/bare_mbi.t | 2 +- cpan/Math-BigInt/t/bare_mif.t | 2 +- cpan/Math-BigInt/t/bigfltpm.t | 2 +- cpan/Math-BigInt/t/bigintpm.t | 2 +- cpan/Math-BigInt/t/mbf_ali.t | 2 +- cpan/Math-BigInt/t/mbi_ali.t | 2 +- cpan/Math-BigInt/t/mbimbf.t | 2 +- cpan/Math-BigInt/t/sub_ali.t | 2 +- cpan/Math-BigInt/t/sub_mbf.t | 2 +- cpan/Math-BigInt/t/sub_mbi.t | 2 +- cpan/Math-BigInt/t/sub_mif.t | 2 +- cpan/Math-BigInt/t/upgrade.t | 2 +- cpan/Math-BigInt/t/upgradef.t | 2 +- cpan/Math-BigInt/t/with_sub.t | 2 +- cpan/Math-BigRat/t/bigfltrt.t | 2 +- cpan/Math-BigRat/t/bigratpm.t | 2 +- cpan/perlfaq/lib/perlfaq5.pod | 4 ++-- cpan/perlfaq/lib/perlfaq8.pod | 2 +- dist/Thread-Queue/t/01_basic.t | 2 +- dist/Thread-Queue/t/02_refs.t | 2 +- dist/Thread-Queue/t/03_peek.t | 2 +- dist/Thread-Queue/t/05_extract.t | 2 +- dist/Thread-Queue/t/06_insert.t | 2 +- dist/Thread-Queue/t/07_lock.t | 2 +- dist/Thread-Queue/t/10_timed.t | 2 +- dist/Thread-Semaphore/t/01_basic.t | 2 +- dist/Thread-Semaphore/t/04_nonblocking.t | 2 +- dist/Thread-Semaphore/t/05_force.t | 2 +- ext/DynaLoader/t/DynaLoader.t | 2 +- h2pl/cbreak.pl | 2 +- h2pl/cbreak2.pl | 2 +- keywords.c | 2 +- keywords.h | 2 +- lib/h2ph.t | 1 - lib/strict.t | 2 +- lib/warnings.t | 2 +- makedef.pl | 2 +- metaconfig.h | 1 + perl.c | 9 +++++++-- perly.act | 2 +- perly.h | 2 +- perly.tab | 2 +- plan9/config_sh.sample | 1 + pod/buildtoc | 2 +- pod/perlmodlib.PL | 2 +- regcharclass.h | 2 +- regen.pl | 2 +- regen/ebcdic.pl | 7 +++++-- regen/embed.pl | 4 ++-- regen/feature.pl | 2 +- regen/genpacksizetables.pl | 2 +- regen/keywords.pl | 2 +- regen/lib_cleanup.pl | 4 ++-- regen/mg_vtable.pl | 2 +- regen/miniperlmain.pl | 2 +- regen/mk_PL_charclass.pl | 4 ++-- regen/mk_invlists.pl | 4 ++-- regen/opcode.pl | 4 ++-- regen/overload.pl | 2 +- regen/reentr.pl | 2 +- regen/regcharclass.pl | 4 ++-- regen/regcomp.pl | 2 +- regen/uconfig_h.pl | 2 +- regen/unicode_constants.pl | 4 ++-- regen/warnings.pl | 2 +- regen_perly.pl | 2 +- symbian/config.sh | 1 + t/comp/line_debug.t | 2 ++ t/lib/warnings/op | 1 + t/op/goto.t | 2 +- t/porting/authors.t | 2 +- t/porting/bench.t | 2 +- t/porting/cmp_version.t | 2 +- t/porting/corelist.t | 2 +- t/porting/diag.t | 4 ++-- t/porting/globvar.t | 2 +- t/porting/manifest.t | 2 +- t/porting/pending-author.t | 2 +- t/porting/pod_rules.t | 2 +- t/porting/readme.t | 2 +- t/porting/regen.t | 6 +++--- t/porting/utils.t | 2 +- t/re/pat.t | 6 +++--- t/run/runenv.t | 7 ++++++- t/run/switches.t | 6 +++--- t/test.pl | 3 ++- uconfig.h | 10 ++++++++-- uconfig.sh | 1 + uconfig64.sh | 1 + utils/Makefile.PL | 2 +- utils/c2ph.PL | 4 ++-- utils/perlivp.PL | 2 +- win32/config.ce | 1 + win32/config.gc | 1 + win32/config.vc | 1 + 116 files changed, 193 insertions(+), 120 deletions(-) diff --git a/Configure b/Configure index 4492020..592cc0d 100755 --- a/Configure +++ b/Configure @@ -937,6 +937,7 @@ d_wcstombs='' d_wcsxfrm='' d_wctomb='' d_writev='' +default_inc_excludes_dot='' dlext='' bin_ELF='' cccdlflags='' @@ -20625,6 +20626,34 @@ EOCP ;; esac +: Include . in @INC +$cat <<EOM + +Historically Perl has provided a final fallback of the current working +directory '.' when searching for a library. This, however, can lead to +problems when a Perl program which loads optional modules is called from +a shared directory. This can lead to executing unexpected code. + +EOM + +# When changing to exclude by default: +#case "$default_inc_excludes_dot" in +# $undef|false|[nN]*) dflt="n" ;; +# *) dflt="y" ;; +#esac +# For now: +case "$default_inc_excludes_dot" in + $define|true|[yY]*) dflt="y" ;; + *) dflt="n" ;; +esac + +rp='Exclude '.' from @INC by default? ' +. ./myread +case "$ans" in + [nN]|undef) default_inc_excludes_dot="$undef" ;; + *) default_inc_excludes_dot="$define" ;; +esac + : Check what kind of inf/nan your system has $echo "Checking the kind of infinities and nans you have..." >&4 $echo "(The following tests may crash. That's okay.)" >&4 @@ -24913,6 +24942,7 @@ db_prefixtype='$db_prefixtype' db_version_major='$db_version_major' db_version_minor='$db_version_minor' db_version_patch='$db_version_patch' +default_inc_excludes_dot='$default_inc_excludes_dot' direntrytype='$direntrytype' dlext='$dlext' dlsrc='$dlsrc' diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index 2626400..a20d723 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -637,6 +637,7 @@ db_prefixtype='size_t' db_version_major='' db_version_minor='' db_version_patch='' +default_inc_excludes_dot='' direntrytype='struct dirent' dlext='so' dlsrc='dl_dlopen.xs' diff --git a/Makefile.SH b/Makefile.SH index b1c4765..491d1a6 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -345,7 +345,7 @@ RUN_PERL = \$(LDLIBPTH) \$(RUN) $perl\$(EXE_EXT) $spitshell >>$Makefile <<!GROK!THIS! # Macros to invoke a copy of our fully operational perl during the build. PERL_EXE = perl\$(EXE_EXT) -RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) -Ilib +RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) -Ilib -I. !GROK!THIS! ;; esac diff --git a/NetWare/config.wc b/NetWare/config.wc index 176a865..8535885 100644 --- a/NetWare/config.wc +++ b/NetWare/config.wc @@ -628,6 +628,7 @@ db_version_minor='0' db_version_patch='0' def_perlroot='sys:\perl\scripts' def_temp='sys:\perl\temp' +default_inc_excludes_dot='' direntrytype='DIR' dlext='nlm' dlsrc='dl_netware.xs' diff --git a/Porting/Glossary b/Porting/Glossary index 522d356..1d2a6ea 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -2959,6 +2959,9 @@ db_version_patch (i_db.U): Berkeley DB found in the <db.h> header file. For DB version 1 this is always 0. +default_inc_excludes_dot (defaultincdot.U): + When defined, remove the legacy '.' from @INC + direntrytype (i_dirent.U): 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 diff --git a/Porting/checkcfgvar.pl b/Porting/checkcfgvar.pl index 4dc93df..601be18 100755 --- a/Porting/checkcfgvar.pl +++ b/Porting/checkcfgvar.pl @@ -36,7 +36,7 @@ GetOptions ( $default and $default =~ s/^'(.*)'$/$1/; # Will be quoted on generation -require 'regen/regen_lib.pl' if $opt_r; +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: diff --git a/Porting/config.sh b/Porting/config.sh index ff6a5fe..c9aa2c2 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -650,6 +650,7 @@ db_prefixtype='int' db_version_major='1' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct dirent' dlext='bundle' dlsrc='dl_dlopen.xs' diff --git a/Porting/makemeta b/Porting/makemeta index 9259b20..a5fa5a4 100644 --- a/Porting/makemeta +++ b/Porting/makemeta @@ -65,7 +65,7 @@ use CPAN::Meta; BEGIN { # Get function prototypes - require 'regen/regen_lib.pl'; + require './regen/regen_lib.pl'; } use Maintainers qw(%Modules get_module_files get_module_pat); diff --git a/Porting/new-perldelta.pl b/Porting/new-perldelta.pl index 09b7783..47376cb 100644 --- a/Porting/new-perldelta.pl +++ b/Porting/new-perldelta.pl @@ -4,7 +4,7 @@ use strict; # This needs to be able to run from a clean checkout, hence assume only system # perl, which may be too old to have autodie -require 'Porting/pod_lib.pl'; +require './Porting/pod_lib.pl'; my $state = get_pod_metadata(1); my (undef, $old_major, $old_minor) = @{$state->{delta_version}}; diff --git a/Porting/pod_rules.pl b/Porting/pod_rules.pl index 37cbb9c..7bf1380 100644 --- a/Porting/pod_rules.pl +++ b/Porting/pod_rules.pl @@ -32,8 +32,8 @@ if (ord("A") == 193) { # plan9 => 'plan9/mkfile', ); -require 'Porting/pod_lib.pl'; -require 'Porting/manifest_lib.pl'; +require './Porting/pod_lib.pl'; +require './Porting/manifest_lib.pl'; sub my_die; # process command-line switches diff --git a/TestInit.pm b/TestInit.pm index f4ed6fd..f9a5e91 100644 --- a/TestInit.pm +++ b/TestInit.pm @@ -47,7 +47,7 @@ sub import { } elsif ($_ eq 'T') { $chdir = '..' unless -f 't/TEST' && -f 'MANIFEST' && -d 'lib' && -d 'ext'; - @INC = 'lib'; + @INC = qw/ lib . /; $setopt = 1; } else { die "Unknown option '$_'"; diff --git a/autodoc.pl b/autodoc.pl index ce4846e..597607c 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -29,8 +29,8 @@ if (@ARGV) { chdir $workdir or die "Couldn't chdir to '$workdir': $!"; } -require 'regen/regen_lib.pl'; -require 'regen/embed_lib.pl'; +require './regen/regen_lib.pl'; +require './regen/embed_lib.pl'; # # See database of global and static function prototypes in embed.fnc diff --git a/charclass_invlists.h b/charclass_invlists.h index 5ed5aed..09949e3 100644 --- a/charclass_invlists.h +++ b/charclass_invlists.h @@ -91561,5 +91561,5 @@ static const U8 WB_table[24][24] = { * 066d6e75f95cf6794161c8ac0b1a40990277de90eefb913be2e675a7cba38d59 lib/unicore/mktables * cdecb300baad839a6f62791229f551a4fa33f3cbdca08e378dc976466354e778 lib/unicore/version * 913d2f93f3cb6cdf1664db888bf840bc4eb074eef824e082fceda24a9445e60c regen/charset_translations.pl - * 11011bc761487f5a63c8135e67248394d4cdff6f8f204a41cdfbdc8131e79406 regen/mk_invlists.pl + * 6697977221bf632720408ca9a1a934e43d5d8e51c870532cec3ebdb3e3ba80c6 regen/mk_invlists.pl * ex: set ro: */ diff --git a/config_h.SH b/config_h.SH index c722657..e9b144f 100755 --- a/config_h.SH +++ b/config_h.SH @@ -3736,6 +3736,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_writev HAS_WRITEV /**/ +/* DEFAULT_INC_EXCLUDES_DOT: + * This symbol, if defined, removes the legacy default behavior of + * including '.' at the end of @INC. + */ +#$default_inc_excludes_dot DEFAULT_INC_EXCLUDES_DOT /**/ + /* USE_DYNAMIC_LOADING: * This symbol, if defined, indicates that dynamic loading of * some sort is available. diff --git a/configure.com b/configure.com index 888d2d0..090d2ef 100644 --- a/configure.com +++ b/configure.com @@ -6452,6 +6452,7 @@ $ WC "db_version_minor='" + "'" $ WC "db_version_patch='" + "'" $ WC "dbgprefix='" + dbgprefix + "'" $ WC "devtype='" + devtype + "'" +$ WC "default_inc_excludes_dot=''" $ WC "direntrytype='struct dirent'" $ WC "dlext='" + dlext + "'" $ WC "dlobj='" + dlobj + "'" diff --git a/cpan/Devel-PPPort/devel/mktodo b/cpan/Devel-PPPort/devel/mktodo index c5c2a9b..2eb9ea3 100644 --- a/cpan/Devel-PPPort/devel/mktodo +++ b/cpan/Devel-PPPort/devel/mktodo @@ -17,7 +17,7 @@ use strict; use Getopt::Long; -require 'devel/devtools.pl'; +require './devel/devtools.pl'; our %opt = ( base => 0, diff --git a/cpan/Devel-PPPort/devel/mktodo.pl b/cpan/Devel-PPPort/devel/mktodo.pl index 9345a23..c479eab 100644 --- a/cpan/Devel-PPPort/devel/mktodo.pl +++ b/cpan/Devel-PPPort/devel/mktodo.pl @@ -22,7 +22,7 @@ use IO::Select; use Config; use Time::HiRes qw( gettimeofday tv_interval ); -require 'devel/devtools.pl'; +require './devel/devtools.pl'; our %opt = ( debug => 0, diff --git a/cpan/Devel-PPPort/devel/regenerate b/cpan/Devel-PPPort/devel/regenerate index dad5338..bc1742d 100644 --- a/cpan/Devel-PPPort/devel/regenerate +++ b/cpan/Devel-PPPort/devel/regenerate @@ -20,7 +20,7 @@ use File::Copy; use Getopt::Long; use Pod::Usage; -require 'devel/devtools.pl'; +require './devel/devtools.pl'; our %opt = ( check => 1, diff --git a/cpan/Devel-PPPort/devel/scanprov b/cpan/Devel-PPPort/devel/scanprov index 86910e4..804524c 100644 --- a/cpan/Devel-PPPort/devel/scanprov +++ b/cpan/Devel-PPPort/devel/scanprov @@ -17,7 +17,7 @@ use strict; use Getopt::Long; -require 'parts/ppptools.pl'; +require './parts/ppptools.pl'; our %opt = ( mode => 'check', diff --git a/cpan/Devel-PPPort/parts/apicheck.pl b/cpan/Devel-PPPort/parts/apicheck.pl index ac119a6..69d8502 100644 --- a/cpan/Devel-PPPort/parts/apicheck.pl +++ b/cpan/Devel-PPPort/parts/apicheck.pl @@ -15,7 +15,7 @@ ################################################################################ use strict; -require 'parts/ppptools.pl'; +require './parts/ppptools.pl'; if (@ARGV) { my $file = pop @ARGV; diff --git a/cpan/Math-BigInt/t/bare_mbf.t b/cpan/Math-BigInt/t/bare_mbf.t index 6b9af66..2167dca 100644 --- a/cpan/Math-BigInt/t/bare_mbf.t +++ b/cpan/Math-BigInt/t/bare_mbf.t @@ -13,4 +13,4 @@ our ($CLASS, $CALC); $CLASS = "Math::BigFloat"; $CALC = "Math::BigInt::BareCalc"; # backend -require 't/bigfltpm.inc'; # all tests here for sharing +require './t/bigfltpm.inc'; # all tests here for sharing diff --git a/cpan/Math-BigInt/t/bare_mbi.t b/cpan/Math-BigInt/t/bare_mbi.t index 93dbc7a..f2b768d 100644 --- a/cpan/Math-BigInt/t/bare_mbi.t +++ b/cpan/Math-BigInt/t/bare_mbi.t @@ -15,4 +15,4 @@ our ($CLASS, $CALC); $CLASS = "Math::BigInt"; $CALC = "Math::BigInt::BareCalc"; # backend -require 't/bigintpm.inc'; # perform same tests as bigintpm.t +require './t/bigintpm.inc'; # perform same tests as bigintpm.t diff --git a/cpan/Math-BigInt/t/bare_mif.t b/cpan/Math-BigInt/t/bare_mif.t index d63e3da..e7b9774 100644 --- a/cpan/Math-BigInt/t/bare_mif.t +++ b/cpan/Math-BigInt/t/bare_mif.t @@ -21,4 +21,4 @@ $mbf = 'Math::BigFloat'; is(Math::BigInt->config()->{lib}, 'Math::BigInt::BareCalc', 'Math::BigInt->config()->{lib}'); -require 't/mbimbf.inc'; +require './t/mbimbf.inc'; diff --git a/cpan/Math-BigInt/t/bigfltpm.t b/cpan/Math-BigInt/t/bigfltpm.t index 629cb56..a256b9f 100644 --- a/cpan/Math-BigInt/t/bigfltpm.t +++ b/cpan/Math-BigInt/t/bigfltpm.t @@ -33,4 +33,4 @@ SKIP: { is(ref($e->{_e}->[0]), '', '$e->{_e}->[0] is a scalar'); } -require 't/bigfltpm.inc'; # all tests here for sharing +require './t/bigfltpm.inc'; # all tests here for sharing diff --git a/cpan/Math-BigInt/t/bigintpm.t b/cpan/Math-BigInt/t/bigintpm.t index e87e05a..cd552ca 100644 --- a/cpan/Math-BigInt/t/bigintpm.t +++ b/cpan/Math-BigInt/t/bigintpm.t @@ -44,4 +44,4 @@ is($x, "9903520314281112085086151826", ############################################################################# # all the other tests -require 't/bigintpm.inc'; # all tests here for sharing +require './t/bigintpm.inc'; # all tests here for sharing diff --git a/cpan/Math-BigInt/t/mbf_ali.t b/cpan/Math-BigInt/t/mbf_ali.t index b44b64c..3999aa7 100644 --- a/cpan/Math-BigInt/t/mbf_ali.t +++ b/cpan/Math-BigInt/t/mbf_ali.t @@ -12,4 +12,4 @@ use Math::BigFloat; our $CLASS; $CLASS = 'Math::BigFloat'; -require 't/alias.inc'; +require './t/alias.inc'; diff --git a/cpan/Math-BigInt/t/mbi_ali.t b/cpan/Math-BigInt/t/mbi_ali.t index e65aa3c..45ed6c4 100644 --- a/cpan/Math-BigInt/t/mbi_ali.t +++ b/cpan/Math-BigInt/t/mbi_ali.t @@ -12,4 +12,4 @@ use Math::BigInt; our $CLASS; $CLASS = 'Math::BigInt'; -require 't/alias.inc'; +require './t/alias.inc'; diff --git a/cpan/Math-BigInt/t/mbimbf.t b/cpan/Math-BigInt/t/mbimbf.t index dd65da4..107da31 100644 --- a/cpan/Math-BigInt/t/mbimbf.t +++ b/cpan/Math-BigInt/t/mbimbf.t @@ -15,7 +15,7 @@ use Math::BigFloat; our $mbi = 'Math::BigInt'; our $mbf = 'Math::BigFloat'; -require 't/mbimbf.inc'; +require './t/mbimbf.inc'; # some tests that won't work with subclasses, since the things are only # guaranteed in the Math::Big(Int|Float) (unless subclass chooses to support diff --git a/cpan/Math-BigInt/t/sub_ali.t b/cpan/Math-BigInt/t/sub_ali.t index 6023be3..2f145b4 100644 --- a/cpan/Math-BigInt/t/sub_ali.t +++ b/cpan/Math-BigInt/t/sub_ali.t @@ -14,4 +14,4 @@ use Math::BigInt::Subclass; our $CLASS; $CLASS = 'Math::BigInt::Subclass'; -require 't/alias.inc'; +require './t/alias.inc'; diff --git a/cpan/Math-BigInt/t/sub_mbf.t b/cpan/Math-BigInt/t/sub_mbf.t index 69311d4..e438581 100644 --- a/cpan/Math-BigInt/t/sub_mbf.t +++ b/cpan/Math-BigInt/t/sub_mbf.t @@ -14,7 +14,7 @@ our ($CLASS, $CALC); $CLASS = "Math::BigFloat::Subclass"; $CALC = Math::BigFloat->config()->{lib}; # backend -require 't/bigfltpm.inc'; # perform same tests as bigfltpm +require './t/bigfltpm.inc'; # perform same tests as bigfltpm ############################################################################### # Now do custom tests for Subclass itself diff --git a/cpan/Math-BigInt/t/sub_mbi.t b/cpan/Math-BigInt/t/sub_mbi.t index e991ad9..500f2a4 100644 --- a/cpan/Math-BigInt/t/sub_mbi.t +++ b/cpan/Math-BigInt/t/sub_mbi.t @@ -14,7 +14,7 @@ our ($CLASS, $CALC); $CLASS = "Math::BigInt::Subclass"; $CALC = "Math::BigInt::Calc"; # backend -require 't/bigintpm.inc'; # perform same tests as bigintpm +require './t/bigintpm.inc'; # perform same tests as bigintpm ############################################################################### # Now do custom tests for Subclass itself diff --git a/cpan/Math-BigInt/t/sub_mif.t b/cpan/Math-BigInt/t/sub_mif.t index 96bf82f..250db3f 100644 --- a/cpan/Math-BigInt/t/sub_mif.t +++ b/cpan/Math-BigInt/t/sub_mif.t @@ -17,4 +17,4 @@ our ($mbi, $mbf); $mbi = 'Math::BigInt::Subclass'; $mbf = 'Math::BigFloat::Subclass'; -require 't/mbimbf.inc'; +require './t/mbimbf.inc'; diff --git a/cpan/Math-BigInt/t/upgrade.t b/cpan/Math-BigInt/t/upgrade.t index 2307a48..7ed4378 100644 --- a/cpan/Math-BigInt/t/upgrade.t +++ b/cpan/Math-BigInt/t/upgrade.t @@ -19,4 +19,4 @@ is(Math::BigInt->upgrade(), "Math::BigFloat", is(Math::BigInt->downgrade() || "", "", qq/Math::BigInt->downgrade() || ""/); -require 't/upgrade.inc'; # all tests here for sharing +require './t/upgrade.inc'; # all tests here for sharing diff --git a/cpan/Math-BigInt/t/upgradef.t b/cpan/Math-BigInt/t/upgradef.t index d208890..dbe373f 100644 --- a/cpan/Math-BigInt/t/upgradef.t +++ b/cpan/Math-BigInt/t/upgradef.t @@ -67,4 +67,4 @@ is($z, 321, . q| $z = $x->badd($y); $z|); # not yet: -#require 't/upgrade.inc'; # all tests here for sharing +#require './t/upgrade.inc'; # all tests here for sharing diff --git a/cpan/Math-BigInt/t/with_sub.t b/cpan/Math-BigInt/t/with_sub.t index 2c54107..299eea5 100644 --- a/cpan/Math-BigInt/t/with_sub.t +++ b/cpan/Math-BigInt/t/with_sub.t @@ -19,4 +19,4 @@ $CALC = "Math::BigInt::Calc"; # backend is(Math::BigFloat->config()->{with}, 'Math::BigInt::Calc', 'Math::BigFloat->config()->{with}'); -require 't/bigfltpm.inc'; # all tests here for sharing +require './t/bigfltpm.inc'; # all tests here for sharing diff --git a/cpan/Math-BigRat/t/bigfltrt.t b/cpan/Math-BigRat/t/bigfltrt.t index 4f36bde..97f8032 100644 --- a/cpan/Math-BigRat/t/bigfltrt.t +++ b/cpan/Math-BigRat/t/bigfltrt.t @@ -16,4 +16,4 @@ $CALC = "Math::BigInt::Calc"; pass(); # fails still too many tests -#require 't/bigfltpm.inc'; # all tests here for sharing +#require './t/bigfltpm.inc'; # all tests here for sharing diff --git a/cpan/Math-BigRat/t/bigratpm.t b/cpan/Math-BigRat/t/bigratpm.t index a5bb947..675d1e9 100644 --- a/cpan/Math-BigRat/t/bigratpm.t +++ b/cpan/Math-BigRat/t/bigratpm.t @@ -11,4 +11,4 @@ our ($CLASS, $CALC); $CLASS = "Math::BigRat"; $CALC = "Math::BigInt::Calc"; # backend -require 't/bigratpm.inc'; # all tests here for sharing +require './t/bigratpm.inc'; # all tests here for sharing diff --git a/cpan/perlfaq/lib/perlfaq5.pod b/cpan/perlfaq/lib/perlfaq5.pod index 22e88b8..239f92a 100644 --- a/cpan/perlfaq/lib/perlfaq5.pod +++ b/cpan/perlfaq/lib/perlfaq5.pod @@ -1278,7 +1278,7 @@ comes with Perl tries to convert C include files to Perl code, which can be C<require>d. FIONREAD ends up defined as a function in the I<sys/ioctl.ph> file: - require 'sys/ioctl.ph'; + require './sys/ioctl.ph'; $size = pack("L", 0); ioctl(FH, FIONREAD(), $size) or die "Couldn't call ioctl: $!\n"; @@ -1378,7 +1378,7 @@ used for things that Perl opened itself, even if it was a dup of a numeric descriptor as with C<MHCONTEXT> above. But if you really have to, you may be able to do this: - require 'sys/syscall.ph'; + require './sys/syscall.ph'; my $rc = syscall(SYS_close(), $fd + 0); # must force numeric die "can't sysclose $fd: $!" unless $rc == -1; diff --git a/cpan/perlfaq/lib/perlfaq8.pod b/cpan/perlfaq/lib/perlfaq8.pod index 3431417..42b27ab 100644 --- a/cpan/perlfaq/lib/perlfaq8.pod +++ b/cpan/perlfaq/lib/perlfaq8.pod @@ -239,7 +239,7 @@ and in pixels: This is more portable than the raw C<ioctl>, but not as illustrative: - require 'sys/ioctl.ph'; + require './sys/ioctl.ph'; die "no TIOCGWINSZ " unless defined &TIOCGWINSZ; open(my $tty_fh, "+</dev/tty") or die "No tty: $!"; unless (ioctl($tty_fh, &TIOCGWINSZ, $winsize='')) { diff --git a/dist/Thread-Queue/t/01_basic.t b/dist/Thread-Queue/t/01_basic.t index 2983f0b..4ec5195 100644 --- a/dist/Thread-Queue/t/01_basic.t +++ b/dist/Thread-Queue/t/01_basic.t @@ -13,7 +13,7 @@ use threads; use Thread::Queue; if ($] == 5.008) { - require 't/test.pl'; # Test::More work-alike for Perl 5.8.0 + require './t/test.pl'; # Test::More work-alike for Perl 5.8.0 } else { require Test::More; } diff --git a/dist/Thread-Queue/t/02_refs.t b/dist/Thread-Queue/t/02_refs.t index 0cebdc1..fdf8f6b 100644 --- a/dist/Thread-Queue/t/02_refs.t +++ b/dist/Thread-Queue/t/02_refs.t @@ -14,7 +14,7 @@ use threads::shared; use Thread::Queue; if ($] == 5.008) { - require 't/test.pl'; # Test::More work-alike for Perl 5.8.0 + require './t/test.pl'; # Test::More work-alike for Perl 5.8.0 } else { require Test::More; } diff --git a/dist/Thread-Queue/t/03_peek.t b/dist/Thread-Queue/t/03_peek.t index d543b59..29ef75e 100644 --- a/dist/Thread-Queue/t/03_peek.t +++ b/dist/Thread-Queue/t/03_peek.t @@ -13,7 +13,7 @@ use threads; use Thread::Queue; if ($] == 5.008) { - require 't/test.pl'; # Test::More work-alike for Perl 5.8.0 + require './t/test.pl'; # Test::More work-alike for Perl 5.8.0 } else { require Test::More; } diff --git a/dist/Thread-Queue/t/05_extract.t b/dist/Thread-Queue/t/05_extract.t index de0e78b..d8cb417 100644 --- a/dist/Thread-Queue/t/05_extract.t +++ b/dist/Thread-Queue/t/05_extract.t @@ -13,7 +13,7 @@ use threads; use Thread::Queue; if ($] == 5.008) { - require 't/test.pl'; # Test::More work-alike for Perl 5.8.0 + require './t/test.pl'; # Test::More work-alike for Perl 5.8.0 } else { require Test::More; } diff --git a/dist/Thread-Queue/t/06_insert.t b/dist/Thread-Queue/t/06_insert.t index 4f9d1df..93617e1 100644 --- a/dist/Thread-Queue/t/06_insert.t +++ b/dist/Thread-Queue/t/06_insert.t @@ -13,7 +13,7 @@ use threads; use Thread::Queue; if ($] == 5.008) { - require 't/test.pl'; # Test::More work-alike for Perl 5.8.0 + require './t/test.pl'; # Test::More work-alike for Perl 5.8.0 } else { require Test::More; } diff --git a/dist/Thread-Queue/t/07_lock.t b/dist/Thread-Queue/t/07_lock.t index b20e060..6337221 100644 --- a/dist/Thread-Queue/t/07_lock.t +++ b/dist/Thread-Queue/t/07_lock.t @@ -14,7 +14,7 @@ use Thread::Queue; use Thread::Semaphore; if ($] == 5.008) { - require 't/test.pl'; # Test::More work-alike for Perl 5.8.0 + require './t/test.pl'; # Test::More work-alike for Perl 5.8.0 } else { require Test::More; } diff --git a/dist/Thread-Queue/t/10_timed.t b/dist/Thread-Queue/t/10_timed.t index 8404720..da8b03a 100644 --- a/dist/Thread-Queue/t/10_timed.t +++ b/dist/Thread-Queue/t/10_timed.t @@ -13,7 +13,7 @@ use threads; use Thread::Queue; if ($] == 5.008) { - require 't/test.pl'; # Test::More work-alike for Perl 5.8.0 + require './t/test.pl'; # Test::More work-alike for Perl 5.8.0 } else { require Test::More; } diff --git a/dist/Thread-Semaphore/t/01_basic.t b/dist/Thread-Semaphore/t/01_basic.t index 1e9d110..cfdadb9 100644 --- a/dist/Thread-Semaphore/t/01_basic.t +++ b/dist/Thread-Semaphore/t/01_basic.t @@ -14,7 +14,7 @@ use threads::shared; use Thread::Semaphore; if ($] == 5.008) { - require 't/test.pl'; # Test::More work-alike for Perl 5.8.0 + require './t/test.pl'; # Test::More work-alike for Perl 5.8.0 } else { require Test::More; } diff --git a/dist/Thread-Semaphore/t/04_nonblocking.t b/dist/Thread-Semaphore/t/04_nonblocking.t index d1538e8..bef964e 100644 --- a/dist/Thread-Semaphore/t/04_nonblocking.t +++ b/dist/Thread-Semaphore/t/04_nonblocking.t @@ -14,7 +14,7 @@ use threads::shared; use Thread::Semaphore; if ($] == 5.008) { - require 't/test.pl'; # Test::More work-alike for Perl 5.8.0 + require './t/test.pl'; # Test::More work-alike for Perl 5.8.0 } else { require Test::More; } diff --git a/dist/Thread-Semaphore/t/05_force.t b/dist/Thread-Semaphore/t/05_force.t index ca888d8..ee7090b 100644 --- a/dist/Thread-Semaphore/t/05_force.t +++ b/dist/Thread-Semaphore/t/05_force.t @@ -14,7 +14,7 @@ use threads::shared; use Thread::Semaphore; if ($] == 5.008) { - require 't/test.pl'; # Test::More work-alike for Perl 5.8.0 + require './t/test.pl'; # Test::More work-alike for Perl 5.8.0 } else { require Test::More; } diff --git a/ext/DynaLoader/t/DynaLoader.t b/ext/DynaLoader/t/DynaLoader.t index 77fb65d..7fe30b3 100644 --- a/ext/DynaLoader/t/DynaLoader.t +++ b/ext/DynaLoader/t/DynaLoader.t @@ -4,7 +4,7 @@ use strict; use Config; push @INC, '.'; if (-f 't/test.pl') { - require 't/test.pl'; + require './t/test.pl'; } else { require '../../t/test.pl'; } diff --git a/h2pl/cbreak.pl b/h2pl/cbreak.pl index 422185e..ad4c187 100644 --- a/h2pl/cbreak.pl +++ b/h2pl/cbreak.pl @@ -12,7 +12,7 @@ sub set_cbreak { local($on) = @_; require 'sizeof.ph'; - require 'sys/ioctl.ph'; + require './sys/ioctl.ph'; ioctl(STDIN,&TIOCGETP,$sgttyb) || die "Can't ioctl TIOCGETP: $!"; diff --git a/h2pl/cbreak2.pl b/h2pl/cbreak2.pl index 8ac55a3..db71d26 100644 --- a/h2pl/cbreak2.pl +++ b/h2pl/cbreak2.pl @@ -11,7 +11,7 @@ sub cooked { sub set_cbreak { local($on) = @_; - require 'sys/ioctl.pl'; + require './sys/ioctl.pl'; ioctl(STDIN,$TIOCGETP,$sgttyb) || die "Can't ioctl TIOCGETP: $!"; diff --git a/keywords.c b/keywords.c index 74af832..9fa30e6 100644 --- a/keywords.c +++ b/keywords.c @@ -3437,5 +3437,5 @@ unknown: } /* Generated from: - * 7e3d76a333c5f9b77d47dd7d423450356b63853a1c2313d3e805042caaa4bc2c regen/keywords.pl + * db0472e0ad4f44bd0816cad799d63b60d1bbd7e11cef40ea15bf0d00f69669f6 regen/keywords.pl * ex: set ro: */ diff --git a/keywords.h b/keywords.h index eaa4120..2b1d598 100644 --- a/keywords.h +++ b/keywords.h @@ -270,5 +270,5 @@ #define KEY_y 254 /* Generated from: - * 7e3d76a333c5f9b77d47dd7d423450356b63853a1c2313d3e805042caaa4bc2c regen/keywords.pl + * db0472e0ad4f44bd0816cad799d63b60d1bbd7e11cef40ea15bf0d00f69669f6 regen/keywords.pl * ex: set ro: */ diff --git a/lib/h2ph.t b/lib/h2ph.t index 64d9dc0..bdcc389 100644 --- a/lib/h2ph.t +++ b/lib/h2ph.t @@ -1,5 +1,4 @@ #!./perl -use strict; # quickie tests to see if h2ph actually runs and does more or less what is # expected diff --git a/lib/strict.t b/lib/strict.t index d6c6ed0..bfee762 100644 --- a/lib/strict.t +++ b/lib/strict.t @@ -1,7 +1,7 @@ #!./perl chdir 't' if -d 't'; -@INC = '../lib'; +@INC = ( '.', '../lib' ); our $local_tests = 6; require "../t/lib/common.pl"; diff --git a/lib/warnings.t b/lib/warnings.t index ee696fe..7c24f3a 100644 --- a/lib/warnings.t +++ b/lib/warnings.t @@ -1,7 +1,7 @@ #!./perl chdir 't' if -d 't'; -@INC = '../lib'; +@INC = ( '.', '../lib' ); our $UTF8 = (${^OPEN} || "") =~ /:utf8/; require "../t/lib/common.pl"; diff --git a/makedef.pl b/makedef.pl index cb11e7e..68ae706 100644 --- a/makedef.pl +++ b/makedef.pl @@ -70,7 +70,7 @@ BEGIN { } use constant PLATFORM => $ARGS{PLATFORM}; -require "$ARGS{TARG_DIR}regen/embed_lib.pl"; +require "./$ARGS{TARG_DIR}regen/embed_lib.pl"; # Is the following guard strictly necessary? Added during refactoring # to keep the same behaviour when merging other code into here. diff --git a/metaconfig.h b/metaconfig.h index a5538d8..720c370 100644 --- a/metaconfig.h +++ b/metaconfig.h @@ -11,6 +11,7 @@ * in Configure, this is the way to force them into availability. * * BOOTSTRAP_CHARSET + * DEFAULT_INC_EXCLUDES_DOT * DOUBLEKIND * HAS_ACOSH * HAS_ASCTIME64 diff --git a/perl.c b/perl.c index aa7d8b6..f1501c1 100644 --- a/perl.c +++ b/perl.c @@ -4644,8 +4644,13 @@ S_init_perllib(pTHX) #endif #endif /* !PERL_IS_MINIPERL */ - if (!TAINTING_get) - S_incpush(aTHX_ STR_WITH_LEN("."), 0); + if (!TAINTING_get) { +#if !defined(PERL_IS_MINIPERL) && defined(DEFAULT_INC_EXCLUDES_DOT) + const char * const unsafe = PerlEnv_getenv("PERL_USE_UNSAFE_INC"); + if (unsafe && strEQ(unsafe, "1")) +#endif + S_incpush(aTHX_ STR_WITH_LEN("."), 0); + } } #if defined(DOSISH) || defined(__SYMBIAN32__) diff --git a/perly.act b/perly.act index 769a5cf..20f89b7 100644 --- a/perly.act +++ b/perly.act @@ -1978,5 +1978,5 @@ case 2: /* Generated from: * 5646c76b3536061de3b69eb5df829f5643d09247aa0d249bf2d2e050594b3679 perly.y - * 3e1dff60f26df8933d7aed0c0e87177a0f022c14800c0707eb62a7db4196ac98 regen_perly.pl + * 153cba5d215c1a083a0459c43f4d55c45fd0a7093c197d7247a456dcde21ea53 regen_perly.pl * ex: set ro: */ diff --git a/perly.h b/perly.h index 1fecda4..1f5d6d7 100644 --- a/perly.h +++ b/perly.h @@ -184,5 +184,5 @@ int yyparse (void); /* Generated from: * 5646c76b3536061de3b69eb5df829f5643d09247aa0d249bf2d2e050594b3679 perly.y - * 3e1dff60f26df8933d7aed0c0e87177a0f022c14800c0707eb62a7db4196ac98 regen_perly.pl + * 153cba5d215c1a083a0459c43f4d55c45fd0a7093c197d7247a456dcde21ea53 regen_perly.pl * ex: set ro: */ diff --git a/perly.tab b/perly.tab index 7c9a6da..0d0b607 100644 --- a/perly.tab +++ b/perly.tab @@ -1110,5 +1110,5 @@ static const toketypes yy_type_tab[] = /* Generated from: * 5646c76b3536061de3b69eb5df829f5643d09247aa0d249bf2d2e050594b3679 perly.y - * 3e1dff60f26df8933d7aed0c0e87177a0f022c14800c0707eb62a7db4196ac98 regen_perly.pl + * 153cba5d215c1a083a0459c43f4d55c45fd0a7093c197d7247a456dcde21ea53 regen_perly.pl * ex: set ro: */ diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index 9851e22..e7078a0 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -636,6 +636,7 @@ db_prefixtype='size_t' db_version_major='' db_version_minor='' db_version_patch='' +default_inc_excludes_dot='' direntrytype='struct dirent' dlext='none' dlsrc='dl_none.xs' diff --git a/pod/buildtoc b/pod/buildtoc index acb8cf6..75bdcf2 100644 --- a/pod/buildtoc +++ b/pod/buildtoc @@ -14,7 +14,7 @@ no locale; BEGIN { my $Top = File::Spec->catdir($FindBin::Bin, File::Spec->updir); chdir $Top or die "Can't chdir to $Top: $!"; - require 'Porting/pod_lib.pl'; + require './Porting/pod_lib.pl'; } die "$0: Usage: $0 [--quiet]\n" diff --git a/pod/perlmodlib.PL b/pod/perlmodlib.PL index 615ae4c..b92f9ca 100644 --- a/pod/perlmodlib.PL +++ b/pod/perlmodlib.PL @@ -13,7 +13,7 @@ if (@ARGV) { chdir $workdir or die "Couldn't chdir to '$workdir': $!"; } -require 'regen/regen_lib.pl'; +require './regen/regen_lib.pl'; # MANIFEST itself is Unix style filenames, so we have to assume that Unix style # filenames will work. diff --git a/regcharclass.h b/regcharclass.h index cb43aca..907fb4e 100644 --- a/regcharclass.h +++ b/regcharclass.h @@ -1876,6 +1876,6 @@ * 066d6e75f95cf6794161c8ac0b1a40990277de90eefb913be2e675a7cba38d59 lib/unicore/mktables * cdecb300baad839a6f62791229f551a4fa33f3cbdca08e378dc976466354e778 lib/unicore/version * 913d2f93f3cb6cdf1664db888bf840bc4eb074eef824e082fceda24a9445e60c regen/charset_translations.pl - * 66e20f857451956f9fc7ad7432de972e84fb857885009838878bcf6f91ffbeef regen/regcharclass.pl + * 39e12eb402240416c97b52f918a4e8c31aeeaec1fdcb92bfdcd1d73fb86a23b2 regen/regcharclass.pl * 393f8d882713a3ba227351ad0f00ea4839fda74fcf77dcd1cdf31519925adba5 regen/regcharclass_multi_char_folds.pl * ex: set ro: */ diff --git a/regen.pl b/regen.pl index 8788668..71a6eda 100644 --- a/regen.pl +++ b/regen.pl @@ -15,7 +15,7 @@ use strict; my $tap = $ARGV[0] && $ARGV[0] eq '--tap' ? '# ' : ''; foreach my $pl (map {chomp; "regen/$_"} <DATA>) { - my @command = ($^X, $pl, @ARGV); + my @command = ($^X, '-I.', $pl, @ARGV); print "$tap@command\n"; system @command and die "@command failed: $?" diff --git a/regen/ebcdic.pl b/regen/ebcdic.pl index fa8a051..a3e049d 100644 --- a/regen/ebcdic.pl +++ b/regen/ebcdic.pl @@ -1,8 +1,11 @@ use v5.16.0; use strict; use warnings; -require 'regen/regen_lib.pl'; -require 'regen/charset_translations.pl'; + +BEGIN { unshift @INC, '.' } + +require './regen/regen_lib.pl'; +require './regen/charset_translations.pl'; # Generates the EBCDIC translation tables that were formerly hard-coded into # utfebcdic.h diff --git a/regen/embed.pl b/regen/embed.pl index 50ca2eb..19256eb 100755 --- a/regen/embed.pl +++ b/regen/embed.pl @@ -26,8 +26,8 @@ use strict; BEGIN { # Get function prototypes - require 'regen/regen_lib.pl'; - require 'regen/embed_lib.pl'; + require './regen/regen_lib.pl'; + require './regen/embed_lib.pl'; } my $SPLINT = 0; # Turn true for experimental splint support http://www.splint.org diff --git a/regen/feature.pl b/regen/feature.pl index 97d0359..f8cf4a8 100755 --- a/regen/feature.pl +++ b/regen/feature.pl @@ -11,7 +11,7 @@ # This script is normally invoked from regen.pl. BEGIN { - require 'regen/regen_lib.pl'; + require './regen/regen_lib.pl'; push @INC, './lib'; } use strict ; diff --git a/regen/genpacksizetables.pl b/regen/genpacksizetables.pl index 7a03dcd..d886822 100644 --- a/regen/genpacksizetables.pl +++ b/regen/genpacksizetables.pl @@ -3,7 +3,7 @@ # it will generate EBCDIC too. (TODO) use strict; use Encode; -require 'regen/regen_lib.pl'; +require './regen/regen_lib.pl'; sub make_text { my ($chrmap, $letter, $unpredictable, $nocsum, $size, $condition) = @_; diff --git a/regen/keywords.pl b/regen/keywords.pl index eafe58c..9619d86 100755 --- a/regen/keywords.pl +++ b/regen/keywords.pl @@ -11,7 +11,7 @@ use strict; use Devel::Tokenizer::C 0.05; -require 'regen/regen_lib.pl'; +require './regen/regen_lib.pl'; my $h = open_new('keywords.h', '>', { by => 'regen/keywords.pl', from => 'its data', diff --git a/regen/lib_cleanup.pl b/regen/lib_cleanup.pl index c9d6e43..5e40b40 100644 --- a/regen/lib_cleanup.pl +++ b/regen/lib_cleanup.pl @@ -1,7 +1,7 @@ #!perl -w use strict; -require 'regen/regen_lib.pl'; -require 'Porting/pod_lib.pl'; +require './regen/regen_lib.pl'; +require './Porting/pod_lib.pl'; use vars qw($TAP $Verbose); # For processing later diff --git a/regen/mg_vtable.pl b/regen/mg_vtable.pl index a05a7d4..342f5e0 100644 --- a/regen/mg_vtable.pl +++ b/regen/mg_vtable.pl @@ -20,7 +20,7 @@ require 5.004; BEGIN { # Get function prototypes - require 'regen/regen_lib.pl'; + require './regen/regen_lib.pl'; } my %mg = diff --git a/regen/miniperlmain.pl b/regen/miniperlmain.pl index 9123b3f..37a3fff 100644 --- a/regen/miniperlmain.pl +++ b/regen/miniperlmain.pl @@ -4,7 +4,7 @@ use strict; BEGIN { # Get function prototypes - require 'regen/regen_lib.pl'; + require './regen/regen_lib.pl'; unshift @INC, 'ext/ExtUtils-Miniperl/lib'; } diff --git a/regen/mk_PL_charclass.pl b/regen/mk_PL_charclass.pl index 5b609e5..8b217b3 100644 --- a/regen/mk_PL_charclass.pl +++ b/regen/mk_PL_charclass.pl @@ -2,8 +2,8 @@ use v5.15.8; use strict; use warnings; -require 'regen/regen_lib.pl'; -require 'regen/charset_translations.pl'; +require './regen/regen_lib.pl'; +require './regen/charset_translations.pl'; # This program outputs l1_charclass_tab.h, which defines the guts of the # PL_charclass table. Each line is a bit map of properties that the Unicode diff --git a/regen/mk_invlists.pl b/regen/mk_invlists.pl index 460a72c..d6ff165 100644 --- a/regen/mk_invlists.pl +++ b/regen/mk_invlists.pl @@ -8,8 +8,8 @@ use Unicode::UCD qw(prop_aliases prop_invlist prop_invmap search_invlist ); -require 'regen/regen_lib.pl'; -require 'regen/charset_translations.pl'; +require './regen/regen_lib.pl'; +require './regen/charset_translations.pl'; # This program outputs charclass_invlists.h, which contains various inversion # lists in the form of C arrays that are to be used as-is for inversion lists. diff --git a/regen/opcode.pl b/regen/opcode.pl index edb9f4d..0bd62ce 100755 --- a/regen/opcode.pl +++ b/regen/opcode.pl @@ -20,7 +20,7 @@ use strict; BEGIN { # Get function prototypes - require 'regen/regen_lib.pl'; + require './regen/regen_lib.pl'; } my $oc = open_new('opcode.h', '>', @@ -924,7 +924,7 @@ package main; # which define what bits in op_private have what meanings for each op. # It populates %LABELS, %DEFINES, %FLAGS, %BITFIELDS. -require 'regen/op_private'; +require './regen/op_private'; #use Data::Dumper; #print Dumper \%LABELS, \%DEFINES, \%FLAGS, \%BITFIELDS; diff --git a/regen/overload.pl b/regen/overload.pl index c95ab2d..38dac32 100644 --- a/regen/overload.pl +++ b/regen/overload.pl @@ -16,7 +16,7 @@ BEGIN { # Get function prototypes - require 'regen/regen_lib.pl'; + require './regen/regen_lib.pl'; } use strict; diff --git a/regen/reentr.pl b/regen/reentr.pl index 3a0afaf..564a68f 100644 --- a/regen/reentr.pl +++ b/regen/reentr.pl @@ -18,7 +18,7 @@ BEGIN { # Get function prototypes - require 'regen/regen_lib.pl'; + require './regen/regen_lib.pl'; } use strict; diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl index f3f8b99..c593334 100755 --- a/regen/regcharclass.pl +++ b/regen/regcharclass.pl @@ -11,8 +11,8 @@ our $hex_fmt= "0x%02X"; sub DEBUG () { 0 } $|=1 if DEBUG; -require 'regen/regen_lib.pl'; -require 'regen/charset_translations.pl'; +require './regen/regen_lib.pl'; +require './regen/charset_translations.pl'; require "regen/regcharclass_multi_char_folds.pl"; =head1 NAME diff --git a/regen/regcomp.pl b/regen/regcomp.pl index 850eeb9..94aa572 100644 --- a/regen/regcomp.pl +++ b/regen/regcomp.pl @@ -20,7 +20,7 @@ BEGIN { # Get function prototypes - require 'regen/regen_lib.pl'; + require './regen/regen_lib.pl'; } use strict; diff --git a/regen/uconfig_h.pl b/regen/uconfig_h.pl index 99a74f1..1c3d1b2 100755 --- a/regen/uconfig_h.pl +++ b/regen/uconfig_h.pl @@ -10,7 +10,7 @@ use strict; use Config; -require 'regen/regen_lib.pl'; +require './regen/regen_lib.pl'; my ($uconfig_h, $uconfig_h_new, $config_h_sh) = ('uconfig.h', 'uconfig.h-new', 'config_h.SH'); diff --git a/regen/unicode_constants.pl b/regen/unicode_constants.pl index acdbaa3..cbe3179 100644 --- a/regen/unicode_constants.pl +++ b/regen/unicode_constants.pl @@ -1,8 +1,8 @@ use v5.16.0; use strict; use warnings; -require 'regen/regen_lib.pl'; -require 'regen/charset_translations.pl'; +require './regen/regen_lib.pl'; +require './regen/charset_translations.pl'; use Unicode::UCD; use charnames qw(:loose); diff --git a/regen/warnings.pl b/regen/warnings.pl index 40e7265..739a7b4 100644 --- a/regen/warnings.pl +++ b/regen/warnings.pl @@ -19,7 +19,7 @@ $VERSION = '1.37'; BEGIN { - require 'regen/regen_lib.pl'; + require './regen/regen_lib.pl'; push @INC, './lib'; } use strict ; diff --git a/regen_perly.pl b/regen_perly.pl index f9ef04b..b8fb5d7 100644 --- a/regen_perly.pl +++ b/regen_perly.pl @@ -35,7 +35,7 @@ sub usage { die "usage: $0 [ -b bison_executable ] [ file.y ]\n" } use warnings; use strict; -BEGIN { require 'regen/regen_lib.pl'; } +BEGIN { require './regen/regen_lib.pl'; } my $bison = 'bison'; diff --git a/symbian/config.sh b/symbian/config.sh index 1c08bd3..e6ca7fb 100644 --- a/symbian/config.sh +++ b/symbian/config.sh @@ -583,6 +583,7 @@ db_prefixtype='size_t' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct dirent' dlext='dll' dlsrc='dl_symbian.xs' diff --git a/t/comp/line_debug.t b/t/comp/line_debug.t index 8361194..71626bb 100644 --- a/t/comp/line_debug.t +++ b/t/comp/line_debug.t @@ -1,5 +1,7 @@ #!./perl +BEGIN { unshift @INC, '.' } + chdir 't' if -d 't'; sub ok { diff --git a/t/lib/warnings/op b/t/lib/warnings/op index 8240dd6..e8d93e8 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -1453,6 +1453,7 @@ END { print "in end\n"; } print "in mainline\n"; 1; --FILE-- +BEGIN { unshift @INC, '.' } require abc; do "abc.pm"; EXPECT diff --git a/t/op/goto.t b/t/op/goto.t index 6be6413..05f1573 100644 --- a/t/op/goto.t +++ b/t/op/goto.t @@ -280,7 +280,7 @@ YYY: print "OK\n"; EOT close $f; -$r = runperl(prog => 'use Op_goto01; print qq[DONE\n]'); +$r = runperl(prog => 'BEGIN { unshift @INC, q[.] } use Op_goto01; print qq[DONE\n]'); is($r, "OK\nDONE\n", "goto within use-d file"); unlink_all "Op_goto01.pm"; diff --git a/t/porting/authors.t b/t/porting/authors.t index bc69e3a..563b92a 100644 --- a/t/porting/authors.t +++ b/t/porting/authors.t @@ -7,7 +7,7 @@ BEGIN { use TestInit qw(T); # T is chdir to the top level use strict; -require 't/test.pl'; +require './t/test.pl'; find_git_or_skip('all'); # This is the subset of "pretty=fuller" that checkAUTHORS.pl actually needs: diff --git a/t/porting/bench.t b/t/porting/bench.t index 527995a..bbebd37 100644 --- a/t/porting/bench.t +++ b/t/porting/bench.t @@ -8,7 +8,7 @@ BEGIN { use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute use strict; -require 't/test.pl'; +require './t/test.pl'; my $source = find_git_or_skip('all'); chdir $source or die "Can't chdir to $source: $!"; diff --git a/t/porting/cmp_version.t b/t/porting/cmp_version.t index 55b4003..bbbc852 100644 --- a/t/porting/cmp_version.t +++ b/t/porting/cmp_version.t @@ -16,7 +16,7 @@ BEGIN { use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute use strict; -require 't/test.pl'; +require './t/test.pl'; my $source = find_git_or_skip('all'); chdir $source or die "Can't chdir to $source: $!"; diff --git a/t/porting/corelist.t b/t/porting/corelist.t index 251a260..820ff3e 100644 --- a/t/porting/corelist.t +++ b/t/porting/corelist.t @@ -6,7 +6,7 @@ use TestInit qw(T); use strict; use Config; -require 't/test.pl'; +require './t/test.pl'; plan(tests => 6); diff --git a/t/porting/diag.t b/t/porting/diag.t index ccde8cb..cdd9d64 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -9,7 +9,7 @@ use warnings; use strict; use Config; -require 't/test.pl'; +require './t/test.pl'; if ( $Config{usecrosscompile} ) { skip_all( "Not all files are available during cross-compilation" ); @@ -26,7 +26,7 @@ plan('no_plan'); my $make_exceptions_list = ($ARGV[0]||'') eq '--make-exceptions-list' and shift; -require 'regen/embed_lib.pl'; +require './regen/embed_lib.pl'; # Look for functions that look like they could be diagnostic ones. my @functions; diff --git a/t/porting/globvar.t b/t/porting/globvar.t index 8dd45ba..605eba0 100644 --- a/t/porting/globvar.t +++ b/t/porting/globvar.t @@ -4,7 +4,7 @@ use TestInit qw(T); use strict; use Config; -require 't/test.pl'; +require './t/test.pl'; skip_all("Code to read symbols not ported to $^O") if $^O eq 'VMS' or $^O eq 'MSWin32'; diff --git a/t/porting/manifest.t b/t/porting/manifest.t index b0dd440..7adb061 100644 --- a/t/porting/manifest.t +++ b/t/porting/manifest.t @@ -30,7 +30,7 @@ BEGIN { } use TestInit qw(T); # T is chdir to the top level -require 't/test.pl'; +require './t/test.pl'; skip_all("Cross-compiling, the entire source might not be available") if $Config{usecrosscompile}; diff --git a/t/porting/pending-author.t b/t/porting/pending-author.t index 4dceaf6..0aaa546 100644 --- a/t/porting/pending-author.t +++ b/t/porting/pending-author.t @@ -27,7 +27,7 @@ use TestInit qw(T); # T is chdir to the top level use strict; use File::Spec; -require 't/test.pl'; +require './t/test.pl'; find_git_or_skip('all'); my $devnull = File::Spec->devnull; diff --git a/t/porting/pod_rules.t b/t/porting/pod_rules.t index 46a0114..894b153 100644 --- a/t/porting/pod_rules.t +++ b/t/porting/pod_rules.t @@ -25,7 +25,7 @@ BEGIN { chdir '..'; } @INC = qw(lib .); # Special @INC. - require 't/test.pl'; + require './t/test.pl'; } use strict; diff --git a/t/porting/readme.t b/t/porting/readme.t index e127920..232a45f 100644 --- a/t/porting/readme.t +++ b/t/porting/readme.t @@ -10,7 +10,7 @@ BEGIN { use TestInit qw(T); # T is chdir to the top level use strict; use warnings; -require 't/test.pl'; +require './t/test.pl'; my @porting_files; open my $man, "MANIFEST" or die "Can't open MANIFEST: $!"; diff --git a/t/porting/regen.t b/t/porting/regen.t index 39aaf64..a3944ca 100644 --- a/t/porting/regen.t +++ b/t/porting/regen.t @@ -8,8 +8,8 @@ BEGIN { use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute use strict; -require 'regen/regen_lib.pl'; -require 't/test.pl'; +require './regen/regen_lib.pl'; +require './t/test.pl'; $::NO_ENDING = $::NO_ENDING = 1; if ( $^O eq "VMS" ) { @@ -97,7 +97,7 @@ OUTER: foreach my $file (@files) { } foreach (@progs) { - my $command = "$^X $_ --tap"; + my $command = "$^X -I. $_ --tap"; system $command and die "Failed to run $command: $?"; } diff --git a/t/porting/utils.t b/t/porting/utils.t index 475380d..92eafbd 100644 --- a/t/porting/utils.t +++ b/t/porting/utils.t @@ -22,7 +22,7 @@ BEGIN { use TestInit qw(T); # T is chdir to the top level use strict; -require 't/test.pl'; +require './t/test.pl'; # It turns out that, since the default @INC will include your old 5.x libs, if # you have them, the Porting utils might load a library that no longer compiles diff --git a/t/re/pat.t b/t/re/pat.t index eb321e9..b8d7680 100644 --- a/t/re/pat.t +++ b/t/re/pat.t @@ -1699,7 +1699,7 @@ EOP # NOTE - Do not put quotes in the code! # NOTE - We have to triple escape the backref in the pattern below. my $code=' - BEGIN{require q(test.pl);} + BEGIN{require q(./test.pl);} watchdog(3); for my $len (1 .. 20) { my $eights= q(8) x $len; @@ -1715,7 +1715,7 @@ EOP # #123562] my $code=' - BEGIN{require q(test.pl);} + BEGIN{require q(./test.pl);} use Encode qw(_utf8_on); # \x80 and \x41 are continuation bytes in their respective # character sets @@ -1783,7 +1783,7 @@ EOP my ($expr, $expect, $test_name, $cap1)= @$tuple; # avoid quotes in this code! my $code=' - BEGIN{require q(test.pl);} + BEGIN{require q(./test.pl);} watchdog(3); my $status= eval(q{ !(' . $expr . ') ? q(failed) : ' . ($cap1 ? '($1 ne q['.$cap1.']) ? qq(badmatch:$1) : ' : '') . diff --git a/t/run/runenv.t b/t/run/runenv.t index 82846a4..6f235d2 100644 --- a/t/run/runenv.t +++ b/t/run/runenv.t @@ -285,7 +285,12 @@ is ($err, '', 'No errors when determining @INC'); my @default_inc = split /\n/, $out; -is ($default_inc[-1], '.', '. is last in @INC'); +if ($Config{default_inc_excludes_dot}) { + ok !(grep { $_ eq '.' } @default_inc), '. is not in @INC'; +} +else { + is ($default_inc[-1], '.', '. is last in @INC'); +} my $sep = $Config{path_sep}; foreach (['nothing', ''], diff --git a/t/run/switches.t b/t/run/switches.t index 0018a74..b61be56 100644 --- a/t/run/switches.t +++ b/t/run/switches.t @@ -194,12 +194,12 @@ sub import { print map "<\$_>", \@_ } SWTESTPM close $f or die "Could not close: $!"; $r = runperl( - switches => [ "-M$package" ], + switches => [ "-I.", "-M$package" ], prog => '1', ); is( $r, "<$package>", '-M' ); $r = runperl( - switches => [ "-M$package=foo" ], + switches => [ "-I.", "-M$package=foo" ], prog => '1', ); is( $r, "<$package><foo>", '-M with import parameter' ); @@ -213,7 +213,7 @@ SWTESTPM is( $r, '', '-m' ); } $r = runperl( - switches => [ "-m$package=foo,bar" ], + switches => [ "-I.", "-m$package=foo,bar" ], prog => '1', ); is( $r, "<$package><foo><bar>", '-m with import parameters' ); diff --git a/t/test.pl b/t/test.pl index 349bcc9..de2ada0 100644 --- a/t/test.pl +++ b/t/test.pl @@ -652,7 +652,7 @@ sub _create_runperl { # Create the string to qx in runperl(). $runperl = "$ENV{PERL_RUNPERL_DEBUG} $runperl"; } unless ($args{nolib}) { - $runperl = $runperl . ' "-I../lib"'; # doublequotes because of VMS + $runperl = $runperl . ' "-I../lib" "-I." '; # doublequotes because of VMS } if ($args{switches}) { local $Level = 2; @@ -1261,6 +1261,7 @@ sub run_multiple_progs { open my $fh, '>', $tmpfile or die "Cannot open >$tmpfile: $!"; print $fh q{ BEGIN { + push @INC, '.'; open STDERR, '>&', STDOUT or die "Can't dup STDOUT->STDERR: $!;"; } diff --git a/uconfig.h b/uconfig.h index d2c6a48..0600ebd 100644 --- a/uconfig.h +++ b/uconfig.h @@ -3701,6 +3701,12 @@ */ /*#define HAS_WRITEV / **/ +/* DEFAULT_INC_EXCLUDES_DOT: + * This symbol, if defined, removes the legacy default behavior of + * including '.' at the end of @INC. + */ +# DEFAULT_INC_EXCLUDES_DOT /**/ + /* USE_DYNAMIC_LOADING: * This symbol, if defined, indicates that dynamic loading of * some sort is available. @@ -5348,6 +5354,6 @@ #endif /* Generated from: - * 9743712ac45ccdcff0ac2d1335543fd3775cc9cdc5cdc686ad9091d22b3c2126 config_h.SH - * 4145d7916a5873433a2a9e6c68b1ce00b0f46df11a359453e5010576ef149634 uconfig.sh + * a0cea6273c16c1c5d8625665c84bda01926ce960c26873d4e5596b5b02a53e92 config_h.SH + * 0413c6aa363e543b4bfdf09337a7ebf8319009504ac71e1168e74a23141bfe3c uconfig.sh * ex: set ro: */ diff --git a/uconfig.sh b/uconfig.sh index 3174bba..a7b2615 100644 --- a/uconfig.sh +++ b/uconfig.sh @@ -574,6 +574,7 @@ db_prefixtype='size_t' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct dirent' doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f' doublekind='3' diff --git a/uconfig64.sh b/uconfig64.sh index 1eb7eac..27d4a18 100644 --- a/uconfig64.sh +++ b/uconfig64.sh @@ -575,6 +575,7 @@ db_prefixtype='size_t' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct dirent' doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f' doublekind='3' diff --git a/utils/Makefile.PL b/utils/Makefile.PL index 27c371f..85b0833 100644 --- a/utils/Makefile.PL +++ b/utils/Makefile.PL @@ -13,7 +13,7 @@ if (@ARGV) { # attempting to move the work from them to the extension directories and # ExtUtils::MakeMaker. -require 'regen/regen_lib.pl'; +require './regen/regen_lib.pl'; my $target = 'utils/Makefile'; print "Extracting $target (with variable substitutions)\n"; diff --git a/utils/c2ph.PL b/utils/c2ph.PL index ea87a6f..c5b5a3f 100644 --- a/utils/c2ph.PL +++ b/utils/c2ph.PL @@ -198,8 +198,8 @@ them in terms of packages and functions. Consider the following program: #!/usr/local/bin/perl require 'syscall.ph'; - require 'sys/time.ph'; - require 'sys/resource.ph'; + require './sys/time.ph'; + require './sys/resource.ph'; $ru = "\0" x &rusage'sizeof(); diff --git a/utils/perlivp.PL b/utils/perlivp.PL index e522913..81f8ae4 100644 --- a/utils/perlivp.PL +++ b/utils/perlivp.PL @@ -231,7 +231,7 @@ if (defined($Config{'extensions'})) { next if $_ eq 'XS/APItest'; next if $_ eq 'XS/Typemap'; # VMS$ perl -e "eval ""require \""Devel/DProf.pm\"";"" print $@" - # \NT> perl -e "eval \"require 'Devel/DProf.pm'\"; print $@" + # \NT> perl -e "eval \"require './Devel/DProf.pm'\"; print $@" # DProf: run perl with -d to use DProf. # Compilation failed in require at (eval 1) line 1. eval " require \"$_.pm\"; "; diff --git a/win32/config.ce b/win32/config.ce index 47042d8..3005086 100644 --- a/win32/config.ce +++ b/win32/config.ce @@ -624,6 +624,7 @@ db_prefixtype='int' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct direct' dlext='dll' dlsrc='dl_win32.xs' diff --git a/win32/config.gc b/win32/config.gc index 34b670e..b726e7d 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -625,6 +625,7 @@ db_prefixtype='int' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct direct' dlext='dll' dlltool='~ARCHPREFIX~dlltool' diff --git a/win32/config.vc b/win32/config.vc index cfac6e7..5731b88 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -625,6 +625,7 @@ db_prefixtype='int' db_version_major='0' db_version_minor='0' db_version_patch='0' +default_inc_excludes_dot='' direntrytype='struct direct' dlext='dll' dlsrc='dl_win32.xs' -- Perl5 Master Repository
