X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f4d99ac1ca03121255e545df89e7d841a02cc0bf..61531aa2d4702388f81a4a9c8f78821f1cb5128e:/pm_filter?ds=inline 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}; }