BibTeX...::Entry(3pm)
๐ธ NAME ๐ธ
okay bestie, welcome to the BibTeX...::Entry(3pm) page from User Contributed Perl Documentation. This is all about BibTeX::Parser::Entry โ the lil class that contains a single entry of a BibTeX document. Itโs giving โone entry, whole objectโ energy. ๐
โจ SYNOPSIS โจ
This class is literally a wrapper for a single BibTeX entry. It is usually created by BibTeX::Parser. No cap.
use BibTeX::Parser::Entry;
my $entry = BibTeX::Parser::Entry->new($type, $key, $parse_ok, \%fields);
if ($entry->parse_ok) {
my $type = $entry->type;
my $key = $enty->key;
print $entry->field("title");
my @authors = $entry->author;
my @editors = $entry->editor;
...
print $entry->to_string;
}
๐ ๏ธ FUNCTIONS ๐ ๏ธ
โจ new โจ
Create new entry. Fresh entry, fresh vibes. ๐
๐ parse_ok ๐
If the entry was correctly parsed, this method returns a true value, false otherwise. Vibe check: parsed or not parsed.
๐ฉน error ๐ฉน
Return the error message, if the entry could not be parsed or undef otherwise. So if it flopped, this tells you why. ๐ญ
๐ท๏ธ type ๐ท๏ธ
Get or set the type of the entry, eg. 'ARTICLE' or 'BOOK'. Return value is always uppercase. Uppercase always, periodt.
๐ key ๐
Get or set the reference key of the entry. Thatโs the entryโs main-character identifier. ๐
๐ field($name [, $value]) ๐
Get or set the contents of a field. The first parameter is the name of the field, the second (optional) value is the new value.
๐งผ cleaned_field($name) ๐งผ
Retrieve the contents of a field in a format that is cleaned of TeX markup. Clean, clean, clean.
๐ง cleaned_author ๐ง
Get an array of BibTeX::Parser::Author objects for the authors of this entry. Each name has been cleaned of accents and braces.
๐ง cleaned_editor ๐ง
Get an array of BibTeX::Parser::Author objects for the editors of this entry. Each name has been cleaned of accents and braces.
๐ฏ author([@authors]) ๐ฏ
Get or set the authors. Returns an array of BibTeX::Author objects. The parameters can either be BibTeX::Author objects or strings.
Note: You can also change the authors with $entry->field('author', $authors_string)
๐ฏ editor([@editors]) ๐ฏ
Get or set the editors. Returns an array of BibTeX::Author objects. The parameters can either be BibTeX::Author objects or strings.
Note: You can also change the authors with $entry->field('editor', $editors_string)
๐ fieldlist () ๐
Returns a list of all the fields used in this entry. The whole field roster, bestie. ๐ซถ
โ
has($fieldname) โ
Returns a true value if this entry has a value for $fieldname.
โฎ๏ธ pre () โฎ๏ธ
Return the text in BibTeX file before the entry.
๐ฆ raw_bibtex () ๐ฆ
Return raw BibTeX entry (if available).
๐ to_string ([options]) ๐
Returns a text of the BibTeX entry in BibTeX format. Options are a hash.
The return string is the entry reformated with lines indented by 4 spaces and the @entrytype uppercased. Example:
@BOOK{Knuth:TAOCP1,
author = {Knuth, Donald E.},
publisher = {Addison-Wesley},
title = {The Art of Computer Programming},
year = {1968},
url = {https://www-cs-faculty.stanford.edu/~knuth/taocp.html},
}
canonize_namesโ If true (the default), authors' and editors' names are translated into canonical bibtex form. The command$entry->to_string(canonize_names=>0)overrides this behavior.field_capitalizationโ Capitalization of the field names. Can take values'Uppercase','Lowercase'(the default) or'Titlecase'print_preโ False by default. If true, the text in the Bib file before the entry is printed. Note that at present we assume the text before the entry NEVER has the@symbol insidetype_capitalizationโ Capitalization of the type names. Can take values'Uppercase'(the default),'Lowercase'or'Titlecase'
๐ท๏ธ VERSION ๐ท๏ธ
version 1.95
๐ AUTHOR ๐
Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com> and Karl Berry <karl@freefriends.org>
๐ COPYRIGHT AND LICENSE ๐
Copyright 2013-2026 Gerhard Gossen, Boris Veytsman, Karl Berry
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
okay bestie, thatโs the whole page โ perl v5.40.1, 2026-06-26, and the BibTeX...::Entry(3pm) manual. bye and slay! ๐
โจ
๐ฆ where this page comes from
- ubuntu stonking: libbibtex-parser-perl 1.95+dfsg-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms