diff options
author | franck cuny <franck@lumberjaph.net> | 2010-02-14 18:00:29 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-02-14 18:00:29 +0100 |
commit | 16f270e2eb646263a9712fe4b443e7a07e367064 (patch) | |
tree | 8def06d8534db2fe3c190663e7d4230dcd04895f /lib/MooseX/Privacy/Meta/Method/Protected.pm | |
parent | add_{private,protected}_method accept a MX::Private::Meta::Method::* instance... (diff) | |
download | moosex-privacy-16f270e2eb646263a9712fe4b443e7a07e367064.tar.gz |
POD and confess
Diffstat (limited to '')
-rw-r--r-- | lib/MooseX/Privacy/Meta/Method/Protected.pm | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/lib/MooseX/Privacy/Meta/Method/Protected.pm b/lib/MooseX/Privacy/Meta/Method/Protected.pm index 90a22e1..f76ac8e 100644 --- a/lib/MooseX/Privacy/Meta/Method/Protected.pm +++ b/lib/MooseX/Privacy/Meta/Method/Protected.pm @@ -3,7 +3,7 @@ package MooseX::Privacy::Meta::Method::Protected; use Moose; extends 'Moose::Meta::Method'; -use Carp; +use Carp qw/confess/; sub wrap { my $class = shift; @@ -12,10 +12,10 @@ sub wrap { my $method = delete $args{body}; my $protected_code = sub { my $caller = caller(); - croak "The " + confess "The " . $args{package_name} . "::" . $args{name} - . " name method is private" + . " method is protected" unless $caller eq $args{package_name} || $caller->isa( $args{package_name} ); @@ -26,4 +26,28 @@ sub wrap { } 1; +__END__ + +=head1 NAME + +MooseX::Privacy::Meta::Method::Protected + +=head1 SYNOPSIS + +=head1 METHODS + +=head2 wrap + +=head1 AUTHOR + +franck cuny E<lt>franck@lumberjaph.netE<gt> + +=head1 SEE ALSO + +=head1 LICENSE + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut |