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

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::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 (FILENAME [,MODE [,PERMS]])

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).

close

Closes the filehandle associated with the object. If there is no such filehandle (ie. if you never called open on 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.