line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WSST::SchemaParser::YAML; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
41282
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
87
|
|
4
|
2
|
|
|
2
|
|
10
|
use base qw(WSST::SchemaParser); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
766
|
|
5
|
2
|
|
|
2
|
|
1709
|
use YAML (); |
|
2
|
|
|
|
|
24244
|
|
|
2
|
|
|
|
|
316
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.1.1'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
2
|
|
|
2
|
1
|
933
|
my $class = shift; |
11
|
2
|
|
|
|
|
5
|
my $self = {}; |
12
|
2
|
|
|
|
|
9
|
return bless($self, $class); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub types { |
16
|
2
|
|
|
2
|
1
|
495
|
return [".yml", ".yaml"]; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub parse { |
20
|
2
|
|
|
2
|
1
|
1095
|
my $self = shift; |
21
|
2
|
|
|
|
|
5
|
my $path = shift; |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
|
|
10
|
my $data = YAML::LoadFile($path); |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
48567
|
return WSST::Schema->new($data); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
WSST::SchemaParser::YAML - YAML SchemaParser class of WSST |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 DESCRIPTION |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
This class is YAML schema parser. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 METHODS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 new |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Constructor. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 types |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Returns [".yml", ".yaml"] |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 parse |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Parses YAML schema file, and returns Schema object. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 SEE ALSO |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
http://code.google.com/p/wsst/ |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 AUTHORS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Mitsuhisa Oshikawa |
57
|
|
|
|
|
|
|
Yusuke Kawasaki |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Copyright 2008 WSS Project Team |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
1; |