DlfCategoriser(3pm)
π DlfCategoriser(3pm) β Lire::DlfCategoriser
okay bestie, welcome to Lire::DlfCategoriser, straight out of LogReport's Lire Documentation β¨ this is the base class for analysers that produce extended DLF records. it's giving "starter kit energy" and honestly? iconic for it π
πΈ NAME
Lire::DlfCategoriser β the base class for analysers which produce extended DLF records π¦
β¨ SYNOPSIS
like, here's the whole vibe in code, no cap:
use base qw/ Lire::DlfCategoriser /;
sub categorise {
my ( $self, $dlf ) = @_;
# Adds the extended field to DLF.
return;
}
π DESCRIPTION
so this package defines a base class you can use for Lire::DlfAnalyser when it writes to an ExtendedSchema π and here's the slay part: the categoriser only has to implement the categorise() method instead of the more generic analyse(). that's it. that's the whole job. lowkey the easiest inheritance of your life π
π§ META INFORMATION METHODS
your Lire::DlfCategoriser should implement the same meta-information methods as Lire::DlfAnalyser β no skipping, bestie, all of them:
name()src_schema()dst_schema()title()description()
π₯ IMPLEMENTATION METHODS
the categoriser does its whole thing using the initialise() and categorise() methods π«Ά
β analyse( $process, $config )
Lire::DlfCategoriser implements the analyse() method β it's already done for you, main character behaviour honestly π it will run the query on the src_schema() using the correct filter, then call categorise() on each DLF that comes back. the extended fields then get written to dst_schema() β¨ and errors? bestie, they should be reported by dying π
π initialise( $config )
this method is called before the categorise() method is called π
the $config parameter contains configuration data that was specified in the AnalysisJob for that analyser. to register configuration specification for your DlfCategoriser, you just need to define a configuration specification under the name analyser_name_properties β and that should be either a RecordSpec or ObjectSpec π¦
π categorise( $dlf )
called once for each DLF record that should be categorised πΈ the categoriser should add the extended fields directly to the $dlf hash reference. just... put them in there. go off π
π finalise( $config )
this method is called after all the DLF records were categorised β
the $config parameter contains configuration data that was specified in the AnalysisJob for that analyser. to register configuration specification for your DlfCategoriser, you just need to define a configuration specification under the name analyser_name_properties β and that should be either a RecordSpec or ObjectSpec π
ngl the default implementation does nothing. literally nothing. it's the "seen 2:47 AM" of methods π«
π SEE ALSO
go read these, bestie, iykyk:
π¦ AUTHOR
Francis J. Lacoste <flacoste@logreport.org> β shoutout to the icon who wrote this π
π VERSION
$Id: DlfCategoriser.pm,v 1.6 2006/07/23 13:16:28 vanbaal Exp $
π COPYRIGHT
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. 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.
and that's the whole page, bestie π«Ά this was Lire 2.1.1, dated 2025-09-28, and honestly it ate π β¨
π¦ 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