ReportConfig(3pm)
β¨ ReportConfig(3pm) β¨
okay bestie, so this is the LogReport's Lire Documentation page for Lire::ReportConfig, and honestly it's giving backstage-pass energy π β it's the API to the report configuration file, and you're gonna want it in your life.
π NAME π
Lire::ReportConfig β the API to the report configuration file, no cap π«Ά
β SYNOPSIS β
like, here's the whole vibe in code:
use Lire::ReportConfig;
my $templates = Lire::ReportConfig->templates();
if ( Lire::ReportConfig->has_template( 'www_default' ) ) {
my $report_cfg = Lire::ReportConfig->template( 'www_default' )->as_value();
my $report = $report_cfg->generate_report( $report );
}
π¦ DESCRIPTION π¦
so this class represents report configurations β literally that's its whole job, main character energy π. And how are report configurations stored? As an XML configuration, using the Lire::Report::ReportSpec configuration type. slay.
πΈ TEMPLATES πΈ
template reports are configuration specification files, and you'll find them sitting in the directories that the 'lr_templates_path' configuration variable points at. iykyk π
π templates()
returns an array reference with the names of all the defined templates. all of them. periodt.
π has_template( $name )
returns true if there's actually a template named $name available β a little vibe check for your templates β¨
π template( $name )
returns a Lire::Config::Object that defines the template ReportConfig named $name. and bestie, check this: its spec() method would return a Lire::Config::ReportSpec object, and its as_value() method would instantiate a Lire::ReportConfig object. obsessed π
π CONSTRUCTORS π
π§ new()
creates a new, totally empty Lire::ReportConfig object β fresh out the box π
the created report configuration object doesn't contain any section, report or filter specifications. like, nothing. blank slate. adorable.
π§ new_from_file( $superservice, $report_cfg )
this will create a new report configuration object for the $superservice superservice, based on the report configuration file $report_cfg. that's the whole thing, no notes π
π OBJECT METHODS π
π
filename( [ $new_filename ] )
returns (and optionally changes) the filename from which this ReportConfig was loaded. it will return undef if the ReportConfig wasn't loaded from a file. so if it's undef... yeah, no file, bestie π
π
title( [ $new_title ] )
returns (and optionally changes) the title that will be assigned to the report. cute little label, love that for you π·οΈ
π
schemas()
returns an array reference containing the name of the schemas used in this report. β¨
π
sections()
returns this report configuration's sections as an array of Lire::Section objects. very demure, very array.
π
add_section( $section )
adds a section to this report configuration. the $section parameter should be a Lire::ReportSection object β like, don't just throw anything in there, okay? π«Ά
π
merge_filters()
calling this method will make sure that all report specifications take into account their section's filter specification. teamwork!
β οΈ heads up: this method will modify all report specifications. after this, their object representation won't be identical to the one in the XML report specification. so yeah, it changes things β that's the whole point, but don't say I didn't warn you π
π
print( [$fh] )
prints the report configuration on the $fh filehandle. if you omit the $fh parameter, it'll be printed on STDOUT instead. easy π
π
create_report( $timespan_start, $timespan_end )
returns a Lire::Report object based on this report's configuration file. the $timespan_start and $timespan_end attributes will be used to initiate the Report object. β°
used when generating an XML report from a DLF source, and when merging XML reports. and the real job? delegated to Lire::ReportSection::create_report_section(). iconique delegation behavior π
π
create_analyser_streams( $store )
this method makes sure a DlfStream is available in the Lire::DlfStore $store for each schema used by this report configuration. the stream gets created by running the first analyser that's able to generate the schema using existing streams. π§
π
generate_report( $store )
generates a Lire::Report from this report configuration. the report is computed using the streams in the Lire::DlfStore $store. this is the moment, this is the main event π₯
π
merge_report_files( @report_files )
generates a new Lire::Report based on this report configuration by merging XML reports. every report spec contained in the configuration will be the result of merging all the subreports having the same id. matching ids unite π
π SEE ALSO π
βοΈ AUTHOR βοΈ
Francis J. Lacoste <flacoste@logreport.org> π
π VERSION π
$Id: ReportConfig.pm,v 1.38 2006/07/23 13:16:29 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. β¨
okay that's the whole page, bestie β go forth and configure those reports π β¨
π sign-off time: this was Lire 2.1.1, dated 2025-09-28, and the page is ReportConfig(3pm). mwah π
π¦ 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