App-cpx

 view release on metacpan or  search on metacpan

bin/cpx  view on Meta::CPAN

my $cpm = App::cpm::CLI->new;
$cpm->run( 'install', "-L$local_lib", $to_install );


# The ultimate goal: execute! 
sub execute {
    my $ll = shift; # Local Lib
    my $b = shift; # bin

    if (-f "$ll/bin/$b") {
        exec "perl", "-Mlocal::lib=$ll", "$ll/bin/$b", @ARGV;
    } else {
        print "💀 Executable was found, but not installed correctly\n";
        exit -1;
    }
}

execute($local_lib, $bin);



( run in 0.446 second using v1.01-cache-2.11-cpan-49f99fa48dc )