Permalink
Browse files

Added secret roadrunner feature

  • Loading branch information...
1 parent 3e4179d commit eb704744767807cb45e4b53bf04c727af7cabc2b @Getty Getty committed May 13, 2013
Showing with 26 additions and 0 deletions.
  1. +26 −0 lib/App/DuckPAN/Cmd/Roadrunner.pm
@@ -0,0 +1,26 @@
+package App::DuckPAN::Cmd::Roadrunner;
+
+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 authordeps --missing 2>/dev/null | grep -vP '[^\\w:]' | cpanm --quiet --notest --skip-satisfied"));
+ $self->app->perl->cpanminus_install_error
+ if (system("dzil listdeps --missing 2>/dev/null | grep -vP '[^\\w:]' | cpanm --quiet --notest --skip-satisfied"));
+ $self->app->print_text(
+ "Everything fine!",
+ );
+ }
+
+}
+
+1;

0 comments on commit eb70474

Please sign in to comment.