XMLSpecListSpec(3pm)

πŸ“¦ version 2.1.1, in arch rolling

πŸ’… XMLSpecListSpec(3pm) β€” the vibes are very Lire::Config, bestie

okay so real quick, this is a page from LogReport's Lire Documentation (yes, that Lire β€” the 3pm perl module situation). Buckle up, it's a short one but it's lowkey iconic πŸŽ€


✨ NAME ✨

Lire::Config::XMLSpecListSpec β€” literally just a list of XML specifications. that's it. that's the whole vibe. 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

So Lire::Config::TypeSpec already has a thing called ListSpec, right? Well this class? This class defines a special kind of ListSpec. Not like other girls πŸ’…

The way it works: it overrides the has_component(), get(), component_names() and components() methods so that every XML report specification or filter specification is available. And the gag is β€” these specifications are created dynamically at runtime. not pre-baked, not sitting in a config file somewhere. born fresh, main character energy ✨

πŸŽ€ new( 'name' => $name, 'type' => 'filters'|'reports )

Creates a new Lire::Config::XMLSpecListSpec object which will contain a list of report or filter specifications configuration. 🫢

The type parameter is what decides whether a Lire::ReportSpec or a Lire::FilterSpec will be created β€” so like, pick your fighter. (yes the original docs spell it "creatd", we're all doing our best here 😭)

new( 'name' => $name, 'type' => 'filters'|'reports )

🧚 type()

Returns the type of specification contained by this object. literally just tells you what's inside. no cap. ⭐

πŸ’œ has_component( $name )

This spec returns true when $name is of the form superservice:id β€” and only if there's actually an available id specification defined in superservice. πŸ’–

Otherwise? It returns false. Sorry bestie, that's the whole rule. πŸ™ˆ

🌈 component_names()

Returns an array containing the configuration name of all available specifications. every single one. the whole roster. πŸ‘‘

πŸ”₯ get( $name )

Returns an Lire::Config::ObjectSpec specification for the component named $name.

And this ObjectSpec is the one that will instantiate a Lire::ReportSpec or a Lire::FilterSpec of the appropriate type. so it's giving "middle management but make it useful" πŸ’€

🌟 components()

Returns an array containing all the Lire::Config::ObjectSpec defining the available specifications. yes, all of them. glutinous. we love to see it. πŸ“


πŸ‘€ SEE ALSO πŸ‘€

go read those too, iykyk πŸ¦‹


πŸ“Œ VERSION πŸ“Œ

$Id: XMLSpecListSpec.pm,v 1.8 2006/07/23 13:16:31 vanbaal Exp $

πŸ’Œ AUTHOR πŸ’Œ

Francis J. Lacoste <flacoste@logreport.org> β€” thank you for your service, king 🫢


Copyright (C) 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. Please see the GNU General Public License for more details. ⚠️ (like fr fr, no promises, read the license)

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. πŸŽ€


okay and that's the whole page!! this was Lire 2.1.1, dated 2025-09-28 β€” periodt, we're done here πŸ’…βœ¨ πŸ¦‹

πŸ“¦ where this page comes from