diff options
author | Benjamin J. Tilly <unknown> | 2003-10-05 18:40:36 +0000 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2003-10-06 03:32:50 +0000 |
commit | 1db7d662ab3016c638481dc6ccd6dfc26c968f33 (patch) | |
tree | af327faf0913747473f8ff22da7c665551d32b2e /lib | |
parent | 865c4c6f6836f5d201ca85b078e35d1e47de908b (diff) | |
download | perl-1db7d662ab3016c638481dc6ccd6dfc26c968f33.tar.gz |
[perl #24120] Tie::Hash documentation has broken code
From: "Benjamin J. Tilly" (via RT) <perlbug-followup@perl.org>
Message-Id: <rt-24120-65664.15.9776865968429@rt.perl.org>
(Applied without $VERSION update.)
p4raw-id: //depot/perl@21404
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Tie/Hash.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Tie/Hash.pm b/lib/Tie/Hash.pm index 282006984b..397272bece 100644 --- a/lib/Tie/Hash.pm +++ b/lib/Tie/Hash.pm @@ -136,12 +136,13 @@ element being a hash reference, and the remaining methods should operate on the hash C<< %{ $_[0]->[0] } >>: package ReportHash; - our @ISA = 'Tie::StdHash'; + our @ISA = 'Tie::ExtraHash'; sub TIEHASH { - my $storage = bless {}, shift; + my $class = shift; + my $storage = bless [{}, @_], $class; warn "New ReportHash created, stored in $storage.\n"; - [$storage, @_] + $storage; } sub STORE { warn "Storing data with key $_[1] at $_[0].\n"; |