Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Reverse engineering some code :(

by ysth (Canon)
on Jun 21, 2009 at 06:39 UTC ( #773332=note: print w/ replies, xml ) Need Help??


in reply to Reverse engineering some code :(

See the doc. selectall_hashref returns a reference to a hash where the values are hashrefs, each containing all the columns from one row, and the keys are one of the columns, which you identify with the $keyfield parameter. That call seems to be missing the $keyfield (which I'm guessing would be "nick").

Looking at how get_score is used in triviabot.pl, it seems that it should be returning a reference to an array of hashrefs instead, which you would do like:

return $obj->{dbh}->selectall_arrayref("SELECT * FROM scores", { S +lice => {} }) };


Comment on Re: Reverse engineering some code :(
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2015-07-07 04:52 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 (87 votes), past polls