| 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
| |||||||||||
| 16 | or die "Can't write ".$file->name.": $!"; | ||||||||||
| 17 | 1 | print $fh $file->content; | |||||||||
| 18 | 1 | ▶ | close $fh | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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__ | ||||||||||