Bot-Webalert

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

--- #YAML:1.0
name:                Bot-Webalert
version:             0.01
abstract:            IRC bot watches Web sites and reports changes to IRC channels
license:             ~
generated_by:        ExtUtils::MakeMaker version 6.31
distribution_type:   module
requires:     
    Bot::BasicBot:                 0.81
    HTTP::Cookies:                 5
    HTTP::Request::Common:         5
    Log::Log4perl:                 1
    POE:                           1.003
    POE::Component::Client::HTTP:  0.85
meta-spec:
    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
    version: 1.2
author:
    - Mike Schilli <cpan@perlmeister.com>

Makefile.PL  view on Meta::CPAN

use ExtUtils::MakeMaker;
WriteMakefile(
    'NAME'         => 'Bot::Webalert',
    'VERSION_FROM' => 'Webalert.pm', # finds $VERSION
    'PREREQ_PM'    => {
        HTTP::Request::Common => 5,
        Bot::BasicBot                => 0.81,
        Log::Log4perl                => 1,
        POE                          => 1.003,
        POE::Component::Client::HTTP => 0.85,
        HTTP::Cookies                => 5,
    }, # e.g., Module::Name => 1.1
    ($] >= 5.005 ?    ## Add these new keywords supported since 5.005
      (ABSTRACT_FROM => 'Webalert.pm',
       AUTHOR     => 'Mike Schilli <cpan@perlmeister.com>') : ()),
);

Webalert.pm  view on Meta::CPAN

###########################################
package Bot::Webalert;
###########################################
use strict;
use warnings;
use Bot::BasicBot;
use Log::Log4perl 1.05 qw(:easy);
use POE;
use POE::Component::Client::HTTP;
use HTTP::Cookies;
use base qw( Bot::BasicBot );

our $VERSION = "0.01";

###########################################
sub new {
###########################################
    my($class, %options) = @_;

    %options = (

Webalert.pm  view on Meta::CPAN

      DEBUG "Not spawning $self->{ua_alias} session (there's one already)";
      return 1;
  }

  DEBUG "Spawning POE::Component::Client::HTTP aliased '$self->{ua_alias}'";

      # Spawn the UA with a cookie jar
  POE::Component::Client::HTTP->spawn(
    Alias     => $self->{ua_alias},
    Timeout   => $self->{ua_timeout},
    CookieJar => HTTP::Cookies->new(),
  );

  POE::Session->create(
    object_states => [
      $self => {
        _start     => "_start",
        http_start => "http_start",
        http_ready  => "http_ready",
      }
    ]



( run in 0.712 second using v1.01-cache-2.11-cpan-e9199f4ba4c )