---
name: "Test::Bot::BasicBot::Pluggable"
section: "3pm"
platform: "linux"
package: "libbot-basicbot-pluggable-perl"
version: "1.30+ds1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Test::Bot::BasicBot::Pluggable"
---

# Test::Bot::BasicBot::Pluggable(3pm)

utilities to aid in testing of Bot::BasicBot::Pluggable modules

## NAME

Test::Bot::BasicBot::Pluggable - utilities to aid in testing of Bot::BasicBot::Pluggable modules

## VERSION

version 1.30

## SYNOPSIS

```
  use Test::More;
  use Test::Bot::BasicBot::Pluggable;
  my $bot = Test::Bot::BasicBot->new();
  $bot->load('MyModule');
  is ( $bot->tell_direct('foo'),   'bar');
  is ( $bot->tell_indirect('foo'), 'bar');
  is ( $bot->tell_private('foo'),  'bar');
```

## DESCRIPTION

Test::Bot::BasicBot::Pluggable was written to provide a minimalistic testing bot in order to write cleaner unit tests for Bot::BasicBot::Pluggable modules.

## SUBROUTINES/METHODS

### new

Creates a new Test::Bot::BasicBot::Pluggable object, which is basically just a subclass of Bot::BasicBot::Pluggable with a few special methods. The default nickname is 'test\_bot' and it contains a in-memory store instead of sqlite. It takes the same arguments as Bot::BasicBot::Pluggable.

## INSTANCE METHODS

### tell\_direct

Sends the provided string to the bot like it was send directly to the bot in a public channel. The channel is called '#test' and the sending user 'test\_user'.

```
  test_user@#test> test_bot: foo
```

### tell\_indirect

Sends the provided string to the bot like it was send to a public channel without addressing. The channel is called '#test' and the sending user 'test\_user'.

```
  test_user@#test> foo
```

### tell\_private

Sends the provided string to the bot like it was send in a private channel. The sending user 'test\_user'.

```
  test_user@test_bot> foo
```

### tell

This is the working horse of Test::Bot::BasicBot::Pluggable. It basically builds a message hash as argument to the bots **said()** function. You should never have to call it directly.

### connect

Dispatch the connected event to all loaded modules without actually connecting to anything.

### DESTROY

The special subroutine is explicitly overridden with an empty subroutine as otherwise AUTOLOAD in Bot::BasicBot will be called for it.

## BUGS AND LIMITATIONS

There are no methods to test join, part and emote.

## AUTHOR

Mario Domgoergen \<mdom@cpan.org\>

## LICENSE AND COPYRIGHT

Copyright 2009 Mario Domgoergen, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
