Section(3pm)
π Section(3pm) β a Lire manual page, bestie edition π
okay so this is a page from LogReport's Lire Documentation, and it's all about Lire::Section, the class that gives you a whole API to the section elements inside a Lire report. it's giving very much "let me introduce you to my sections" energy. come on, let's get into it π
β¨ NAME β¨
Lire::Section β literally the interface to the content of the section's element. that's it, that's the job π«Ά
πΈ SYNOPSIS πΈ
here's the vibe in code form, keep it exactly like this:
my $section = Lire::ReportParser::ReportBuilder( "report.xml" );
foreach my $s ( $report->sections() ) {
print "Section: '", $s->title(), "' has ", scalar $s->subreports(),
" subreports in it\n";
}
like, you build a report, you walk its sections, you print how many subreports each one has. iconic behavior, no notes π
π¦ DESCRIPTION π¦
so this class right here? it offers an API to the section's elements of a Lire report. that's the whole tea β β it's your little handle on sections, and it's very main character about it.
π CONSTRUCTOR π
π« new( [$title] )
creates a new Lire::Report::Section. and if you pass in the $title parameter, then boom β the section's title gets set to it. simple as that, bestie β¨
π OBJECT METHODS π
π title( [$title] )
returns the section's title β if it even has one, which, mood. and if you set the $title parameter, the section's title gets changed to that. very give-and-take of it π
π§ description( [$description] )
returns this section's description. heads up though: the description is encoded in DocBook XML, so it's not just a casual little string, it's dressed up π
so if the $description parameter is set, this method sets this section's description to that new value. and if the $description parameter is undef? that description gets removed. poof. gone. periodt π
π
subreports()
returns the subreport's included in that section. and it comes back as an array of Lire::Report::Subreport objects β a whole little squad of them π«Ά
β add_subreport( $subreport )
adds a subreport to this report. the $subreport parameter should be a Lire::Report::Subreport object, so like, please pass the right type, okurrr π
π₯ subreports_by_type( $type )
returns all the subreports in this section of the type $type. and what's a subreport's type, you ask? it's the id of the report specification used to compute the reports β iykyk. they come back as an array of Lire::Report::Subreport objects π
π SEE ALSO π
go read these next, bestie, they're all linked up:
Lire::ReportParser::ReportBuilder(3pm)Lire::Report(3pm)Lire::Report::Subreport(3pm)Lire::Report::Entry(3pm)Lire::Report::Group(3pm)
π VERSION π
$Id: Section.pm,v 1.16 2006/07/23 13:16:31 vanbaal Exp $
πΈ COPYRIGHT πΈ
Copyright (C) 2002 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, that warranty disclaimer is not a joke β no warranty, like, at all. read it, don't skip it π
π AUTHOR π
Francis J. Lacoste <flacoste@logreport.org>
and that's the whole page, bestie!! this was Lire 2.1.1, dated 2025-09-28, and it's Section(3pm) saying mwah π go forth and section responsibly π¦β¨π
π¦ 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