blib/lib/Dist/Zilla/Plugin/ReversionAfterRelease.pm

filter: Statementstmt 100% 19 / 19 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 2 totaltotal 86.2% 25 / 29 CC 4 SCAR 10.1
CC
4
Cov
91%
after_release
4.1
BEGIN
1.0
munge_files
1.0
CRAP 2.8
↑ Summary
1 package Dist::Zilla::Plugin::ReversionAfterRelease;
2 1 our $VERSION = '0.3';
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 extends 'Dist::Zilla::Plugin::ReversionOnRelease';
5 1 with 'Dist::Zilla::Role::AfterRelease';
6  
7 # Don't munge files before release
8 1 ▶sub munge_files { }
Subroutine munge_files: called CC=1 SCAR=0.0
Pod undocumented
9  
10 # Munge files after release
11 1 ▶sub after_release {
Subroutine after_release: called CC=4 SCAR=14.0
Pod undocumented
12 1 my $self = shift;
13 1 $self->SUPER::munge_files;
14 1 for my $file (@{ $self->found_files }) {
15 1 ▶ open my $fh, '>:raw:encoding('.$file->encoding.')', $file->name
Branch: 1 branch
BranchTrueFalseTotal
open my $fh, '>:raw:encoding(' . $file->encoding . ')', $file->name or die q[Can't write ] . $file->name . ": $!" 1 0 1
16 or die "Can't write ".$file->name.": $!";
17 1 print $fh $file->content;
18 1 ▶ close $fh
Branch: 1 branch
BranchTrueFalseTotal
close $fh or die q[Can't write ] . $file->name . ": $!" 1 0 1
19 or die "Can't write ".$file->name.": $!";
20 }
21 1 return;
22 }
23  
24 1 __PACKAGE__->meta->make_immutable;
25 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 1;
27 __END__
↑ Summary