Salvation::MacroProcessor::MethodDescription - Method description object
Scalar::Util
Carp::Assert
MooseX::StrictConstructor
Moose
Salvation::MacroProcessor::MethodDescription -> new( method => $method, orig_method => $orig_method, associated_meta => $associated_meta, previously_associated_meta => $previously_associated_meta, query => $query, postfilter => $postfilter, required_shares => $required_shares, required_filters => $required_filters, excludes_filters => $excludes_filters, imported => $imported, connector_chain => $connector_chain )
Constructor.
Returns Salvation::MacroProcessor::MethodDescription instance.
Only method and associated_meta arguments are required.
method
associated_meta
Mostly all arguments documented at this section below, or at smp_add_description function documentation of Salvation::MacroProcessor module, except imported argument which is simply a boolean value where true means "this description is imported from some other class" and false means "this description is not imported from anywhere".
smp_add_description
imported
true
false
$description -> method();
Returns a name of the description. Usually matches a name of the method being described, though can be different in some cases.
$description -> orig_method();
Returns an original name of the description. In example, if the description of method named id has been imported into another class with prefix parent_, then such description will have method equal to parent_id and orig_method equal to id.
id
parent_
parent_id
orig_method
$description -> associated_meta();
Returns Moose::Meta::Class or Moose::Meta::Role object instance corresponding to the object which has defined the description.
$description -> connector_chain();
Return an ArrayRef. Each element is another ArrayRef containing two elements:
String. A name of the class where the description has been imported.
String. A name of the connector which has been used to import description.
This will hold the whole import chain for description being imported.
$description -> previously_associated_meta();
Returns Moose::Meta::Class or Moose::Meta::Role object instance corresponding to the object which has defined the description. It is used when child class inherits a description from its parent and holds the reference to parent's class metaclass.
$description -> inherited_description();
Returns Salvation::MacroProcessor::MethodDescription object instance as it has been defined by a parent class if the description has been inherited.
$description -> attr();
Returns Moose::Meta::Attribute object instance if the description is for attribute instead of plain method.
$description -> clone();
Clones description, returning new-made clone.
$description -> excludes_filters();
Returns an ArrayRef. Each element is the name of conflicting description.
$description -> postfilter( $object, $value );
Returns boolean value. Executes custom description's post-filtering code. See postfilter argument of Salvation::MacroProcessor::smp_add_description method.
postfilter
::smp_add_description
$description -> query( $value ); $description -> query( $shares, $value );
Returns ArrayRef which is a processed query part for this description, customized for given $value and $shares as told by query argument of Salvation::MacroProcessor::smp_add_description or Salvation::MacroProcessor::Hooks::query_from_attribute call, if any is applicable.
$value
$shares
query
::query_from_attribute
$description -> required_filters();
Returns an ArrayRef. Each element is the name of required description.
$description -> required_shares();
Returns an ArrayRef. Each element is the name of required share.
To install Salvation::MacroProcessor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Salvation::MacroProcessor
CPAN shell
perl -MCPAN -e shell install Salvation::MacroProcessor
For more information on module installation, please visit the detailed CPAN module installation guide.