Condition Coverage

lib/Changes.pm
Criterion Covered Total %
condition 82 345 23.7


and 2 conditions

line l !l condition
413 2 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
418 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
422 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
431 2 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
437 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
452 2 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
456 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
866 0 0 not exists $self->{'_reset'} && defined $self->{'_reset'} && length $self->{'_reset'} and scalar @_
896 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
899 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL

and 3 conditions

line !l l&&!r l&&r condition
82 0 0 1 defined $text and length "$text"
88 1 0 0 defined $last and not $self->_is_a($last, "Changes::NewLine")
99 0 0 1 defined $text and length "$text"
112 2 0 2 scalar @_ == 1 and $self->_is_a($_[0], "Changes::Release")
129 0 0 2 exists $opts->{'version'} and defined $opts->{'version'}
0 0 2 exists $opts->{'version'} and defined $opts->{'version'} and length "$opts->{'version'}"
149 17 0 4 defined $preamble and not $preamble->is_empty
163 19 0 2 defined $epilogue and not $epilogue->is_empty
189 0 0 0 defined $$elements[$pos + $until] and $self->_is_a($$elements[$pos + $until], "Changes::NewLine")
199 0 0 0 defined $vers and length "$vers"
268 0 0 19 defined $data and length "$data"
305 0 0 0 not defined $$opts{"group_$opt"} and exists $$def{"group_$opt"}
0 0 0 not defined $$opts{"group_$opt"} and exists $$def{"group_$opt"} and defined $$def{"group_$opt"}
0 0 0 not defined $$opts{"group_$opt"} and exists $$def{"group_$opt"} and defined $$def{"group_$opt"} and length $$def{"group_$opt"}
339 0 4 4 not defined $opts->{$opt} and exists $def->{$opt}
4 0 4 not defined $opts->{$opt} and exists $def->{$opt} and defined $def->{$opt}
4 0 4 not defined $opts->{$opt} and exists $def->{$opt} and defined $def->{$opt} and length $def->{$opt}
394 8 28 41 defined $release and $l =~ /^(?<c_space1>[[:blank:]\h]*)(?<marker>(?:[^\w[:blank:]\h]|[\_\x{30FC}]))(?<c_space2>[[:blank:]\h]+)(?<c_text>.+?)(?<c_nl>[\015\012]+)?$/ms
0 0 1 $l =~ /^(\S+.*?)(?<nl>[\015\012]+)?$/ms and !($nls->is_empty || defined $epilogue) || defined $epilogue && !defined($release) && !defined($group) && !defined($change)
0 0 1 $l =~ /^(\S+.*?)(?<nl>[\015\012]+)?$/ms and !($nls->is_empty || defined $epilogue) || defined $epilogue && !defined($release) && !defined($group) && !defined($change) and not $elements->is_empty
409 2 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
413 2 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
418 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
422 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 2 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 2 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
425 2 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
431 2 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
437 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 2 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 2 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
439 2 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
452 2 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
456 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 2 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 2 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
479 0 2 0 defined $preamble and not $preamble->is_empty
528 1 30 3 defined $preamble and not $preamble->is_empty
565 0 8 0 defined $preamble and not $preamble->is_empty
578 3 3 0 defined $change and length($re->{'g_space'} // "") > $change->prefix->length
738 0 0 23 defined $re->{'nl'} && defined $re->{'space'}
798 0 0 4 defined $text and $text->defined
866 0 0 0 exists $self->{'_reset'} && defined $self->{'_reset'} && length $self->{'_reset'}
890 0 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
896 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
899 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')

or 2 conditions

line l !l condition
90 0 0 $self->nl // "\n"
135 2 0 $self->new_release(%$opts) || (return $self->pass_error)
243 1 0 shift @_ || (return $this->error('No changes file was provided to load.'))
246 1 0 $this->new(%$opts) || (return $this->pass_error)
248 1 0 $self->new_file($file) || (return $this->pass_error($self->error))
250 1 0 $self->mode // "+<"
254 1 0 $f->lines || (return $this->pass_error($f->error))
266 19 0 $this->new(%$opts) || (return $this->pass_error)
290 41 0 'Changes::Change'->new($opts) || (return $self->pass_error('Changes::Change'->error))
315 6 0 'Changes::Group'->new($opts) || (return $self->pass_error('Changes::Group'->error))
324 25 0 'Changes::NewLine'->new(@_) || (return $self->pass_error('Changes::NewLine'->error))
349 46 0 'Changes::Release'->new($opts) || (return $self->pass_error('Changes::Release'->error))
358 0 0 'Changes::Version'->new(@_) || (return $self->pass_error('Changes::Version'->error))
368 20 0 shift @_ || (return $self->error('No array reference of lines was provided.'))
376 20 0 $self->max_width // 0
504 34 0 $self->_parse_timestamp($re->{'r_date'}) || (return $self->pass_error('Cannot parse datetime timestamp although the regular expression matched: ', $self->error->message))
578 3 0 $re->{'g_space'} // ""
635 41 0 $self->new_change(defined $re->{'c_space1'} ? ('spacer1', $re->{'c_space1'}) : (), defined $re->{'c_space2'} ? ('spacer2', $re->{'c_space2'}) : (), 'marker', $re->{'marker'}, 'max_width', $max_width, defined $re->{'c_text'} ? ('text', $re->{'c_text'}) : (), 'nl', $re->{'c_nl'}, 'raw', $l, defined $wrapper ? ('wrapper', $wrapper) : (), 'line', $i + 1, 'debug', $debug) || (return $self->pass_error)
693 0 0 $self->new_change(defined $re->{'c_space1'} ? ('spacer1', $re->{'c_space1'}) : (), defined $re->{'c_space2'} ? ('spacer2', $re->{'c_space2'}) : (), 'marker', $re->{'marker'}, 'max_width', $max_width, defined $re->{'c_text'} ? ('text', $re->{'c_text'}) : (), 'nl', $re->{'c_nl'}, 'raw', $l, 'line', $i + 1, 'debug', $debug) || (return $self->pass_error)
738 23 0 $re->{'space'} // ""
23 0 $re->{'nl'} // ""
802 1 0 $self->nl // "\n"
806 1 0 $self->nl // "\n"
816 0 0 shift @_ || (return $self->error('No set name was provided.'))
928 1 0 $self->file || (return $self->error('No Changes file has been set to write to.'))
937 1 0 $f->open('>', {'binmode', 'utf-8', 'autoflush', 1}) || (return $self->pass_error($f->error))

or 3 conditions

line l !l&&r !l&&!r condition
287 0 0 0 $opts->{$opt} //= $defaults->{$opt}
313 0 0 0 $opts->{'defaults'} //= $def
347 0 2 0 $opts->{'defaults'} //= $def
394 1 0 0 !($nls->is_empty || defined $epilogue) || defined $epilogue && !defined($release) && !defined($group) && !defined($change)
422 2 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 2 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 2 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
437 2 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 2 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 2 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
456 2 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 2 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 2 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
597 6 0 0 $re->{'g_name'} // $re->{'g_name_colon'}
677 4 0 0 $change->nl // $self->nl
824 0 0 0 shift @_ || 'DateTime'->now
899 0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')