develooper Front page | perl.perl5.porters | Postings from July 2013

Re: [perl #118691] Perl crash on usage of index [-1] for array insubroutine call

Thread Previous | Thread Next
From:
demerphq
Date:
July 8, 2013 07:25
Subject:
Re: [perl #118691] Perl crash on usage of index [-1] for array insubroutine call
Message ID:
CANgJU+UAOAPo3mDs_sp7FSk52B+8B8M-i5AhB+6YV2qdo_nVVQ@mail.gmail.com
On 6 July 2013 21:38, Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote:
> * Father Chrysostomos via RT <perlbug-followup@perl.org> [2013-06-30T10:03:06]
>> > > It’s just a matter of tweaking the defer logic in pp_aelem.  Then rvalue
>> > > uses of $_[0] within the function will just work, but assignment to
>> > > $_[0] will croak with the same error (i.e., the error will be delayed as
>> > > long as possible).
>> > >
>> >
>> > Do we really want to do that?
>>
>> I say Yes! :-)
>
> I think so.  (I am speaking here only as a user.  So, probably: apply unless
> somebody has a great objection... which probably should've happened by now?)

If it means that $array[-1] will not die in when used as an rvalue on
an empty @array then personally I am in favor.

cheers,
Yves


--
perl -Mre=debug -e "/just|another|perl|hacker/"

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