Biber(3pm)

Biber(3pm) ๐Ÿ’–

User Contributed Perl Documentation โ€” ok bestie, this is the main module for biber, a bibtex replacement for users of biblatex. It's giving part 1 of 2, and more parts follow, so don't go anywhere. ๐Ÿซถ


โœจ NAME โœจ

Biber โ€” main module for biber, a bibtex replacement for users of biblatex.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

use Biber;
my $biber = Biber->new();
$biber->parse_ctrlfile("example.bcf");
$biber->prepare;

๐Ÿ‘‘ METHODS ๐Ÿ‘‘

new โœจ

Initializes the Biber object, optionally passing named options as arguments. Slay.

display_end ๐Ÿ’…

Outputs a summary of warnings/errors/misc before exit.

biber_tempdir ๐ŸŽ€

Returns a File::Temp directory object for use in various things.

biber_tempdir_name ๐Ÿฆ‹

Returns the directory name of that File::Temp directory object.

sections ๐Ÿ’–

my $sections= $biber->sections

Returns a Biber::Sections object describing the bibliography sections.

add_sections ๐ŸŒˆ

Adds a Biber::Sections object. Used externally from, e.g. biber.

datalists ๐Ÿ’œ

my $datalists = $biber->datalists

Returns a Biber::DataLists object describing the bibliography sorting lists.

langtags โญ

Returns a Biber::LangTags object containing a parser for BCP47 tags.

set_output_obj ๐Ÿ‘‘

Sets the object used to output final results. Heads up: it must be a subclass of Biber::Output::base.

get_preamble ๐Ÿงš

Returns the current preamble as an array ref.

get_output_obj ๐Ÿ”ฅ

Returns the object used to output final results.

set_current_section ๐Ÿ’ซ

Sets the current section number that we are working on to a section number.

get_current_section ๐ŸŒŸ

Gets the current section number that we are working on.

tool_mode_setup ๐Ÿ› ๏ธ

Fakes parts of the control file for tool mode.

parse_ctrlfile ๐Ÿ“„

This method reads the control file generated by biblatex to work out the various biblatex options. See Constants.pm for defaults and an example of the data structure being built here.

process_setup โš™๏ธ

Place to put misc pre-processing things needed later.

process_setup_tool ๐Ÿ”ง

Place to put misc pre-processing things needed later for tool mode.

resolve_alias_refs ๐Ÿ”—

Resolve aliases in xref/crossref/xdata which take keys as values to their real keys.

We use set_datafield as we are overriding the alias in the datasource.

process_citekey_aliases ๐Ÿ’€

Removes citekey aliases from citekeys, because they don't point to real entries. Bye.

instantiate_dynamic ๐ŸŒ€

This instantiates any dynamic entries so they're available for processing later on. It has to be done before most all other processing so that when we call $section->bibentry($key), as we do many times in the code, we don't die because there's a key but no Entry object. Fr fr, it's a lifesaver.

resolve_xdata ๐Ÿงฉ

Resolves xdata.

cite_setmembers ๐Ÿ“ฃ

Promotes set member to cited status.

preprocess_sets ๐Ÿงบ

$biber->preprocess_sets

This records the set information for use later.

calculate_interentry ๐Ÿ”

$biber->calculate_interentry

Ensures that crossrefs/xrefs that are directly cited or cross-referenced at least mincrossrefs/minxrefs times are included in the bibliography.

process_interentry ๐Ÿ”„

$biber->process_interentry

Ensures proper inheritance of data from cross-references.

validate_datamodel โœ…

Validate bib data according to a datamodel. Note that we're validating the internal Biber::Entries after they've been created from the datasources, so this is datasource neutral, as it should be. It's here to enforce adherence to what biblatex expects.

process_namedis ๐Ÿท๏ธ

Generates name strings and disambiguation schema. It has to be in the context of a data list (reference context) because uniquenametemplate can be specified per-list/context.

postprocess_sets ๐Ÿ“ฆ

Adds required per-entry options etc. to sets.

process_entries_static ๐Ÿงฑ

Processing of entries which is not list-specific and which can therefore insert data directly into entries.

process_entries_pre ๐Ÿš€

Main processing operations, to generate metadata and entry information. This method is automatically called by prepare. Runs prior to uniqueness processing.

process_entries_post ๐Ÿ

More processing operations, to generate things which require uniqueness information like namehash. Runs after uniqueness processing.

