diff options
author | Craig A. Berry <craigberry@mac.com> | 2013-02-12 20:01:40 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2013-02-12 20:01:40 -0600 |
commit | 56f80848c16545165ba677cd5815d15eb0d8222e (patch) | |
tree | 3ab950daedbb942d47ac01d142c250f1d68b560f /ext/File-DosGlob | |
parent | b60fc215755c2aabdaebeac3d21e48f45d59f304 (diff) | |
download | perl-56f80848c16545165ba677cd5815d15eb0d8222e.tar.gz |
Make File::DosGlob handle VMS extended filespecs.
Diffstat (limited to 'ext/File-DosGlob')
-rw-r--r-- | ext/File-DosGlob/lib/File/DosGlob.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/File-DosGlob/lib/File/DosGlob.pm b/ext/File-DosGlob/lib/File/DosGlob.pm index 8a85d04796..c90bebb278 100644 --- a/ext/File-DosGlob/lib/File/DosGlob.pm +++ b/ext/File-DosGlob/lib/File/DosGlob.pm @@ -6,7 +6,7 @@ package File::DosGlob; -our $VERSION = '1.09'; +our $VERSION = '1.10'; use strict; use warnings; @@ -62,6 +62,13 @@ sub doglob { opendir(D, $head) or next OUTER; my @leaves = readdir D; closedir D; + + # VMS-format filespecs, especially if they contain extended characters, + # are unlikely to match patterns correctly, so Unixify them. + if ($^O eq 'VMS') { + require VMS::Filespec; + @leaves = map {$_ =~ s/\.$//; VMS::Filespec::unixify($_)} @leaves; + } $head = '' if $head eq '.'; $head .= $sepchr unless $head eq '' or substr($head,-1) eq $sepchr; |