Move get_tables from Meta/Class into Meta/Asset. s/getTables/meta->get_tables/;

This commit is contained in:
Colin Kuskie 2010-01-04 15:34:24 -08:00
parent b72e3a1cd1
commit ce3edcf743
8 changed files with 74 additions and 38 deletions

View file

@ -86,6 +86,25 @@ The second is the i18n namespace to find the asset's name.
=cut
#-------------------------------------------------------------------
=head2 get_tables ( )
Returns an array of the names of all tables in every class used by
this Class.
=cut
sub get_tables {
my $self = shift;
my @properties = ();
my %seen = ();
push @properties,
grep { ! $seen{$_}++ }
map { $_->tableName }
$self->get_all_properties
;
return @properties;
}
1;

View file

@ -106,27 +106,6 @@ sub get_property_list {
#-------------------------------------------------------------------
=head2 get_tables ( )
Returns an array of the names of all tables in every class used by
this Class.
=cut
sub get_tables {
my $self = shift;
my @properties = ();
my %seen = ();
push @properties,
grep { ! $seen{$_}++ }
map { $_->tableName }
$self->get_all_properties
;
return @properties;
}
#-------------------------------------------------------------------
=head2 property_meta ( )
Returns the name of the class for properties.