use a default label instead of requiring one

This commit is contained in:
Doug Bell 2011-06-23 13:02:27 -05:00
parent 0c5acb697b
commit 7f47927325

View file

@ -51,7 +51,7 @@ These methods are available from this class:
sub add_property {
my ($self, $name, %options) = @_;
if (! (exists $options{noFormPost} || exists $options{label}) ) {
Moose->throw_error("Must pass either noFormPost or label when making a property");
$options{label} = $name;
}
$options{traits} ||= [];
push @{ $options{traits} }, @{ $self->property_metaroles };