X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f4d99ac1ca03121255e545df89e7d841a02cc0bf..0b977fa22cabf8e1050857412123015c07c30c19:/pm_filter diff --git a/pm_filter b/pm_filter index 89449bd91..a80ce04f0 100755 --- a/pm_filter +++ b/pm_filter @@ -3,6 +3,7 @@ BEGIN { $prefix=shift; $ver=shift; + $libdir=shift; } if (/INSTALLDIR_AUTOREPLACE/) { @@ -12,5 +13,13 @@ elsif (/VERSION_AUTOREPLACE/) { $_=qq{our \$version="$ver";}; } elsif (/^use lib/) { - $_=""; + if (grep { $_ eq $libdir } @INC) { + $_=""; + } + else { + $_="use lib '$libdir';\n"; + } +} +elsif ($. == 1 && $ENV{NOTAINT} && m{^(#!/usr/bin/perl) -T$}) { + $_=qq{$1\n}; }