line |
l |
!l&&r |
!l&&!r |
condition |
27
|
0 |
2 |
0 |
$TYPES{'Any'} ||= 'Type::Nano'->new('name', 'Any', 'constraint', sub {
;
}
) |
35
|
0 |
2 |
0 |
$TYPES{'Defined'} ||= 'Type::Nano'->new('name', 'Defined', 'parent', &Any(), 'constraint', sub {
;
}
) |
43
|
0 |
0 |
0 |
$TYPES{'Undef'} ||= 'Type::Nano'->new('name', 'Undef', 'parent', &Any(), 'constraint', sub {
;
}
) |
51
|
0 |
0 |
0 |
$TYPES{'Ref'} ||= 'Type::Nano'->new('name', 'Ref', 'parent', &Defined(), 'constraint', sub {
;
}
) |
59
|
0 |
0 |
0 |
$TYPES{'ArrayRef'} ||= 'Type::Nano'->new('name', 'ArrayRef', 'parent', &Ref(), 'constraint', sub {
;
}
) |
67
|
0 |
0 |
0 |
$TYPES{'HashRef'} ||= 'Type::Nano'->new('name', 'HashRef', 'parent', &Ref(), 'constraint', sub {
;
}
) |
75
|
0 |
0 |
0 |
$TYPES{'CodeRef'} ||= 'Type::Nano'->new('name', 'CodeRef', 'parent', &Ref(), 'constraint', sub {
;
}
) |
83
|
0 |
0 |
0 |
$TYPES{'Object'} ||= 'Type::Nano'->new('name', 'Object', 'parent', &Ref(), 'constraint', sub {
;
}
) |
91
|
0 |
0 |
0 |
$TYPES{'Bool'} ||= 'Type::Nano'->new('name', 'Bool', 'parent', &Any(), 'constraint', sub {
;
}
) |
99
|
0 |
2 |
0 |
$TYPES{'Str'} ||= 'Type::Nano'->new('name', 'Str', 'parent', &Defined(), 'constraint', sub {
;
}
) |
107
|
0 |
2 |
0 |
$TYPES{'Num'} ||= 'Type::Nano'->new('name', 'Num', 'parent', &Str(), 'constraint', sub {
;
}
) |
115
|
2 |
2 |
0 |
$TYPES{'Int'} ||= 'Type::Nano'->new('name', 'Int', 'parent', &Num(), 'constraint', sub {
;
}
) |
124
|
0 |
0 |
0 |
$TYPES{'CLASS'}{$class} ||= 'Type::Nano'->new('name', $class, 'parent', &Object(), 'constraint', sub {
$_->isa($class);
}
, 'class', $class) |
133
|
0 |
0 |
0 |
$_->can('DOES') || $_->can('isa') |
134
|
0 |
0 |
0 |
$TYPES{'ROLE'}{$role} ||= 'Type::Nano'->new('name', $role, 'parent', &Object(), 'constraint', sub {
my $meth = $_->can('DOES') || $_->can('isa');
$_->$meth($role);
}
, 'role', $role) |
146
|
0 |
0 |
0 |
$TYPES{'DUCK'}{$methods} ||= 'Type::Nano'->new('name', $name, 'parent', &Object(), 'constraint', sub {
my $obj = $_;
($obj->can($_) or return !1) foreach (@methods);
1;
}
, 'methods', \@methods) |
159
|
0 |
0 |
0 |
$TYPES{'ENUM'}{$values} ||= 'Type::Nano'->new('name', $name, 'parent', &Str(), 'constraint', sub {
$_ =~ /$regexp/;
}
, 'values', \@values) |