in reply to Perl Advent Calendar Daily Installer
This is a tad friendlier to the server
update: and here is the friendliest version possibleuse strict; use warnings; use LWP::Simple 'get'; use XML::Simple; use CPAN; my $xml = XMLin( get( 'http://perladvent.org/perladvent.rdf' ) ); my $item = shift @{ $xml->{channel}{item} }; CPAN::Shell->install($1) if $item->{title} =~ /-\s(\S+)$/;
use strict; use warnings; use LWP::Simple 'get'; use XML::Simple; use CPAN; CPAN::Shell->install( XMLin( get( 'http://perladvent.org/perladventone.rdf' ) ) ->{channel}{item}{title} );
In Section
Cool Uses for Perl