Front page | perl.perl5.porters |
Postings from April 2000
[ID 20000428.006] panic using $obj->$coderef()
From:
Joe Smith
Date:
April 28, 2000 19:59
Subject:
[ID 20000428.006] panic using $obj->$coderef()
Message ID:
200004290301.XAA02141@sparky.home-net
This is a bug report for perl from jes@presto.med.upenn.edu,
generated with the help of perlbug 1.28 running under perl v5.6.0.
-----------------------------------------------------------------
[Please enter your report here]
I was playing with lvalue subs in 5.6 and I noticed this:
file: x.perl:
1
2 $obj = bless { }; # an object
3
4 $coderef = sub:lvalue { $x }; # an lvalue coderef
5
6 &$coderef($obj) = 10; # ok
7
8 print $obj->$coderef(), "\n"; # cool, it works
9
10 $obj->$coderef() = 100; # but this panics
11
12 print $obj->$coderef(), "\n";
$ perl x.perl
panic: unexpected optree near method call at x.perl line 10, near "100;"
Execution of x.perl aborted due to compilation errors.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.6.0:
Configured by jes at Tue Apr 25 22:01:57 EDT 2000.
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=linux, osvers=2.2.13-7mdk, archname=i586-linux
uname='linux sparky.home-net 2.2.13-7mdk #1 wed sep 15 18:02:18 cest 1999 i586 unknown '
config_args='-Uinstallusrbinperl -de'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O2', gccversion=pgcc-2.91.66 19990314 (egcs-1.1.2 release)
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccflags ='-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', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=/lib/libc-2.1.1.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.6.0:
/usr/local/lib/perl5/5.6.0/i586-linux
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/i586-linux
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl
.
---
Environment for perl v5.6.0:
HOME=/home/jes
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/local/bin:/bin:/usr/bin::/usr/X11R6/bin:/home/jes/bin
PERL_BADLANG (unset)
SHELL=/bin/bash
-
[ID 20000428.006] panic using $obj->$coderef()
by Joe Smith