NAME
Text::BibTeX::File - interface to whole BibTeX files
SYNOPSIS
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;
DESCRIPTION
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.
METHODS
- new ([FILENAME [,MODE [,PERMS]]])
-
Creates a new
Text::BibTeX::Fileobject. IfFILENAMEis supplied, passes it to theopenmethod (along withMODEandPERMSif they are supplied). If theopenfails,newfails and returns false; if theopensucceeds (or ifFILENAMEisn't supplied),newreturns the new object reference. - open (FILENAME [,MODE [,PERMS]])
-
Opens the file specified by
FILENAME, possibly usingMODEandPERMS(see IO::File for full semantics; thisopenis just a front end forIO::File::open). - close
-
Closes the filehandle associated with the object. If there is no such filehandle (ie. if you never called
openon the object), does nothing.
AUTHOR
Greg Ward <greg@bic.mni.mcgill.ca>
COPYRIGHT
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.