X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Flib.pm;h=8748613588f39fff11a49ef11391b4a6dc79384d;hb=a4f3eea9be6bcf3c1a2f99ac49d0585bf5fe8789;hp=546ae87b8918c943290888f43575896c2a43a077;hpb=a5f75d667838e8e7bb037880391f5c44476d33b4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/lib.pm b/lib/lib.pm index 546ae87..8748613 100644 --- a/lib/lib.pm +++ b/lib/lib.pm @@ -11,10 +11,15 @@ my $archname = $Config{'archname'}; sub import { shift; foreach (reverse @_) { + unless (defined $_ and $_ ne '') { + require Carp; + Carp::carp("Empty or undefined compile time value given"); # at foo.pl line ... + } unshift(@INC, $_); # Put a corresponding archlib directory infront of $_ if it # looks like $_ has an archlib directory below it. - unshift(@INC, "$_/$archname") if -d "$_/$archname/auto"; + unshift(@INC, "$_/$archname/$]") if -d "$_/$archname/$]/auto"; + unshift(@INC, "$_/$archname") if -d "$_/$archname/auto"; } } @@ -118,7 +123,7 @@ can say =head1 SEE ALSO -AddINC - optional module which deals with paths relative to the source file. +FindBin - optional module which deals with paths relative to the source file. =head1 AUTHOR