Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: CPANization of a script for building Perl

by polettix (Vicar)
on Dec 15, 2007 at 14:01 UTC ( [id://657197]=note: print w/replies, xml ) Need Help??

in reply to CPANization of a script for building Perl

When starting the cpan utility for the first time you're presented with a set of questions whose goal is to customise a configuration module; among the questions there are also requests to know which system programs should be used, like wget, ncftp and so on.

That could be a good example, in many senses: first of all, having an external configuration file where one can put weird paths for some needed external program; secondly, to get a clue about how actually check that there is some needed external software, and bail out if it's not available (which gives you dependency check as well).

Regarding hard dependencies and tests, you could make a test for the dependency. Something along the lines:

use Test::More tests => 1; use English qw( -no_match_vars ); qx{ wget --version }; is($CHILD_ERROR, 0, 'wget is available');

perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Io ho capito... ma tu che hai detto?

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-06-18 01:34 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.