Section(3pm)

πŸ“¦ version 2.1.1, in arch rolling

πŸŽ€ 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:


πŸ’œ VERSION πŸ’œ

$Id: Section.pm,v 1.16 2006/07/23 13:16:31 vanbaal Exp $

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