perl*: Fix handling of relative paths in @INC.

master
Ville Skyttä 2013-05-19 22:32:56 +03:00
parent 5c6b1bb4a4
commit 18c28bb9a2
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@
use strict;
use Config;
use Cwd;
use File::Spec::Functions;
my %seen;
@ -47,8 +48,10 @@ sub print_modules_real {
sub print_modules {
my ($word) = @_;
my $origdir = getcwd;
foreach my $directory (@INC) {
print_modules_real(undef, $directory, $word);
chdir $origdir;
}
}