Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B::Deparse doesn't handle lexical subs #12741

Closed
p5pRT opened this issue Jan 27, 2013 · 6 comments
Closed

B::Deparse doesn't handle lexical subs #12741

p5pRT opened this issue Jan 27, 2013 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Jan 27, 2013

Migrated from rt.perl.org#116553 (status was 'resolved')

Searchable as RT116553$

@p5pRT
Copy link
Author

p5pRT commented Jan 27, 2013

From @arc

Created by @arc

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.

Perl Info

Flags:
    category=library
    severity=low
    module=B::Deparse

Site configuration information for perl 5.17.9:

Configured by aaron at Sun Jan 27 10:38:21 GMT 2013.

Summary of my perl5 (revision 5 version 17 subversion 9) configuration:
  Commit id: 48e25610e9bc068523de995899ed4f9f130eef08
  Platform:
    osname=darwin, osvers=10.8.0, archname=darwin-2level
    uname='darwin daybreak 10.8.0 darwin kernel version 10.8.0: tue
jun 7 16:33:36 pdt 2011; root:xnu-1504.15.3~1release_i386 i386 i386
macbookpro5,4 darwin '
    config_args='-des -Dusedevel -Dprefix=/tmp/blead'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing
-pipe -fstack-protector -I/opt/local/include',
    optimize='-O3',
    cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe
-fstack-protector -I/opt/local/include'
    ccversion='', gccversion='4.2.1 (Apple Inc. build 5666) (dot 3)',
gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='
-fstack-protector -L/opt/local/lib'
    libpth=/opt/local/lib /usr/lib
    libs=-lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=, so=dylib, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup
-L/opt/local/lib -fstack-protector'

Locally applied patches:



@INC for perl 5.17.9:
    lib
    /tmp/blead/lib/perl5/site_perl/5.17.9/darwin-2level
    /tmp/blead/lib/perl5/site_perl/5.17.9
    /tmp/blead/lib/perl5/5.17.9/darwin-2level
    /tmp/blead/lib/perl5/5.17.9
    .


Environment for perl 5.17.9:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/aaron
    LANG=en_GB.UTF-8
    LANGUAGE (unset)
    LC_COLLATE=C
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
    SHELL=/bin/bash


-- 
Aaron Crane ** http://aaroncrane.co.uk/

@p5pRT
Copy link
Author

p5pRT commented Nov 30, 2014

From @cpansprout

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

@p5pRT
Copy link
Author

p5pRT commented Nov 30, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 30, 2014

@cpansprout - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2015

From @khwilliamson

Thanks for submitting this ticket

The issue should be resolved with the release today of Perl v5.22. If you find that the problem persists, feel free to reopen this ticket

--
Karl Williamson for the Perl 5 porters team

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2015

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant