Skip to content

Commit c41e888

Browse files
committed
* Avoid loading modules from relative paths in @inc for Text::Diff etc.
Also reported by John Lightsey.
1 parent 8a91645 commit c41e888

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: lib/Module/Signature.pm

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ sub _verify {
119119
my $sigtext = shift || '';
120120
my $plaintext = shift || '';
121121

122+
# Avoid loading modules from relative paths in @INC.
123+
local @INC = grep { File::Spec->file_name_is_absolute($_) } @INC;
122124
local $SIGNATURE = $signature if $signature ne $SIGNATURE;
123125

124126
if ($AutoKeyRetrieve and !$CanKeyRetrieve) {

0 commit comments

Comments
 (0)