Subject: | $dir->children() It becomes an error when there is a file(or dir) of "0" |
--- Dir.pm Fri Apr 17 18:23:50 2009
+++ Dir.pm.patch Fri Apr 17 18:36:21 2009
@@ -164,7 +164,7 @@
my $dh = $self->open or Carp::croak( "Can't open directory $self: $!" );
my @out;
- while (my $entry = $dh->read) {
+ while (defined(my $entry = $dh->read)) {
# XXX What's the right cross-platform way to do this?
next if (!$opts{all} && ($entry eq '.' || $entry eq '..'));
push @out, $self->file($entry);