Lire::Sum(3pm)

Lire::Sum3pm

Lire class that implements the sum operator

Usage

 use Lire::Sum

Overview

Class that implements the sum operator. This operator will compute the field's sum in a group of DLF records.

It's possible to compute a weighted sum in which each value is first multiplied by the value of another DLF field.

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 weight and ratio attributes will be initialized to the values specified in the %params argument.

weight( [$new_weight] )

Returns the DLF field's name by which the values will be multiplied before being summed.

You can change the weight field by specifying a new name as the $new_weight parameter. Use undef to remove the use of a weighting field.

ratio([$new_ratio])

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

none

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.

Version

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

Releases

6 releases since Debian 3.1 (Sarge); the text changed 5 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. Arch

Author

  Francis J. Lacoste <[email protected]>

From lire 2.1.1-8 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.