From 9ce5290e080af1fab5ba1499337c579fac3db7ef Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sun, 14 Feb 2010 12:07:07 +0100 Subject: use with_meta instead of with_caller --- lib/MooseX/Privacy.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/MooseX/Privacy.pm') 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', ], ); -- cgit 1.4.1