Minilla/Release/RewriteChanges.pm

filter: Statementstmt 86.9% 20 / 23 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 82.3% 28 / 34 CC 3 SCAR 7.3
CC
3
Cov
81%
run
3.8
BEGIN
1.0
BEGIN
1.0
CRAP 2.1
« Minilla/Logger.pm ↑ Summary Minilla/CLI/Build.pm »
1 package Minilla::Release::RewriteChanges;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Minilla::Changes;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Minilla::Util qw(slurp_raw spew_raw);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶sub run {
Subroutine run: called CC=3 SCAR=13.5
Pod undocumented
9 1 my ($self, $project, $opts) = @_;
10 1 ▶ return if $opts->{dry_run};
Branch: 1 branch
BranchTrueFalseTotal
if $opts->{"dry_run"} 0 1 1
11  
12 1 my $content = slurp_raw('Changes');
13 1 ▶ return if Minilla::Changes::is_prepared($content, $project->version);
Branch: 1 branch
BranchTrueFalseTotal
if Minilla::Changes::is_prepared($content, $project->version) 1 0 1
14  
15 0 $content =~ s!\{\{\$NEXT\}\}!
16 0 "{{\$NEXT}}\n\n" . $project->version . " " . $project->work_dir->changes_time->strftime('%Y-%m-%dT%H:%M:%SZ')
17 !e;
18 0 spew_raw('Changes' => $content);
19 }
20  
21  
22 2 1;
« Minilla/Logger.pm ↑ Summary Minilla/CLI/Build.pm »