Query: moo::role
OS: osx
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Moo::Role(3) User Contributed Perl Documentation Moo::Role(3)NAMEMoo::Role - Minimal Object Orientation support for RolesSYNOPSISpackage My::Role; use Moo::Role; sub foo { ... } sub bar { ... } has baz => ( is => 'ro', ); 1; And elsewhere: package Some::Class; use Moo; # bar gets imported, but not foo with('My::Role'); sub foo { ... } 1;DESCRIPTION"Moo::Role" builds upon Role::Tiny, so look there for most of the documentation on how this works. The main addition here is extra bits to make the roles more "Moosey;" which is to say, it adds "has".IMPORTED SUBROUTINESSee "IMPORTED SUBROUTINES" in Role::Tiny for all the other subroutines that are imported by this module. has has attr => ( is => 'ro', ); Declares an attribute for the class to be composed into. See "has" in Moo for all options.AUTHORSSee Moo for authors.COPYRIGHT AND LICENSESee Moo for the copyright and license. perl v5.16.2 2012-10-08 Moo::Role(3)
Similar Topics in the Unix Linux Community |
---|
When is a _function_ not a _function_? |
To print diamond asterisk pattern based on inputs |
My first PERL incarnation... Audio Oscillograph |
Syntax error in subtraction in Bash |