our(@ISA, %EXPORT_TAGS, @EXPORT_OK, $AUTOLOAD, %SIGRT) = ();
-our $VERSION = "1.09";
+our $VERSION = "1.11";
use AutoLoader;
use XSLoader ();
+use Fcntl qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK F_SETFD
+ F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND
+ O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC
+ O_WRONLY);
+
# Grandfather old foo_h form to new :foo_h form
my $loaded;
sub remove {
usage "remove(filename)" if @_ != 1;
- CORE::unlink($_[0]);
+ (-d $_[0]) ? CORE::rmdir($_[0]) : CORE::unlink($_[0]);
}
sub rename {
);
# Exporter::export_tags();
-for (values %EXPORT_TAGS) {
- push @EXPORT, @$_;
+{
+ # De-duplicate the export list:
+ my %export;
+ @export{map {@$_} values %EXPORT_TAGS} = ();
+ # Doing the de-dup with a temporary hash has the advantage that the SVs in
+ # @EXPORT are actually shared hash key sacalars, which will save some memory.
+ push @EXPORT, keys %export;
}
@EXPORT_OK = qw(