Bot-BasicBot-Pluggable

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

    "Module::Pluggable" => 0,
    "Moose" => 0,
    "Moose::Util::TypeConstraints" => 0,
    "MooseX::Getopt" => 0,
    "MooseX::Getopt::Dashes" => 0,
    "MooseX::SimpleConfig" => 0,
    "POE" => 0,
    "Socket" => 0,
    "Storable" => 0,
    "Text::Unidecode" => 0,
    "Try::Tiny" => 0,
    "URI" => 0,
    "URI::Find::Simple" => 0,
    "URI::Title" => 0,
    "XML::Feed" => 0,
    "base" => 0,
    "constant" => 0,
    "lib" => 0,
    "perl" => "v5.8.0",
    "strict" => 0,
    "warnings" => 0

Changes  view on Meta::CPAN

    ignored modules in ./modules and ./

  - Store: DBI, DBM::Deep and DBD::SQLite are no langer hard
    requirements of this module. Bot::BasicBot::Pluggable now tries
    to load all storage types in a predefined order until one returns
    successfully. Normally you should just select one explicitly.

  - Base.pm: Removed Base.pm from the list of available modules und
    depracate its usage

  - Try::Tiny: Error handling is now performed by try::tiny instead
    of writing all the eval boilerplate. Although it does lack some
    convenience, i selected it as we'll get it through moose in any
    case.

  - ChanOp.pm: New core module to handle channel managment operations
    like oping, deoping, kicking and flood control. Please take a
    closer look at this module, it definitly needs some testing!

0.83 2009/11/08

META.yml  view on Meta::CPAN

  Module::Pluggable: '0'
  Moose: '0'
  Moose::Util::TypeConstraints: '0'
  MooseX::Getopt: '0'
  MooseX::Getopt::Dashes: '0'
  MooseX::SimpleConfig: '0'
  POE: '0'
  Socket: '0'
  Storable: '0'
  Text::Unidecode: '0'
  Try::Tiny: '0'
  URI: '0'
  URI::Find::Simple: '0'
  URI::Title: '0'
  XML::Feed: '0'
  base: '0'
  constant: '0'
  lib: '0'
  perl: v5.8.0
  strict: '0'
  warnings: '0'

Makefile.PL  view on Meta::CPAN

    "Module::Pluggable" => 0,
    "Moose" => 0,
    "Moose::Util::TypeConstraints" => 0,
    "MooseX::Getopt" => 0,
    "MooseX::Getopt::Dashes" => 0,
    "MooseX::SimpleConfig" => 0,
    "POE" => 0,
    "Socket" => 0,
    "Storable" => 0,
    "Text::Unidecode" => 0,
    "Try::Tiny" => 0,
    "URI" => 0,
    "URI::Find::Simple" => 0,
    "URI::Title" => 0,
    "XML::Feed" => 0,
    "base" => 0,
    "constant" => 0,
    "lib" => 0,
    "strict" => 0,
    "warnings" => 0
  },

Makefile.PL  view on Meta::CPAN

  "Moose" => 0,
  "Moose::Util::TypeConstraints" => 0,
  "MooseX::Getopt" => 0,
  "MooseX::Getopt::Dashes" => 0,
  "MooseX::SimpleConfig" => 0,
  "POE" => 0,
  "Socket" => 0,
  "Storable" => 0,
  "Test::More" => 0,
  "Text::Unidecode" => 0,
  "Try::Tiny" => 0,
  "URI" => 0,
  "URI::Find::Simple" => 0,
  "URI::Title" => 0,
  "XML::Feed" => 0,
  "YAML::XS" => 0,
  "base" => 0,
  "constant" => 0,
  "lib" => 0,
  "strict" => 0,
  "warnings" => 0

lib/App/Bot/BasicBot/Pluggable.pm  view on Meta::CPAN

package App::Bot::BasicBot::Pluggable;
$App::Bot::BasicBot::Pluggable::VERSION = '1.30';
use Moose;
use Config::Find;
use Bot::BasicBot::Pluggable;
use Bot::BasicBot::Pluggable::Store;
use Moose::Util::TypeConstraints;
use List::MoreUtils qw(any uniq);
use Try::Tiny;
use Log::Log4perl;

