X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole.pm;h=4ba4aa2541b1707725a0c7bf7313e120638b7ed3;hb=a62dcd43575e3069a70277082c7be85fb71322bf;hp=31e843758defc3b8d6d32ca58816a1a58fe19d8a;hpb=534000fdfc34b72565bb32ee72ddad7b7421ad9a;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role.pm b/lib/Moose/Meta/Role.pm index 31e8437..4ba4aa2 100644 --- a/lib/Moose/Meta/Role.pm +++ b/lib/Moose/Meta/Role.pm @@ -8,7 +8,7 @@ use metaclass; use Scalar::Util 'blessed'; use Carp 'confess'; -our $VERSION = '0.62_01'; +our $VERSION = '0.71_01'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -122,8 +122,10 @@ foreach my $action ( sub add_attribute { my $self = shift; my $name = shift; - (defined $name && $name) - || Moose->throw_error("You must provide a name for the attribute"); + unless ( defined $name && $name ) { + require Moose; + Moose->throw_error("You must provide a name for the attribute"); + } my $attr_desc; if (scalar @_ == 1 && ref($_[0]) eq 'HASH') { $attr_desc = $_[0]; @@ -904,7 +906,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006-2008 by Infinity Interactive, Inc. +Copyright 2006-2009 by Infinity Interactive, Inc. L