}
sub _initialize_object{
- my($self, $object, $args, $ignore_triggers) = @_;
+ my($self, $object, $args, $is_cloning) = @_;
my @triggers_queue;
push @triggers_queue, [ $attribute->trigger, $object->{$slot} ];
}
}
- else { # no init arg
+ elsif(!$is_cloning) { # no init arg, noop while cloning
if ($attribute->has_default || $attribute->has_builder) {
if (!$attribute->is_lazy) {
my $default = $attribute->default;
}
}
- if(!$ignore_triggers){
+ if(@triggers_queue){
foreach my $trigger_and_value(@triggers_queue){
my($trigger, $value) = @{$trigger_and_value};
$trigger->($object, $value);
return;
}
+sub check {
+ my $self = shift;
+ return $self->_compiled_type_constraint->(@_);
+}
+
+
package Mouse::Object;
sub BUILDARGS {
=head1 VERSION
-This document describes Mouse version 0.51
+This document describes Mouse version 0.55
=head1 SEE ALSO