required => 1,
);
+my $target_tc = __PACKAGE__->meta->find_attribute_by_name('target')
+ ->type_constraint;
+
=head2 C<user_constraint>
An optional user defined code reference which predates checking the target for validity.
$target = LaTeX::TikZ::Tools::type_constraint($target) if defined $target;
Carp::confess("No meta object for $target_name") unless defined $target;
}
- __PACKAGE__->meta->find_attribute_by_name('target')
- ->type_constraint->assert_valid($target);
+ $target_tc->assert_valid($target);
$args{target} = $target;
if (any_moose() eq 'Moose') {