Add built local::lib
[catagits/Gitalist.git] / local-lib5 / man / man3 / Moose::Meta::Role.3pm
diff --git a/local-lib5/man/man3/Moose::Meta::Role.3pm b/local-lib5/man/man3/Moose::Meta::Role.3pm
new file mode 100644 (file)
index 0000000..bff20ab
--- /dev/null
@@ -0,0 +1,352 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "Moose::Meta::Role 3"
+.TH Moose::Meta::Role 3 "2009-11-19" "perl v5.8.7" "User Contributed Perl Documentation"
+.SH "NAME"
+Moose::Meta::Role \- The Moose Role metaclass
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This class is a subclass of Class::MOP::Module that provides
+additional Moose-specific functionality.
+.PP
+It's \s-1API\s0 looks a lot like Moose::Meta::Class, but internally it
+implements many things differently. This may change in the future.
+.SH "INHERITANCE"
+.IX Header "INHERITANCE"
+\&\f(CW\*(C`Moose::Meta::Role\*(C'\fR is a subclass of Class::MOP::Module.
+.SH "METHODS"
+.IX Header "METHODS"
+.Sh "Construction"
+.IX Subsection "Construction"
+.IP "\fBMoose::Meta::Role\->initialize($role_name)\fR" 4
+.IX Item "Moose::Meta::Role->initialize($role_name)"
+This method creates a new role object with the provided name.
+.ie n .IP "\fBMoose::Meta::Role\->combine( [ \fB$role\fB => { ... } ], [ \f(BI$role\fB ], ... )\fR" 4
+.el .IP "\fBMoose::Meta::Role\->combine( [ \f(CB$role\fB => { ... } ], [ \f(CB$role\fB ], ... )\fR" 4
+.IX Item "Moose::Meta::Role->combine( [ $role => { ... } ], [ $role ], ... )"
+This method accepts a list of array references. Each array reference
+should contain a role name as its first element. The second element is
+an optional hash reference. The hash reference can contain \f(CW\*(C`\-excludes\*(C'\fR
+and \f(CW\*(C`\-alias\*(C'\fR keys to control how methods are composed from the role.
+.Sp
+The return value is a new Moose::Meta::Role::Composite that
+represents the combined roles.
+.ie n .IP "\fBMoose::Meta::Role\->create($name, \fB%options\fB)\fR" 4
+.el .IP "\fBMoose::Meta::Role\->create($name, \f(CB%options\fB)\fR" 4
+.IX Item "Moose::Meta::Role->create($name, %options)"
+This method is identical to the Moose::Meta::Class \f(CW\*(C`create\*(C'\fR
+method.
+.IP "\fBMoose::Meta::Role\->create_anon_role\fR" 4
+.IX Item "Moose::Meta::Role->create_anon_role"
+This method is identical to the Moose::Meta::Class
+\&\f(CW\*(C`create_anon_class\*(C'\fR method.
+.IP "\fB$metarole\->is_anon_role\fR" 4
+.IX Item "$metarole->is_anon_role"
+Returns true if the role is an anonymous role.
+.Sh "Role application"
+.IX Subsection "Role application"
+.ie n .IP "\fB$metarole\->apply( \fB$thing\fB, \f(BI@options\fB )\fR" 4
+.el .IP "\fB$metarole\->apply( \f(CB$thing\fB, \f(CB@options\fB )\fR" 4
+.IX Item "$metarole->apply( $thing, @options )"
+This method applies a role to the given \f(CW$thing\fR. That can be another
+Moose::Meta::Role, object, a Moose::Meta::Class object, or a
+(non\-meta) object instance.
+.Sp
+The options are passed directly to the constructor for the appropriate
+Moose::Meta::Role::Application subclass.
+.Sp
+Note that this will apply the role even if the \f(CW$thing\fR in question already
+\&\f(CW\*(C`does\*(C'\fR this role.  \*(L"does_role\*(R" in Moose::Util is a convenient wrapper for
+finding out if role application is necessary.
+.Sh "Roles and other roles"
+.IX Subsection "Roles and other roles"
+.IP "\fB$metarole\->get_roles\fR" 4
+.IX Item "$metarole->get_roles"
+This returns an array reference of roles which this role does. This
+list may include duplicates.
+.IP "\fB$metarole\->calculate_all_roles\fR" 4
+.IX Item "$metarole->calculate_all_roles"
+This returns a \fIunique\fR list of all roles that this role does, and
+all the roles that its roles do.
+.IP "\fB$metarole\->does_role($role_name)\fR" 4
+.IX Item "$metarole->does_role($role_name)"
+Given a role \fIname\fR, returns true if this role does the given
+role.
+.IP "\fB$metarole\->add_role($role)\fR" 4
+.IX Item "$metarole->add_role($role)"
+Given a Moose::Meta::Role object, this adds the role to the list of
+roles that the role does.
+.IP "\fB$metarole\->get_excluded_roles_list\fR" 4
+.IX Item "$metarole->get_excluded_roles_list"
+Returns a list of role names which this role excludes.
+.IP "\fB$metarole\->excludes_role($role_name)\fR" 4
+.IX Item "$metarole->excludes_role($role_name)"
+Given a role \fIname\fR, returns true if this role excludes the named
+role.
+.IP "\fB$metarole\->add_excluded_roles(@role_names)\fR" 4
+.IX Item "$metarole->add_excluded_roles(@role_names)"
+Given one or more role names, adds those roles to the list of excluded
+roles.
+.Sh "Methods"
+.IX Subsection "Methods"
+The methods for dealing with a role's methods are all identical in \s-1API\s0
+and behavior to the same methods in Class::MOP::Class.
+.IP "\fB$metarole\->method_metaclass\fR" 4
+.IX Item "$metarole->method_metaclass"
+Returns the method metaclass name for the role. This defaults to
+Moose::Meta::Role::Method.
+.IP "\fB$metarole\->get_method($name)\fR" 4
+.IX Item "$metarole->get_method($name)"
+.PD 0
+.IP "\fB$metarole\->has_method($name)\fR" 4
+.IX Item "$metarole->has_method($name)"
+.ie n .IP "\fB$metarole\->add_method( \fB$name\fB, \f(BI$body\fB )\fR" 4
+.el .IP "\fB$metarole\->add_method( \f(CB$name\fB, \f(CB$body\fB )\fR" 4
+.IX Item "$metarole->add_method( $name, $body )"
+.IP "\fB$metarole\->get_method_list\fR" 4
+.IX Item "$metarole->get_method_list"
+.IP "\fB$metarole\->find_method_by_name($name)\fR" 4
+.IX Item "$metarole->find_method_by_name($name)"
+.PD
+These methods are all identical to the methods of the same name in
+Class::MOP::Package
+.Sh "Attributes"
+.IX Subsection "Attributes"
+As with methods, the methods for dealing with a role's attribute are
+all identical in \s-1API\s0 and behavior to the same methods in
+Class::MOP::Class.
+.PP
+However, attributes stored in this class are \fInot\fR stored as
+objects. Rather, the attribute definition is stored as a hash
+reference. When a role is composed into a class, this hash reference
+is passed directly to the metaclass's \f(CW\*(C`add_attribute\*(C'\fR method.
+.PP
+This is quite likely to change in the future.
+.IP "\fB$metarole\->get_attribute($attribute_name)\fR" 4
+.IX Item "$metarole->get_attribute($attribute_name)"
+.PD 0
+.IP "\fB$metarole\->has_attribute($attribute_name)\fR" 4
+.IX Item "$metarole->has_attribute($attribute_name)"
+.IP "\fB$metarole\->get_attribute_list\fR" 4
+.IX Item "$metarole->get_attribute_list"
+.ie n .IP "\fB$metarole\->add_attribute($name, \fB%options\fB)\fR" 4
+.el .IP "\fB$metarole\->add_attribute($name, \f(CB%options\fB)\fR" 4
+.IX Item "$metarole->add_attribute($name, %options)"
+.IP "\fB$metarole\->remove_attribute($attribute_name)\fR" 4
+.IX Item "$metarole->remove_attribute($attribute_name)"
+.PD
+.Sh "Required methods"
+.IX Subsection "Required methods"
+.IP "\fB$metarole\->get_required_method_list\fR" 4
+.IX Item "$metarole->get_required_method_list"
+Returns the list of methods required by the role.
+.IP "\fB$metarole\->requires_method($name)\fR" 4
+.IX Item "$metarole->requires_method($name)"
+Returns true if the role requires the named method.
+.IP "\fB$metarole\->add_required_methods(@names)\fR" 4
+.IX Item "$metarole->add_required_methods(@names)"
+Adds the named methods to the role's list of required methods.
+.IP "\fB$metarole\->remove_required_methods(@names)\fR" 4
+.IX Item "$metarole->remove_required_methods(@names)"
+Removes the named methods from the role's list of required methods.
+.IP "\fB$metarole\->add_conflicting_method(%params)\fR" 4
+.IX Item "$metarole->add_conflicting_method(%params)"
+Instantiate the parameters as a Moose::Meta::Role::Method::Conflicting
+object, then add it to the required method list.
+.Sh "Method modifiers"
+.IX Subsection "Method modifiers"
+These methods act like their counterparts in Class::Mop::Class and
+Moose::Meta::Class.
+.PP
+However, method modifiers are simply stored internally, and are not
+applied until the role itself is applied to a class.
+.ie n .IP "\fB$metarole\->add_after_method_modifier($method_name, \fB$method\fB)\fR" 4
+.el .IP "\fB$metarole\->add_after_method_modifier($method_name, \f(CB$method\fB)\fR" 4
+.IX Item "$metarole->add_after_method_modifier($method_name, $method)"
+.PD 0
+.ie n .IP "\fB$metarole\->add_around_method_modifier($method_name, \fB$method\fB)\fR" 4
+.el .IP "\fB$metarole\->add_around_method_modifier($method_name, \f(CB$method\fB)\fR" 4
+.IX Item "$metarole->add_around_method_modifier($method_name, $method)"
+.ie n .IP "\fB$metarole\->add_before_method_modifier($method_name, \fB$method\fB)\fR" 4
+.el .IP "\fB$metarole\->add_before_method_modifier($method_name, \f(CB$method\fB)\fR" 4
+.IX Item "$metarole->add_before_method_modifier($method_name, $method)"
+.ie n .IP "\fB$metarole\->add_override_method_modifier($method_name, \fB$method\fB)\fR" 4
+.el .IP "\fB$metarole\->add_override_method_modifier($method_name, \f(CB$method\fB)\fR" 4
+.IX Item "$metarole->add_override_method_modifier($method_name, $method)"
+.PD
+These methods all add an appropriate modifier to the internal list of
+modifiers.
+.IP "\fB$metarole\->has_after_method_modifiers\fR" 4
+.IX Item "$metarole->has_after_method_modifiers"
+.PD 0
+.IP "\fB$metarole\->has_around_method_modifiers\fR" 4
+.IX Item "$metarole->has_around_method_modifiers"
+.IP "\fB$metarole\->has_before_method_modifiers\fR" 4
+.IX Item "$metarole->has_before_method_modifiers"
+.IP "\fB$metarole\->has_override_method_modifier\fR" 4
+.IX Item "$metarole->has_override_method_modifier"
+.PD
+Return true if the role has any modifiers of the given type.
+.IP "\fB$metarole\->get_after_method_modifiers($method_name)\fR" 4
+.IX Item "$metarole->get_after_method_modifiers($method_name)"
+.PD 0
+.IP "\fB$metarole\->get_around_method_modifiers($method_name)\fR" 4
+.IX Item "$metarole->get_around_method_modifiers($method_name)"
+.IP "\fB$metarole\->get_before_method_modifiers($method_name)\fR" 4
+.IX Item "$metarole->get_before_method_modifiers($method_name)"
+.PD
+Given a method name, returns a list of the appropriate modifiers for
+that method.
+.IP "\fB$metarole\->get_override_method_modifier($method_name)\fR" 4
+.IX Item "$metarole->get_override_method_modifier($method_name)"
+Given a method name, returns the override method modifier for that
+method, if it has one.
+.Sh "Introspection"
+.IX Subsection "Introspection"
+.IP "\fBMoose::Meta::Role\->meta\fR" 4
+.IX Item "Moose::Meta::Role->meta"
+This will return a Class::MOP::Class instance for this class.
+.SH "BUGS"
+.IX Header "BUGS"
+All complex software has bugs lurking in it, and this module is no
+exception. If you find a bug please either email me, or add the bug
+to cpan\-RT.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Stevan Little <stevan@iinteractive.com>
+.SH "COPYRIGHT AND LICENSE"
+.IX Header "COPYRIGHT AND LICENSE"
+Copyright 2006\-2009 by Infinity Interactive, Inc.
+.PP
+<http://www.iinteractive.com>
+.PP
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.