NAME

Bot::BasicBot::Pluggable::Store

DESCRIPTION

Base class for the back-end pluggable store

SYNOPSIS

my $store = Bot::BasicBot::Pluggable::Store->new( option => "Value" );

my $name = $store->name;

my $namespace = "MyModule";

for ( $store->keys($namespace) ) {
  my $value = $store->get($namespace, $_);
  $store->set( $namespace, $_ => "$value and your momma" );
}

'real' store classes should subclass this and provide some persistent way of storing things.

METHODS

keys( namespace )

returns a list of all store keys

get( namespace, var )

returns the stored value of the key 'var'.

set( namespace, key => val )

sets stored value for 'key' to 'val'. returns the store object.

unset( namespace, key )

removes the key 'key' from the store. Returns the store object.

namespaces()

returns a list of all namespaces in the store.

load()

save()

dump()

Dumps the complete store to a huge scalar. This is mostly so you can convert from one store to another easily. Ie:

my $from = Bot::BasicBot::Pluggable::Store::Storable->new();
my $to   = Bot::BasicBot::Pluggable::Store::DBI->new( ... );
$to->restore( $from->dump );

restore( data )

restores the store from a dump().

SEE ALSO

Bot::BasicBot::Pluggable

Bot::BasicBot::Pluggable::Module

AUTHOR

Tom

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 50:

You forgot a '=back' before '=head2'

Around line 169:

=back without =over