NAME POE::Component::SmokeBox::Recent - A POE component to retrieve recent CPAN uploads. SYNOPSIS use strict; use POE qw(Component::SmokeBox::Recent); $|=1; POE::Session->create( package_states => [ 'main' => [qw(_start recent)], ], ); $poe_kernel->run(); exit 0; sub _start { POE::Component::SmokeBox::Recent->recent( url => 'http://www.cpan.org/', event => 'recent', ); return; } sub recent { my $hashref = $_[ARG0]; if ( $hashref->{error} ) { print $hashref->{error}, "\n"; return; } print $_, "\n" for @{ $hashref->{recent} }; return; } DESCRIPTION POE::Component::SmokeBox::Recent is a POE component for retrieving recently uploaded CPAN distributions from the CPAN mirror of your choice. It accepts a url and an event name and attempts to download and parse the RECENT file from that given url. It is part of the SmokeBox toolkit for building CPAN Smoke testing frameworks. CONSTRUCTOR recent Takes a number of parameters: 'url', the full url of the CPAN mirror to retrieve the RECENT file from, only http and ftp are currently supported, mandatory; 'event', the event handler in your session where the result should be sent, mandatory; 'session', optional if the poco is spawned from within another session; 'context', anything you like that'll fit in a scalar, a ref for instance; The 'session' parameter is only required if you wish the output event to go to a different session than the calling session, or if you have spawned the poco outside of a session. The poco does it's work and will return the output event with the result. OUTPUT EVENT This is generated by the poco. ARG0 will be a hash reference with the following keys: 'recent', an arrayref containing recently uploaded distributions; 'error', if something went wrong this will contain some hopefully meaningful error messages; 'context', if you supplied a context in the constructor it will be returned here; AUTHOR Chris "BinGOs" Williams KUDOS Andy Armstrong for helping me to debug accessing his CPAN mirror. SEE ALSO POE POE::Component::Client::HTTP POE::Component::Client::FTP