Advanced-Config
view release on metacpan or search on metacpan
full_developer_test.pl.src view on Meta::CPAN
print "Found ${cnt} fish logs ...\n\n";
return ( $cnt );
}
# Cleans up after previous runs of this program ...
sub delete_old_fish_logs
{
my $wild_1 = File::Spec->catfile ( $fish_dir_summary, "*.fish.txt" );
my $wild_2 = File::Spec->catfile ( $fish_dir_details, "*.fish.txt" );
foreach my $f ( bsd_glob ( $wild_1 ), bsd_glob ( $wild_2 ) ) {
unlink ( $f );
}
return;
}
# Tries to find out the proper 'make' program to use for your platform ...
# Then runs it. If it exits with a non-zero status it assumes it's the
# wrong one and tries out the next one in the list!
sub find_and_run_make
{
my $cmd;
print "\nSearching for the correct 'make' variant to use ...\n\n";
# Keep dmake last since Strawberry perl depreciated it in favor of gmake.
# Assumes any depreciated make found will exit with a status of zero!
foreach my $make ( "make", "gmake", "dmake" ) {
$cmd = which ( $make );
if ( defined $cmd ) {
my $mk = basename ( $cmd );
print "\nRunning '${mk}' ...\n";
my $res = system ( $cmd );
if ( $res == 0 ) {
last; # The command is good!
} else {
print "Failed '${mk}'. Looking for the next make variant in the list.\n\n";
$cmd = undef;
}
}
}
unless ( defined $cmd ) {
die ("Can't locate a working 'make' program to run 'make test' with!\n");
}
print "Found: $cmd\n";
return ($cmd);
}
# Tries to find out the proper 'prove' program to use for your platform ...
sub which_prove
{
my $process = shift;
my $cmd;
print "\nSearching for the correct 'prove' variant to use ...\n\n";
foreach my $prove ( "prove" ) {
$cmd = which ( $prove );
last if ( defined $cmd );
}
unless ( defined $cmd ) {
die ("Can't locate a 'prove' program to run 'prove -bv ${process}' with!\n");
}
print "Found: $cmd\n";
return ($cmd);
}
# A simple version of which() so I don't have to depend on an external module.
sub which
{
my $prog = shift;
my $cmd;
my @path = File::Spec->path ();
foreach my $d (@path) {
printf ("CHK-IN-DIR (%s): %s\n", $prog, $d);
my $f = File::Spec->catfile ( abs_path ($d), $prog );
# Now see if the file exists & is executable ...
$cmd = MM->maybe_command ( $f ); # Provided by ExtUtils::MakeMaker ...
last if ( defined $cmd );
}
print "\n";
return ($cmd);
}
( run in 0.656 second using v1.01-cache-2.11-cpan-39bf76dae61 )