NAME

BoBot::DB - DB Manager


SYNOPSIS

  use BoBot::DB;


DESCRIPTION

External Methods

class->new( dbfile )
Constructor.

this->close( )
Closes a db file.

this->reload( )
Reloads a DB.

this->exists( key )
Checks if a given key exists in the database.

this->get_re_matches( string )
Finds all the keys matching the parameter. The keys of the DB are supposed to be regexps.

Returns a list of [key, value] which key matches the given string.

this->getREKey( key )
Finds the key that match the parameter. The keys of the DB are supposed to be regexps.

In scalar context, return the first key encountered that matches the key as a regex. In list context, return both the key and the value.

this->get_value( key );
Returns the value corresponding to the given key. No check is performed wether key exists or not in the database.

this->add( key, value )
Adds a new pair of (key, value) in the database.

this->remove( key )
Removes a key and its value in the database.

this->list()
Lists all the pairs (key, value) of the database.

Internal Methods

this->DESTROY( )
Destructor.

this->AUTOLOAD( args, ... )
Autoloader


COPYRIGHT, LICENCE

 Copyright (c) 1997-2002 Sebastien BONNET
 Copyright (c) 2001-2002 Samuel    MOUNIEE
 Copyright (c) 2002      Jerome    QUELIN

This file is part of Bobot.

Bobot is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Bobot is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Bobot; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


AUTHOR

Samuel Mouniée <mouns@mouns.net>
Jérôme Quelin <jquelin@cpan.org>


SEE ALSO

the BoBot::IRC manpage