Skip to content
Browse files

Added duckpan install command

  • Loading branch information...
1 parent a29156e commit ea5e4d9a120daf0f44a25a291943983024917d0b @Getty Getty committed May 23, 2012
Showing with 25 additions and 0 deletions.
  1. +25 −0 lib/App/DuckPAN/Cmd/Install.pm
View
25 lib/App/DuckPAN/Cmd/Install.pm
@@ -0,0 +1,25 @@
+package App::DuckPAN::Cmd::Install;
+
+use Moo;
+with qw( App::DuckPAN::Cmd );
+
+use MooX::Options;
+
+sub run {
+ my ( $self, @args ) = @_;
+
+ if (-f 'dist.ini') {
+ $self->app->print_text(
+ "Found a dist.ini, suggesting a Dist::Zilla distribution",
+ );
+
+ $self->app->perl->cpanminus_install_error
+ if (system("dzil install --install-command 'cpanm .'"));
+ $self->app->print_text(
+ "Everything fine!",
+ );
+ }
+
+}
+
+1;

0 comments on commit ea5e4d9

Please sign in to comment.
Something went wrong with that request. Please try again.