Lire::Count3pm
Lire class that implements the count operator
Usage
use Lire::Count
Overview
Class that implements the count operator. This operator counts the number of DLF records in the current group.
If the fields attribute is set, the count statistics will be equals to the number of different values present in the fields specified by that attribute.
Its also 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. 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.
fields( [$new_fields] )
Returns the fields for which we are counting the different values. This 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.
ratio([$new_ratio])
Returns how the count will be expressed. This can 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. |
Version
$Id: Count.pm,v 1.16 2008/03/09 19:27:31 vanbaal Exp $
Releases
6 releases since Debian 3.1 (Sarge); the text changed 5 times.