Count(3pm)

πŸ“¦ version 2.1.1, in arch rolling

πŸ’– NAME πŸ’–

Hey bestie, welcome to Count(3pm) from LogReport's Lire Documentation! This page is all about Lire::Count β€” the Lire class that implements the count operator. Periodt. πŸ‘‘

✨ SYNOPSIS ✨

use Lire::Count

🌸 DESCRIPTION 🌸

Okay so this class implements the count operator, and what it does is literally count the number of DLF records in the current group. Obsessed with the efficiency.

If the fields attribute is set, the count statistics will be equal to the number of different values present in the fields specified by that attribute.

It's also possible to express the count as a ratio of the total count for the group or table. Flexible icon behavior, honestly. πŸ’…

πŸŽ€ METHODS πŸŽ€

🫢 new( %params ) 🫢

Creates a new Lire::Count object. In addition to the values supported by its parents, the fields and ratio attributes will be initialized to the values specified in the %params argument. Main character constructor energy.

πŸ¦‹ fields( [$new_fields] ) πŸ¦‹

Returns the fields for which we are counting the different values. This is a reference to an array of DLF field names.

If the $new_fields parameter is set, it will be used as the new $fields value. It must be an array reference and should only contains valid field names for the current report specification's schema. (Yes bestie, valid field names only β€” we do not do chaos here. πŸ’€)

🌈 ratio([$new_ratio]) 🌈

Returns how the count will be expressed. This can be one of three possible values:

  • none β€” Default. The absolute count will be used.
  • group β€” The count will be expressed as a percentage of the group's count.
  • table β€” The count will be expressed as a percentage of the table's total count.

πŸ’œ SEE ALSO πŸ’œ

Go hang with Lire::ReportSpec(3pm), Lire::ReportOperator(3pm), Lire::Aggregator(3pm), and Lire::Aggregate(3pm). The whole squad is there. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Francis J. Lacoste β€” <flacoste@logreport.org>

⭐ VERSION ⭐

$Id: Count.pm,v 1.16 2008/03/09 19:27:31 vanbaal Exp $

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.


πŸ’– That's the whole page, bestie! This one's from Lire 2.1.1, dated 2025-09-28 β€” slay and stay cozy. πŸ’–

πŸ“¦ where this page comes from