The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Biblio::Biblio - Interface class for bibliographic databases

SYNOPSIS

        use Biblio::Biblio;

        my $bib = new Biblio::Biblio('file' => 'sample.bib')
                or die "Can't open bibliographic database!\n";
        my $bib = new Biblio::Biblio(qw(
                        class Database
                        dbms mysql
                        dbhost samplehost
                        dbname biblio
                        dbuser biblio
                        dbpass biblio
                        shortcuts_table shortcuts
                        )) or die "Can't open bibliographic database!\n";
        
        my $refs = $bib->queryPapers();
        print join(', ', keys(%{$refs})), "\n";

DESCRIPTION

Class Biblio provides an abstract interface for bibliographic databases. It also can be used as a factory for a concrete database implementation.

Supported database classes are:

Biblio::Database

All databases that can be accessed through Perl's DBI module. The mapping of database fields can be configured (arguments 'column-mapping' and 'column-types', see OOo-table.pbib for an example).

Biblio::File

Several kind of files, such as bibtex, refer, endnote, tib. This uses the cool bp package, a Perl Bibliography Package by Dana Jacobsen (dana@acm.org).

own subclasses

You can write your own subclass and pass the class name as the 'class' argument.

METHODS

my $bib = new Biblio::Biblio(options)

Factory method for concrete database implementations.

Supported Options:

class

Class name. If one of the options file, dbname, dsn, or dbms is specified, it is set automatically to Bibilio::File or Biblio::Database. If the class name does not contain a '::' the classname is prefixed with 'Biblio::'.

file

Filename in bibtex, refer or any other supported format.

dbms

Name of database type, e.g. ODBC or mysql. This is in fact DBI's dbms argument.

dbhost

Hostname. Passed to DBI.

dbname

Name of the database. Passed to DBI.

dbuser, dbpass

User and password. Passed to DBI.

dsn

You can directly specify a DSN that is passed to DBI.

verbose

Be more verbose and keep the verbose flag within the options.

quiet

Be more quite and keep the quiet flag within the options.

class specific argument

Depending on the Biblio class used, other arguments can be specified here.

In addition, some arguments can be specified in the environment:

'class' => 'BIBLIO_CLASS'
'file' => 'BIBLIO_FILE'
'dbms' => 'BIBLIO_DBMS'
'dbhost' => 'BIBLIO_HOST'
'dbname' => 'BIBLIO_NAME'
'dbuser' => 'BIBLIO_USER'
'dbpass' => 'BIBLIO_PASS'

AUTHOR

Peter Tandler pbib@tandlers.de

COPYRIGHT AND LICENCE

Copyright (C) 2002-2004 P. Tandler

For copyright information please refer to the LICENSE file included in this distribution.

SEE ALSO

For usage examples, please refer to PBib, e.g. bin\pbib.pl, bin\PBibTk.pl