Support downloads-only non-validating tests.
[MyWeb.git] / Hash / Sub.pm
index cde07be..daadf2a 100644 (file)
@@ -21,8 +21,9 @@ our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
 our $CVS_ID=q$Id$;
 use strict;
 use warnings;
-require Tie::Hash;     # for Tie::StdHash
-our @ISA=qw(Tie::StdHash);
+use My::Web;   # for &Wrequire
+Wrequire 'My::Hash';
+our @ISA=qw(My::Hash);
 use Carp qw(cluck confess);
 
 
@@ -30,22 +31,11 @@ sub FETCH($$)
 {
 my($this,$key)=@_;
 
-       my $val=$this->SUPER::FETCH($key);
+       my $val=$this->pass("FETCH",$key);
        return $val if $key=~/_sub$/;   # force
        return $val if !defined $val;   # 1-item array is intentional.
        return $val if "CODE" ne ref $val;
        return &{$val}($this,$key);
 }
 
-sub STORE
-{
-my($this,$key,$value)=@_;
-
-       return $this->SUPER::STORE($key,$value) if $key!~/_push$/;
-       my $val_orig=$this->SUPER::FETCH($key);
-       $val_orig=[] if !defined $val_orig;
-       $val_orig=[$val_orig] if "ARRAY" ne ref $val_orig;
-       return $this->SUPER::STORE($key,[@$val_orig,$value]);
-}
-
 1;