Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^5: Markup::Perl Review / Demo (Basic CGI Shell)

by stevieb (Canon)
on Jul 05, 2018 at 18:06 UTC ( [id://1217972]=note: print w/replies, xml ) Need Help??

in reply to Re^4: Markup::Perl Review / Demo (Basic CGI Shell)
in thread Markup::Perl Review / Demo (Basic CGI Shell)

Instead of using force, why don't you fix the actual test and send a patch?

Here is often how I check if a binary is available and executable (usually in my Makefile.PL files, but I digress... here's one example, and another):

use strict; use warnings; use Test::More; my $is_win = $^O =~ /MSWin/; my ($sep, $bin) = $is_win ? (';', 'perl.exe') : (':', 'perl'); my $perl_available = grep { -x "$_/$bin" } split /$sep/, $ENV{PATH}; ok $perl_available, "perl binary was found and is executable"; done_testing();

Update: Modified code to work on both Windows and Unixy platforms.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1217972]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-25 10:44 GMT
Find Nodes?
    Voting Booth?

    No recent polls found