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

[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:
Father Chrysostomos via RT
Date:
March 29, 2017 02:00
Subject:
[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:
rt-4.0.24-17241-1490752799-1679.129068-15-0@perl.org
On Tue, 28 Mar 2017 16:17:43 -0700, zefram@fysh.org wrote:
> Dave Mitchell wrote:
> >Is there any reason why a my() list can't be enforced (in a strict manner)
> >by the lexer / grammar itself rather than post-hoc by optree inspection?
> 
> If we were building this from scratch then grammatical enforcement
> would clearly be a good idea, with only the minor downside that we
> need to duplicate the productions for list syntax.  Having already
> got into the present state, though, we can't just casually change it.
> It's still a good direction to go in, but we'd need a deprecation cycle,
> in case anyone is using syntactically strange stuff to legitimate effect.
> I can't imagine that there's any usage in that category that we'd actually
> want to preserve.

One that I can think of is unary plus.  It’s not likely to occur often, but it is often used for disambiguation and could conceivably end up in a my() list after refactoring (and somebody forgot to remove the +, but the code worked anyway).

Yes, this is only theoretical.  I don‘t know whether it is worth preserving that.  my +$x is an error.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=129068

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