summaryrefslogtreecommitdiff
path: root/pm_filter
diff options
context:
space:
mode:
Diffstat (limited to 'pm_filter')
-rwxr-xr-xpm_filter8
1 files changed, 7 insertions, 1 deletions
diff --git a/pm_filter b/pm_filter
index 89449bd91..f61e7810b 100755
--- a/pm_filter
+++ b/pm_filter
@@ -3,6 +3,7 @@
BEGIN {
$prefix=shift;
$ver=shift;
+ $libdir=shift;
}
if (/INSTALLDIR_AUTOREPLACE/) {
@@ -12,5 +13,10 @@ elsif (/VERSION_AUTOREPLACE/) {
$_=qq{our \$version="$ver";};
}
elsif (/^use lib/) {
- $_="";
+ if (grep { $_ eq $libdir } @INC) {
+ $_="";
+ }
+ else {
+ $_="use lib '$libdir';\n";
+ }
}