X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFile%2FBasename.pm;h=887c7bae4a9fb13cbae95bf12172c86e72665661;hb=a8bf0cad84ba0e8477c2b4b1b02a57dbd376a155;hp=1c9a41931329a244b8529e1f02058137d2456d0e;hpb=6286f723a70d9d63bf59e611a2946140879179c3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index 1c9a419..887c7ba 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -12,14 +12,15 @@ dirname - extract just the directory from a path use File::Basename; - ($name,$path,$suffix) = fileparse($fullname,@suffixlist) + ($name,$path,$suffix) = fileparse($fullname,@suffixlist); + $name = fileparse($fullname,@suffixlist); fileparse_set_fstype($os_string); $basename = basename($fullname,@suffixlist); $dirname = dirname($fullname); ($name,$path,$suffix) = fileparse("lib/File/Basename.pm",qr{\.pm}); fileparse_set_fstype("VMS"); - $basename = basename("lib/File/Basename.pm",qr{\.pm}); + $basename = basename("lib/File/Basename.pm",".pm"); $dirname = dirname("lib/File/Basename.pm"); =head1 DESCRIPTION @@ -70,6 +71,8 @@ You are guaranteed that if you concatenate B, B, and B together in that order, the result will denote the same file as the input file specification. +In scalar context, fileparse() returns only the B part of the filename. + =back =head1 EXAMPLES @@ -130,7 +133,7 @@ directory name to be F<.>). # 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'; } @@ -142,7 +145,7 @@ our(@ISA, @EXPORT, $VERSION, $Fileparse_fstype, $Fileparse_igncase); require Exporter; @ISA = qw(Exporter); @EXPORT = qw(fileparse fileparse_set_fstype basename dirname); -$VERSION = "2.71"; +$VERSION = "2.73"; # fileparse_set_fstype() - specify OS-based rules used in future