Front page | perl.perl5.porters |
Postings from April 2000
[ID 20000419.004] -MO=Deparse problems.
From:
abigail
Date:
April 19, 2000 11:34
Subject:
[ID 20000419.004] -MO=Deparse problems.
Message ID:
20000419183704.22657.qmail@arenanetworks.com
This is a bug report for perl from abigail@arena-i.com,
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.
Abigail
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=library
severity=medium
---
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:
Platform:
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
Compiler:
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/libc.so, 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:
/home/abigail/Perl
/home/abigail/Sybase
/opt/perl/lib/5.6.0/i86pc-solaris-64int
/opt/perl/lib/5.6.0
/opt/perl/lib/site_perl/5.6.0/i86pc-solaris-64int
/opt/perl/lib/site_perl/5.6.0
/opt/perl/lib/site_perl
.
---
Environment for perl v5.6.0:
HOME=/home/abigail
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH=/home/abigail/Lib:/usr/local/lib:/usr/lib:/lib:/usr/X11R6/lib
LOGDIR (unset)
PATH=/home/abigail/bin:/usr/local/bin:/usr/local/X11/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/games:/usr/ccs/bin:/usr/openwin/bin:/opt/Acrobat4/bin:/opt/cvs/bin:/opt/perl/bin
PERL5LIB=/home/abigail/Perl:/home/abigail/Sybase
PERLDIR=/opt/perl
PERL_BADLANG (unset)
SHELL=/usr/local/bin/bash