Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^5: Querying data with and & or when using DBIx::Class

by Your Mother (Chancellor)
on Sep 17, 2013 at 20:48 UTC ( #1054538=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Querying data with and & or when using DBIx::Class
in thread Querying data with and & or when using DBIx::Class

it seems DBIx::Class is a little sensitive when using a scalar...

Don't confuse scalar for string just because a scalar often holds strings. They aren't the same. A hash ref can be put into a scalar ( my $hash_ref = \%some_hash or my $x = {}) and hash refs are the only kind of argument DBIC takes for its search and options clauses: never strings. There is no way to (safely and reliably) separate out the bind values and parse the intention of the tree from a string. Compare your original with what is necessary-

print "ID => $id, color => $color1", $/; print { ID => $id, color => $color1 }, $/;


Comment on Re^5: Querying data with and & or when using DBIx::Class
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054538]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (18)
As of 2015-07-02 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (33 votes), past polls