DlfAnalyser(3pm)

πŸ“¦ version 2.1.1, in arch rolling

πŸ’… Lire::DlfAnalyser β€” the base interface for ALL the DLF analysers (yes, all of them)

okay so this is from the DlfAnalyser(3pm) page in LogReport's Lire Documentation, and bestie, it's literally the blueprint every other DLF analyser has to follow. Let's get into it πŸŽ€


✨ NAME ✨

Lire::DlfAnalyser β€” the base interface for all DLF analysers. like, the mother of analysers. the blueprint. the vibe-setter πŸ‘‘


🌸 SYNOPSIS 🌸

use base qw/ Lire::DlfAnalyser /;

that's it. that's the whole synopsis. short and iconic, we love a minimal queen ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

So this package defines the interface that must be implemented by every single DLF Analyser out there. And here's the gag: all the methods defined in this package will throw a 'method not implemented' exception if you actually call them. Like, they're placeholders. abstract. they're giving "you have to do the work yourself, bestie" energy πŸ’€

And a lil tip: analysers that produce DLF records for an extended schema should probably use the simpler Lire::DlfCategoriser interface instead. no cap, it's just easier. 🫢


πŸ’– META INFORMATION METHODS πŸ’–

These methods are the ones that hand information about the DLF analysers over to the Lire framework. like a little info fairy handing over the deets 🧚

The Lire::DlfAnalyser interface extends the Lire::Plugin interface, so they (your analysers) absolutely must implement all the standard meta-information methods: name(), title() and description(). non-negotiable, fr fr πŸ’…

🌈 src_schema()

Returns the Dlf schema which is analysed by this analyser.

E.g. "www"

(like, the schema going IN 🌸)

⭐ dst_schema()

Returns the Dlf schema which is producted by this analyser.

E.g. "www-user_session"

(and yes, the original page says "producted" β€” we are preserving it character for character because that's the rule, and honestly? iconic word, no notes πŸ™ˆ)


πŸ”₯ IMPLEMENTATION METHOD πŸ”₯

This is where the analyser actually does its job. main character energy, honestly. it all happens using the analyse() method. πŸ‘‘

πŸ’œ analyse( $process, $config )

The $process parameter contains the Lire::DlfAnalyserProcess object which is controlling the conversion process.

The $config parameter contains configuration data that was specified in the AnalysisJob for that converter. And here's how you register configuration specification for your DlfAnalyser: you just need to define a configuration specification under the name analyser_name_properties. This should be either a RecordSpec or an ObjectSpec. that's the whole trick, iykyk πŸŽ€


πŸ“ SEE ALSO πŸ“

go read those too, they're literally right there and they're all connected πŸ’«


πŸ‘‘ AUTHOR πŸ‘‘

Francis J. Lacoste <flacoste@logreport.org>

the legend themselves πŸ’…


πŸŽ€ VERSION πŸŽ€

$Id: DlfAnalyser.pm,v 1.4 2006/07/23 13:16:28 vanbaal Exp $

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.

ok real talk for a sec bestie β€” that warranty disclaimer is not a joke, it's in ALL CAPS in the original and it means it: no warranty, no promises, use it at your own risk πŸ’€

and that's the whole page! πŸ¦‹ mwaaah, love you, go build an analyser πŸ’–

~ from the Lire 2.1.1 docs, dated 2025-09-28, page DlfAnalyser(3pm) β€” signed, sealed, slayed πŸ’…βœ¨

πŸ“¦ where this page comes from