X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f4d99ac1ca03121255e545df89e7d841a02cc0bf..376944cb026945ab597db01eb1e3aea4fa320007:/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}; }