Catman...BibTeX(3pm)
π Catmandu::Importer::BibTeX β a BibTeX importer π
okay bestie, so this is the page for Catmandu::Importer::BibTeX, living in the 3pm section of the manual (perl gang represent πΈ). It's the little importer that goes "bib file? say less" and hands you back nice lil hashrefs. Let's get into it β¨
π SYNOPSIS
use Catmandu::Importer::BibTeX;
my $importer = Catmandu::Importer::BibTeX->new(file => "/foo/bar.bib");
my $n = $importer->each(sub {
my $hashref = $_[0];
# ...
});
like. look at her. four lines and she's already eating π₯ you use her, you build her with a file pointing at your .bib, and then you each over everything and do whatever your heart desires with each $hashref. the $n catches how many you went through. iconic behavior tbh π
π¦ DESCRIPTION
so here's the tea, and it's short but important: when this importer slurps up your BibTeX, the citekey and the reference type don't get shoved in like regular fields β nope β they land in their own special little spots:
- the citekey comes in as the field
_citekeyπ - the reference type comes in as the field
_typeπ
respectively, obviously. that leading underscore is doing heavy lifting β it's the "this came from the outside, not from the entry body" signal, iykyk π
π§ METHODS
all the methods from Catmandu::Importer are inherited here β and by extension, every method from Catmandu::Iterable too, since Catmandu::Importer is that girl's child. so you're not just getting this importer, you're getting the whole family tree, no cap π³
fr fr: nothing extra is added on top, it's all inheritance, so go read those two if you want the full menu. this page is not the place to reinvent each, bestie π
πΈ SEE ALSO
Catmandu::Exporter::BibTeXβ the mirror twin, the one who writes BibTeX instead of reading it πͺBibTeX::Parserβ the parser doing the actual heavy lifting under the hood πͺ
and that's the whole vibe check, bestie β go import something cute π
this page came to you courtesy of perl v5.36.0, dated 2023-02-02, from the Catman...BibTeX(3pm) manual. mwah, take care of her π«Ά
π¦ where this page comes from
- debian bookworm: libcatmandu-bibtex-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-bibtex-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-bibtex-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-bibtex-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-bibtex-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms