develooper Front page | perl.perl5.porters | Postings from May 2004

Re: my $x->{foo} doesn't work

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
May 21, 2004 02:23
Subject:
Re: my $x->{foo} doesn't work
Message ID:
20040521092910.GA1904@iabyn.com
On Fri, May 21, 2004 at 10:47:54AM +0200, Rafael Garcia-Suarez wrote:
> Your patch looks correct at a first glance, but I'm not very inclined to
> apply it, unless the crowd comes up with good reasons why to.

The patch incorrectly removes introduction:

    for (1..4) {
	(my $x)->{foo} = 1;
	print "$_: already exists!!\n" if exists $x->{bar};
	$x->{bar} = 1;
    }

with the patch outputs:

    2: already exists!!
    3: already exists!!
    4: already exists!!


-- 
The Enterprise is captured by a vastly superior alien intelligence which
does not put them on trial.
    -- Things That Never Happen in "Star Trek" #10

Thread Previous | Thread Next


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