Config...kOrder(3pm)
β¨ NAME β¨
Config::Model::BackendTrackOrder β tracking the read order of elements from config, bestie π
(Also, hello, you're reading a User Contributed Perl Documentation page, and the manual it lives in is Config...kOrder(3pm) β yes the truncation is giving mystery novel, iykyk.)
πΈ VERSION πΈ
version 2.166
π¦ SYNOPSIS π¦
# inside a backend
use Config::Model::BackendTrackOrder;
has tracker => (
is => 'ro',
isa => 'Config::Model::BackendTrackOrder',
lazy_build => 1,
);
sub _build_tracker {
my $self = shift;
return Config::Model::BackendTrackOrder->new(
backend_obj => $self,
node => $self->node,
) ;
}
# register elements to record user order
$self->tracker->register_element('foo');
$self->tracker->register_element('bar');
# later, when writing data back
foreach my $elt ( $self->tracker->get_ordered_element_names ) {
# write data
}
π DESCRIPTION π
okay so here's the tea β β backends use this module to record the order of the configuration elements they found in the user's file. Then, later on, those elements can be written back into the file in that exact same order. Preservation, main character energy π
But! There's a plot twist. Data gets written in canonical order if the canonical method of the Config::Model::Instance in instance returns true.
π CONSTRUCTOR π
The constructor (the original page literally types it as "THe", no cap, we're leaving that as a vibe π) accepts these parameters:
backend_objβ the backend object holding this tracker. Required, bestie. You can't skip it.nodeβ the node holding the backend above.
π METHODS π
π register_element
Registers the element, and keeps track of the registration order during the initial load.
Elements registered after the initial load β i.e. user modification β get registered using canonical order.
π§ get_ordered_element_names
Returns a list of elements respecting the user's order. Respect the order, respect the user. π
Returns the canonical list if the Instance canonical attribute is 1.
π AUTHOR π
Dominique Dumont
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2005-2022 by Dominique Dumont.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
and that's the whole page, we ate and left no crumbs π«Άπ½
sign-off time: this was perl v5.42.3, dated 2026-07-23, and the page name got truncated to Config...kOrder(3pm) because apparently the manual page title also needed a dramatic little mystery. slay π
β¨
π¦ where this page comes from
- ubuntu stonking: libconfig-model-perl 2.166-1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms