.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .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. \*(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- .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" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "MooseX::AttributeShortcuts::Trait::Attribute 3pm" .TH MooseX::AttributeShortcuts::Trait::Attribute 3pm "2018-01-03" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" MooseX::AttributeShortcuts::Trait::Attribute \- Shortcuts attribute trait proper .SH "VERSION" .IX Header "VERSION" This document describes version 0.037 of MooseX::AttributeShortcuts::Trait::Attribute \- released November 20, 2017 as part of MooseX-AttributeShortcuts. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is the actual attribute trait that implements MooseX::AttributeShortcuts. You should consult that package's documentation for information on any of the new attribute options; we're mainly going to document the additional attributes, methods, and role parameters that this role provides. .PP All methods we include that chain off Moose's \f(CW\*(C`_process_options()\*(C'\fR are prefixed with \f(CW\*(C`_mxas_\*(C'\fR and generally are not documented in the \s-1POD\s0; we document any internal methods of Moose::Meta::Attribute that we wrap or otherwise override we document here as well. .SH "ROLE PARAMETERS" .IX Header "ROLE PARAMETERS" Parameterized roles accept parameters that influence their construction. This role accepts the following parameters. .SS "writer_prefix" .IX Subsection "writer_prefix" .SS "builder_prefix" .IX Subsection "builder_prefix" .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" .SS "constraint" .IX Subsection "constraint" CodeRef, read-only. .SS "original_isa" .IX Subsection "original_isa" .SS "trigger_method" .IX Subsection "trigger_method" Contains the name of the method that will be invoked as a trigger. .SH "BEFORE METHOD MODIFIERS" .IX Header "BEFORE METHOD MODIFIERS" .SS "_process_options" .IX Subsection "_process_options" Here we wrap \fI_process_options()\fR instead of the newer \fI_process_is_option()\fR, as that makes our life easier from a Moose 1.x/2.x compatibility perspective \*(-- and that we're generally altering more than just the 'is' option at one time. .SH "AROUND METHOD MODIFIERS" .IX Header "AROUND METHOD MODIFIERS" .SS "_make_delegation_method" .IX Subsection "_make_delegation_method" Here we create and install any custom accessors that have been defined. .SH "AFTER METHOD MODIFIERS" .IX Header "AFTER METHOD MODIFIERS" .SS "attach_to_class" .IX Subsection "attach_to_class" We hijack attach_to_class in order to install our anon_builder, if we have one. Note that we don't go the normal associate_method/install_accessor/etc route as this is kinda... different. (That is, the builder is not an accessor of this attribute, and should not be installed as such.) .SH "METHODS" .IX Header "METHODS" .SS "has_constraint" .IX Subsection "has_constraint" Predicate for the \*(L"constraint\*(R" attribute. .SS "has_original_isa" .IX Subsection "has_original_isa" Predicate for the \*(L"original_isa\*(R" attribute. .SS "has_trigger_method" .IX Subsection "has_trigger_method" Predicate for the \*(L"trigger_method\*(R" attribute. .SS "\fIbuilder_method_metaclass()\fP" .IX Subsection "builder_method_metaclass()" Returns the metaclass we'll use to install a inline builder. .SS "canonical_writer_prefix" .IX Subsection "canonical_writer_prefix" Returns the writer prefix; this is almost always \f(CW\*(C`set_\*(C'\fR. .SS "canonical_builder_prefix" .IX Subsection "canonical_builder_prefix" Returns the builder prefix; this is almost always \f(CW\*(C`_build_\*(C'\fR. .SH "PREFIXES" .IX Header "PREFIXES" We accept two parameters on the use of this module; they impact how builders and writers are named. .SS "\-writer_prefix" .IX Subsection "-writer_prefix" .Vb 1 \& use MooseX::::AttributeShortcuts \-writer_prefix => \*(Aqprefix\*(Aq; .Ve .PP The default writer prefix is \f(CW\*(C`_set_\*(C'\fR. If you'd prefer it to be something else (say, \f(CW\*(C`_\*(C'\fR), this is where you'd do that. .SS "\-builder_prefix" .IX Subsection "-builder_prefix" .Vb 1 \& use MooseX::AttributeShortcuts \-builder_prefix => \*(Aqprefix\*(Aq; .Ve .PP The default builder prefix is \f(CW\*(C`_build_\*(C'\fR, as this is what \*(L"lazy_build\*(R" in Moose does, and what people in general recognize as build methods. .SH "SEE ALSO" .IX Header "SEE ALSO" Please see those modules/websites for more information related to this module. .IP "\(bu" 4 MooseX::AttributeShortcuts .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests on the bugtracker website .PP When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. .SH "AUTHOR" .IX Header "AUTHOR" Chris Weyl .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2017, 2015, 2014, 2013, 2012, 2011 by Chris Weyl. .PP This is free software, licensed under: .PP .Vb 1 \& The GNU Lesser General Public License, Version 2.1, February 1999 .Ve