develooper Front page | perl.perl5.porters | Postings from October 2011

[perl #101814] class names containing '=' parsed incorrectly by dumpvar.pl

Thread Previous
From:
perlbug-followup
Date:
October 21, 2011 08:55
Subject:
[perl #101814] class names containing '=' parsed incorrectly by dumpvar.pl
Message ID:
rt-3.6.HEAD-31297-1319129932-1205.101814-75-0@perl.org
# New Ticket Created by  "Dami Laurent (PJ)" 
# Please include the string:  [perl #101814]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=101814 >


This is a bug report for perl from dami@cpan.org,
generated with the help of perlbug 1.39 running under perl 5.12.1.

Examining objects through the 'x' command in the perl debugger doesn't
work if those objects are blessed into class names containing '='.

This is due to incorrect parsing through 'split' in dumpvar.pl line 165.
Below is a patch to fix that.

Thanks in advance, Laurent Dami

--- D:/strawberry/perl/lib/dumpvar.pl.orig	Thu May 13 16:01:08 2010
+++ D:/strawberry/perl/lib/dumpvar.pl	Thu Oct 20 18:31:55 2011
@@ -165,8 +165,7 @@
       # Match type and address.                      
       # Unblessed references will look like TYPE(0x...)
       # Blessed references will look like Class=TYPE(0x...)
-      ($start_part, $val) = split /=/,$val;
-      $val = $start_part unless defined $val;
+      $val =~ s/^.*=//; # suppress the Class part, just keep
TYPE(0x...)
       ($item_type, $address) = 
         $val =~ /([^\(]+)        # Keep stuff that's     
                                  # not an open paren
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl 5.12.1:

Configured by 1 at Thu Jul 29 16:39:48 2010.

Summary of my perl5 (revision 5 version 12 subversion 1) configuration:
   
  Platform:
    osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
    uname='Win32 strawberryperl 5.12.1.0 #1 Thu Jul 29 10:08:11 2010
i386'
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags =' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT
-DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-fno-strict-aliasing -mms-bitfields -DPERL_MSVCRT_READFIX',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='4.4.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long
long', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags ='-s -L"D:\strawberry\perl\lib\CORE"
-L"D:\strawberry\c\lib"'
    libpth=D:\strawberry\c\lib D:\strawberry\c\i686-w64-mingw32\lib
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr
-lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
-lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=, so=dll, useshrplib=true, libperl=libperl512.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -s -L"D:\strawberry\perl\lib\CORE"
-L"D:\strawberry\c\lib"'

Locally applied patches:
    

---
@INC for perl 5.12.1:
    D:/strawberry/perl/site/lib
    D:/strawberry/perl/vendor/lib
    D:/strawberry/perl/lib
    .

---
Environment for perl 5.12.1:
    HOME=D:\dami
    LANG=fr
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
 
PATH=C:\oraclexe\app\oracle\product\11.2.0\server\bin;d:\ProgFiles\Svn;C
:\oracle\product\10.2.0\client_1\bin;C:\Program Files\Fichiers
communs\GTK\2.0\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\W
bem;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls\FRANCAIS;c:\Program
Files\Novell\ZENworks;C:\Program
Files\TortoiseSVN\bin;C:\BASISclient\cs\bin;C:\BASISclient\www\bin;C:\WI
NDOWS\system32\WindowsPowerShell\v1.0;D:\strawberry\c\bin;D:\strawberry\
perl\site\bin;D:\strawberry\perl\bin;D:\ProgFiles\GnuWin32\bin;D:\devare
a\Oracle\instantclient_11_1;C:\Program Files\TortoiseGit\bin;C:\Program
Files\Support Tools\;c:\Program files\git\bin;D:\ProgFiles\PuTTY;Z:.;
    PERL5OPT=-M-indirect
    PERL_BADLANG (unset)
    SHELL (unset)


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