]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - pm_filter
web commit by StefanoZacchiroli: tiny bit for sharing css formatting between inline...
[git.ikiwiki.info.git] / pm_filter
index 89449bd914122b88f85145a7fd7223ac5635f021..f61e7810b686cc8a1995134b9f8ed75ded158044 100755 (executable)
--- 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";
+       }
 }