My::Hash::* reimplementation for separate feature add-on packages (cleanup).
authorshort <>
Sat, 17 Sep 2005 01:15:21 +0000 (01:15 +0000)
committershort <>
Sat, 17 Sep 2005 01:15:21 +0000 (01:15 +0000)
Web.pm

diff --git a/Web.pm b/Web.pm
index 57950fa..c368a4b 100644 (file)
--- a/Web.pm
+++ b/Web.pm
@@ -158,12 +158,13 @@ my($class,%args)=@_;
        # We cannot do it in BEGIN { } block
        # as it would not be tracked for each of the toplevel users later.
        Wuse 'WebConfig';
-       Wrequire 'My::Hash::Sub';
+       Wrequire 'My::Hash';
 
-       $W={};
-       tie %$W,"My::Hash::Sub";
-       %$W=(%WebConfig,%args); # override %WebConfig settings
-       $W->{"__PACKAGE__"}||=caller();
+       $W=My::Hash->new({
+               "__PACKAGE__"=>scalar(caller()),
+               %WebConfig,
+               %args,  # override %WebConfig settings
+               },"My::Hash::Sub","My::Hash::Push");
 
        # {"__PACKAGE__"} is mandatory for mod_perl-2.0;
        # $Apache2::Registry::curstash is no longer supported.