From: Benjamin J. Tilly Date: Sun, 5 Oct 2003 18:40:36 +0000 (+0000) Subject: [perl #24120] Tie::Hash documentation has broken code X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1db7d662ab3016c638481dc6ccd6dfc26c968f33;p=p5sagit%2Fp5-mst-13.2.git [perl #24120] Tie::Hash documentation has broken code From: "Benjamin J. Tilly" (via RT) Message-Id: (Applied without $VERSION update.) p4raw-id: //depot/perl@21404 --- diff --git a/lib/Tie/Hash.pm b/lib/Tie/Hash.pm index 2820069..397272b 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";