From: Dave Rolsky Date: Mon, 7 Sep 2009 17:28:40 +0000 (-0500) Subject: Use with_meta rather than with_caller X-Git-Tag: 0.11~39 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=59ee60b453a133ceaca1d538e95040bcb24243ec;p=gitmo%2FMooseX-ClassAttribute.git Use with_meta rather than with_caller --- diff --git a/lib/MooseX/ClassAttribute.pm b/lib/MooseX/ClassAttribute.pm index 52eea7f..d142d41 100644 --- a/lib/MooseX/ClassAttribute.pm +++ b/lib/MooseX/ClassAttribute.pm @@ -11,7 +11,7 @@ use Moose::Exporter; use MooseX::ClassAttribute::Role::Meta::Class; Moose::Exporter->setup_import_methods - ( with_caller => [ 'class_has' ] ); + ( with_meta => [ 'class_has' ] ); sub init_meta @@ -30,15 +30,14 @@ sub init_meta sub class_has { - my $caller = shift; + my $meta = shift; my $name = shift; my %options = @_; my $attrs = ref $name eq 'ARRAY' ? $name : [$name]; - Class::MOP::class_of($caller) - ->add_class_attribute( $_, %options ) - for @{ $attrs }; + $meta->add_class_attribute( $_, %options ) + for @{ $attrs }; } 1;