LRpt::CollUnkeyed - Object of this class represents a collection of unkeyed rows
This class is a part of
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).
my $uk_coll = LRpt::CollUnkeyed->new();
Constructor. Initializes fields.
$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.
$uk_coll->add_to_group( $row );
It increases the number of equal rows (the same amount of fields, all fields have the same values).
my $res = $uk_coll->is_equal( $row1, $row2 );
$row2 are totally equal - the same amount of fields, all fields have the same values.
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.
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.
my $res = $uk_coll->is_empty();
Returns 1 if a collection is empty. O otherwise
my @rows = $uk_coll->get_remaining_rows();
Returns all rows, which are not matched by anything.
The project is maintained on Source Forge http://lreport.sourceforge.net. You can find there links to some helpful documentation like tutorial.
Piotr Kaluski <firstname.lastname@example.org>
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.