summaryrefslogtreecommitdiff
path: root/lib/AnyDBM_File.pm
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-09-01 22:49:42 +0200
committerNicholas Clark <nick@ccl4.org>2011-09-01 22:51:56 +0200
commit5f8b5b708cedba3c94f25cd706768d6db53611fd (patch)
treec3f8ec33df773826a13c9d9ce935c30222911175 /lib/AnyDBM_File.pm
parent25b1159e83fc9adc6d42cbbd24260c1b6d977d6b (diff)
downloadperl-5f8b5b708cedba3c94f25cd706768d6db53611fd.tar.gz
Update AnyDBM_File's documentation to avoid use POSIX;
use Fcntl; is a much more efficient way to load the two constants needed. Bring the joy of strict (and warnings) to AnyDBM_File, remove commented-out code, and add __END__ to make it clear that there is no more code hiding beyond the pod.
Diffstat (limited to 'lib/AnyDBM_File.pm')
-rw-r--r--lib/AnyDBM_File.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/AnyDBM_File.pm b/lib/AnyDBM_File.pm
index d73abab0f9..4153af2de2 100644
--- a/lib/AnyDBM_File.pm
+++ b/lib/AnyDBM_File.pm
@@ -1,7 +1,9 @@
package AnyDBM_File;
+use warnings;
+use strict;
use 5.006_001;
-our $VERSION = '1.00';
+our $VERSION = '1.01';
our @ISA = qw(NDBM_File DB_File GDBM_File SDBM_File ODBM_File) unless @ISA;
my $mod;
@@ -13,7 +15,8 @@ for $mod (@ISA) {
}
die "No DBM package was successfully found or installed";
-#return 0;
+
+__END__
=head1 NAME
@@ -39,7 +42,7 @@ can still do so, but new ones can reorder @ISA:
Having multiple DBM implementations makes it trivial to copy database formats:
- use POSIX; use NDBM_File; use DB_File;
+ use Fcntl; use NDBM_File; use DB_File;
tie %newhash, 'DB_File', $new_filename, O_CREAT|O_RDWR;
tie %oldhash, 'NDBM_File', $old_filename, 1, 0;
%newhash = %oldhash;