Bot-BasicBot-Pluggable
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Bot/BasicBot/Pluggable/Store.pm view on Meta::CPAN
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 ) {
$self = bless {@_} => $class;
}
elsif ( @_ == 1 and ref $_[0] eq 'HASH' ) {
$self = $class->new_from_hashref( $_[0] );
}
elsif ( @_ == 1 and !ref $_[0] ) {
$self = $class->new_from_hashref( { type => $_[0] } );
}
elsif ( !@_ ) {
$self = bless {} => $class;
}
else {
$logger->warn(
"Argument to new() is neither an argument list, a hashref, a string nor empty"
);
}
$self->init();
$self->load();
return $self;
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.481 second using v1.00-cache-2.02-grep-82fe00e-cpan-a086c87fca4 )