something like CPAN::AutoInc for scripts
am 07.06.2006 22:18:11 von Ted ZlatanovI would like to distribute a script to users, but the source may
change. So I want to do something like CPAN::AutoInc, but for
scripts.
You'd say "perl -MScript::AutoInc -e'go "TEODOR", "http://lifelogs.com/runthis.pl"'
the script would begin with
use Script::AutoInc qw[TEODOR http://lifelogs.com/runthis.pl];
.... actual script here ...
When you run it, if it's updated, the script will get the new version
and overwrite the old one (if possible). Then it runs the new
version. So just that first line is enough as a stub. But if the
external server is not accessible, or the user wants to skip the
update check, they have the option to run the current version of the
script.
The "TEODOR" CPAN name gets a public key and checks if the released
script is signed appropriately for some small measure of security.
Has this been done before? I can put a module together quickly
myself, but wanted to make sure I'm not missing an existing module.
Thanks
Ted