Parser(3pm)

πŸ“¦ version 2.1.1, in arch rolling

✨ NAME ✨

ok so this is Parser(3pm) from LogReport's Lire documentation, and it's literally the glow-up machine for your config files πŸ’… β€” Lire::Config::Parser creates a Lire::Config::ConfigFile object out of XML. yep, XML in, fancy object out. slay.


πŸŽ€ SYNOPSIS πŸŽ€

bestie, here's the whole vibe:

use Lire::Config;
use Lire::Config::Parser;

my $parser = new Lire::Config::Parser( 'spec' => Lire::Config->config_spec());
my $conf = $parser->parsefile( 'config.xml' );

like… make the parser, feed it the file, get the config. that's it. iconic.


🌸 DESCRIPTION 🌸

okay so it's a "rather straightforward" XML parser β€” the docs said it, not me β€” and what it does is follow the configuration specification to parse an XML file. no cap, it's exactly that: spec goes in, parser reads XML according to that spec, good things come out πŸ¦‹

πŸ’– new( 'spec' => $spec )

Creates a parser object ✨ and this parser is gonna parse configuration files that validate against the Lire::Config::ConfigSpec specification $spec. so like, the spec is the rules and the parser is the girl who actually reads them. main character energy fr fr.

🫢 load_config_file( $file )

Parses the $file XML file and returns a Lire::Config::ConfigFile object representing it. that's the whole trick β€” you hand it a filename, it hands you back the object version of that file. obsessed 😭


πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, iykwup (iykwyp? iykyk):


🧚 AUTHORS 🧚

the legends who made this happen, periodt:

  • Wessel Dankers <wsl@logreport.org>
  • Francis J. Lacoste <flacoste@logreport.org>

⭐ VERSION ⭐

here's the exact version string, no edits, keep it cute:

$Id: Parser.pm,v 1.49 2006/07/23 13:16:30 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.

⚠️ bestie pls actually read that warranty bit β€” it's all caps for a reason. no warranty, no promises, that's the deal πŸ’€

ok that's the whole page!! πŸ’œ this was Parser(3pm) from Lire 2.1.1, dated 2025-09-28 β€” go forth and parse, you've got this πŸ“βœ¨

πŸ“¦ where this page comes from