On Thu, Oct 8, 2009 at 8:18 AM, Ido Perlmuter <[email protected]> wrote:
> For some reason, the following query has been constantly causing an
> SQL::Abstract error message.
>
> Query: $c->model('DB::Stuff')->single({ stage_id => $stage->id, num => 0,
> foreign_id => $foreign->id, type => 0 });
>
> Error: "can't quote an empty label".
>
Just a wild guess:
Are $stage->id() or $foreign->id() returning an array and/or undef, perhaps,
and that's causing a hashref key that is an "empty" label? Do you see the
"Odd number of elements" or "uninitialized value" errors?
$ perl -Mwarnings -Mstrict -MData::Dumper -e 'my $stage = sub { return qw( a
b ) }; my $foreign = sub { return undef }; my $query_hr = { stage_id =>
$stage->(), num => 0, foreign_id => $foreign->(), type => 0 }; print
Dumper($query_hr);'
Use of uninitialized value in anonymous hash ({}) at -e line 1.
Odd number of elements in anonymous hash at -e line 1.
$VAR1 = {
'' => 'type',
'0' => undef,
'b' => 'num',
'stage_id' => 'a'
};
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]