mmitchell has asked for the wisdom of the Perl Monks concerning the following question:

I'm attempting to add a feature to a (Apache/CGI) script that will permit users to update the script automatically, however, I don't want to do something as evil as:
eval { system("wget -N http://path/to/file;"); };
Then including it... Aside from the fact it isn't very cross-platform, I don't like the idea of doing it. :) Please advise.

Replies are listed 'Best First'.
Re: wget alternative
by Anonymous Monk on Jul 15, 2011 at 03:44 UTC
        Thanks!

        Beings that the script is being hosted on servers that don't belong to me, is it really ethically okay to execute the updates either by replacing modules or include()-ing them?

        They'd be eval{ }-ed and it'd only do so when prompted, so it's not a matter of CAN I, but more of a SHOULD I allow Perl to execute code from an external source?
Re: wget alternative
by xhudik (Initiate) on Jul 15, 2011 at 08:17 UTC
    I'm working with curl - cross-platform, robust program. But it is still external program ...