More attribute => aspect changes. Add get_all_attributes_list, which returns a list of the names of all attributes.
This commit is contained in:
parent
d4f31870a3
commit
60375516ab
4 changed files with 26 additions and 9 deletions
|
|
@ -46,7 +46,7 @@ These methods are available from this class:
|
|||
|
||||
my ($import, $unimport, $init_meta) = Moose::Exporter->build_import_methods(
|
||||
install => [ 'unimport' ],
|
||||
with_meta => [ 'property', 'attribute' ],
|
||||
with_meta => [ 'property', 'aspect' ],
|
||||
also => 'Moose',
|
||||
);
|
||||
|
||||
|
|
@ -87,15 +87,15 @@ sub init_meta {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 attribute ( )
|
||||
=head2 aspect ( )
|
||||
|
||||
An attribute of the definition is typically static data which is never processed from a form
|
||||
or persisted to the database. In an Asset-style definition, an attribute would
|
||||
An aspect of the definition is typically static data which is never processed from a form
|
||||
or persisted to the database. In an Asset-style definition, an aspect would
|
||||
be the table name, the asset's name, or the path to the asset's icon.
|
||||
|
||||
=cut
|
||||
|
||||
sub attribute {
|
||||
sub aspect {
|
||||
my ($meta, $name, $value) = @_;
|
||||
if ($meta->can($name)) {
|
||||
$meta->$name($value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue