lib/Changes.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 76 | 313 | 24.2 |
line | l | !l | condition |
---|---|---|---|
427 | 2 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
433 | 0 | 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 |
447 | 2 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
453 | 0 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
468 | 2 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
472 | 0 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
859 | 0 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
862 | 0 | 0 | not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
81 | 0 | 0 | 1 | defined $text and length "$text" |
87 | 1 | 0 | 0 | defined $last and not $self->_is_a($last, "Changes::NewLine") |
98 | 0 | 0 | 1 | defined $text and length "$text" |
119 | 2 | 0 | 2 | scalar @_ == 1 and $self->_is_a($_[0], "Changes::Release") |
136 | 0 | 0 | 2 | exists $opts->{'version'} and defined $opts->{'version'} |
0 | 0 | 2 | exists $opts->{'version'} and defined $opts->{'version'} and length "$opts->{'version'}" | |
156 | 17 | 0 | 4 | defined $preamble and not $preamble->is_empty |
171 | 19 | 0 | 2 | defined $epilogue and not $epilogue->is_empty |
197 | 0 | 0 | 0 | defined $$elements[$pos + $until] and $self->_is_a($$elements[$pos + $until], "Changes::NewLine") |
207 | 0 | 0 | 0 | defined $vers and length "$vers" |
278 | 0 | 0 | 19 | defined $data and length "$data" |
315 | 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"} | |
349 | 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} | |
407 | 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 | |
423 | 2 | 0 | 0 | $INC{'threads.pm'} and not exists $INC{'forks.pm'} |
427 | 2 | 0 | 0 | defined $Nice::Try::WANT and length $Nice::Try::WANT |
433 | 0 | 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" | |
441 | 2 | 0 | 0 | $INC{'threads.pm'} and not exists $INC{'forks.pm'} |
447 | 2 | 0 | 0 | defined $Nice::Try::WANT and length $Nice::Try::WANT |
453 | 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" | |
455 | 2 | 0 | 0 | $INC{'threads.pm'} and not exists $INC{'forks.pm'} |
468 | 2 | 0 | 0 | defined $Nice::Try::WANT and length $Nice::Try::WANT |
472 | 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" | |
496 | 0 | 2 | 0 | defined $preamble and not $preamble->is_empty |
547 | 1 | 30 | 3 | defined $preamble and not $preamble->is_empty |
585 | 0 | 8 | 0 | defined $preamble and not $preamble->is_empty |
599 | 3 | 3 | 0 | defined $change and length($re->{'g_space'} // "") > $change->prefix->length |
771 | 0 | 0 | 23 | defined $re->{'nl'} && defined $re->{'space'} |
853 | 0 | 0 | 0 | $INC{'threads.pm'} and not exists $INC{'forks.pm'} |
859 | 0 | 0 | 0 | defined $Nice::Try::WANT and length $Nice::Try::WANT |
862 | 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" |
line | l | !l | condition |
---|---|---|---|
89 | 0 | 0 | $self->nl // "\n" |
105 | 1 | 0 | $self->nl // "\n" |
109 | 1 | 0 | $self->nl // "\n" |
142 | 2 | 0 | $self->new_release(%$opts) || (return $self->pass_error) |
253 | 1 | 0 | shift @_ || (return $this->error('No changes file was provided to load.')) |
256 | 1 | 0 | $this->new(%$opts) || (return $this->pass_error) |
258 | 1 | 0 | $self->new_file($file) || (return $this->pass_error($self->error)) |
260 | 1 | 0 | $self->mode // "+<" |
264 | 1 | 0 | $f->lines || (return $this->pass_error($f->error)) |
276 | 19 | 0 | $this->new(%$opts) || (return $this->pass_error) |
300 | 41 | 0 | 'Changes::Change'->new($opts) || (return $self->pass_error('Changes::Change'->error)) |
325 | 6 | 0 | 'Changes::Group'->new($opts) || (return $self->pass_error('Changes::Group'->error)) |
334 | 25 | 0 | 'Changes::NewLine'->new(@_) || (return $self->pass_error('Changes::NewLine'->error)) |
359 | 46 | 0 | 'Changes::Release'->new($opts) || (return $self->pass_error('Changes::Release'->error)) |
368 | 0 | 0 | 'Changes::Version'->new(@_) || (return $self->pass_error('Changes::Version'->error)) |
378 | 20 | 0 | shift @_ || (return $self->error('No array reference of lines was provided.')) |
386 | 20 | 0 | $self->max_width // 0 |
522 | 34 | 0 | $self->_parse_timestamp($re->{'r_date'}) || (return $self->pass_error('Cannot parse datetime timestamp although the regular expression matched: ', $self->error->message)) |
599 | 3 | 0 | $re->{'g_space'} // "" |
601 | 0 | 0 | $re->{'g_space'} // "" |
659 | 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) |
723 | 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) |
771 | 23 | 0 | $re->{'space'} // "" |
23 | 0 | $re->{'nl'} // "" | |
891 | 1 | 0 | $self->file || (return $self->error('No Changes file has been set to write to.')) |
900 | 1 | 0 | $f->open('>', {'binmode', 'utf-8', 'autoflush', 1}) || (return $self->pass_error($f->error)) |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
297 | 0 | 0 | 0 | $opts->{$opt} //= $defaults->{$opt} |
323 | 0 | 0 | 0 | $opts->{'defaults'} //= $def |
357 | 0 | 2 | 0 | $opts->{'defaults'} //= $def |
407 | 1 | 0 | 0 | !($nls->is_empty || defined $epilogue) || defined $epilogue && !defined($release) && !defined($group) && !defined($change) |
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" | |
453 | 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" | |
472 | 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" | |
609 | 6 | 0 | 0 | $re->{'g_name'} // $re->{'g_name_colon'} |
620 | 6 | 0 | 0 | $re->{'g_name'} // $re->{'g_name_colon'} |
706 | 4 | 0 | 0 | $change->nl // $self->nl |
862 | 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" |