From: Stas Bekman Date: Mon, 17 Jun 2002 16:31:48 +0000 (+0800) Subject: use of undef var X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=978ae42104f05bfd8858151fe20777a708bba549;p=p5sagit%2Fp5-mst-13.2.git use of undef var Message-ID: <3D0D9E74.7000908@stason.org> (modified) p4raw-id: //depot/perl@17269 --- diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index 37faa6d..b2ab469 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -167,6 +167,10 @@ sub fileparse_set_fstype { sub fileparse { my($fullname,@suffices) = @_; + unless (defined $fullname) { + require Carp; + Carp::croak "fileparse(): need a valid pathname"; + } my($fstype,$igncase) = ($Fileparse_fstype, $Fileparse_igncase); my($dirpath,$tail,$suffix,$basename); my($taint) = substr($fullname,0,0); # Is $fullname tainted?