diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-06-25 19:57:19 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-06-25 19:57:19 +0200 |
commit | e63be7465b2d564165a64209685cfd7026a2005b (patch) | |
tree | ff47a7c8e5014efbcaf54a81c56527e2c94e89ef /pp_ctl.c | |
parent | 15932acc618e3c642a4814dee6429b92b088b3fd (diff) | |
download | perl-e63be7465b2d564165a64209685cfd7026a2005b.tar.gz |
Trim all trailing / from "." in @INC when filling %INC
This fixes bug #66942 : as a / was left in the directory name,
$INC{"Foo.pm"} for a file loaded from the current directory
was given the incorrect value "/Foo.pm".
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -3489,8 +3489,10 @@ PP(pp_require) tryname = SvPVX_const(namesv); tryrsfp = doopen_pm(tryname, SvCUR(namesv)); if (tryrsfp) { - if (tryname[0] == '.' && tryname[1] == '/') - tryname += 2; + if (tryname[0] == '.' && tryname[1] == '/') { + ++tryname; + while (*++tryname == '/'); + } break; } else if (errno == EMFILE) |