diff --git a/helpers/perl b/helpers/perl index f847dc74..8d44235a 100644 --- a/helpers/perl +++ b/helpers/perl @@ -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; } }