Subject: | Tangram::Storage::count (2.07_07) patch |
Date: | Thu, 11 Jan 2007 19:18:26 +0200 |
To: | bug-Tangram [...] rt.cpan.org |
From: | Assen Tchorbadjiev <pt [...] tchorbadjiev.com> |
Hello,
attached is a [minor] patch for the Tangram::Storage module (from
2.07_07). Inside the count() sub is a call like:
Show quoted text
> $objects->insert($expr->objects);
Since $expr usually end up being Tangram::QueryObject(s), they don't
have the objectS() method, but only object().
I've looked against the stable version, but the count() sub is
implemented in a different way, w/o using such a call on the $expr argument.
The patch effectively calls object(), instead of objectS().
It works for me at least (and it gives the correct counts).
The code I'm using is basically like:
Show quoted text> $r1 = $remote-data-type-as-per-schema->new();
> $r2 = $remote-data-type-as-per-schema->{field}->eq(xxx);
> Tangram::Storage->count( $r1, $r2 );
Regards,
Assen
--- Storage.pm.orig Thu Jan 11 18:49:41 2007
+++ Storage.pm Thu Jan 11 18:49:44 2007
@@ -1110,7 +1110,7 @@
{
my $expr = shift;
$target = $expr->{expr};
- $objects->insert($expr->objects);
+ $objects->insert($expr->object);
$filter = shift;
}