12 *UNIVERSAL::a_sub_not_likely_to_be_here = sub {
15 # deviation from Scalar::Util
16 # XS returns undef, PP returns GLOB.
17 # let's make that more consistent by having PP return
18 # undef if it's a GLOB. :/
20 # \*STDOUT would be allowed as an object in PP blessed
22 return $ref eq 'GLOB' ? undef : $ref;
27 local($@, $SIG{__DIE__}, $SIG{__WARN__});
29 ? eval { $_[0]->a_sub_not_likely_to_be_here }
36 loaded => \&mro::get_linear_isa,
38 # this recurses so it isn't pretty
43 my $classname = shift;
45 my @lin = ($classname);
47 foreach my $parent (@{"$classname\::ISA"}) {
48 my $plin = $code->($parent);
50 next if exists $stored{$_};
62 our @EXPORT_OK = map { keys %$_ } values %dependencies;
64 for my $module_name (keys %dependencies) {
65 (my $file = "$module_name.pm") =~ s{::}{/}g;
68 local $SIG{__DIE__} = 'DEFAULT';
69 eval "require '$file'; 1";
72 for my $method_name (keys %{ $dependencies{ $module_name } }) {
73 my $producer = $dependencies{$module_name}{$method_name};
76 if (ref($producer) eq 'HASH') {
77 $implementation = $loaded
79 : $producer->{not_loaded};
82 $implementation = $loaded
83 ? $module_name->can($method_name)
88 *{ __PACKAGE__ . '::' . $method_name } = $implementation;