make does_role work on objects
[gitmo/Moo.git] / lib / Moo.pm
index 31727fe..2f27387 100644 (file)
@@ -3,6 +3,9 @@ package Moo;
 use strictures 1;
 use Moo::_Utils;
 
+our $VERSION = '0.009001'; # 0.9.1
+$VERSION = eval $VERSION;
+
 our %MAKERS;
 
 sub import {
@@ -10,6 +13,7 @@ sub import {
   my $class = shift;
   strictures->import;
   *{_getglob("${target}::extends")} = sub {
+    _load_module($_) for @_;
     *{_getglob("${target}::ISA")} = \@_;
   };
   *{_getglob("${target}::with")} = sub {
@@ -29,6 +33,7 @@ sub import {
   };
   foreach my $type (qw(before after around)) {
     *{_getglob "${target}::${type}"} = sub {
+      require Class::Method::Modifiers;
       _install_modifier($target, $type, @_);
     };
   }