Is there a script I can run from cron that will automatically update my modules from CPAN? I know it's a security risk, but given that my modus operandi is to say:
% sudo perl -MCPAN -e shell cpan> install Module::Fooand I automatically follow prerequisites, I figure I'm already at the mercy of anyone who maintains the modules I already have. There's nothing preventing them from changing the Makefile.PL of their new release to drop my /etc/passwd into the mail for them, or add a new account, or even just require Nat::You've::Been::R00ted.
Why do I want this? I'm working an hour a night on the next edition of the Perl Cookbook, and I'm doing SOAP stuff. I want to test code, which means I need SOAP::Lite installed, which means I need ... and suddenly the world of dependencies is opening before me. And when I did an r in CPAN shell to see what else I should update ... aiee! Leave a machine a month and it becomes a bloody fossil!
--Nat
Use autobundle from the list of the modules you want up to date and then just write a cheap script to install them into a temp and non-priv location if you don't want to run it as root. See the CPAN FAQ and the CPAN.pm docs
/usr/bin/perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'
24 strokes!
jdavidb on 2002-05-15T13:33:12
C<install> is exported by default, so you can just install(CPAN::Shell->r).