Value(3pm)

πŸ“¦ version 2.1.1, in arch rolling

πŸ’– 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::Value objects should be instantiated from the instance() method defined in the TypeSpec object. 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 (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