tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

"sa-update" in SpamAssassin 3.4.0


the "sa-update" script in SpamAssassin 3.4.0 (I've got a package which
I'm currently testing) contains the following code:

# Do a GET request via HTTP for a given URL using an external program,
# or fall back to LWP if no external downloading program is available.
# Use the optional time_t value to do an IMS GET
sub http_get {
  foreach my $try_prog ('curl', 'wget', 'fetch') {
    $cmd = Mail::SpamAssassin::Util::find_executable_in_env_path($try_prog);
    if (defined $cmd && $cmd ne '') { $ext_prog = $try_prog; last }

So basically it checks for a bunch of external programs and uses them
if available. If none can be found it uses the Perl library.

The result on my system is that it uses "curl" because that is installed
anyway. What would be the appropriate way to handle this? Should I add
a dependence on "curl" to get predictable behaviour?

        Kind regards

Matthias Scheler                       

Home | Main Index | Thread Index | Old Index