X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=.build%2F0ey2IQdAX1%2Flib%2FDist%2FZilla%2FPlugin%2FOyster%2FNew.pm;fp=.build%2F0ey2IQdAX1%2Flib%2FDist%2FZilla%2FPlugin%2FOyster%2FNew.pm;h=5ab89e64a95b18c57b3c221981e40ea91e28c02c;hb=6b832bd6eabfef633627b14a5252110b8653e310;hp=0000000000000000000000000000000000000000;hpb=83928564ffca265f67e17d34adc15d12d5319537;p=p5sagit%2FOyster.git diff --git a/.build/0ey2IQdAX1/lib/Dist/Zilla/Plugin/Oyster/New.pm b/.build/0ey2IQdAX1/lib/Dist/Zilla/Plugin/Oyster/New.pm new file mode 100644 index 0000000..5ab89e6 --- /dev/null +++ b/.build/0ey2IQdAX1/lib/Dist/Zilla/Plugin/Oyster/New.pm @@ -0,0 +1,126 @@ +use strict; +use warnings; +package Dist::Zilla::Plugin::Oyster::New; +BEGIN { + our $VERSION = 0.01;# VERSION +} +use Moose; +use Dist::Zilla::Plugin::Oyster::Helper; +with qw( Dist::Zilla::Role::ModuleMaker ); + +use Dist::Zilla::File::FromCode; + +sub make_module { + my ( $self ) = @_; + + if ( $Catalyst::Helper::VERSION <= 1.28 ) { + $self->log('getting authors from ENV variable AUTHOR not dzil'); + } + + # format $name to what C::Helper wants + my $name = $self->zilla->name; + $name =~ s/-/::/g; + + # turn authors into a scalar it's what C::Helper wants + my $authors = join( ',', @{$self->zilla->authors} ); + + my $helper + = Dist::Zilla::Plugin::Oyster::Helper->new({ + name => $name, + author => $authors, + _zilla_gatherer => $self, + }); + + # $name here is for backcompat in older versions of C::Devel + $helper->mk_app( $name ); +} +__PACKAGE__->meta->make_immutable; +no Moose; +1; +# ABSTRACT: create a new catalyst project with dzil new + + +__END__ +=pod + +=head1 NAME + +Dist::Zilla::Plugin::Oyster::New - create a new Oyster project with dzil new + +=head1 VERSION + +version 0.07 + +=head1 SYNOPSIS + +in C<{home}/.dzil/profiles/oyster/profile.ini> + + [Oyster::New / :DefaultModuleMaker] + [@Oyster] + +=head1 DESCRIPTION + +this plugin is used to generate the same files L does when +C is run. + +=head1 EXAMPLE + +You probably want more than just the bare minimum profile.ini, here's a more +functional one. I suggest putting it in +C<{home}/.dzil/profiles/oyster/profile.ini> + + [Oyster::New / :DefaultModuleMaker] + [@Oyster] + +Now you can run the following command to create a skeleton catalyst app. + + dzil new -p oyster MyApp + +Obviously C is arbitrary and can be named whatever you like. + +=head1 METHODS + +=over + +=item * make_module + +required see L + +=back + +=head1 BUGS + +or features depending on your opinion and the nature of the issue. The +following are known "issue's". + +=over + +=item * Doesn't create all the files catalyst.pl does + +Some files like README, Makefile.PL and some of the tests, etc, are better +generated by C. Use existing dzil plugins to generate these. + +=back + +For all other problems use the bug tracker + +=head1 AUTHORS + +=over 4 + +=item * + +TODO, see CONTRIBUTORS + +=back + +=head1 COPYRIGHT AND LICENSE + +This software is Copyright (c) 2010 by Caleb Cushing. + +This is free software, licensed under: + + The Artistic License 2.0 + +=cut +