Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

text::bibtex::file(3pm) [debian man page]

Text::BibTeX::File(3pm) 				User Contributed Perl Documentation				   Text::BibTeX::File(3pm)

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: $! "; # or: $bib = new Text::BibTeX::File; $bib->open ("foo.bib") || die "foo.bib: $! "; $bib->set_structure ($structure_name, $option1 => $value1, ...); $at_eof = $bib->eof; $bib->close; DESCRIPTION
"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 Text::BibTeX::Structure. METHODS
Object creation, file operations 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 (i.e., "open" was never called on the object), does nothing. eof () Returns the end-of-file state of the filehandle associated with the object: a true value means we are at the end of the file. Object properties set_structure (STRUCTURE [, OPTION => VALUE, ...]) Sets the database structure for a BibTeX file. At the simplest level, this means that entries from the file are expected to conform to certain field requirements as specified by the structure module. It also gives you full access to the methods of the particular structured entry class for this structure, allowing you to perform operations specific to this kind of database. See "CLASS INTERACTIONS" in Text::BibTeX::Structure for all the consequences of setting the database structure for a "Text::BibTeX::File" object. structure () Returns the name of the database structure associated with the object (as set by "set_structure"). preserve_values ([PRESERVE]) Sets the "preserve values" flag, to control all future parsing of entries from this file. If PRESERVE isn't supplied, returns the current state of the flag. See Text::BibTeX::Value for details on parsing in "value preservation" mode. SEE ALSO
Text::BibTeX, Text::BibTeX::Entry, Text::BibTeX::Structure AUTHOR
Greg Ward <gward@python.net> COPYRIGHT
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. perl v5.14.2 2012-06-02 Text::BibTeX::File(3pm)

Check Out this Related Man Page

Text::BibTeX::BibSort(3pm)				User Contributed Perl Documentation				Text::BibTeX::BibSort(3pm)

NAME
Text::BibTeX::BibSort - generate sort keys for bibliographic entries SYNOPSIS
# Assuming $entry comes from a database of the 'Bib' structure # (i.e., that it's blessed into the BibEntry class, which inherits # the sort_key method from BibSort): $sort_key = $entry->sort_key; DESCRIPTION
"Text::BibTeX::BibSort" is a base class of "Text::BibTeX::BibEntry" for generating sort keys from bibliography entries. It could in principle (and, someday, might) offer a wide range of highly customizable sort-key generators. Currently, though, it provides only a single method ("sort_key") for public use, and that method only pays attention to one structure option, "sortby". METHODS
sort_key () Generates a sort key for a single bibliographic entry. Assumes this entry conforms to the "Bib" database structure. The nature of this sort key is controlled by the "sortby" option, which can be either "name" or "year". (The "namestyle" also has a role, in determining how author/editor names are formatted for inclusion in the sort key.) For by-name sorting (which is how BibTeX's standard styles work), the sort key consists of one of the "author", "editor", "organization", or "key" fields (depending on the entry type and which fields are actually present), followed by the year and the title. All fields are drastically simplified to produce the sort key: non-English letters are mercilessly anglicized, non-alphabetic characters are stripped, and everything is forced to lowercase. (The first two steps are done by the "purify_string" routine; see "Generic string-processing functions" in Text::BibTeX for a brief description, and the descripton of the C function "bt_purify_string()" in bt_misc for all the gory details.) SEE ALSO
Text::BibTeX::Structure, Text::BibTeX::Bib, Text::BibTeX::BibFormat AUTHOR
Greg Ward <gward@python.net> COPYRIGHT
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. perl v5.14.2 2012-06-02 Text::BibTeX::BibSort(3pm)
Man Page