The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

  MooseX::Role::Restricted - Restrict which sub are exported by a role

SYNOPSIS

  package MyApp::MyRole;

  use MooseX::Role::Restricted;

  sub method1 { ... }
  sub _private1 { ... }

  sub _method2 :Public { ... }
  sub private2 :Private { ... }

DESCRIPTION

By default Moose::Role will export any sub you define in a role package. However it does not export any sub which was imported from another package

MooseX::Role::Restricted give a little more control over which subs are exported and which are not.

By default an sub with a name starting with _ is considered private and will not be exported. However MooseX::Role::Restricted provides two subroutine attributes :Public and :Private which can control is any sub is exported or kept private

SEE ALSO

Moose::Role

AUTHOR

Graham Barr <gbarr@cpan.org>

COPYRIGHT & LICENSE

Copyright (C) 2009 Graham Barr

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.