From: Sven Dowideit <svendowid...@fosiki.com>

---
 AnyData.pm |    5 +++--
 Changes    |    2 +-
 t/test.t   |   10 +++++++---
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/AnyData.pm b/AnyData.pm
index b91aa05..c6ffcf8 100644
--- a/AnyData.pm
+++ b/AnyData.pm
@@ -498,13 +498,14 @@ sub adRows {
     my $thash = shift;
     my %keys  = @_;
     my $obj   = tied(%$thash);
-    return $obj->adRows(\%keys)
+    return $obj->adRows(\%keys);
 }
 sub adColumn {
     my $thash  = shift;
     my $column = shift;
+    my $flags = shift;
     my $obj    = tied(%$thash);
-    return $obj->adColumn($column)
+    return $obj->adColumn($column, $flags);
 }
 sub adArray {
     my($format,$data)=@_;
diff --git a/Changes b/Changes
index 44c8c9e..880750a 100644
--- a/Changes
+++ b/Changes
@@ -9,7 +9,7 @@ version 0.11, released  Aug 2012
  * Fails to retrieve XML data over HTTP (debian#421884) Bart Martens 
<ba...@knars.be>
  * Fix syntax error in POD documentation (debian) Ansgar Burchardt 
<ans...@43-1.org>
  * Fix spelling errors (debian) Ansgar Burchardt <ans...@43-1.org>
-
+ * adColumn $distinct_flag not handled (RT#6248 & RT#6251) John D. Lima
 
 
 version 0.10, released 19 April 2004
diff --git a/t/test.t b/t/test.t
index b9cf639..a860f48 100755
--- a/t/test.t
+++ b/t/test.t
@@ -7,13 +7,13 @@ use warnings;
 my @formats = qw(CSV Pipe Tab Fixed Paragraph ARRAY);
 
 use Test::More;
-plan tests => (1+$#formats) * 4;
+plan tests => (1+$#formats) * 6;
 
 use AnyData;
 
 
 for my $format( @formats ) {
-   printf  "  %10s ... %s\n", $format, test_ad($format);
+   test_ad($format);
 }
 
 sub test_ad {
@@ -25,6 +25,8 @@ sub test_ad {
     $table->{Sue} = {country=>'fr',sex=>'f'};          # insert rows
     $table->{Tom} = {country=>'fr',sex=>'f'};
     $table->{Bev} = {country=>'en',sex=>'f'};
+    $table->{Nel} = {country=>'en',sex=>'f'};
+    $table->{Pam} = {country=>'au',sex=>'f'};
     $table->{{ name=>'Tom'}} = {sex=>'m'};             # update a row
     delete $table->{Bev};                              # delete a row
     $flags = {pattern=>'A5 A8 A3'};
@@ -35,7 +37,9 @@ sub test_ad {
     }
     ok('SueTom' eq $tstr, "Failed multiple select");
     ok('namecountrysex' eq join('',adNames($table)), "Failed names");
-    ok(2 == adRows($table), "Failed rows");
+    ok(4 == adRows($table), "Failed rows");
+    ok(4 == adColumn($table, 'country'), "total number of rows");
+    ok(3 == adColumn($table, 'country', 1), "distinct countries");
 }
 
 
-- 
1.7.10.4

Reply via email to