# then we compile them to run without
# having to recurse as we did before
- return subname $self->name => sub {
- local $_ = $_[0];
+ return subname $self->name => sub {
+ local $_ = $_[0];
foreach my $parent (@parents) {
return undef unless $parent->($_[0]);
}
- return undef unless $check->($_[0]);
- 1;
- };
+ return undef unless $check->($_[0]);
+ 1;
+ };
}
sub _compile_type {
my ($self, $check) = @_;
- return subname $self->name => sub {
- local $_ = $_[0];
- return undef unless $check->($_[0]);
- 1;
- };
+ return subname $self->name => sub {
+ local $_ = $_[0];
+ return undef unless $check->($_[0]);
+ 1;
+ };
}
## other utils ...