sub has_red_table { my $self = shift; for (@{ $self->tables }) { return 1 if $_->color eq 'red'; } return 0; }