line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::ThaiSchema; |
2
|
1
|
|
|
1
|
|
807
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
4
|
1
|
|
|
1
|
|
4
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
5
|
1
|
|
|
1
|
|
21
|
use ThaiSchema (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
16
|
use parent qw/Exporter Test::Builder::Module/; |
|
1
|
|
|
|
|
3
|
|
|
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__ |