Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^5: $dbh could not be passed to function unless another variable is also passed

by Fletch (Bishop)
on Aug 08, 2019 at 14:11 UTC ( [id://11104180]=note: print w/replies, xml ) Need Help??


in reply to Re^4: $dbh could not be passed to function unless another variable is also passed
in thread $dbh could not be passed to function unless another variable is also passed

You've stringified all three of your arguments which isn't what you want to do. A DBI handle is an object which is (usually) implemented as a reference to a data structure such as a hash. When you pass it through double quotes you're breaking that reference (hand waving a bit here; see perlobj for more details) so when you try and call methods upon it you're trying to call methods on a string value (hence your error).

The cake is a lie.
The cake is a lie.
The cake is a lie.

  • Comment on Re^5: $dbh could not be passed to function unless another variable is also passed

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found