develooper Front page | perl.perl5.porters | Postings from February 2015

[perl #123779] Package Name Version Block loses version data in Deparse

From:
Kent Fredric
Date:
February 10, 2015 06:13
Subject:
[perl #123779] Package Name Version Block loses version data in Deparse
Message ID:
rt-4.0.18-29836-1423548774-945.123779-75-0@perl.org
# New Ticket Created by  Kent Fredric 
# Please include the string:  [perl #123779]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123779 >


# perl -E 'package Foo 1.234 { say $VERSION }; say $Foo::VERSION; say $VERSION'
1.234
1.234

# perl -MO=Deparse -E 'package Foo 1.234 { say $VERSION }; say $Foo::VERSION; say $VERSION'
use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval';
{
    package Foo;
    say $VERSION;
}
say $Foo::VERSION;
say $VERSION;

In the deparse, "1.234" is nowhere to be seen.

SO PNVB is being restructured to {PN; }  and V is lost in the deparse.

---
Flags: 
    category=core
    severity=low
---

Summary of my perl5 (revision 5 version 21 subversion 8) configuration:
  Derived from: 50cb265ee60adad097f86c7b4987b24240a9ef54
  Platform:
    osname=linux, osvers=3.18.1-aufs, archname=x86_64-linux
    uname='linux katipo2 3.18.1-aufs #20 smp preempt fri dec 19 22:15:35 nzdt 2014 x86_64 intel(r) core(tm) i5-2410m cpu @ 2.30ghz genuineintel gnulinux '
    config_args='-de -Dprefix=/home/kent/perl5/perlbrew/perls/5.21.8-b -Dusecbacktrace -Doptimize=-O3 -march=native -mtune=native -g -ggdb3 -Dman1dir=none -Dman3dir=none -Dusedevel -Accflags=-DPERL_HASH_FUNC_SDBM -DUSE_C_BACKTRACE_ON_ERROR -Aldflags=-lbfd -Aeval:scriptdir=/home/kent/perl5/perlbrew/perls/5.21.8-b/bin'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DPERL_HASH_FUNC_SDBM -DUSE_C_BACKTRACE_ON_ERROR -fwrapv -fno-strict-aliasing -pipe -fstack-protector -DUSE_C_BACKTRACE -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O3 -march=native -mtune=native -g -ggdb3',
    cppflags='-DPERL_HASH_FUNC_SDBM -DUSE_C_BACKTRACE_ON_ERROR -fwrapv -fno-strict-aliasing -pipe -fstack-protector'
    ccversion='', gccversion='4.8.3', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -lbfd -fstack-protector -L/usr/local/lib'
    libpth=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include-fixed /usr/lib /usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.20.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.20'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O3 -march=native -mtune=native -g -ggdb3 -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_SDBM PERL_MALLOC_WRAP
                        PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
                        PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT
                        USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                        USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME
                        USE_PERLIO USE_PERL_ATOF
  Locally applied patches:
	uncommitted-changes
  Built under linux
  Compiled at Jan 22 2015 23:49:30
  %ENV:
    PERLBREW_BASHRC_VERSION="0.72"
    PERLBREW_HOME="/home/kent/.perlbrew"
    PERLBREW_MANPATH="/home/kent/perl5/perlbrew/perls/5.21.8-b/man"
    PERLBREW_PATH="/home/kent/perl5/perlbrew/bin:/home/kent/perl5/perlbrew/perls/5.21.8-b/bin"
    PERLBREW_PERL="5.21.8-b"
    PERLBREW_ROOT="/home/kent/perl5/perlbrew"
    PERLBREW_VERSION="0.72"
  @INC:
    /home/kent/perl5/perlbrew/perls/5.21.8-b/lib/site_perl/5.21.8/x86_64-linux
    /home/kent/perl5/perlbrew/perls/5.21.8-b/lib/site_perl/5.21.8
    /home/kent/perl5/perlbrew/perls/5.21.8-b/lib/5.21.8/x86_64-linux
    /home/kent/perl5/perlbrew/perls/5.21.8-b/lib/5.21.8
    .




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