Update B-Debug to CPAN version 1.19
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Fri, 8 Nov 2013 13:00:43 +0000 (13:00 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Fri, 8 Nov 2013 13:00:48 +0000 (13:00 +0000)
  [DELTA]

  1.19 2013-11-07 rurban
    * install into site (again) since 5.12
    * support lexical subs, NAME instead of GV.
    * fix double SV FLAGS
    * fix wrong xpv_cur, add xpv_len

Porting/Maintainers.pl
cpan/B-Debug/Debug.pm

index 92252a7..c79b753 100755 (executable)
@@ -171,7 +171,7 @@ use File::Glob qw(:case);
     },
 
     'B::Debug' => {
-        'DISTRIBUTION' => 'RURBAN/B-Debug-1.18.tar.gz',
+        'DISTRIBUTION' => 'RURBAN/B-Debug-1.19.tar.gz',
         'FILES'        => q[cpan/B-Debug],
         'EXCLUDED'     => ['t/pod.t'],
     },
index 31b0e28..c4a1a33 100644 (file)
@@ -1,6 +1,6 @@
 package B::Debug;
 
-our $VERSION = '1.18';
+our $VERSION = '1.19';
 
 use strict;
 require 5.006;
@@ -181,7 +181,6 @@ sub B::SV::debug {
     printf <<'EOT', class($sv), $$sv, $sv->REFCNT;
 %s (0x%x)
        REFCNT          %d
-       FLAGS           0x%x
 EOT
     printf "\tFLAGS\t\t0x%x", $sv->FLAGS;
     if ($have_B_Flags) {
@@ -203,9 +202,10 @@ sub B::PV::debug {
     my ($sv) = @_;
     $sv->B::SV::debug();
     my $pv = $sv->PV();
-    printf <<'EOT', cstring($pv), length($pv);
+    printf <<'EOT', cstring($pv), $sv->CUR, $sv->LEN;
        xpv_pv          %s
        xpv_cur         %d
+       xpv_len         %d
 EOT
 }
 
@@ -258,17 +258,23 @@ sub B::CV::debug {
     my ($padlist) = $sv->PADLIST;
     my ($file) = $sv->FILE;
     my ($gv) = $sv->GV;
-    printf <<'EOT', $$stash, $$start, $$root, $$gv, $file, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
+    printf <<'EOT', $$stash, $$start, $$root;
        STASH           0x%x
        START           0x%x
        ROOT            0x%x
-       GV              0x%x
+EOT
+    if ( $]>5.017 && ($sv->FLAGS & 0x40000)) { #lexsub
+      printf("\tNAME\t%%s\n", $sv->NAME);
+    } else {
+      printf("\tGV\t%0x%x\t%s\n", $$gv, $gv->SAFENAME);
+    }
+    printf <<'EOT', $file, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
        FILE            %s
        DEPTH           %d
        PADLIST         0x%x
        OUTSIDE         0x%x
 EOT
-    printf("\tOUTSIDE_SEQ\t%d\n", $sv->OUTSIDE_SEQ) if $] > 5.007;
+    printf("\tOUTSIDE_SEQ\t%d\n", $sv->OUTSIDE_SEQ) if $] > 5.007;
     if ($have_B_Flags) {
       my $SVt_PVCV = $] < 5.010 ? 12 : 13;
       printf("\tCvFLAGS\t0x%x\t%s\n", $sv->CvFLAGS,
@@ -407,7 +413,7 @@ Reini Urban C<rurban@cpan.org>
 =head1 LICENSE
 
 Copyright (c) 1996, 1997 Malcolm Beattie
-Copyright (c) 2008, 2010 Reini Urban
+Copyright (c) 2008, 2010, 2013 Reini Urban
 
        This program is free software; you can redistribute it and/or modify
        it under the terms of either: