# not be available.
BEGIN {
unless (eval { require re; })
- { eval ' sub re::import { $^H |= 0x00100000; } ' }
+ { eval ' sub re::import { $^H |= 0x00100000; } ' } # HINT_RE_TAINT
import re 'taint';
}
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?
$tail .= $taint if defined $tail; # avoid warning if $tail == undef
wantarray ? ($basename .= $taint, $dirpath .= $taint, $tail)
- : $basename .= $taint;
+ : ($basename .= $taint);
}