App-MechaCPAN

 view release on metacpan or  search on metacpan

lib/App/MechaCPAN.pm  view on Meta::CPAN

    undef @ENV{qw/PERL_LOCAL_LIB_ROOT PERL5LIB/};

    # If we've running, inform the new us that they are a restarted process
    local $ENV{$restarted_key} = 1
      if ${^GLOBAL_PHASE} eq 'RUN';

    # Cleanup any files opened already. They arn't useful after we exec
    File::Temp::cleanup();

    info "Restarting to local perl\n";
    info( join( " ", $local_perl, map( {"-I$_"} @inc_add ), $real0, @ARGV ) );
    exec( $local_perl, map( {"-I$_"} @inc_add ), $real0, @ARGV );
  }
}

1;
__END__

=encoding utf-8

=head1 NAME

t/06_restart.t  view on Meta::CPAN


  App::MechaCPAN::restart_script;
}

# --directory
{
  # Override some vars it uses to insulate from the prove process
  local *File::Temp::cleanup = sub { };
  local $ENV{PERL5LIB};
  local $ENV{PERL_LOCAL_LIB_ROOT};
  local @ARGV;
  local $App::MechaCPAN::PROJ_DIR = $tmpdir;

  my $exe_path  = "$tmpdir/local/perl/bin";
  my $lib_path  = "$tmpdir/local/lib/perl5";
  my $exe_bin   = "$exe_path/perl";
  my $fake0_bin = "$tmpdir/fake0";
  my $pm        = 'App/MechaCPAN.pm';

  run_restart;
  is( scalar @last_ran_params, 0, 'restart_script without enough structure does nothing' );

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.555 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )