sub _attributes { return { map { $_ => 1 } qw( Wheels Doors Color Passengers ) }; } sub _valid { my ($self, $attribute) = @_; return exists $self->_attributes()->{ $attribute }; }