Value(3pm)
π Value(3pm) π
okay so bestie, welcome to the Value(3pm) page β straight out of LogReport's Lire Documentation, and honestly? it's giving foundational. it's giving "everything else is built on me." let's get into it π«Ά
β¨ NAME β¨
Lire::Config::Value β Lire value containers for configuration variables. that's the whole vibe: it holds your config values. iconic behaviour, no notes π
πΈ SYNOPSIS πΈ
use base qw/ Lire::Config::Value /;
that's literally it. one line. inherit from it and you're in the club π
π¦ DESCRIPTION π¦
these are the Value containers for configuration variables β the little treasure chests that hold what each config variable is set to π
and here's the tea: this class is abstract. it's the superclass for all the other Lire::Config::Value classes. so you don't really use it directly, you let its children do the work. main character energy, but a generous main character π
β new( ['spec' => $spec], ... )
this is the constructor for the value object, okay?
π important though:Lire::Config::Valueobjects should be instantiated from theinstance()method defined in theTypeSpecobject. not by hand. let the TypeSpec do it, bestie, it knows what it's doing.
β name()
returns this configuration parameter's name. simple, clean, slay β¨
β spec()
returns the specification for this parameter. the spec is like the blueprint, and this hands it right back to you π
β summary()
returns the specification's summary for this value. the short version π«
β description()
returns the specification's description for this value. the long version πΈ
β text_description()
returns the specification's description, but formatted in plain text for this value. for when you want it readable and un-fancy, ngl π«Ά
β as_value()
returns this value as a perl native value π₯
the way this works: it'll be either a scalar value, or a hash or array reference. and the values it returns should be normalized β keep that in mind, no cap.
β as_label()
returns the label of this object, for displaying in GUIs. it's the pretty face for the interface π
β as_shell_var()
returns this configuration variable's value in a form that can be evaled in a shell script. shell-friendly, iykyk π
β clone()
returns a deep_copie'd value of this instance π the reference to the spec is kept but is not copied. so: fresh value, same spec. periodt.
β is_equals( $param )
returns whether the $param instance is identifcal to this one. yes bestie, that's literally how it's spelled in the original and i'm not touching it π either it matches or it doesn't.
β is_valid()
checks that the current value is valid according to the specification. the vibe check, but for config values β
β is_default()
returns true if this value is equals to its specification's default. like, is this thing just the out-of-the-box setting? π
β save_xml( $fh )
writes an XML configuration of the variable recursively on $fh. all of it, nested and everything, straight to your filehandle π¦
π AUTHORS π
the absolute legends who made this happen:
Wessel Dankers <wsl@logreport.org>Francis J. Lacoste <flacoste@logreport.org>Wolfgang Sourdeau <wolfgang@logreport.org>
π VERSION π
$Id: Value.pm,v 1.18 2008/03/09 19:27:31 vanbaal Exp $
π COPYRIGHT π
Copyright (C) 2002-2004 Stichting LogReport Foundation LogReport@LogReport.org
This file is part of Lire.
Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
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. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html.
π real talk: that warranty disclaimer is not a joke, bestie β it's genuinely "no promises, use at your own risk." read it, respect it.
and that's the whole page, bestie π§π« this was Lire 2.1.1, dated 2025-09-28, and the page itself is Value(3pm) β go forth and container-ize your values, mwah ππΈ
π¦ where this page comes from
- arch rolling: lire 2.1.1-8 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms