our %dependencies = (
'Scalar::Util' => {
+
+# VVVVV CODE TAKEN FROM SCALAR::UTIL VVVVV
'blessed' => do {
do {
no strict 'refs';
}
: $t
},
+ 'openhandle' => sub {
+ my $fh = shift;
+ my $rt = reftype($fh) || '';
+
+ return defined(fileno($fh)) ? $fh : undef
+ if $rt eq 'IO';
+
+ if (reftype(\$fh) eq 'GLOB') { # handle openhandle(*DATA)
+ $fh = \(my $tmp=$fh);
+ }
+ elsif ($rt ne 'GLOB') {
+ return undef;
+ }
+
+ (tied(*$fh) or defined(fileno($fh)))
+ ? $fh : undef;
+ },
+ weaken => {
+ loaded => \&Scalar::Util::weaken,
+ not_loaded => sub { die "Scalar::Util required for weak reference support" },
+ },
+# ^^^^^ CODE TAKEN FROM SCALAR::UTIL ^^^^^
},
'MRO::Compat' => {
+# VVVVV CODE TAKEN FROM MRO::COMPAT VVVVV
'get_linear_isa' => {
loaded => \&mro::get_linear_isa,
not_loaded => do {
}
},
},
+# ^^^^^ CODE TAKEN FROM MRO::COMPAT ^^^^^
},
);
1;
+__END__
+
+=head1 NAME
+
+Mouse::Util - features, with or without their dependencies
+
+=head1 IMPLEMENTATIONS FOR
+
+=head2 L<MRO::Compat>
+
+=head3 get_linear_isa
+
+=head2 L<Scalar::Util>
+
+=head3 blessed
+
+=head3 looks_like_number
+
+=head3 reftype
+
+=head3 openhandle
+
+=head3 weaken
+
+C<weaken> I<must> be implemented in XS. If the user tries to use C<weaken>
+without L<Scalar::Util>, an error is thrown.
+
+=cut
+