develooper Front page | perl.perl5.porters | Postings from August 2010

Re: [PATCH] Re: [perl #76814] FETCH called twice.

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
August 24, 2010 14:38
Subject:
Re: [PATCH] Re: [perl #76814] FETCH called twice.
Message ID:
20100824213840.GD20209@iabyn.com
On Sun, Aug 22, 2010 at 12:16:19PM -0700, Father Chrysostomos wrote:
> > I don't understand why it's not a bug. If I do
> > 
> >    $dummy = f () || g ();
> > 
> > people would consider it to be a bug if f () were to be called twice. Why
> > should $x be FETCHed twice then? In fact, IMO, if $x is tied, $x in
> > rvalue context should just be a shorthand for C<< (tied $x) -> FETCH >>.
> 
> (Except that (tied $x)->FETCH doesn’t allow $_[0] assignment to change what the variable is tied too. :-)
> 
> Is it really rvalue context? Consider the following examples:
> 
>  $dummy = \($x || $y);
>  $dummy = ${\($x || $y)};
> 
> Can you come up with a way to unify the concepts such that your test would work and my two examples would continue to work (oh, and ${\($a||$b)} = $c as well)?
> 
> In the mean time, is there any chance the first four patches could be applied?

Could you re-submit the patches,
a) with a binary backwards-compatibility entry for the old
now-replaced-with-macro functions in mathoms.c? See
0d7d409d8d92b77ed7de5b74ab047eced86edfc3 for an example of this.

b) Could the patches be attached to the email in a format that 'git am'
understands, e.g. using git format-patch?

Thanks.

-- 
This email is confidential, and now that you have read it you are legally
obliged to shoot yourself. Or shoot a lawyer, if you prefer. If you have
received this email in error, place it in its original wrapping and return
for a full refund. By opening this email, you accept that Elvis lives.

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