Jo Seibert > Thesaurus-DBI-0.01 > Thesaurus::DBI

Download:
Thesaurus-DBI-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Thesaurus::DBI - Store and query synonyms (Thesaurus) in an SQL database.

SYNOPSIS ^

        use Thesaurus::DBI;
        
        # create new database connection
        my $th = new Thesaurus::DBI(dbhost=> 'localhost', dbname=>'thesaurus',dbuser=>'user',dbpassword=>'pass');
        
        # use existing database connection
        my $th = new Thesaurus::DBI(dbhandle => $dbi, dbname=>'thesaurus',dbuser=>'user',dbpassword=>'pass');
        
        # initialize database
        $th->create_tables();
        
        # query thesaurus
        my @synonyms = $th->find('synonym');
        
        # add synonyms
        $th->add(['word', 'synonym']);
        
        # delete word
        $th->delete('word');

DESCRIPTION ^

This subclass of Thesaurus implements persistence by using an SQL database.

This module requires the DBI module from CPAN. To use it with certain database servers, the corresponding database drivers are needed, too. (Mysql -> DBD::mysql)

Please note, that database servers like MySQL doesn't take care of case-sensitivity. So the queries to the thesaurus-database wil all bei case-insensitive.

METHODS ^

SEE ALSO ^

Thesaurus, DBI, DBD::mysql

SYNONYM SOURCES ^

Listed below are some links for synonym databases, that can be used with this module

AUTHOR ^

Jo Seibert, jseibert (at) seibert-media (dot) net

COPYRIGHT AND LICENSE ^

Copyright (C) 2006 by Jo Seibert

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: