Piotr Kaluski > LRpt > LRpt::CollUnkeyed

Download:
LRpt_0.16.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

LRpt::CollUnkeyed - Object of this class represents a collection of unkeyed rows

DESCRIPTION ^

This class is a part of LRpt library. Object of this class represents a collection of unkeyed rows. Unkeyed means that there is no key specified for these rows. This collection is used for Expected-Actual comparison. Sometimes a key of the exected row is not known or diffucult to predict (if this is a unique ID automaticaly generated by the server).

METHODS ^

new

  my $uk_coll = LRpt::CollUnkeyed->new();

Constructor. Initializes fields.

add_row

  $uk_coll->add_row( $row );

Adds a row to a group. A group contains all rows, which have have same amount of fields defined. Each group is devided on groups of rows having the same values of all defined columns.

add_to_group

  $uk_coll->add_to_group( $row );

It increases the number of equal rows (the same amount of fields, all fields have the same values).

is_equal

  my $res = $uk_coll->is_equal( $row1, $row2 );

Checks that $row1 and $row2 are totally equal - the same amount of fields, all fields have the same values.

is_matching

  my $res = $uk_coll->is_matching( $row1, $row2 );

Checks if a given row matches a row in collection. By matching, I mean that the row matches all fields from the row in the collection.

find_matching_row

  my $res = $uk_coll->find_matching_row( $row );

Finds a row in a collection, which matches a given row. It tries to find a matching row starting from the row, which has the biggest number of fields defined.

is_empty

  my $res = $uk_coll->is_empty();

Returns 1 if a collection is empty. O otherwise

get_remaining_row

  my @rows = $uk_coll->get_remaining_rows();

Returns all rows, which are not matched by anything.

SEE ALSO ^

The project is maintained on Source Forge http://lreport.sourceforge.net. You can find there links to some helpful documentation like tutorial.

AUTHORS ^

Piotr Kaluski <pkaluski@piotrkaluski.com>

COPYRIGHT ^

Copyright (c) 2004-2006 Piotr Kaluski. Poland. All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

syntax highlighting: