Change 34415 by [EMAIL PROTECTED] on 2008/09/24 14:00:17

        Integrate:
        [ 34413]
        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.8/perl/ext/B/B/Concise.pm#44 integrate
... //depot/maint-5.8/perl/ext/B/t/concise.t#18 integrate

Differences ...

==== //depot/maint-5.8/perl/ext/B/B/Concise.pm#44 (text) ====
Index: perl/ext/B/B/Concise.pm
--- perl/ext/B/B/Concise.pm#43~33925~   2008-05-25 13:50:26.000000000 -0700
+++ perl/ext/B/B/Concise.pm     2008-09-24 07:00:17.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.8/perl/ext/B/t/concise.t#18 (text) ====
Index: perl/ext/B/t/concise.t
--- perl/ext/B/t/concise.t#17~33210~    2008-02-02 11:08:57.000000000 -0800
+++ perl/ext/B/t/concise.t      2008-09-24 07:00:17.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.

Reply via email to