line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
11
|
|
|
11
|
|
76
|
use strict; use warnings; |
|
11
|
|
|
11
|
|
27
|
|
|
11
|
|
|
|
|
318
|
|
|
11
|
|
|
|
|
58
|
|
|
11
|
|
|
|
|
25
|
|
|
11
|
|
|
|
|
364
|
|
2
|
|
|
|
|
|
|
package YAMLScript::Core; |
3
|
|
|
|
|
|
|
|
4
|
11
|
|
|
11
|
|
71
|
use File::Spec; |
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
272
|
|
5
|
|
|
|
|
|
|
|
6
|
11
|
|
|
11
|
|
54
|
use YAMLScript::Common; |
|
11
|
|
|
|
|
24
|
|
|
11
|
|
|
|
|
2688
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub dirname { |
9
|
0
|
|
|
0
|
0
|
0
|
my ($file_path) = @_; |
10
|
11
|
|
|
11
|
|
85
|
use File::Spec; |
|
11
|
|
|
|
|
28
|
|
|
11
|
|
|
|
|
2773
|
|
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
|
102
|
my ($str, $substr) = @_; |
17
|
2
|
|
66
|
|
|
84
|
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; |