diff options
author | Adam Kennedy <adam@ali.as> | 2007-01-13 16:35:02 +0000 |
---|---|---|
committer | Adam Kennedy <adam@ali.as> | 2007-01-13 16:35:02 +0000 |
commit | b153985baf34e9d9cb5858d02cdc0de960ed01f4 (patch) | |
tree | 82e79138d3a15507dc45d78da0d9dd6de5f75e66 | |
parent | 7ff519c1a0dd06225048f2c1ba4bb4cc62e479be (diff) |
Preparing for release
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | Makefile.PL | 1 | ||||
-rw-r--r-- | lib/File/Flat.pm | 23 |
3 files changed, 16 insertions, 11 deletions
@@ -1,5 +1,8 @@ Revision history for Perl extension File::Flat. +1.00 Sun 14 Jan 2007 + - FINALLY completed full functionality on Win32 + 0.96 Wed 19 Jul 2006 - Moving from CVS to new SVN repository - Upgrading to Module::Install diff --git a/Makefile.PL b/Makefile.PL index dd0c5fb..b973d6e 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,3 +1,4 @@ +use strict; use inc::Module::Install; name 'File-Flat'; diff --git a/lib/File/Flat.pm b/lib/File/Flat.pm index 91699ca..be2ebda 100644 --- a/lib/File/Flat.pm +++ b/lib/File/Flat.pm @@ -8,18 +8,18 @@ package File::Flat; use 5.005; use strict; -use Cwd (); -use File::Spec (); -use IO::File (); -use prefork 'File::Slurp'; -use prefork 'File::Temp'; -use prefork 'File::Copy'; -use prefork 'File::Copy::Recursive'; -use prefork 'File::Remove'; +use Cwd (); +use File::Spec (); +use IO::File (); +use prefork 'File::Slurp'; +use prefork 'File::Temp'; +use prefork 'File::Copy'; +use prefork 'File::Copy::Recursive'; +use prefork 'File::Remove'; use vars qw{$VERSION $errstr %modes $AUTO_PRUNE}; BEGIN { - $VERSION = '0.97'; + $VERSION = '1.00'; # The main error string $errstr = ''; @@ -705,13 +705,14 @@ sub prune { # Does it contain anything, other that (possibly) curdir and updir entries opendir( PRUNEDIR, $dir ) or return $self->_error("opendir failed while pruning: $!"); - foreach ( readdir PRUNEDIR ) { + my @files = readdir PRUNEDIR; + closedir PRUNEDIR; + foreach ( @files ) { next if $_ eq File::Spec->curdir; next if $_ eq File::Spec->updir; # Found something, we don't need to prune this, # or anything else for that matter. - closedir PRUNEDIR; return 1; } |