in reply to Re^2: Querying data with and & or when using DBIx::Class
in thread Querying data with and & or when using DBIx::Class
So, what's going on here is you're using a string in place of a(n anonymous) hash.
$whrcls = "ID => $id, color => $color1";Should be-
$whrcls = { ID => $id, color => $color1 }; # OR something like my %params = ( ID => $id, color => $color1 ); $whrcls = \%params;
It looks like you might be using some global variables and non-standard code structures (method instead of plain sub). Globals are going to tend to come back and bite you. Definitely avoid them. Non-standard stuff like method signatures has a dearth of examples and help and can come with really deep and difficult edge case bugs. I don't want to put you off that necessarily but if you're having a little trouble with Perl syntax it might not be the best place to jump in.
In Section
Seekers of Perl Wisdom