Sum(3pm)
π Sum(3pm) β the Lire::Sum glow-up β¨
okay so bestie, welcome to Lire::Sum, a Perl module from LogReport's Lire documentation, and it is literally the class that implements the sum operator π
no cap.
use Lire::Sum
π¦ DESCRIPTION π¦
so what does this bad boy actually do? Lire::Sum is the class that implements the sum operator, and that operator computes the field's sum across a group of DLF records πΈ. that's the whole vibe.
and it gets better β you can compute a weighted sum, where each value gets multiplied by the value of another DLF field first π. it's giving β¨math but make it fashionβ¨.
also (and this is highkey the cute part), it's possible to express the count as a ratio of the total count for the group or table π«Ά.
π METHODS π
π new( %params )
creates a new Lire::Count object π yes, that's what the docs say, and we're not changing a single character of it. on top of the values supported by its parents, the weight and ratio attributes get initialized to whatever you passed in the %params argument. periodt.
π weight( [$new_weight] )
returns the DLF field's name that your values get multiplied by before being summed π«.
and you can totally change the weight field β just pass a new name as the $new_weight parameter. wanna remove the weighting field entirely? pass undef and it's gone, iconic π§.
π ratio([$new_ratio])
returns how the sum will be expressed. it can be one of three possible values, bestie:
noneβ the default π the absolute sum will be used.groupβ the sum will be expressed as a percentage of the group's sum.tableβ the sum will be expressed as a percentage of the table's total sum π₯.
π SEE ALSO π
go check these out, iykyk π
zLire::ReportSpec(3pm)Lire::ReportOperator(3pm)Lire::Aggregator(3pm)Lire::Aggregate(3pm)
π AUTHOR π
Francis J. Lacoste <flacoste@logreport.org> β absolute legend, we stan π«Ά
β VERSION β
$Id: Sum.pm,v 1.17 2008/03/09 19:27:31 vanbaal Exp $
π COPYRIGHT π
Copyright (C) 2001, 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.
real talk though β that warranty disclaimer is NOT a vibe, it's the actual legal text, so don't come for me π read it, it matters.
and that's the whole page, babe π¦ it's from Lire 2.1.1, dated 2025-09-28, and the manpage is Sum(3pm) π go forth and sum responsibly, 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