diff options
author | franck cuny <franck@lumberjaph.net> | 2010-02-14 12:07:07 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-02-14 12:07:07 +0100 |
commit | 9ce5290e080af1fab5ba1499337c579fac3db7ef (patch) | |
tree | 5bc96955fe9f4e689093102aa95a57d6633ae52d | |
parent | clean POD (diff) | |
download | moosex-privacy-9ce5290e080af1fab5ba1499337c579fac3db7ef.tar.gz |
use with_meta instead of with_caller
-rw-r--r-- | lib/MooseX/Privacy.pm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/MooseX/Privacy.pm b/lib/MooseX/Privacy.pm index ec34a41..ad4f907 100644 --- a/lib/MooseX/Privacy.pm +++ b/lib/MooseX/Privacy.pm @@ -5,16 +5,16 @@ our $VERSION = '0.01'; use Moose::Exporter; Moose::Exporter->setup_import_methods( - with_caller => [qw( private protected )], ); + with_meta => [qw( private_method protected_method )], ); -sub private { - my ( $caller, $name, $body ) = @_; - $caller->meta->add_private_method( $name, $body ); +sub private_method { + my ( $meta, $name, $body ) = @_; + $meta->add_private_method( $name, $body ); } -sub protected { - my ( $caller, $name, $body ) = @_; - $caller->meta->add_protected_method( $name, $body ); +sub protected_method { + my ( $meta, $name, $body ) = @_; + $meta->add_protected_method( $name, $body ); } sub init_meta { @@ -23,7 +23,7 @@ sub init_meta { my $for = $options{for_class}; Moose->init_meta(%options); - Moose::Util::MetaRole::apply_metaclass_roles( + Moose::Util::MetaRole::apply_metaroles( for_class => $for, metaclass_roles => [ 'MooseX::Privacy::Meta::Class', ], ); |