line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::Types; |
2
|
2
|
|
|
2
|
|
93956
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
85
|
|
3
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
69
|
|
4
|
2
|
|
|
2
|
|
8827
|
use parent 'Exporter'; |
|
2
|
|
|
|
|
994
|
|
|
2
|
|
|
|
|
12
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
7
|
|
|
|
|
|
|
our @EXPORT = qw/number string bool/; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub number($) { |
10
|
4
|
100
|
|
4
|
1
|
1902
|
return undef unless defined $_[0]; |
11
|
2
|
|
|
|
|
22
|
$_[0] + 0; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub string($) { |
15
|
3
|
100
|
|
3
|
1
|
1053
|
return undef unless defined $_[0]; |
16
|
1
|
|
|
|
|
37
|
$_[0] . ''; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub bool($) { |
20
|
3
|
100
|
|
3
|
1
|
588
|
$_[0] ? \1 : \0; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |