use Mouse::Meta::Module;
our @ISA = qw(Mouse::Meta::Module);
+our @CARP_NOT = qw(Mouse); # trust Mouse
+
sub attribute_metaclass;
sub method_metaclass;
$self->{attributes}{$attr->name} = $attr;
$attr->install_accessors();
- if(Mouse::Util::_MOUSE_VERBOSE && !$attr->{associated_methods} && ($attr->{is} || '') ne 'bare'){
- Carp::cluck(qq{Attribute (}.$attr->name.qq{) of class }.$self->name.qq{ has no associated methods (did you mean to provide an "is" argument?)});
+ if(!$attr->{associated_methods} && ($attr->{is} || '') ne 'bare'){
+ Carp::carp(qq{Attribute ($name) of class }.$self->name
+ .qq{ has no associated methods (did you mean to provide an "is" argument?)});
}
return $attr;
}
$self->{is_immutable}++;
+ $self->{strict_constructor} = $args{strict_constructor};
+
if ($args{inline_constructor}) {
- my $c = $self->constructor_class;
- Mouse::Util::load_class($c);
$self->add_method($args{constructor_name} =>
- $c->_generate_constructor($self, \%args));
+ Mouse::Util::load_class($self->constructor_class)
+ ->_generate_constructor($self, \%args));
}
if ($args{inline_destructor}) {
- my $c = $self->destructor_class;
- Mouse::Util::load_class($c);
$self->add_method(DESTROY =>
- $c->_generate_destructor($self, \%args));
+ Mouse::Util::load_class($self->destructor_class)
+ ->_generate_destructor($self, \%args));
}
# Moose's make_immutable returns true allowing calling code to skip setting an explicit true value
=head1 VERSION
-This document describes Mouse version 0.50
+This document describes Mouse version 0.50_03
=head1 METHODS