Text::...lidate(3pm)
π Text::BibTeX::Validate π
okay bestie, so this is a User Contributed Perl Documentation page for Text::BibTeX::Validate, which is literally the validator for the BibTeX format. no cap. π
β¨ NAME β¨
Text::BibTeX::Validate β validator for BibTeX format. she checks things. that's the whole job. π
πΈ SYNOPSIS πΈ
use Text::BibTeX;
use Text::BibTeX::Validate qw( validate_BibTeX );
my $bibfile = Text::BibTeX::File->new( 'bibliography.bib' );
while( my $entry = Text::BibTeX::Entry->new( $bibfile ) ) {
for my $warning (validate_BibTeX( $entry )) {
print STDERR "$warning\n";
}
}
like. look at her go. π¦
π« DESCRIPTION π«
so Text::BibTeX::Validate checks the standard fields of BibTeX entries for their compliance with their format. that's the vibe. π«Ά
the way that value of email gets checked against RFC 822 mandated email address syntax? iconic. and value of doi is checked to start with 10. and contain at least one / and so on. β¨
some nonstandard fields like isbn, issn and url are also checked, because she's thorough like that. π
failures of checks are returned as instances of Text::BibTeX::Validate::Warning. not me being obsessed with structured error objects honestly π
π METHODS π
π validate_BibTeX( $what )
takes a plain Perl hash reference containing BibTeX fields and their values, as well as Text::BibTeX::Entry instances, and returns an array of validation messages as instances of Text::BibTeX::Validate::Warning. so you hand her your stuff and she hands you back a lil array of warnings. slay. π
πΈ clean_BibTeX( $what )
takes the same input as "validate_BibTeX" and attempts to reconcile trivial issues like dropping the resolver URL part of DOIs (see "shorten_DOI" method) and converting month numbers into three-letter abbreviations. lowkey a glow-up service for your bibliography. π§
β shorten_DOI( $doi )
remove the resolver URL part, as well as "doi:" prefixes, from DOIs. that's it, that's the whole method, and honestly? she ate. π
π AUTHORS π
Andrius Merkys, <merkys@cpan.org> π
bestie quick vibe check: this page is from perl v5.32.1, dated 2021-02-28, and it's the User Contributed Perl Documentation edition of Text::...lidate(3pm). periodt. π
π¦ where this page comes from
- debian bookworm: libtext-bibtex-validate-perl 0.3.0-1 Β· BSD-3-Clause
- debian trixie: libtext-bibtex-validate-perl 0.3.0-1 Β· BSD-3-Clause
- ubuntu jammy: libtext-bibtex-validate-perl 0.3.0-1 Β· BSD-3-Clause
- ubuntu noble: libtext-bibtex-validate-perl 0.3.0-1 Β· BSD-3-Clause
- ubuntu resolute: libtext-bibtex-validate-perl 0.3.0-1 Β· BSD-3-Clause
- ubuntu stonking: libtext-bibtex-validate-perl 0.3.0-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms