use strict;
use warnings;
-our $VERSION = '0.01';
+our $VERSION = '0.06';
package Tie::Hash ;
# if $class already contains "::", don't prefix "DBM_Filter::"
$class = "DBM_Filter::$class" unless $class =~ /::/;
+ no strict 'refs';
# does the "DBM_Filter::$class" exist?
- if ( ! defined %{ "${class}::"} ) {
+ if ( ! %{ "${class}::"} ) {
# Nope, so try to load it.
eval " require $class ; " ;
croak "$caller: Cannot Load DBM Filter '$class': $@" if $@;
}
- no strict 'refs';
my $fetch = *{ "${class}::Fetch" }{CODE};
my $store = *{ "${class}::Store" }{CODE};
my $filter = *{ "${class}::Filter" }{CODE};
=head1 SYNOPSIS
use DBM_Filter ;
- use SDBM_File; # or DB_File, or GDBM_File, or NDBM_File, or ODBM_File
+ use SDBM_File; # or DB_File, GDBM_File, NDBM_File, or ODBM_File
$db = tie %hash, ...
$db->Filtered();
package DBM_Filter::my_filter1;
-
+
sub Store { ... }
sub Fetch { ... }
This module will arrange for the following methods to be available via
the object returned from the C<tie> call.
-=head2 $db->Filter_Push()
-
-=head2 $db->Filter_Key_Push()
-
-=head2 $db->Filter_Value_Push()
+=head2 $db->Filter_Push() / $db->Filter_Key_Push() / $db->Filter_Value_Push()
Add a filter to filter stack for the database, C<$db>. The three formats
vary only in whether they apply to the DBM key, the DBM value or both.