madsen/dist-zilla-plugin-git — pull request #13 by kentfredric (2013-10-23 18:01:35+00:00)
Title: Dzil5

This patch set fixes various things:

- `Plugin::CommitBuild` uses `encoded_content` instead of `content` on `Dist::Zilla >= 5`, which returns the data in `bytes` ( instead of characters now returned from `content` ).
- `PluginBundle::Git` now uses `Module::Runtime` directly, instead of using the `Class::MOP` method, which is deprecated in `Moose >= 2.1100`

Note: In order to build this on `Dist::Zilla 5` you will first have to modify `Prepender` to have this:
```perl
sub munge_file {
my ($self, $file) = @_;

foreach my $skip ( $self->_skips ){
return if $file->name =~ $skip;
}
return if $file->encoding eq 'bytes'; ## Add this line

return $self->_munge_perl($file) if $file->name =~ /\.(?:pm|pl)$/i;
return $self->_munge_perl($file) if $file->content =~ /^#!(?:.*)perl(?:$|\s)/;
return;
}
```
otherwise calling `$file->content` attempts to decode the data from `UTF-8`, and then cause an error because `corpus/dzp-git.*` contain byte sequences that are invalid in UTF-8`.

You'll also have to add the changes to `dist.ini` that I've patched in here too, because that sets the `encoding` return value to 'bytes' instead of 'utf-8' .