Subject: | Support use of modules without a bot |
The pluggable architecture of modules is useful, but why should you
limit it it IRC only? I'd like to use modules also use in other domains
(Jabber, Twitter, Web-Applications etc.). The only problem I encountered
is that the ->bot method of a module croaks if you used the module in
other environments and so does the ->store method. I'd suggest to
rewrite the ->store method to use an in-memory store by default.
Here is a testcase :
my $mod = Bot::BasicBot::Pluggable::Module::MyModule->new();
$mod->set( "foo" => "bar" );
print "> ";
while (<STDIN>) {
last if $_ =~ /^(quit|bye|exit)$/;
my $reply = $mod->told( $_ );
print "$reply\n" if defined $reply;
print "> ";
}