doc
[gitmo/Mouse.git] / lib / Mouse / Util.pm
index 51aa3f9..b2ab6c6 100644 (file)
@@ -6,6 +6,8 @@ use base 'Exporter';
 
 our %dependencies = (
     'Scalar::Util' => {
+
+#       VVVVV   CODE TAKEN FROM SCALAR::UTIL   VVVVV
         'blessed' => do {
             do {
                 no strict 'refs';
@@ -86,8 +88,14 @@ our %dependencies = (
             (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 {
@@ -112,6 +120,7 @@ our %dependencies = (
                 }
             },
         },
+#       ^^^^^   CODE TAKEN FROM MRO::COMPAT   ^^^^^
     },
 );
 
@@ -145,5 +154,35 @@ for my $module_name (keys %dependencies) {
     }
 }
 
+
 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
+