Graham Barr > MooseX-Role-Restricted-1.01 > MooseX::Role::Restricted

Download:
MooseX-Role-Restricted-1.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 1.01   Source   Latest Release: MooseX-Role-Restricted-1.02

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.