use Scalar::Util directly
[gitmo/Mouse.git] / lib / Mouse / Util.pm
index cf807da..c9fca63 100644 (file)
@@ -4,10 +4,8 @@ use strict;
 use warnings;
 use base qw/Exporter/;
 use Carp;
-use Scalar::Util qw(blessed looks_like_number openhandle reftype weaken);
 
 our @EXPORT_OK = qw(
-    blessed looks_like_number openhandle reftype weaken
     get_linear_isa
 );
 our %EXPORT_TAGS = (
@@ -16,12 +14,12 @@ our %EXPORT_TAGS = (
 
 BEGIN {
     my $impl;
-    if (\&mro::get_linear_isa) {
+    if ($] >= 5.009_005) {
         $impl = \&mro::get_linear_isa;
     } else {
         my $loaded = do {
             local $SIG{__DIE__} = 'DEFAULT';
-            eval "use MRO::Compat (); 1";
+            eval "require MRO::Compat; 1";
         };
         if ($loaded) {
             $impl = \&mro::get_linear_isa;
@@ -49,6 +47,7 @@ BEGIN {
             $impl = $code;
         }
     }
+
     no strict 'refs';
     *{ __PACKAGE__ . '::get_linear_isa'} = $impl;
 }
@@ -100,26 +99,5 @@ Mouse::Util - features, with or without their dependencies
 
 =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.
-
-=head2 Test::Exception
-
-=head3 throws_ok
-
-=head3 lives_ok
-
 =cut