App-FQStat
view release on metacpan or search on metacpan
lib/App/FQStat/System.pm view on Meta::CPAN
warnenter if ::DEBUG;
my $cmd = shift;
my $ssh = get_config("sshcommand");
require ExtUtils::MakeMaker;
require Config;
require File::Spec;
my $_cmd = $cmd;
if (defined $ssh and $ssh ne '') {
# too slow...
return $_cmd; # err, right!
# my $cmd_escape = $cmd;
# $cmd_escape =~ s/'/\\'g/; # bad
# my $problem = run(
# 'perl', '-e',
# q|use ExtUtils::MakeMaker; if(-x '|
# . $cmd_escape
# . q|' or MM->maybe_command('|
# . $cmd_escape
# . q|'){exit(0)}else{exit(1)}|
# );
# return $_cmd unless $problem;
}
else {
return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
my $abs = File::Spec->catfile($dir, $cmd);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
( run in 0.541 second using v1.01-cache-2.11-cpan-c21f80fb71c )