develooper Front page | perl.perl5.porters | Postings from July 2005

[perl #36534] Subroutines with lvalue attrib fail in debugger

Thread Previous
From:
kynn jones
Date:
July 14, 2005 02:30
Subject:
[perl #36534] Subroutines with lvalue attrib fail in debugger
Message ID:
rt-3.0.11-36534-117219.5.12944085224952@perl.org
# New Ticket Created by  kynn jones 
# Please include the string:  [perl #36534]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36534 >




This is a bug report for perl from kynn@panix.com
generated with the help of perlbug 1.35 running under perl v5.8.6.


-----------------------------------------------------------------
[Please enter your report here]

[ This bug report supersedes #36532, which was mistakenly filed under
  "library" instead of "core".  Please disregard/delete/void #36532.
  My apologies. ]

Subs defined with the lvalue attribute are unrecognized or mishandled
when running inside the Perl debugger.  For example the following
script runs fine on the command line but fails in the debugger.

# test_script.pl
use strict;
use warnings;

my $var = 0;

sub foo : lvalue {
   $var;
}

foo = 1;
die "\$var unchanged ($var)" unless $var;  # fails in debugger

print "OK: $var\n";

__END__

% perl test_script.pl
OK: 1
% perl -d test_script.pl

Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(test_script.pl:4):       my $var = 0;
main::(test_script.pl:5):       sub foo : lvalue {
   DB<1> c
$var unchanged (0)
  at test_script.pl line 12
Debugged program terminated.  Use q to quit or R to restart,
   use O inhibit_exit to avoid stopping after program termination,
   h q, h R or h O to get additional info.


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
     category=core
     severity=medium
---
Site configuration information for perl v5.8.6:

Configured by kynn at Tue Apr 12 12:24:11 EDT 2005.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
   Platform:
     osname=linux, osvers=2.4.18-686-smp, archname=i686-linux-ld
     uname='linux luna 2.4.18-686-smp #1 smp sun apr 14 12:07:19 est 2002 
i686 unknown '
     config_args=''
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=define
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
     optimize='-O2',
     cppflags='-fno-strict-aliasing -pipe -I/usr/local/include'
     ccversion='', gccversion='2.95.4 20011002 (Debian prerelease)', 
gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long', ivsize=4, nvtype='long double', nvsize=12, 
Off_t='off_t', lseeksize=8
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib
     libs=-lnsl -lgdbm -ldbm -ldb -ldl -lm -lcrypt -lutil -lc
     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
     libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a
     gnulibc_version='2.2.5'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:


---
@INC for perl v5.8.6:
     /home/kynn/local/lib/perl/my
     /home/kynn/local/lib/perl/5.8.4
     /home/kynn/local/lib/perl/5.6.1
     /home/kynn/local/lib/perl5/5.8.6/i686-linux-ld
     /home/kynn/local/lib/perl5/5.8.6
     /home/kynn/local/lib/perl5/i686-linux-ld
     /home/kynn/local/lib/perl5
     /home/kynn/local/lib/perl5/5.8.6/i686-linux-ld
     /home/kynn/local/lib/perl5/5.8.6
     /home/kynn/local/lib/perl5/site_perl/5.8.6/i686-linux-ld
     /home/kynn/local/lib/perl5/site_perl/5.8.6
     /home/kynn/local/lib/perl5/site_perl
     .

---
Environment for perl v5.8.6:
     HOME=/home/kynn
     LANG=C
     LANGUAGE (unset)
     LD_LIBRARY_PATH=/home/kynn/local/lib:/opt/java/jdk/lib/i386
     LOGDIR (unset)
     PATH=.:/home/kynn/local/bin:/home/kynn/local/usr/bin:/home/kynn/local/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/home/kynn/java/javacc/bin:/opt/java/jdk/bin:/usr/pbs/bin:/home/kynn/opt/ant/bin
     PERL5LIB=/home/kynn/local/lib/perl/my:/home/kynn/local/lib/perl/5.8.4:/home/kynn/local/lib/perl/5.6.1:/home/kynn/local/lib/perl5
     PERL5_CPANPLUS_CONFIG=/home/kynn/.cpanplus/config
     PERL_BADLANG (unset)
     SHELL=/usr/bin/zsh 


Thread Previous


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