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

[perl #67830] Output of complex objects differs when program is debugged with perl -d

Thread Next
Eric Promislow
July 23, 2009 16:02
[perl #67830] Output of complex objects differs when program is debugged with perl -d
Message ID:
# New Ticket Created by  Eric Promislow 
# Please include the string:  [perl #67830]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.36 running under perl 5.10.0.

[Please enter your report here]

The output of this program behaves differently depending on
whether it's from the command-line, or debugged with

The program:
#!/usr/bin/env perl -w
use strict;
use Data::Dumper;

my $obj = Obj->new();
print Dumper $obj;

package Obj;
use strict;

sub new (%) {
    my ($class, %params)=@_;
    bless \%params, $class;

sub alias($$) : lvalue {
    my ($self, $alias)=@_;


Output from the command-line:

$VAR1 = bless( {
                 'alias' => {
                              'Fred' => 'Flintstone'
               }, 'Obj' );


Output from a `perl -d ...' session:

C:>perl -d

Loading DB routines from version 1.3
Editor support available.

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

main::( my $obj = Obj->new();

  DB<1> c
$VAR1 = bless( {
                 'alias' => {}
               }, 'Obj' );
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.

  DB<1> q



The discrepancy is most likely due to the way the debugger
uses the overload module, but I can't figure out why.  Any insight?

[Please do not change anything below this line]
Site configuration information for perl 5.10.0:

Configured by ActiveState at Wed May 14 05:06:16 PDT 2008.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
    osname=linux, osvers=2.4.21-297-default, archname=i686-linux-thread-multi
    uname='linux gila 2.4.21-297-default #1 sat jul 23 07:47:39 utc 2005 i686 i686 i386 gnulinux '
    config_args='-ders -Dcc=gcc -Dusethreads -Duseithreads -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Accflags=-DUSE_SITECUSTOMIZE -Duselargefiles -Accflags=-DPRIVLIB_LAST_IN_INC -Dprefix=/home/ericp/opt/ActivePerl- -Dprivlib=/home/ericp/opt/ActivePerl- -Darchlib=/home/ericp/opt/ActivePerl- -Dsiteprefix=/home/ericp/opt/ActivePerl- -Dsitelib=/home/ericp/opt/ActivePerl- -Dsitearch=/home/ericp/opt/ActivePerl- -Dsed=/bin/sed -Duseshrplib -Dcf_by=ActiveState'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    ccversion='', gccversion='3.3.1 (SuSE Linux)', 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='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =''
    libpth=/lib /usr/lib /usr/local/lib
    libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/home/ericp/opt/ActivePerl-'
    cccdlflags='-fPIC', lddlflags='-shared -O2'

Locally applied patches:
    33741 avoids segfaults invoking S_raise_signal() (on Linux)
    33763 Win32 process ids can have more than 16 bits
    32809 Load 'loadable object' with non-default file extension
    32728 64-bit fix for Time::Local

@INC for perl 5.10.0:

Environment for perl 5.10.0:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About