asset immutability
This commit is contained in:
parent
a1d8dbd67a
commit
0efa62a73c
68 changed files with 84 additions and 7 deletions
|
|
@ -76,9 +76,17 @@ Returns an array of the names of all tables in every class used by this class.
|
|||
=cut
|
||||
|
||||
sub get_tables {
|
||||
my $self = shift;
|
||||
if ($self->is_immutable) {
|
||||
return @{ $self->{__immutable}{get_tables_methods} ||= [ $self->_get_tables ] };
|
||||
}
|
||||
goto &_get_tables;
|
||||
}
|
||||
|
||||
sub _get_tables {
|
||||
my $self = shift;
|
||||
my %seen = ();
|
||||
my @tables =
|
||||
my @tables =
|
||||
grep { ! $seen{$_}++ }
|
||||
map { $_->tableName }
|
||||
$self->get_all_properties
|
||||
|
|
|
|||
|
|
@ -76,6 +76,14 @@ Returns an array of all attribute names across all meta classes.
|
|||
=cut
|
||||
|
||||
sub get_all_attributes_list {
|
||||
my $self = shift;
|
||||
if ($self->is_immutable) {
|
||||
return @{ $self->{__immutable}{get_all_attributes_list} ||= [ $self->_get_all_attributes_list ] };
|
||||
}
|
||||
goto &_get_all_attributes_list;
|
||||
}
|
||||
|
||||
sub _get_all_attributes_list {
|
||||
my $self = shift;
|
||||
my @attributes = ();
|
||||
CLASS: foreach my $meta ($self->get_all_class_metas) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue