X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=.build%2F0ey2IQdAX1%2Flib%2FDist%2FZilla%2FPlugin%2FOyster%2FHelper.pm;fp=.build%2F0ey2IQdAX1%2Flib%2FDist%2FZilla%2FPlugin%2FOyster%2FHelper.pm;h=97335568cdb5c7630eaed0fdb1bb781971c7cfdc;hb=6b832bd6eabfef633627b14a5252110b8653e310;hp=0000000000000000000000000000000000000000;hpb=83928564ffca265f67e17d34adc15d12d5319537;p=p5sagit%2FOyster.git diff --git a/.build/0ey2IQdAX1/lib/Dist/Zilla/Plugin/Oyster/Helper.pm b/.build/0ey2IQdAX1/lib/Dist/Zilla/Plugin/Oyster/Helper.pm new file mode 100644 index 0000000..9733556 --- /dev/null +++ b/.build/0ey2IQdAX1/lib/Dist/Zilla/Plugin/Oyster/Helper.pm @@ -0,0 +1,89 @@ +use strict; +use warnings; +package Dist::Zilla::Plugin::Oyster::Helper; +BEGIN { + our $VERSION = 0.01;# VERSION +} +use Moose; +use Dist::Zilla::File::InMemory; + +extends 'Catalyst::Helper'; + +has _zilla_gatherer => ( + is => 'ro', + required => 1, + handles => { + _zilla_add_file => 'add_file', + }, +); + +# we don't want these to do anything +sub _mk_changes {}; +sub _mk_makefile {}; +sub _mk_readme {}; +sub _mk_apptest {}; +sub _mk_podtest {}; +sub _mk_podcoveragetest {}; + +sub mk_file { + my ( $self, $file_obj , $output ) = @_; + + # unfortunately the stringified $file_obj includes a prepended + # {dist_repo} name which dzil already creates if we don't regex it out we + # end up with {dist_repo}/{dist_repo}/{files} instead of just + # {dist_repo}/{files} + my $name = "$file_obj"; + $name =~ s{[\w-]+/}{}; + + my $file + = Dist::Zilla::File::InMemory->new({ + name => $name, + content => $output, + }); + + $file->mode( oct(755) ) if $file->name =~ /script/; + + $self->_zilla_add_file($file); +} +__PACKAGE__->meta->make_immutable; +no Moose; +1; +# ABSTRACT: a subclass of Catalyst::Helper + + +__END__ +=pod + +=head1 NAME + +Dist::Zilla::Plugin::Oyster::Helper - a subclass of Catalyst::Helper + +=head1 VERSION + +version 0.07 + +=head1 DESCRIPTION + +this is used to override methods in L so that it works +better with dzil. + +=head1 AUTHORS + +=over 4 + +=item * + +CONTRIBUTORS TODO (note, based on xenoterracide & t0m's work) + +=back + +=head1 COPYRIGHT AND LICENSE + +TODO + +This is free software, licensed under: + + The Artistic License 2.0 + +=cut +