Filewatcher File Search File Search
Content Search
» » » » » POE-Component-SmokeBox-Uploads-CPAN-Mini-1.00.tar.gz » Content »
pkg://POE-Component-SmokeBox-Uploads-CPAN-Mini-1.00.tar.gz:25526/POE-Component-SmokeBox-Uploads-CPAN-Mini-1.00/  info  downloads


    POE::Component::SmokeBox::Uploads::CPAN::Mini - Obtain uploaded CPAN
    modules via a CPAN::Mini mirror

      # Create a CPAN::Mini::Devel mirror
      use strict;
      use warnings;
      use POE qw(Component::SmokeBox::Uploads::CPAN::Mini);
      use Data::Dumper;


            package_states => [
              'main' => [qw(_start upload)],

      exit 0;

      sub _start {
            event => 'upload',
            remote => '',
            'local' => '/home/ftp/CPAN/',
            class => 'CPAN::Mini::Devel',

      sub upload {
        print Dumper( $_[ARG0] );

    POE::Component::SmokeBox::Uploads::CPAN::Mini is a POE component that
    maintains a minimal CPAN mirror using CPAN::Mini and generates events
    for when new distributions are added to the mirror and distributions are
    removed from the mirror.

    The component uses POE::Wheel::Run to run CPAN::Mini's "update_mirror"
    class method.

        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;
          'remote', URL to the remote cpan mirror (required)
          'local', path to where the local minicpan will reside (required)
          'interval', the interval in seconds between mirror updates, default is 14400 ( ie. 4 hours );

        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.

        Other CPAN::Mini options may be specified.

          'class', specify the CPAN::Mini class to use, defaults to CPAN::Mini;
          'force', check all directories, even if indices are unchanged, default is true;
          'skip_perl', skip the major language distributions: perl, parrot, and ponier, default false;

        There are some debugging options:

          'debug', if set to true the component will print output from update_mirror();
          'dump', if set to true, the component will add additional fields to the output event;
          'options', pass a hashref of POE::Session options to the component;

        Returns an object.

        Returns the POE::Session ID of the component.

        Terminates the component.

        Terminates the component.

    An event will be triggered each time the local mirror is updated by the
    component. ARG0 of the event will be a hashref with the following keys:

      'uploads', an arrayref containing the distributions that were updated;
      'cleaned', an arrayref containing the distributions that were removed;
      'status', the exit code of the update_mirror() fork;

    If "dump" has been set to true in the "spawn" constructor then these
    additional keys will be set:

      'buffer', an arrayref containing the STDOUT messages from the update_mirror() call;
      'errors', an arrayref containing the STDERR messages from the update_mirror() call;

    Chris "BinGOs" Williams <>

    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.



Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017