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
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
$out = runperl ( switches => ["-MO=Concise,-stash=Data::Dumper,-src,-exec"],
prog => '-e 1', stderr => 1 );
-{
- local $TODO = q(require $package unless ${$package.'::'}; doesn't do what you want under static linking) unless $Config{usedl};
- like($out, qr/FUNC: \*Data::Dumper::format_refaddr/,
- "stash rendering loads package as needed");
-}
+like($out, qr/FUNC: \*Data::Dumper::format_refaddr/,
+ "stash rendering loads package as needed");
my $prog = q{package FOO; sub bar { print "bar" } package main; FOO::bar(); };