summaryrefslogtreecommitdiff
path: root/cpan/Module-Load
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/Module-Load')
-rw-r--r--cpan/Module-Load/lib/Module/Load.pm4
-rw-r--r--cpan/Module-Load/t/01_Module-Load.t1
2 files changed, 4 insertions, 1 deletions
diff --git a/cpan/Module-Load/lib/Module/Load.pm b/cpan/Module-Load/lib/Module/Load.pm
index 7087b5e8bf..3a83c386a2 100644
--- a/cpan/Module-Load/lib/Module/Load.pm
+++ b/cpan/Module-Load/lib/Module/Load.pm
@@ -1,6 +1,6 @@
package Module::Load;
-$VERSION = '0.20';
+$VERSION = '0.22';
use strict;
use File::Spec ();
@@ -49,6 +49,8 @@ sub _to_file{
## trailing blanks ignored by default. [rt #69886]
my @parts = split /::/, $_, -1;
+ ## make sure that we can't hop out of @INC
+ shift @parts if @parts && !$parts[0];
### because of [perl #19213], see caveats ###
my $file = $^O eq 'MSWin32'
diff --git a/cpan/Module-Load/t/01_Module-Load.t b/cpan/Module-Load/t/01_Module-Load.t
index 0aaed74be0..228b31d7bd 100644
--- a/cpan/Module-Load/t/01_Module-Load.t
+++ b/cpan/Module-Load/t/01_Module-Load.t
@@ -17,6 +17,7 @@ use Test::More 'no_plan';
{ my @Map = (
# module flag diagnostic
[q|Must::Be::Loaded|, 1, 'module'],
+ [q|::Must::Be::Loaded|, 1, 'module'],
[q|LoadMe.pl|, 0, 'file' ],
[q|LoadIt|, 1, 'ambiguous module' ],
[q|ToBeLoaded|, 0, 'ambiguous file' ],