Subject: | PATCH for VMS (file regexp match within MH's _what_is_there) |
Hello and thanks for Email::Folder.
On VMS with the default file system filenames must contain a
period/dot, even when there is no file extension, so in the
sub "_what_is_there" in Email::Folder::MH I needed to change
the file regexp to allow a period/dot for the 03mh.t tests to pass.
Using /\A\d+\.?\Z/ would avoid the $^O check, but would allow
"2." to pass on non VMS systems.
(on VMS the file "2" without an extension is "2.")
Cheers,
Peter (Stig) Edwards
Email/Folder/MH.pm
@@ -29,8 +29,12 @@
my @messages;
opendir(DIR,"$dir") or croak "Could not open '$dir'";
foreach my $file (readdir DIR) {
+ if($^O eq 'VMS'){
+ next unless $file =~ /\A\d+\.\Z/;
+ } else {
next unless $file =~ /\A\d+\Z/;
- push @messages, "$dir/$file";
+ }
+ push @messages, "$dir/$file";
}
$self->{_messages} = \@messages;