develooper Front page | perl.perl5.porters | Postings from November 2014

[perl #116553] B::Deparse doesn't handle lexical subs

From:
Father Chrysostomos via RT
Date:
November 30, 2014 02:29
Subject:
[perl #116553] B::Deparse doesn't handle lexical subs
Message ID:
rt-4.0.18-2936-1417314584-1032.116553-15-0@perl.org
On Sun Jan 27 03:19:46 2013, arc wrote:
> This is a bug report for perl from arc@cpan.org,
> generated with the help of perlbug 1.39 running under perl 5.17.9.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> B::Deparse doesn't understand the introcv, clonecv, or padcv ops, used
> by
> lexical subs:
> 
> $ ./perl -Ilib -MO=Deparse -e 'use feature "lexical_subs"; no
> warnings; my sub f {}; print f()'
> unexpected OP_INTROCV at lib/B/Deparse.pm line 1250.
> unexpected OP_CLONECV at lib/B/Deparse.pm line 1250.
> do {
>     XXX;
>     XXX
> };
> unexpected OP_PADCV at lib/B/Deparse.pm line 1250.
> no warnings;
> use feature 'lexical_subs';
> print XXX->();
> -e syntax OK
> 
> I'll commit a TODO test for this once I've got a ticket number from
> RT.

This is finally fixed.

d4f1bfe Deparse lexical subs
d49c356 Deparse: Qualify pkg CVs that conflict w. lex CVs
e4d64f8 Deparse.pm: Update docs concerning lex subs

These earlier commits also contributed (the lexsub-specific commits depend on these):

a958cfb Make B::Deparse qualify sub calls named after keywords
3188a82 Deparse with CORE:: to avoid lex sub conflicts
e54915d Deparse sub calls quietly
7741cee Finish deparsing ‘my sub if; CORE::if...’
34b5495 [perl #77452] Deparse { ...; BEGIN{} } correctly
8635e3c [perl #77452] Deparse BEGIN blocks in the right place

-- 

Father Chrysostomos


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



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