Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Object in an object

by ikegami (Patriarch)
on Oct 03, 2009 at 03:31 UTC ( [id://798970]=note: print w/replies, xml ) Need Help??


in reply to Object in an object

The problem is that the query objects are not being stored in the hash of the filter object or they are not being retrieved properly

Are you saying that $inth->execute("2","tom"); is failing since $inth doesn't contain the prepared statement? If so, what does $self->{INSERT} contain? Data::Dumper should be useful here.

$intha->execute("1","$self->{INSERT}")

What is that trying to do? Is that your debug code for figuring out what $self->{INSERT} contains? If so, you forgot to tell us.

Replies are listed 'Best First'.
Re^2: Object in an object
by Anonymous Monk on Oct 04, 2009 at 17:48 UTC
    Thanks for the reply. I thought that that was the problem. As for the line of code you asked about; that was an attempt to determine if the object was being stored in the hash of the filter object or not. I was hoping to see the reference stored in the DB if it was being stored in the filter's hash. This experiment did not work, though. Nothing was stored in the DB for this line of code.

      If $inth->execute("2","tom"); fails, it'll throw an exception, so the "$dbha" code will never be reached. In other words, your debugging code is buggy. Change

      $inth->execute("2","tom");
      to
      eval { $inth->execute("2","tom"); };
      or change the order of your code.

      If $inth->execute("2","tom"); fails, it'll throw an exception, so the "$dbha" code will never be reached. In other words, your debugging code is buggy. Change

      $inth->execute("2","tom");
      to
      eval { $inth->execute("2","tom"); };
      or change the order of your code.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-20 00:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found