From: Stevan Little Date: Sat, 18 Mar 2006 05:45:09 +0000 (+0000) Subject: uploin X-Git-Tag: 0_05~94 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f18097c5938a5dfc6cdb19990b6e950f003c9d8;p=gitmo%2FMoose.git uploin --- diff --git a/Build.PL b/Build.PL index 9bc5aed..4372a3e 100644 --- a/Build.PL +++ b/Build.PL @@ -6,10 +6,11 @@ my $build = Module::Build->new( module_name => 'Moose', license => 'perl', requires => { - 'Scalar::Util' => '1.18', - 'Carp' => '0', - 'Class::MOP' => '0.21', - 'Sub::Name' => '0.02', + 'Scalar::Util' => '1.18', + 'Carp' => '0', + 'Class::MOP' => '0.21', + 'Sub::Name' => '0.02', + 'UNIVERSAL::require' => '0' }, optional => { }, diff --git a/lib/Moose.pm b/lib/Moose.pm index 67434ea..f279bb8 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -12,6 +12,8 @@ use Scalar::Util 'blessed', 'reftype'; use Carp 'confess'; use Sub::Name 'subname'; +use UNIVERSAL::require; + use Class::MOP; use Moose::Meta::Class; @@ -56,7 +58,10 @@ sub import { # will not name it with # handle superclasses - $meta->alias_method('extends' => subname 'Moose::extends' => sub { $meta->superclasses(@_) }); + $meta->alias_method('extends' => subname 'Moose::extends' => sub { + $_->require for @_; + $meta->superclasses(@_) + }); # handle mixins $meta->alias_method('with' => subname 'Moose::with' => sub { $meta->mixin($_[0]) });