Subject: | Dancer::Plugin::Database documentation bug + quick_select bug |
Date: | Thu, 17 Feb 2011 10:56:36 +0100 |
To: | David Precious via RT <bug-Dancer-Plugin-Database [...] rt.cpan.org> |
From: | Michael Stiller <ms [...] 2scale.net> |
Hi David,
unfortunately i guess i found two more bugs:
In Dancer::Plugin::Database there is documentation which reads:
(around line 230)
230 get '/users/:id' => sub {
231 template 'display_user', {
232 person => database->quick_select('users', id => params->{id}),
233 };
234 };
This is wrong, the {}'s are missing, shouldn't it read:
232 person => database->quick_select('users', { id => params->{id} }),
Beyond that, i'm pretty sure, that the quick_select statement does not honor
the where clause. Shouldn't it read:
(Handle.pm)
142 if ($type eq 'UPDATE' || $type eq 'DELETE' || $type eq 'SELECT') {
143 $sql .= " WHERE " . join " AND ",
144 map { $self->quote_identifier($_) . '=?' } keys %$where;
145 push @bind_params, values %$where;
146 }
Cheers,
Michael
--
2scale GmbH, Karlstr. 88, 40210 Düsseldorf
Amtsgericht: Düsseldorf HRB 50718
Geschäftsführer: Georg von Zezschwitz, Dirk Vleugels
USt-IdNr.: DE 210936505