develooper Front page | perl.perl5.porters | Postings from March 2017

Re: [perl #129068] SV *Perl_cv_const_sv_or_av(const CV *const):Assertion `((svtype)((cv)->sv_flags & 0xff)) == SVt_PVCV ||((svtype)((cv)->sv_flags & 0xff)) == SVt_PVFM' failed (op.c:7926)

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
March 29, 2017 08:59
Subject:
Re: [perl #129068] SV *Perl_cv_const_sv_or_av(const CV *const):Assertion `((svtype)((cv)->sv_flags & 0xff)) == SVt_PVCV ||((svtype)((cv)->sv_flags & 0xff)) == SVt_PVFM' failed (op.c:7926)
Message ID:
20170329085915.GD3342@iabyn.com
On Wed, Mar 29, 2017 at 03:27:41AM +0100, Zefram wrote:
> Father Chrysostomos via RT wrote:
> >One that I can think of is unary plus.
> 
> Ah, indeed, that could appear in a legitimate program.  It's not a usage
> to preserve, there being no need for such disambiguation in this context.
> (If we did want to preserve it, for consistency a similar unary plus
> ought to be permitted on parameters declared in subroutine signatures.)
> 
> A related usage is nested parens.  These are legal, don't break anything,
> and could arise by accident from refactoring.  But, like unary plus,
> they also don't achieve anything in the "my" context, and it's not worth
> the complexity of preserving their permissibility.


Is there any reason we couldn't just add a check to Perl_localize,
Perl_my_attrs (ant maybe a few other places), which gives a deprecation
warning if o isn't of one or two simple forms (like
list/pushmark/(pad[sah]v x n) ?

-- 
This is a great day for France!
    -- Nixon at Charles De Gaulle's funeral

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