line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
11
|
|
|
11
|
|
78
|
use strict; use warnings; |
|
11
|
|
|
11
|
|
24
|
|
|
11
|
|
|
|
|
327
|
|
|
11
|
|
|
|
|
63
|
|
|
11
|
|
|
|
|
24
|
|
|
11
|
|
|
|
|
364
|
|
2
|
|
|
|
|
|
|
package YAMLScript::Core; |
3
|
|
|
|
|
|
|
|
4
|
11
|
|
|
11
|
|
63
|
use File::Spec; |
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
245
|
|
5
|
|
|
|
|
|
|
|
6
|
11
|
|
|
11
|
|
53
|
use YAMLScript::Common; |
|
11
|
|
|
|
|
23
|
|
|
11
|
|
|
|
|
2833
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub dirname { |
9
|
0
|
|
|
0
|
0
|
0
|
my ($file_path) = @_; |
10
|
11
|
|
|
11
|
|
83
|
use File::Spec; |
|
11
|
|
|
|
|
21
|
|
|
11
|
|
|
|
|
2874
|
|
11
|
0
|
|
|
|
|
0
|
my(undef, $dirname, undef) = File::Spec->splitpath($file_path); |
12
|
0
|
|
|
|
|
0
|
STRING->new($dirname); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub ends_with_q { |
16
|
2
|
|
|
2
|
0
|
101
|
my ($str, $substr) = @_; |
17
|
2
|
|
66
|
|
|
45
|
BOOLEAN->new( |
18
|
|
|
|
|
|
|
length("$str") >= length("$substr") and |
19
|
|
|
|
|
|
|
substr("$str", 0-length("$substr")) eq "$substr" |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub read_file_ys { |
24
|
0
|
|
|
0
|
0
|
|
my ($file) = @_; |
25
|
0
|
|
|
|
|
|
my $text = RT->slurp_file($file); |
26
|
0
|
|
|
|
|
|
RT->reader->read_ys($text, $file); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub read_string_ys { |
30
|
0
|
|
|
0
|
0
|
|
my ($string) = @_; |
31
|
0
|
|
|
|
|
|
RT->reader->read_ys($string, undef); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |