develooper Front page | perl.perl5.porters | Postings from April 2000

[ID 20000419.004] -MO=Deparse problems.

April 19, 2000 11:34
[ID 20000419.004] -MO=Deparse problems.
Message ID:

This is a bug report for perl from,
generated with the help of perlbug 1.28 running under perl v5.6.0.

[Please enter your report here]

I've noticed two problems with -MO=Deparse. 

First, consider:

    perl -MO=Deparse -le 'sub foo {print "Hello"} foo ()'

which will give:

    sub foo {
        print 'Hello';
    foo ;

It looses the printing of the newline, mandated by the -l.

More serious is the problem we get when we put the package name there when
we define and call the sub:

    perl -MO=Deparse -le 'sub bar::foo {print "Hello"} bar::foo ()'

which will give us just:

    bar::foo ;

It becomes worse when picking _::_ as the sub name:

    perl -MO=Deparse -le 'sub _::_ {print "Hello"} _::_ ()'

which prints:

    _ ;

Not only is the sub definition lost, when calling the sub, the package
name is also lost.


[Please do not change anything below this line]
This perlbug was built using Perl v5.6.0 - Thu Mar 23 19:51:19 EST 2000
It is being executed now by  Perl v5.6.0 - Fri Mar 24 17:24:48 EST 2000.

Site configuration information for perl v5.6.0:

Configured by abigail at Fri Mar 24 17:24:48 EST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
    osname=solaris, osvers=2.7, archname=i86pc-solaris-64int
    uname='sunos newyork 5.7 generic_106542-07 i86pc i386 i86pc '
    config_args='-d -Dprefix=/opt/perl -Uinstallusrbinperl -Doptimize=-g -Duse64bitint'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=define use64bitall=undef uselongdouble=undef usesocks=undef
    cc='cc', optimize='-g', gccversion=2.95.1 19990816 (release)
    cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
    ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lsec
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.6.0:

Environment for perl v5.6.0:
    LANG (unset)
    LANGUAGE (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/bash Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About