It appears that the only kind of assertion test I could do would be to test
$dbh like this
if ( !defined($dbh) || $dbh eq '' )
{
print "dbh is invalid\n" ;
exit 1
}
Jeff
> Can I test for the existence of a method without actually calling it?
>
> Basically what I'm trying to do is to verify that $dbh is still a valid
handle.
> I want to use this as an assertion test at the start of a function.
>
> # verify that the $dbh is valid
> if ( !defined($dbh->disconnect() ) )
> {
> print "dbh is invalid\n" ;
> exit 1
> }
>
> # $dbh is valid so we can safely disconnect
> $dbh->disconnect()
>
>Jeff
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]