with 'MooseX::Getopt::Dashes';
with 'MooseX::SimpleConfig';

use Module::Pluggable
  sub_name    => '_available_stores',
  search_path => 'Bot::BasicBot::Pluggable::Store';

subtype 'App::Bot::BasicBot::Pluggable::Channels'

lib/Bot/BasicBot/Pluggable.pm  view on Meta::CPAN

$Data::Dumper::Terse  = 1;
$Data::Dumper::Indent = 0;

use Module::Pluggable
  sub_name    => '_available',
  search_path => 'Bot::BasicBot::Pluggable::Module',
  except      => 'Bot::BasicBot::Pluggable::Module::Base';
use Bot::BasicBot::Pluggable::Module;
use Bot::BasicBot::Pluggable::Store;
use File::Spec;
use Try::Tiny;

sub init {
    my $self = shift;
    $self->init_logging();

    my $logger = Log::Log4perl->get_logger( ref $self );
    $logger->info( 'Starting initialization of ' . ref $self );

    if ( !$self->store ) {
        $logger->debug('Store not set, trying to load a store backend');

lib/Bot/BasicBot/Pluggable/Module/Loader.pm  view on Meta::CPAN

package Bot::BasicBot::Pluggable::Module::Loader;
$Bot::BasicBot::Pluggable::Module::Loader::VERSION = '1.30';
use base qw(Bot::BasicBot::Pluggable::Module);
use warnings;
use strict;
use Try::Tiny;

sub init {
    my $self    = shift;
    my @modules = grep !/^user_/, $self->store_keys;
    for (@modules) {
        try { $self->{Bot}->load($_) } catch { warn "Error loading $_: $@." };
    }
}

sub help {

lib/Bot/BasicBot/Pluggable/Store.pm  view on Meta::CPAN

package Bot::BasicBot::Pluggable::Store;
$Bot::BasicBot::Pluggable::Store::VERSION = '1.30';
use strict;
use warnings;
use Carp qw( croak );
use Data::Dumper;
use Storable qw( nfreeze thaw );
use Try::Tiny;
use Module::Load qw();
use Log::Log4perl;

use base qw( );

sub new {
    my $class = shift;
    my $self;
    my $logger = Log::Log4perl->get_logger($class);
    if ( @_ % 2 == 0 ) {

lib/Bot/BasicBot/Pluggable/Store/DBI.pm  view on Meta::CPAN

package Bot::BasicBot::Pluggable::Store::DBI;
$Bot::BasicBot::Pluggable::Store::DBI::VERSION = '1.30';
use warnings;
use strict;
use Carp qw( croak );
use Data::Dumper;
use DBI;
use Storable qw( nfreeze thaw );
use Try::Tiny;

use base qw( Bot::BasicBot::Pluggable::Store );

sub init {
    my $self = shift;
    $self->{dsn}   ||= 'dbi:SQLite:bot-basicbot.sqlite';
    $self->{table} ||= 'basicbot';
    $self->create_table;
}

t/100critic.t  view on Meta::CPAN

use strict;
use warnings;
use File::Spec;
use Test::More;
use Try::Tiny;

if ( not $ENV{TEST_AUTHOR} ) {
    my $msg = 'Author test.  Set $ENV{TEST_AUTHOR} to a true value to run.';
    plan( skip_all => $msg );
}

try {
    require Test::Perl::Critic;
}
catch {

t/101tidy.t  view on Meta::CPAN

use strict;

use warnings;
use File::Spec;
use Test::More;
use Try::Tiny;

if ( not $ENV{TEST_AUTHOR} ) {
    my $msg = 'Author test.  Set $ENV{TEST_AUTHOR} to a true value to run.';
    plan( skip_all => $msg );
}

try {
    require Test::PerlTidy;
}
catch {



( run in 0.327 second using v1.01-cache-2.11-cpan-05444aca049 )