lib/YAMLScript/ReadLine.pm

filter: Statementstmt 68.1% 15 / 22 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 3 totaltotal 52.7% 19 / 36 CC 3 SCAR 12.0
CC
3
Cov
58%
history_file
6.0
multi_start
6.0
multi_stop
2.0
CRAP 3.3
« lib/YAMLScript/RT.pm ↑ Summary lib/YAMLScript/Main.pm »
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::ReadLine;
3  
4 20 ▶use base 'Lingy::ReadLine';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 {
7 package Lingy::ReadLine;
8 20 ▶ use constant RL => YAMLScript::ReadLine->new;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 }
10  
11 20 my $home = $ENV{HOME};
12  
13 0 ▶sub history_file {
Subroutine history_file: not called CC=2 SCAR=17.9
Pod undocumented
14 0 my $history_file = "$ENV{PWD}/.yamlscript_history";
15 0 ▶ $history_file = "$home/.yamlscript_history"
Branch: 1 branch
BranchTrueFalseTotal
unless -w $history_file 0 0 0
16 unless -w $history_file;
17 0 return $history_file;
18 }
19  
20 0 ▶sub multi_start {
Subroutine multi_start: not called CC=2 SCAR=17.9
Pod undocumented
21 0 my ($self, $line) = @_;
22 (
23 0 ▶ $line =~ /^---(?=\s|\z)/ and
Branch: 1 branch
BranchTrueFalseTotal
$line =~ /^---(?=\s|\z)/ and not $line =~ /^\.\.\.\z/m 0 0 0
24 not $line =~ /^\.\.\.\z/m
25 );
26 }
27  
28 0 ▶sub multi_stop{
Subroutine multi_stop: not called CC=1 SCAR=6.9
Pod undocumented
29 0 my ($self, $line) = @_;
30 0 $line eq '...';
31 }
32  
33 20 1;
« lib/YAMLScript/RT.pm ↑ Summary lib/YAMLScript/Main.pm »