line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::TypeInference::Type::String; |
2
|
4
|
|
|
4
|
|
2006
|
use strict; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
97
|
|
3
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
100
|
|
4
|
4
|
|
|
4
|
|
20
|
use parent qw(JSON::TypeInference::Type::Atom); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
18
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
295
|
use Scalar::Util qw(looks_like_number); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
487
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub name { |
9
|
6
|
|
|
6
|
0
|
9
|
my ($class) = @_; |
10
|
6
|
|
|
|
|
30
|
return 'string'; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub accepts { |
14
|
12
|
|
|
12
|
0
|
2240
|
my ($class, $data) = @_; |
15
|
12
|
|
100
|
|
|
148
|
return !ref($data) && defined($data) && !looks_like_number($data); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=encoding utf-8 |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
JSON::TypeInference::Type::String - JSON string type |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 DESCRIPTION |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
C< JSON::TypeInference::Type::String > represents JSON string type. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
It is a value type, and so has no parameters. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 AUTHOR |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
aereal E<lt>aereal@aereal.orgE<gt> |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=cut |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|