You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into issues with count when working with result sets. I create a test which can be put at the bottom of 09-resultset.t:
count after creation
{
my $result = Wine->result();
is $result->count, 3;
}
This fails till I simplify the count method to the following:
sub count {
my $self = shift;
my $results = $self->_load_results;
return scalar @$results;
}
Yann through personal conversation confirms that the count method on $self->class will not work in a normal install. This is due to it expecting a Six Apart specific subclass and that the resultset count should be refactored so that $self->class->can('count') is a condition that is factored in.
The text was updated successfully, but these errors were encountered:
I ran into issues with count when working with result sets. I create a test which can be put at the bottom of 09-resultset.t:
count after creation
{
my $result = Wine->result();
is $result->count, 3;
}
This fails till I simplify the count method to the following:
sub count {
my $self = shift;
my $results = $self->_load_results;
return scalar @$results;
}
Yann through personal conversation confirms that the count method on $self->class will not work in a normal install. This is due to it expecting a Six Apart specific subclass and that the resultset count should be refactored so that $self->class->can('count') is a condition that is factored in.
The text was updated successfully, but these errors were encountered: