develooper Front page | perl.perl5.porters | Postings from October 2005

Re: Time to fix @foo->[0]? (was: [PATCH] Re: [perl #37350] $#{@$aref}in debugger gives: Bizarre copy of ARRAY in leave)

From:
Jeff 'japhy' Pinyan
Date:
October 21, 2005 10:04
Subject:
Re: Time to fix @foo->[0]? (was: [PATCH] Re: [perl #37350] $#{@$aref}in debugger gives: Bizarre copy of ARRAY in leave)
Message ID:
Pine.LNX.4.61.0510211302380.17569@perlmonk.org
On Oct 21, Robin Houston said:

> On Wed, Oct 19, 2005 at 11:15:10PM +0200, Rafael Garcia-Suarez wrote:
>> Thanks, applied as change #25808 to bleadperl.
>
> Is this a good opportunity to revisit the other related issue:
> that of @foo->[0] and %foo->{bar}?
>
> Someone (I think it might have been me) added a warning at some
> point, so this now warns "Using an array as a reference is
> deprecated".

I'm still amazed how some beginners FIND this artifact and use it 
regularly.  I guess it's attractive in that the variables retain their 
sigils, but, wow, it's just weird.

-- 
Jeff "japhy" Pinyan        %  How can we ever be the sold short or
RPI Acacia Brother #734    %  the cheated, we who for every service
http://www.perlmonks.org/  %  have long ago been overpaid?
http://princeton.pm.org/   %    -- Meister Eckhart



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About