Chris Williams

NAME

POE::Component::SmokeBox::Uploads::NNTP - Obtain uploaded CPAN modules via NNTP.

SYNOPSIS

  use strict;
  use POE qw(Component::SmokeBox::Uploads::NNTP);

  $|=1;

  POE::Session->create(
        package_states => [
          'main' => [qw(_start upload)],
        ],
  );

  $poe_kernel->run();
  exit 0;

  sub _start {
    POE::Component::SmokeBox::Uploads::NNTP->spawn(
        event => 'upload',
    );
    return;
  }

  sub upload {
    print $_[ARG0], "\n";
    return;
  }

DESCRIPTION

POE::Component::SmokeBox::Uploads::NNTP is a POE component that alerts newly uploaded CPAN distributions. It obtains this information from polling an NNTP server ( by default the perl.cpan.uploads group on nntp.perl.org ).

POE::Component::Client::NNTP is used to handle the interaction with the NNTP server.

CONSTRUCTOR

spawn

Takes a number of parameters:

  'event', the event handler in your session where each new upload alert should be sent, mandatory;
  'session', optional if the poco is spawned from within another session;
  

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.

Returns an object.

METHODS

session_id

Returns the POE::Session ID of the component.

shutdown

Terminates the component.

INPUT EVENTS

shutdown

Terminates the component.

OUTPUT EVENTS

An event will be triggered for each new CPAN upload. The event will have ARG0 set to the path of the upload:

  B/BI/BINGOS/POE-Component-SmokeBox-Uploads-NNTP-0.01.tar.gz

Suitable for feeding to the smoke tester of your choice.

AUTHOR

Chris BinGOs Williams <chris@bingosnet.co.uk>

LICENSE

Copyright © Chris Williams

This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details.

SEE ALSO

POE

POE::Component::Client::NNTP

http://www.nntp.perl.org/

http://log.perl.org/2008/02/goodbye-cpan-te.html