in reply to Re^2: Object in an object
in thread Object in an object

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.