This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Examining objects through the 'x' command in the perl debugger doesn't
authorLaurent Dami <dami@cpan.org>
Sun, 23 Oct 2011 20:23:44 +0000 (13:23 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 23 Oct 2011 20:49:38 +0000 (13:49 -0700)
work if those objects are blessed into class names containing '='.

This is due to incorrect parsing through 'split' in dumpvar.pl line 165.

lib/dumpvar.pl

index 523bda8..1c782dd 100644 (file)
@@ -165,8 +165,7 @@ sub unwrap {
       # 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