Permalink
Browse files

fixup merge conflict

  • Loading branch information...
2 parents 99a9178 + 176d036 commit c6321e5d63f1a978e29c4851e23c816dffaf6853 @rurban committed Feb 14, 2012
Showing with 17 additions and 13 deletions.
  1. +15 −11 lib/B/C.pm
  2. +2 −2 log.modules-5.015007-nt
View
26 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 );
}
View
4 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%)

0 comments on commit c6321e5

Please sign in to comment.