use Scalar::Util 'blessed', 'weaken', 'looks_like_number', 'refaddr';
-our $VERSION = '0.93_03';
+our $VERSION = '1.00';
our $AUTHORITY = 'cpan:STEVAN';
use base 'Moose::Meta::Method',
if ($is_moose && defined($attr->init_arg) && $attr->is_required && !$attr->has_default && !$attr->has_builder) {
push @source => ('(exists $params->{\'' . $attr->init_arg . '\'}) ' .
- '|| ' . $self->_inline_throw_error('"Attribute (' . $attr->name . ') is required"') .';');
+ '|| ' . $self->_inline_throw_error('"Attribute (' . quotemeta($attr->name) . ') is required"') .';');
}
if (($attr->has_default || $attr->has_builder) && !($is_moose && $attr->is_lazy)) {
my ($self, $attr, $type_constraint_cv, $type_constraint_obj, $value_name) = @_;
return (
$self->_inline_throw_error('"Attribute (' # FIXME add 'dad'
- . $attr->name
+ . quotemeta( $attr->name )
. ') does not pass the type constraint because: " . '
. $type_constraint_obj . '->get_message(' . $value_name . ')')
. "\n\t unless " . $type_constraint_cv . '->(' . $value_name . ');'
=head1 DESCRIPTION
-This class is a subclass of L<Class::MOP::Class::Constructor> that
+This class is a subclass of L<Class::MOP::Method::Constructor> that
provides additional Moose-specific functionality
To understand this class, you should read the the
-L<Class::MOP::Class::Constructor> documentation as well.
+L<Class::MOP::Method::Constructor> documentation as well.
=head1 INHERITANCE