From: Brent B. Powers Date: Thu, 10 Oct 1996 18:22:05 +0000 (-0400) Subject: Re: patch for lib.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=016609bcafdaad73410c6984a3d020d5529e5770;p=p5sagit%2Fp5-mst-13.2.git Re: patch for lib.pm Ignore undefined entries. --- diff --git a/lib/lib.pm b/lib/lib.pm index 8748613..8ca28de 100644 --- a/lib/lib.pm +++ b/lib/lib.pm @@ -11,9 +11,11 @@ my $archname = $Config{'archname'}; sub import { shift; foreach (reverse @_) { - unless (defined $_ and $_ ne '') { + ## Ignore this if not defined. + next unless defined($_); + if ($_ eq '') { require Carp; - Carp::carp("Empty or undefined compile time value given"); # at foo.pl line ... + Carp::carp("Empty compile time value given to use lib"); # at foo.pl line ... } unshift(@INC, $_); # Put a corresponding archlib directory infront of $_ if it