Config/Reader.pm

filter: Statementstmt 94.4% 17 / 18 Branchbran 83.3% 5 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 93.1% 27 / 29 CC 4 SCAR 7.8
CC
4
Cov
92%
__ANON__
3.1
can_ignore
2.0
BEGIN
1.0
CRAP 2.2
« Config/Writer.pm ↑ Summary Config.pm »
1 package Gitosis::Config::Reader;
2 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 extends qw(Config::INI::Reader);
4  
5 63 ▶sub can_ignore {
Subroutine can_ignore: called CC=2 SCAR=6.9
Pod documented
6 63 my ( $self, $line ) = @_;
7 63 ▶ return $line =~ /\A\s*(?:;|$|#)/ ? 1 : 0; # Skip comments and empty lines
Branch: 1 branch
BranchTrueFalseTotal
$line =~ /\A\s*(?:;|$|#)/ ? : 37 26 63
8 }
9  
10 4 has _current_key => ( isa => 'Str', is => 'rw', );
11  
12 18 ▶around parse_value_assignment => sub {
Subroutine __ANON__: called CC=3 SCAR=11.2
13 18 my ( $next, $self ) = splice @_, 0, 2; # pull these off @_
14 18 ▶ if ( my ( $key, $value ) = $self->$next(@_) ) {
Branch: 2 branches
BranchTrueFalseTotal
if (() = $self->$next(@_)) { } 16 2 18
elsif ($_[0] =~ /^\s*(.+)\s*$/) { } 2 0 2
15 16 $self->_current_key($key);
16 16 return ( $key, $value );
17 }
18 elsif ( $_[0] =~ /^\s*(.+)\s*$/ ) {
19 2 return $self->_current_key, $1;
20 }
21 0 return;
22 4 };
23  
24 4 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 4 1;
26 __END__
« Config/Writer.pm ↑ Summary Config.pm »