This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bump Deparse's $VERSION following commit 65ef2c3e7d945498.
[perl5.git] / lib / DBM_Filter.pm
index 7385ddd..033fd1c 100644 (file)
@@ -2,7 +2,7 @@ package DBM_Filter ;
 
 use strict;
 use warnings;
-our $VERSION = '0.01';
+our $VERSION = '0.06';
 
 package Tie::Hash ;
 
@@ -91,14 +91,14 @@ sub _do_Filter_Push
         # 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};
@@ -230,7 +230,7 @@ DBM_Filter -- Filter DBM keys/values
 =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, ...
 
@@ -247,7 +247,7 @@ DBM_Filter -- Filter DBM keys/values
     $db->Filtered();
 
     package DBM_Filter::my_filter1;
-    
+
     sub Store { ... }
     sub Fetch { ... }
 
@@ -323,11 +323,7 @@ to be packaged into a stand-alone module.
 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.