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 a gratuitous object-oriented interface to BibTeX files. It really doesn't do much apart from keep track of a filename and filehandle together for use by the Text::BibTeX::Entry module (which is much more interesting), but it provides a nice clean interface to which I might add functionality at some point.
Text::BibTeX::File
Text::BibTeX::Entry
Creates a new 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.
FILENAME
open
MODE
PERMS
new
Opens the file specified by FILENAME, possibly using MODE and PERMS (see IO::File for full semantics; this open is just a front end for IO::File::open).
IO::File::open
Closes the filehandle associated with the object. If there is no such filehandle (ie. if you never called open on the object), does nothing.
Greg Ward <greg@bic.mni.mcgill.ca>
Copyright (c) 1997 by Gregory P. Ward. All rights reserved. This is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Text::BibTeX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::BibTeX
CPAN shell
perl -MCPAN -e shell install Text::BibTeX
For more information on module installation, please visit the detailed CPAN module installation guide.