20 Nov 2017 22:50:19 UTC
- Distribution: MooseX-AttributeShortcuts
- Module version: 0.037
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (4768 / 17 / 0)
- KwaliteeBus factor: 0
- 91.87% Coverage
- License: lgpl_2_1
- Perl: v5.6.0
- Download (54.31KB)
- MetaCPAN Explorer
- Subscribe to distribution
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- This version
- Latest version++ed by:4 non-PAUSE users
- ROLE PARAMETERS
- BEFORE METHOD MODIFIERS
- AROUND METHOD MODIFIERS
- AFTER METHOD MODIFIERS
- SEE ALSO
- COPYRIGHT AND LICENSE
MooseX::AttributeShortcuts::Trait::Attribute - Shortcuts attribute trait proper
This document describes version 0.037 of MooseX::AttributeShortcuts::Trait::Attribute - released November 20, 2017 as part of MooseX-AttributeShortcuts.
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.
All methods we include that chain off Moose's
_process_options()are prefixed with
_mxas_and generally are not documented in the POD; we document any internal methods of Moose::Meta::Attribute that we wrap or otherwise override we document here as well.
Parameterized roles accept parameters that influence their construction. This role accepts the following parameters.
Contains the name of the method that will be invoked as a trigger.
Here we wrap _process_options() instead of the newer _process_is_option(), 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.
Here we create and install any custom accessors that have been defined.
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.)
Predicate for the "constraint" attribute.
Predicate for the "original_isa" attribute.
Predicate for the "trigger_method" attribute.
Returns the metaclass we'll use to install a inline builder.
Returns the writer prefix; this is almost always
Returns the builder prefix; this is almost always
We accept two parameters on the use of this module; they impact how builders and writers are named.
use MooseX::::AttributeShortcuts -writer_prefix => 'prefix';
The default writer prefix is
_set_. If you'd prefer it to be something else (say,
_), this is where you'd do that.
use MooseX::AttributeShortcuts -builder_prefix => 'prefix';
The default builder prefix is
_build_, as this is what "lazy_build" in Moose does, and what people in general recognize as build methods.
Please see those modules/websites for more information related to this module.
Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/moosex-attributeshortcuts/issues
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.
Chris Weyl <firstname.lastname@example.org>
This software is Copyright (c) 2017, 2015, 2014, 2013, 2012, 2011 by Chris Weyl.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
Module Install Instructions
To install MooseX::AttributeShortcuts, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install MooseX::AttributeShortcuts
For more information on module installation, please visit the detailed CPAN module installation guide.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|