diff --git a/lib/B/C.pm b/lib/B/C.pm index 038ddffd3..609fb162a 100644 --- a/lib/B/C.pm +++ b/lib/B/C.pm @@ -12,7 +12,7 @@ package B::C; use strict; -our $VERSION = '1.43'; +our $VERSION = '1.42_01'; my %debug; my $eval_pvs = ''; @@ -65,6 +65,7 @@ sub output { my $dodbg = 1 if $debug{flags} and $section->[-1]{dbg}; foreach ( @{ $section->[-1]{values} } ) { my $dbg = ""; + next unless defined $_; s{(s\\_[0-9a-f]+)}{ exists($sym->{$1}) ? $sym->{$1} : $default; }ge; if ($dodbg and $section->[-1]{dbg}->[$i]) { $dbg = " /* ".$section->[-1]{dbg}->[$i]." */"; @@ -2498,8 +2499,8 @@ sub B::CV::save { $cvstashname = $gv->STASH->NAME; $cvname = $gv->NAME; $fullname = $cvstashname.'::'.$cvname; - warn sprintf( "CV 0x%x as PVGV 0x%x %s CvFLAGS=0x%x\n", - $$cv, $$gv, $fullname, $cv->CvFLAGS ) + warn sprintf( "CV [%d] as PVGV %s %s CvFLAGS=0x%x\n", + $svsect->index + 1, objsym($gv), $fullname, $cv->CvFLAGS ) if $debug{cv}; # XXX not needed, we already loaded utf8_heavy #return if $fullname eq 'utf8::AUTOLOAD'; @@ -5050,13 +5051,16 @@ sub should_save { # 5.10 introduced version and Regexp::DESTROY, which we dont want automatically. # XXX TODO This logic here is wrong and unstable. Fixes lead to more failures. # The walker deserves a rewrite. - if ( UNIVERSAL::can( $package, $m ) and $package !~ /^(B::C|version|Regexp|utf8|SelectSaver)$/ ) { - next if $package eq 'utf8' and $m eq 'DESTROY'; # utf8::DESTROY is empty + if ( UNIVERSAL::can( $package, $m ) + and !$all_bc_pkg{$package} # only add non B::C packages + and $package !~ /^(B::C|version|utf8)$/ ) + { + #next if $package eq 'utf8' and $m eq 'DESTROY'; # utf8::DESTROY is empty # we load Errno by ourself to avoid double Config warnings [perl #] - next if $package eq 'Errno' and $m eq 'TIEHASH'; + #next if $package eq 'Errno' and $m eq 'TIEHASH'; # XXX Config and FileHandle should not just return. If unneeded skip em. - return 0 if $package eq 'Config' and $m =~ /DESTROY|TIEHASH/; # Config detected in GV - return 0 if $package eq 'FileHandle' and $m eq 'new'; + #return 0 if $package eq 'Config' and $m =~ /DESTROY|TIEHASH/; # Config detected in GV + #return 0 if $package eq 'FileHandle' and $m eq 'new'; warn "$package has method $m: saving package\n" if $debug{pkg}; return mark_package($package); } @@ -5661,10 +5665,10 @@ OPTION: } elsif ( $opt eq "u" ) { $arg ||= shift @options; - if ($arg =~ /\.p/) { - eval "require $arg;"; + if ($arg =~ /\.p[lm]$/) { + eval "require \"$arg\";"; # path as string } else { - eval "require $arg.pm;"; + eval "require $arg;"; # package as bareword with :: } mark_unused( $arg, 1 ); } diff --git a/log.modules-5.015007-nt b/log.modules-5.015007-nt index 368cdf8b6..0165a1735 100644 --- a/log.modules-5.015007-nt +++ b/log.modules-5.015007-nt @@ -1,4 +1,4 @@ -# B::C::VERSION = 1.42 52c6dfb 2012-02-07 | Update Todo +# B::C::VERSION = 1.43 c6dbeb2 2012-02-08 | missed some internal pkgs, can now skip IO and Fcntl # perlversion = 5.015007-nt # path = /usr/local/bin/perl5.15.7-nt # platform = linux 64bit non-threaded @@ -102,7 +102,7 @@ pass IO::String pass AppConfig pass UNIVERSAL::require pass Template::Stash -# 100 / 100 modules tested with B-C-1.42 - perl-5.015007-nt +# 100 / 100 modules tested with B-C-1.43 - perl-5.015007-nt # pass 95 / 100 (95.0%) # fail 5 / 100 (5.0%) # todo 0 / 5 (0.0%)