process_entries_final ๐ŸŽฌ

Final processing operations which depend on all previous processing.

process_uniqueprimaryauthor ๐Ÿ‘ค

Track seen primary author base names for generation of uniqueprimaryauthor.

process_workuniqueness ๐Ÿ“š

Track seen work combination for generation of singletitle, uniquetitle, uniquebaretitle and uniquework.

process_extradate ๐Ÿ“…

Track labelname/labeltitle+date parts combination for generation of extradate.

process_extraname ๐Ÿชช

Track labelname only for generation of extraname.

process_extratitle ๐Ÿ“–

Track labelname/labeltitle combination for generation of extratitle.

process_extratitleyear ๐Ÿ—“๏ธ

Track labeltitle/labelyear combination for generation of extratitleyear.

process_sets ๐Ÿงฉ

Postprocess set entries.

Checks for common set errors and enforces dataonly options for set members. It's not necessary to set skipbib, skipbiblist in the OPTIONS field for the set members as these are automatically set by biblatex due to the \inset.

process_nocite ๐Ÿšซ

Generate nocite information.

process_labelname ๐Ÿท๏ธ

Generate labelname information.

process_labeldate โณ

Generate labeldate information, including times.

process_labeltitle ๐ŸŽ€

Generate labeltitle.

Note that this is not conditionalised on the biblatex labeltitle as labeltitle should always be output since all standard styles need it. Only extratitle is conditionalised on the biblatex labeltitle option.

process_fullhash ๐Ÿ”

Generate fullhash.

process_namehash ๐Ÿงฌ

Generate namehash.

process_pername_hashes ๐Ÿงฎ

Generate per_name_hashes.

process_visible_names ๐Ÿ‘€

Generate the visible name information. This is used in various places and it is useful to have it generated in one place.

process_labelalpha ๐Ÿ”ค

Generate the labelalpha and also the variant for sorting.

process_extraalpha ๐Ÿ” 

Generate the extraalpha information.

process_presort ๐Ÿ“Š

Put presort fields for an entry into the main Biber bltx state so that it is all available in the same place since this can be set per-type and globally too.

process_lists ๐Ÿ“

Process a bibliography list.

check_list_filter ๐Ÿ•ต๏ธ

Run an entry through a list filter. Returns a boolean.

generate_sortdataschema ๐Ÿ—‚๏ธ

Generate sort data schema for Sort::Key from sort spec like this:

         spec   => [
                     [undef, { presort => {} }],
                     [{ final => 1 }, { sortkey => {} }],
                     [
                       {'sort_direction'  => 'descending'},
                       { sortname => {} },
                       { author => {} },
                       { editor => {} },
                       { translator => {} },
                       { sorttitle => {} },
                       { title => {} },
                     ],
                     [undef, { sortyear => {} }, { year => {} }],
                     [undef, { sorttitle => {} }, { title => {} }],
                     [undef, { volume => {} }, { "0000" => {} }],
                   ],

generate_sortinfo ๐Ÿ”ข

Generate information for sorting.

uniqueness ๐ŸŒŸ

Generate the uniqueness information needed when creating .bbl.

create_uniquename_info ๐Ÿงš

Gather the uniquename information as we look through the names.

So here's what's happening in here, bestie: we're registering the number of occurrences of each name, name+init and fullname within a specific context. For example, the context is "global" with uniquename < mininit and "name list" for uniquename=mininit or minfull. The keys we store to count this are the most specific information for the context, so, for uniquename < mininit, this is the full name and for uniquename=mininit or minfull, this is the complete list of full names. These keys have values in a hash which are ignored. They serve only to accumulate repeated occurrences with the context and we don't care about this and so the values are a useful sinkhole for such repetition.

For example, if we find in the global context a base name "Smith" in two different entries under the same form "Alan Smith", the data structure will look like:

{Smith}->{global}->{Alan Smith} = 2

We don't care about the value as this means that there are 2 "Alan Smith"s in the global context which need disambiguating identically anyway. So, we just count the keys for the base name "Smith" in the global context to see how ambiguous the base name itself is. This would be "1" and so "Alan Smith" would get uniquename=false because it's unambiguous as just "Smith".

The same goes for "minimal" list context disambiguation for uniquename=mininit or minfull. For example, if we had the base name "Smith" to disambiguate in two entries with labelname "John Smith and Alan Jones", the data structure would look like:

