asset immutability

This commit is contained in:
Graham Knop 2010-04-18 18:50:56 -05:00
parent a1d8dbd67a
commit 0efa62a73c
68 changed files with 84 additions and 7 deletions

View file

@ -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

View file

@ -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) {