Dist-Zilla-Plugin-ModuleInstall

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/ModuleInstall.pm  view on Meta::CPAN

        make_path   => $self->make_path,
      },
    );
  },
);

with 'Dist::Zilla::Role::BuildRunner';
with 'Dist::Zilla::Role::InstallTool';
with 'Dist::Zilla::Role::TextTemplate';

# no broken tempdir, keepalive_fail helper
use Dist::Zilla::Role::Tempdir 1.001000;
with 'Dist::Zilla::Role::Tempdir';

with 'Dist::Zilla::Role::PrereqSource';
with 'Dist::Zilla::Role::TestRunner';

around dump_config => sub {
  my ( $orig, $self, @args ) = @_;
  my $config = $self->$orig(@args);
  my $payload = $config->{ +__PACKAGE__ } = {};

lib/Dist/Zilla/Plugin/ModuleInstall.pm  view on Meta::CPAN

}








my $error_load   = 'Error running Makefile.PL for Module::Install. ';
my $no_keepalive = $error_load . 'Set MI_KEEPALIVE=1 if you want to retain the directory for analysis';
my $keepalive    = $error_load . 'Inspect the temporary directory to determine cause';

sub setup_installer {
  my ( $self, ) = @_;

  my $file = Dist::Zilla::File::FromCode->new( { name => 'Makefile.PL', code => sub { _generate_makefile_pl($self) }, } );

  $self->add_file($file);

  my $code = sub {
    my ($dir) = @_;
    system $^X, 'Makefile.PL' and do {

      croak($no_keepalive) unless $ENV{MI_KEEPALIVE};

      $dir->keepalive_fail($keepalive);
    };
  };

  my (@generated) = $self->capture_tempdir($code);

  for (@generated) {
    if ( $_->is_new ) {
      $self->log( 'ModuleInstall created: ' . $_->name );
      if ( $_->name =~ /\Ainc\/Module\/Install/msx ) {
        $self->log( 'ModuleInstall added  : ' . $_->name );



( run in 0.738 second using v1.01-cache-2.11-cpan-39bf76dae61 )