Skip to content

Commit 5e5bb90

Browse files
authored
Merge pull request #12 from fastmailops/ConfigurableLibPth
Respect PERL_LIBPATH if set
2 parents cb5eb3c + 2243383 commit 5e5bb90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile.PL

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ sub search_lib {
1919
}
2020
my $libbase = 'lib' . substr($lib, 2) . $Config{lib_ext};
2121
my $libbase_so = 'lib' . substr($lib, 2) . "." . $Config{so};
22-
for my $path (split(' ', $Config{libpth})) {
22+
my @paths = split(' ', $Config{libpth});
23+
push @paths, $ENV{PERL_LIBPATH} if exists $ENV{PERL_LIBPATH};
24+
for my $path (@paths) {
2325
if (-f $path . '/' . $libbase) {
2426
print "$path/$libbase\n";
2527
print "Found '$path/$libbase'.\n";

0 commit comments

Comments
 (0)