summaryrefslogtreecommitdiff
path: root/lib/lib.pm
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-06-03 00:21:06 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-06-03 00:21:06 +0000
commitaf3dad466fe82f837db174449dfa212f6b1726a8 (patch)
tree71481aac1f73e2f5126f2a4939ffc512c5471c9c /lib/lib.pm
parent1f997daff4fff94748c052f95e7390fac6fc4aec (diff)
downloadperl-af3dad466fe82f837db174449dfa212f6b1726a8.tar.gz
perl 5.003_01: lib/lib.pm
Handle empty strings gracefully Look for architecture-specific directory with or without version Update reference to FindBin in documentation
Diffstat (limited to 'lib/lib.pm')
-rw-r--r--lib/lib.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/lib.pm b/lib/lib.pm
index 546ae87b89..8748613588 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