Parser(3pm)
β¨ 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):
Lire::Config::ConfigFile(3pm)Lire::Config::SpecParser(3pm)Lire::Config::ConfigSpec(3pm)
π§ 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 π
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
- 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