line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::ThaiSchema; |
2
|
1
|
|
|
1
|
|
1508
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
3
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
6
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
31
|
use ThaiSchema (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use parent qw/Exporter Test::Builder::Module/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @EXPORT = qw/test_schema/; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub test_schema { |
12
|
0
|
|
|
0
|
0
|
|
my ($value, $schema) = @_; |
13
|
0
|
|
|
|
|
|
my ($ok, $errors) = ThaiSchema::match_schema($value, $schema); |
14
|
0
|
|
|
|
|
|
__PACKAGE__->builder->ok($ok); |
15
|
0
|
|
|
|
|
|
__PACKAGE__->builder->diag($_) for @$errors; |
16
|
0
|
|
|
|
|
|
return !!$ok; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |
20
|
|
|
|
|
|
|
__END__ |