Change 34413 by [EMAIL PROTECTED] on 2008/09/24 08:55:59
Integrate:
[ 34406]
The tests for the -ostash option to B::Concise will have been failing
for -Uusedl since they were added. For now, test with a non-XS module,
and TODO the test with the XS module when usedl is undefined.
[ 34409]
defined %{$package.'::'} isn't good enough to tell whether a module is
loaded when it's XS and staticly linked to perl.
Affected files ...
... //depot/maint-5.10/perl/ext/B/B/Concise.pm#4 integrate
... //depot/maint-5.10/perl/ext/B/t/concise.t#3 integrate
Differences ...
==== //depot/maint-5.10/perl/ext/B/B/Concise.pm#4 (text) ====
Index: perl/ext/B/B/Concise.pm
--- perl/ext/B/B/Concise.pm#3~33640~ 2008-04-03 09:03:24.000000000 -0700
+++ perl/ext/B/B/Concise.pm 2008-09-24 01:55:59.000000000 -0700
@@ -14,7 +14,7 @@
use Exporter (); # use #5
-our $VERSION = "0.75";
+our $VERSION = "0.76";
our @ISA = qw(Exporter);
our @EXPORT_OK = qw( set_style set_style_standard add_callback
concise_subref concise_cv concise_main
@@ -299,7 +299,18 @@
elsif ($o =~ /^-stash=(.*)/) {
my $pkg = $1;
no strict 'refs';
- eval "require $pkg" unless defined %{$pkg.'::'};
+ if (!defined %{$pkg.'::'}) {
+ eval "require $pkg";
+ } else {
+ require Config;
+ if (!$Config::Config{usedl}
+ && keys %{$pkg.'::'} == 1
+ && $pkg->can('bootstrap')) {
+ # It is something that we're staticly linked to, but hasn't
+ # yet been used.
+ eval "require $pkg";
+ }
+ }
push @render_packs, $pkg;
}
# line-style options
==== //depot/maint-5.10/perl/ext/B/t/concise.t#3 (text) ====
Index: perl/ext/B/t/concise.t
--- perl/ext/B/t/concise.t#2~33126~ 2008-01-30 07:26:23.000000000 -0800
+++ perl/ext/B/t/concise.t 2008-09-24 01:55:59.000000000 -0700
@@ -16,7 +16,7 @@
require 'test.pl'; # we use runperl from 'test.pl', so can't use
Test::More
}
-plan tests => 156;
+plan tests => 157;
require_ok("B::Concise");
@@ -407,6 +407,12 @@
like($out, qr/\# 4\d\d: \s+ \$l->concise\(\$level\);/,
"src-line rendering works");
+$out = runperl ( switches =>
["-MO=Concise,-stash=ExtUtils::Mksymlists,-src,-exec"],
+ prog => '-e 1', stderr => 1 );
+
+like($out, qr/FUNC: \*ExtUtils::Mksymlists::_write_vms/,
+ "stash rendering loads package as needed");
+
$out = runperl ( switches => ["-MO=Concise,-stash=Data::Dumper,-src,-exec"],
prog => '-e 1', stderr => 1 );
End of Patch.