modules that ship with Perl, namely DB_File, GDBM_File, NDBM_File,
ODBM_File and SDBM_File.
-Each of the methods work identically, and are used to install (or
+Each of the methods works identically, and is used to install (or
uninstall) a single DBM Filter. The only difference between them is the
place that the filter is installed.
If a filter has been installed with this method, it will be invoked
every time you write a value to a DBM database.
-
=item B<filter_fetch_key>
If a filter has been installed with this method, it will be invoked
You can use any combination of the methods from none to all four.
All filter methods return the existing filter, if present, or C<undef>
-in not.
+if not.
To delete a filter pass C<undef> to it.
unlink $filename;
- my $db = tie %hash, 'DB_File', $filename, O_CREAT|O_RDWR, 0666, $DB_HASH
- or die "Cannot open $filename: $!\n";
+ my $db = tie %hash, 'DB_File', $filename, O_CREAT|O_RDWR, 0666,
+ $DB_HASH or die "Cannot open $filename: $!\n";
$db->filter_fetch_key ( sub { $_ = unpack("i", $_) } );
$db->filter_store_key ( sub { $_ = pack ("i", $_) } );