From 8db13b63e8c97aef3be60f7b6948efc6d11358ee Mon Sep 17 00:00:00 2001 From: Daniel Chetlin Date: Sun, 27 Aug 2000 18:14:18 -0700 Subject: [PATCH] _Minor_ change to overload.pm pod Message-ID: <20000828011418.J769@ilmd.chetlin.org> p4raw-id: //depot/perl@6860 --- lib/overload.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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()} }; -- 2.7.4