Checking to see if a variable is a DBH

"Wechsler, Steven" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <E67053DABCCDF4428BB7974550E1108F03077D3E@DIRECTEFFECT.mtvn.ad.viacom.com>
Sorry, this is not a sybase-specific question, but DBI...

I'm writing a function that I want to be able to pass either a Sybase
server name or a DBI dbhandle; if the former, it will establish a
connection to the server; if the latter, it will use the extant
connection. Is there a straightforward way to check to see if the value
passed to the function is a DBH or not?

Thanks,

Steve


Steve Wechsler | [email protected]
Sybase/SQL Server Database Administrator
212-846-5683

 <<Picture (Metafile)>> MTV Networks
ole0.bmp (image/bmp, 5.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.