Text::BibTeX::File - interface to whole BibTeX files |
Text::BibTeX::File - interface to whole BibTeX files
use Text::BibTeX; # this loads Text::BibTeX::File
$bib = new Text::BibTeX::File "foo.bib" or die "foo.bib: $!\n"; # or: $bib = new Text::BibTeX::File; $bib->open ("foo.bib") || die "foo.bib: $!\n";
$bib->set_structure ($structure_name, $option1 => $value1, ...);
$at_eof = $bib->eof;
$bib->close;
Text::BibTeX::File
provides an object-oriented interface to BibTeX
files. Its most obvious purpose is to keep track of a filename and
filehandle together for use by the Text::BibTeX::Entry
module (which
is much more interesting). In addition, it allows you to specify
certain options which are applicable to a whole database (file), rather
than having to specify them for each entry in the file. Currently, you
can specify the database structure and some structure options.
These concepts are fully documented in the Text::BibTeX::Structure manpage.
Text::BibTeX::File
object. If FILENAME is supplied,
passes it to the open
method (along with MODE and PERMS if they
are supplied). If the open
fails, new
fails and returns false; if
the open
succeeds (or if FILENAME isn't supplied), new
returns the
new object reference.
open
is just a front end for
IO::File::open
.
open
was never called on the object), does nothing.
Text::BibTeX::File
object.
set_structure
).
the Text::BibTeX manpage, the Text::BibTeX::Entry manpage, the Text::BibTeX::Structure manpage
Greg Ward <gward@python.net>
Copyright (c) 1997-2000 by Gregory P. Ward. All rights reserved. This file is part of the Text::BibTeX library. This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
Text::BibTeX::File - interface to whole BibTeX files |