{Smith}->{Smith+Jones}->{John Smith+Alan Jones} = 2

Again, counting the keys of the context for the base name gives us "1" which means we have uniquename=false for "John Smith" in both entries because it's the same list. This also works for repeated names in the same list "John Smith and Bert Smith". Disambiguating "Smith" in this:

{Smith}->{Smith+Smith}->{John Smith+Bert Smith} = 2

So both "John Smith" and "Bert Smith" in this entry get uniquename=false (of course, as long as there are no other "X Smith and Y Smith" entries where X != "John" or Y != "Bert").

The values from biblatex.sty:

false   = 0
init    = 1
true    = 2
full    = 2
allinit = 3
allfull = 4
mininit = 5
minfull = 6

generate_uniquename ๐Ÿ’–

Generate the per-name uniquename values using the information harvested by create_uniquename_info().

create_uniquelist_info ๐ŸŽ€

Gather the uniquelist information as we look through the names.

generate_uniquelist ๐Ÿฆ‹

Generate the per-namelist uniquelist values using the information harvested by create_uniquelist_info().

generate_contextdata ๐ŸŒˆ

Generate information for data which may changes per datalist.

generate_singletitle ๐Ÿ‘‘

Generate the singletitle field, if requested. The information for generating this is gathered in process_workuniqueness().

generate_uniquetitle โญ

Generate the uniquetitle field, if requested. The information for generating this is gathered in process_workuniqueness().

generate_uniquebaretitle ๐Ÿ’œ

Generate the uniquebaretitle field, if requested. The information for generating this is gathered in process_workuniqueness().

generate_uniquework ๐Ÿ”ฅ

Generate the uniquework field, if requested. The information for generating this is gathered in process_workuniqueness().

  • generate_uniquepa โ€” okay so this one generates the uniqueprimaryauthor field, but only if you requested it ๐Ÿ’…. The info it needs for that is all gathered up in create_uniquename_info().
  • sort_list โ€” sorts a list using the info in entries according to some sorting template. There's a flag you can use to skip the info messages on the first pass, so you don't get spammed ๐ŸŒธ.
  • preprocess_options โ€” the pre-game for options. It's mainly for doing the process-heavy stuff once and for all, instead of inside dense loops later. Lowkey genius โœจ.
  • prepare โ€” main character energy right here. It does the main work: processes and sorts every single entry before writing the output. Periodt ๐Ÿ‘‘.
  • prepare_tool โ€” same main-work vibe but for tool mode ๐Ÿ› ๏ธ.
  • fetch_data โ€” fetches citekey and dependents data from section datasources. It expects to find datasource packages named:

Biber::Input::<type>::<datatype>

and one defined subroutine called:

Biber::Input::<type>::<datatype>::extract_entries

which takes these args:

  1. Biber object
  2. Datasource name
  3. Reference to an array of cite keys to look for

and it returns an array of the cite keys it did not find in the datasource. Not me being thorough ๐Ÿ’€.

  • get_dependents โ€” gets the dependents of the entries for a given list of citekeys. It calls itself recursively until there are no more dependents to look for. Recursion bestie, it's giving infinite vibes but it stops, promise ๐ŸŒ€.
  • remove_undef_dependent โ€” removes undefined dependent keys from an entry, using a map of dependent keys to entries. Cleanup crew ๐Ÿงน.
  • _parse_sort โ€” a convenience sub that parses a .bcf sorting section and returns a nice sorting object. So handy ๐ŸŽ€.
  • _filedump and _stringdump โ€” these dump the biber object with Data::Dump for debugging. When you need to see everything, they got you ๐Ÿ”.

โœจ AUTHORS โœจ

Philip Kime "<philip at kime.org.uk>" ๐Ÿ’Œ


๐Ÿ› BUGS ๐Ÿ›

If something's bugging you (literally), or you want a new feature, slide into our Github tracker at <https://github.com/plk/biber/issues> โ€” we don't bite ๐Ÿซถ.


Okay so legally: Copyright 2009-2012 Franรงois Charette and Philip Kime, all rights reserved. Copyright 2012-2026 Philip Kime, all rights reserved.

This module is free software โ€” you can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. No cap, that's the legal tea โ˜•.


Catch you later bestie! This page is from perl v5.42.3, dated 2026-08-14, and it's the Biber(3pm) manual. Stay iconic ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from