line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
92929
|
use 5.006001; |
|
1
|
|
|
|
|
4
|
|
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
20
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
69
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Types::DualVar; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
8
|
|
|
|
|
|
|
our $VERSION = '0.001'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
7
|
use Type::Tiny 1.008000; |
|
1
|
|
|
|
|
18
|
|
|
1
|
|
|
|
|
38
|
|
11
|
1
|
|
|
1
|
|
515
|
use Type::Library -base; |
|
1
|
|
|
|
|
6258
|
|
|
1
|
|
|
|
|
9
|
|
12
|
1
|
|
|
1
|
|
244
|
use Scalar::Util (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
151
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our @EXPORT = qw(DualVar); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
{ |
17
|
|
|
|
|
|
|
package #hide |
18
|
|
|
|
|
|
|
Types::DualVar::_Type; |
19
|
|
|
|
|
|
|
our @ISA = 'Type::Tiny'; |
20
|
|
|
|
|
|
|
require Type::Tiny::ConstrainedObject; |
21
|
|
|
|
|
|
|
*stringifies_to = \&Type::Tiny::ConstrainedObject::stringifies_to; |
22
|
|
|
|
|
|
|
*numifies_to = \&Type::Tiny::ConstrainedObject::numifies_to; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__PACKAGE__->add_type( |
26
|
|
|
|
|
|
|
Types::DualVar::_Type->new( |
27
|
|
|
|
|
|
|
name => 'DualVar', |
28
|
|
|
|
|
|
|
constraint => sub { Scalar::Util::isdual($_) }, |
29
|
|
|
|
|
|
|
inlined => sub { |
30
|
|
|
|
|
|
|
my $var = pop; |
31
|
|
|
|
|
|
|
sprintf('Scalar::Util::isdual(%s)', $var); |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
), |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |