]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind/Tool/memcheck.pm
This is 1.13
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind / Tool / memcheck.pm
index af6f3f0bb98ed39fbfdeca3ac57c7a2495048fd0..78236c7bc0301cadfa6c41e8d8e0d74e7026f486 100644 (file)
@@ -9,11 +9,11 @@ Test::Valgrind::Tool::memcheck - Run an analysis through the memcheck tool.
 
 =head1 VERSION
 
-Version 1.11
+Version 1.13
 
 =cut
 
-our $VERSION = '1.11';
+our $VERSION = '1.13';
 
 =head1 DESCRIPTION
 
@@ -21,7 +21,7 @@ This class contains the information required by the session for running the C<me
 
 =cut
 
-use base qw/Test::Valgrind::Tool/;
+use base qw<Test::Valgrind::Tool>;
 
 =head1 METHODS
 
@@ -149,7 +149,7 @@ You can find documentation for this module with the perldoc command.
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2009 Vincent Pit, all rights reserved.
+Copyright 2009,2010,2011 Vincent Pit, all rights reserved.
 
 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
 
@@ -159,11 +159,11 @@ This program is free software; you can redistribute it and/or modify it under th
 
 package Test::Valgrind::Tool::memcheck::Report;
 
-use base qw/Test::Valgrind::Report/;
+use base qw<Test::Valgrind::Report>;
 
-our $VERSION = '1.11';
+our $VERSION = '1.13';
 
-my @kinds = qw/
+my @kinds = qw<
  InvalidFree
  MismatchedFree
  InvalidRead
@@ -179,7 +179,7 @@ my @kinds = qw/
  Leak_IndirectlyLost
  Leak_PossiblyLost
  Leak_StillReachable
-/;
+>;
 push @kinds, __PACKAGE__->SUPER::kinds();
 
 my %kinds_hashed = map { $_ => 1 } @kinds;
@@ -216,9 +216,9 @@ sub dump {
    my ($ip, $obj, $fn, $dir, $file, $line) = map { (defined) ? $_ : '?' } @$_;
    my $frame;
    if ($fn eq '?' and $obj eq '?') {
-    $ip =~ s/^0x//g;
-    $ip = hex $ip;
-    $frame = sprintf "0x%0${pad}X", $ip;
+    $ip =~ s/^0x//gi;
+    my $l = length $ip;
+    $frame = '0x' . ($l < $pad ? ('0' x ($pad - $l)) : '') . uc($ip);
    } else {
     $frame = sprintf '%s (%s) [%s:%s]', $fn, $obj, $file, $line;
    }