Banal-Mini-Utils
view release on metacpan or search on metacpan
lib/Banal/Mini/Utils/MungeHas.pm view on Meta::CPAN
#######################################
mhs_specs( is => 'ro', init_arg => undef, lazy => 1, @_ );
}
#######################################
sub mhs_specs { # Define meta specs for attributes (is, isa, lazy, ...)
#######################################
# ATTENTION : Special calling convention and interface defined by MooseX::MungeHas.
my $name = $_; # $_ contains the attribute NAME
%_ = (@_, %_); # %_ contains the attribute SPECS, whereas @_ contains defaults (prefs) for those specs.
wantarray ? (%_) : +{%_}
}
#######################################
sub mhs_dict { &mhs_dictionary }
sub mhs_dictionary {
# - Lookup meta specs for attributes from a given (src) dictonary;
# * Parameters destined to this routine (dict, src/src_dict, dest/dest_dict) will be removed from the context.
# * Remaining parameters will win over the values looked up from the src dictionnary.
# * Current munge context (%_) wins over all of the above
( run in 1.698 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )