| 1 | 20 | ▶ | use strict; use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 2 | package YAMLScript::Core; | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 20 | ▶ | use File::Spec; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 20 | ▶ | use YAMLScript::Common; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 1 | ▶ | sub dirname { | ||||||||||||||||||
|
Subroutine
dirname: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 9 | 1 | my ($file_path) = @_; | |||||||||||||||||||
| 10 | 20 | ▶ | use File::Spec; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 11 | 1 | my(undef, $dirname, undef) = File::Spec->splitpath($file_path); | |||||||||||||||||||
| 12 | 1 | STRING->new($dirname); | |||||||||||||||||||
| 13 | } | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 11 | ▶ | sub ends_with_q { | ||||||||||||||||||
|
Subroutine
ends_with_q: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||||||||||
| 16 | 11 | my ($str, $substr) = @_; | |||||||||||||||||||
| 17 | 11 | ▶ | BOOLEAN->new( | ||||||||||||||||||
|
Condition66%2/3
length "$str" >= length "$substr" && substr("$str", 0 - length("$substr")) eq "$substr"
MC/DC50%1/2
length "$str" >= length "$substr" && substr("$str", 0 - length("$substr")) eq "$substr"
length "$str" >= length "$substr"
substr("$str", 0 - length("$substr")) eq "$substr"
Truth table66%2/3
A && B
A= length "$str" >= length "$substr"B= substr("$str", 0 - length("$substr")) eq "$substr"
| |||||||||||||||||||||
| 18 | length("$str") >= length("$substr") and | ||||||||||||||||||||
| 19 | substr("$str", 0-length("$substr")) eq "$substr" | ||||||||||||||||||||
| 20 | ); | ||||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 9 | ▶ | sub read_file_ys { | ||||||||||||||||||
|
Subroutine
read_file_ys: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 24 | 9 | my ($file) = @_; | |||||||||||||||||||
| 25 | 9 | my $text = RT->slurp_file($file); | |||||||||||||||||||
| 26 | 9 | RT->reader->read_ys($text, $file); | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | sub read_string_ys { | ||||||||||||||||||
|
Subroutine
read_string_ys: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 30 | 0 | my ($string) = @_; | |||||||||||||||||||
| 31 | 0 | RT->reader->read_ys($string, undef); | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 20 | 1; | |||||||||||||||||||