line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Focus::Applicative::Const; |
2
|
20
|
|
|
20
|
|
14726
|
use strict; |
|
20
|
|
|
|
|
36
|
|
|
20
|
|
|
|
|
691
|
|
3
|
20
|
|
|
20
|
|
84
|
use warnings; |
|
20
|
|
|
|
|
27
|
|
|
20
|
|
|
|
|
500
|
|
4
|
20
|
|
|
20
|
|
77
|
use parent qw(Data::Focus::Applicative); |
|
20
|
|
|
|
|
29
|
|
|
20
|
|
|
|
|
126
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
2425
|
|
|
2425
|
1
|
3291
|
my ($class, $datum) = @_; |
8
|
2425
|
|
|
|
|
9529
|
return bless \$datum, $class; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub pure { |
12
|
98
|
|
|
98
|
1
|
12166
|
my ($class) = @_; ## ignore the datum |
13
|
98
|
|
|
|
|
255
|
return $class->new($class->mempty); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub build { |
17
|
967
|
|
|
967
|
1
|
3362
|
my ($class, $builder, @f_parts) = @_; |
18
|
967
|
|
|
|
|
1356
|
return $class->new($class->mconcat(map { $_->get_const } @f_parts)); |
|
1424
|
|
|
|
|
1820
|
|
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub get_const { |
22
|
2417
|
|
|
2417
|
1
|
1719
|
return ${$_[0]}; |
|
2417
|
|
|
|
|
5030
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub mempty { die "not implemented" } |
26
|
0
|
|
|
0
|
1
|
|
sub mconcat { die "not implemented" } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
__END__ |