From: Daniel Chetlin Date: Mon, 28 Aug 2000 01:14:18 +0000 (-0700) Subject: _Minor_ change to overload.pm pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8db13b63e8c97aef3be60f7b6948efc6d11358ee;p=p5sagit%2Fp5-mst-13.2.git _Minor_ change to overload.pm pod Message-ID: <20000828011418.J769@ilmd.chetlin.org> p4raw-id: //depot/perl@6860 --- diff --git a/lib/overload.pm b/lib/overload.pm index ba96bc9..f7772c1 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -878,11 +878,10 @@ numeric value.) This prints: =head2 Two-face references Suppose you want to create an object which is accessible as both an -array reference, and a hash reference, similar to the builtin -L builtin Perl type. Let us make it better than the builtin -type, there will be no restriction that you cannot use the index 0 of -your array. +array reference and a hash reference, similar to the +L +builtin Perl type. Let's make it better than a pseudo-hash by +allowing index 0 to be treated as a normal element. package two_refs; use overload '%{}' => \&gethash, '@{}' => sub { $ {shift()} };