diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2013-11-08 13:00:43 +0000 |
---|---|---|
committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2013-11-08 13:00:48 +0000 |
commit | b8e5d789eb3547309b7559d5ec2ad9c64da616c5 (patch) | |
tree | d87749a292611665fbdec2ffd1eb4eae7c6f8faf /cpan | |
parent | 32e9ec8f7eb4d10de0588b750d5e8a31cf7613f9 (diff) | |
download | perl-b8e5d789eb3547309b7559d5ec2ad9c64da616c5.tar.gz |
Update B-Debug to CPAN version 1.19
[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
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/B-Debug/Debug.pm | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/cpan/B-Debug/Debug.pm b/cpan/B-Debug/Debug.pm index 31b0e2834b..c4a1a33afa 100644 --- a/cpan/B-Debug/Debug.pm +++ b/cpan/B-Debug/Debug.pm @@ -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: |