PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Wechsler, Steven" <Steven dot Wechsler at mtvstaff dot com>
Subject: Checking to see if a variable is a DBH
Date: Jan 6 2006 9:59PM

Received: from gw.peppler.org (localhost.localdomain [127.0.0.1])
	by gw.peppler.org (8.12.10/8.12.10) with ESMTP id k06Lxdw1032304
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for ; Fri, 6 Jan 2006 16:59:39 -0500
Received: (from majordomo@localhost)
	by gw.peppler.org (8.12.10/8.12.10/Submit) id k06Lxdpq032302
	for sybperl-l-outgoing; Fri, 6 Jan 2006 16:59:39 -0500
X-SBRS: None
X-SenderGroup: RELAYLIST
X-MailFlowPolicy: $RELAYED
X-Filter: ADD_INSERT_HEADER_INFO
X-MID: 129489980
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/related;
	type="multipart/alternative";
	boundary="----_=_NextPart_001_01C6130C.7BA4B0CD"
Subject: Checking to see if a variable is a DBH
Date: Fri, 6 Jan 2006 16:59:36 -0500
Message-ID: 
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator: 
Thread-Topic: Checking to see if a variable is a DBH
Thread-Index: AcYTDHgCQ51DoV54QqqjOvzUawBW3Q==
From: "Wechsler, Steven" 
To: 
X-OriginalArrivalTime: 06 Jan 2006 21:59:36.0763 (UTC) FILETIME=[7C0140B0:01C6130C]
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.11 (gw.peppler.org [127.0.0.1]); Fri, 06 Jan 2006 16:59:39 -0500 (EST)
X-Greylist: Recipient e-mail whitelisted, not delayed by milter-greylist-1.5.11 (gw.peppler.org [207.234.209.79]); Fri, 06 Jan 2006 16:59:37 -0500 (EST)
X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on gw.peppler.org
X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on gw.peppler.org
X-Virus-Status: Clean
X-Spam-Status: No, hits=0.9 required=5.0 tests=HTML_30_40,
	HTML_FONTCOLOR_UNSAFE,HTML_MESSAGE autolearn=no version=2.64
X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on gw.peppler.org
Sender: owner-sybperl-l@peppler.org
Precedence: bulk

This is a multi-part message in MIME format.

------_=_NextPart_001_01C6130C.7BA4B0CD
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_002_01C6130C.7BA4B0CD"

------_=_NextPart_002_01C6130C.7BA4B0CD
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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 | steven.wechsler@mtvstaff.com
Sybase/SQL Server Database Administrator
212-846-5683

 <> MTV Networks



------_=_NextPart_002_01C6130C.7BA4B0CD
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable






Checking to see if a variable is a DBH




Sorry, this is not a sybase-specific quest= ion, but DBI…

I'm writing a function that I want to be a= ble to pass either a Sybase server name or a DBI dbhandle; if the former, i= t 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 v= alue passed to the function is a DBH or not?

Thanks,

Steve


Steve Wechsler |= steven.wechsler@mtvstaff.com
Sybase/SQL Serv= er Database Administrator
212-846-5683

3D"PictureMTV Networks<= /B>


------_=_NextPart_002_01C6130C.7BA4B0CD-- ------_=_NextPart_001_01C6130C.7BA4B0CD Content-Type: image/bmp; name="ole0.bmp" Content-Transfer-Encoding: base64 Content-Description: Picture (Metafile) Content-Location: No%20AttachName Qk12FAAAAAAAADYAAAAoAAAALwAAACQAAAABABgAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAA//////////////////////////////////////////////// //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// ////////////////////AAAA7vDv/////////////Pz819fX////7e3twsvL ////////////2NnZ////////9/v79v39/f//3ujl8vjy7e3t5ubm6urm2NjU 8PDw////////8/Pv9fbz3dbW+fb2////5uTr2+Pl////7e3t8/Pz//////// ////////////////////////////////AAAA+vDwAAAAAAAARkdHGBcYPD09 LTg4vL29AAkJaWdoHx8gOjY2PCwsnp+f6+vrZGNjQ0VCQE8/EyATMzAyICAg OTk5Dg4PUVZRlJqUQEBBmpqVYWJdY11eKiEhTkVFV1VVSlJRHSAgPj4+nZ2e AAAAv7W1////////////////////////////////////AAAA5+npAAAAZFtb DxAQAAAA////ERobm6OkCAgItL6+AAAAoqOj////////9fX1pKWldHR0Q0FD DhAOTFZRs7m6wL+/CAgIhYWGh4eIHx8giImKhH5/ZWFjR0lClZaUGhsciIiJ ////QUJCAAAAAAAAwL+/0NHR8/Pp////////////////////////////AAAA ////AAAA6+LZIhgQY2NR8unfHx4WmI2EW1NLbWxik5F9WlBADgQAwbu8wcHB Dw8PP0I/WmBWhoWAZ2ZnsrCwrbe3JzM0mJOPlIR2c2VSopqHhXZqal5PSzsp moZ7ppmKX1ZJBQQAgntwhn50SEA16d3dIiIavr2+7fb3/v///////v////// ////////AAAA+vz9amBXv6yasJR4pYpmqo9iqph/rpuBkHxqyayQs5dzsJZx rp16w7SeopqW5Nvc9Ovo7ObdyMW+493U8fHs+fz/4Obyu6mXvJJg0ah7xaCE wZ1+17SQyJ9816mG2bqQxKl0s5dvx6qO1bmdw7Gd5cvA////////+f////// /v//9v//////////////AAAA9/jwYFdF79W407qD6cSZ5bqI28GX2riO1bOQ 3LuN4b+J2rl+ybGIrJ2DfXdvkpGIv7au///7////////////////+vz/vKuY qXtGvY9YtIdZuo5dpHtHo3NGsX5OnW8vqHw9tIlStoNUjmdDeV5BgG1bUkg9 29rb////////7P///////////f38////AAAA6N7Xe2pZ9tuv89CZ/9GV986a 3r2M3sWc28KW5cKO3bF898yT27mJv6CAfnBWZ15MGxcVycrC//////////// +fz/6/L9rpmQq3pOvJRgp4hWqIhXt5BZsopVsn5HsXs8y5BFsHoyqXU4m24/ sY1ofWFEFgQAAAAA9fT0+v//////////////9vbt////AAAA//LdcF1C/+m9 982I/tOY98WC8MWS6sGP7syX6LuA7LV497+F7MWJzKuBm4NvdGhaIyYhxcXH ////////////////8vX7tKSapXpHw5tjnn5SkWpCq4FUroZVuIpTxI1Nx4Uy wYYvqm8mvolJpXZJkXVPMh4KAAAA9vX1////////+///////////////AAAA 8unJgV49/9un982P+MiE/86I+ciH9tWY6L6C+s2G9Llu9MN94bBw0ql7oIJh fG9bJSUmyMjP/////////////f//7vT6o5KHp39PoHtKmHtVq5JudVApkGY5 uYhNvIY0zYsow4UuwIUxvoU8s3hDkGg7RioRAAAA9/b1////////7v////// ////////AAAA/+/YeWM9/+e1/82A/9OR/s16+MeG9Mt/8MJ//8uC/cN1/cVw 8Lx016lxpYVZdV1KHx0jwcHI////////////////9vr/uquej2c6qIJV7OHD ////7M6vroBTrXo8voUz15E3zIk1zIo+t4M3s4NLkmQ6MBMGAAAA9vX1//// ////////////////////AAAA/+vWiHE9/9un/ceE/8qH/s2A6bl38Md887p5 /MN/8bZr/sJy9r513rJ1nH9Xc2hMICEsysrZ/////////////f//6vT3rqKT mHFFkG5Gz8Wu////zLqbmHNCr4lHuYZGxIY8qm0lrHIssX09s4tRk2tGRCoS AAAA9/b1////////////////////////AAAA//begGM9/+as+L19/NOQ/81+ /c2L9syH8saG98V3+btx+710+MV42bNtpoheemlZIR4oxsXU//////////36 ///98fL4qp6RkG5GtZJs6eDQ///9nIpmjG86tI1RroFJlGQnlGQ6ilwrmWo9 m3VJkXRPKxkIAAAA9vX1////////////////////////AAAA/O3Wel08/96r /M6R+cqI/86K+ciJ8sOJ7LyB+cN5/cJ39L9x8MB2161tnIFWeXBeIh8gzMbK ///////+///9////9vn5sqSRc1MryKuD///y///vgWs/h2c3wZZeflglu5Np ///2///kkHZUh2RHfGtOMSIPAAAA9fX1////////////////////////AAAA //Tfb2JA/+S2982M/9CN+82G9caO7caH7cSJ8rx5+MV8+MV0/8uI27B7moBT bl9INi4tz8nGxbuuuqyWz8m75eHd////w7Gbh2I4u6N89/Lk///5mIZfkW4/ uYtdeVw12Mi4///////4qJyCe3BSeWtcHxkLAAAA9fX1//////////////// ///7////AAAA/+7hc2RB/d+2882O/8yJ9c2I6sGJ7sGI68OI8cOB9bx69rhu 9MF91rJ5noRagWxYQzo1npCCdF1CaE8oaU8ncWNPo52arJmCk3FEnoVk39rN ///2nIVhjWo/oHlIf2tN4eDc///////7gHhqcmtOfXRpGxsTAAAA9fX1//// ///////////////4////AAAA/fPkcl0//+O68M2M98+M986H98SR7sCH7cSK 9seA+MJ79Lpw6rt12K52q41plH9lT0Aog29UyKaEyKR3jW08SzcaOS8if25M oIJPrpZ25N/d///6gW5QmXZNmnNIn4t37+zq////////m5SGbGNVdW9oIB8W AAAA9fX1////////////////////////AAAA//Ddcl1B/+Gz9s2N9c2K98SI +8SQ7MaH5r6A77p4+L92+cp387173qx3nH9Xi3VUhXFQw6qH37qM27R5yKBl kXJPYlVBfmdEoIBMq5Fx4d3W///3jHZap4ldcEkhu6qf////////////5eLb WE5EYGBSHBwTAAAA9fX1////////////////////////AAAA//Hed2M8/+Gu 982O/82L+sOI9cWM88aI+caE98B++L9y/8py+rx21qZwjnBCknRQxa2Hv6N4 rIJMqHo0yp9fwqJ5fmxTf2FBoXtLsJd35uLb//7ynYFllXVOeU4o28/I8PDt g4B/6Onr////trOkRkEzGBcOAAAA9fX1/v///v//////////////////AAAA //HfdWM8/+Kv9syN/8+M/86B9sSI9r+C9L16+sV4+L1u/b1w8rVt67l7zaNy zqZ6y7KEsZBbooNRspFbrH47wqR0r5h9o4NiqIJQtZx86+bk//3xoIVmZ0cd uYxc//juqaKaQTAnkoR49fX2////ioZ6AwMAAAAA9vb2/v///v////////// ////////AAAA//DSd109/+Gt/NKT9caD/86E+sOA+sZ/88F5/8Z6+8F29791 77Vp+Ltu8bh35L+BtJthnn5C5NOn///lsY5dfFIuq495vqGHp4hkrJd75uLa ///7mohoRysAzLmS///6j31wgmZMbkUe7NO5///2///5Ly4uAAAA7+/v//// ////+fn/////////////AAAA//PRelw9/96w+9aV88WI/86G/MeE/8l+98F8 +cB698N89r9187ly87Zp8bZq3bhqy7Zus5hSmX5I2sej+ebKw6qVlnFdj3Ng mIZuk4Zt3drM///yg3RRbVAo49vA////fnFbrIZci1YbsIhM+PTU////ytDR AAAA8PDx////////+/v/////////////AAAA/+3UfWw99tSy99ee8cGI/86P 88N+/8t6+b9+9cCA67t48sF38bZ07bdt7rNo4K1i2rVw2bRyp3o+pnpJpIFg 7NO37dbAmo93R0cvgYVv7/Lq///uZlU4qIpt///v////qJdxn3hEtoM7TCAA 6+jQ////////JiYn4ODb///9/fz8+P//////+P//////AAAA//TXemU9/dq1 99Cd9MiN+c6I+ceE+cF69sSH8cZ98L598Lp79cF77bxr7bVr7Kxl4q5o5rhu 6bR4y5lksohcqIVfuauJ393Ms7mqy9HD////5d/TZFZFZkU7wJ+ZwKmWiG5I o3k/v45Dj2IxiW5N+vn1////09PUZ2FY///////6+///////+///////AAAA ++3Tf109/dux99Sh6r+F/s6P+cF+9MiH6rl+78V68bl+7MCA5rp177pu77Jt 6rRs6rFs7bdr155h4Kpyx5lmp4NUk35SW1I5rbWi////////6ubfaltXYEVG nnl7lXlki2Q7sXs6woozxJhQTzADqKCL+fr5////pJuRjYeA////+vr6//// ////////AAAA//bYeFw9/9+398+d8smO+c6H/sqI9ceH8L9/77989cKH7b99 6rl977Zz8Ll16rJr46Vi6q1j7LZu4Kpm0Zxgz6RswaBtkXtRgntZ0s/F//// ///9o5ySaVhXW0FBi21Vt5BkwotCuHEav4pDmXhDTz4o8Ojn////////fnRs a2pk////9Pv7////////AAAA/+rKhW8/8tmo99Wc776F/c6K8cB9/sx89r59 88GC6bh+77t577Z26rd347Bs8bdr7Lls369m1KFTzZhL4Kdo3KZrw5BQ3rBx kWc0v7KV///s///u////7u3tsqqaRi8YfVckv4o93ps6uXw0soVJSTQZp6ad ////////7eviubmvKysr8fP0///9////AAAA//fYgGE0/9+29s6S/suJ/86E +8iB/796/cWC9cV88sCA8Ld29cN97Lts6bZu57Bl3LVn069g4rFm6rBm56db 4ptT7aJe5ptW0YpPklozbkYhclkmYFQutK2R+vvp5ebdnHlGsG0W1Ikry4s+ kWorindZFg8N1s7H////////////1tXVSVFR+fj3////AAAA/+rCkmc+/9mo /tWb57x5/8+L/8Z7/MmC8Ld1/cyJ67Nx57Rx9MF2/MF07K9n2q1o0LBj1LFm yZxX57Bm2JpL7KBN7p1J6ppG7JxN3I1LzYxKvpBQonQ+aUgSnoFO///czKRq tXEcxoEdvH8unHExfGhJFRQNEAgH19fH//////nx////1djid3Zu////AAAA /+/GgV02/+Cv986K+8uJ/82D/82B/8Z1/suK/8B+/MuI9MR788B86axh8Ldp 8MJ117Nyza5w/+CV675s26BV66VU6qFM6pxK6ZdA65tF3ItA4ZlR4KNdq3oz qXsxp3w4iVobyow3zIIkzY4/todOkn5pGxIKAAAALiUb8vLh////+fn5//// Ozwy////AAAA//nGk3A++Nel/9ab/8aD/9aU/8V4/cx477V098SD8b5698R5 8bl388B/5LFr26tk3bB+z6lyglkck2co47h00qJby5ZC0JY/3Zw/6Z9F1os0 zoQu4ZhA1ow4x4k1pnExrH45zJA4yXUhwIAxqIJDdF9JHhwbAAAA7u7uSkI4 u7uy7Ovsv8nJdWtq////AAAA//zagV4+/+Gu98yI+cWK/9CD/8yJ9715/82K 8cl++MyR7rl36bd67MR557l35Kt09L+Zp3RLhGYwhWsypIZJzaxvvaRWwaBO 26tV465T5ZtH45NA0oMw4JIx3oo11Jdcw41QxYQtzIAi3ZxVmnM8c2lRISIh AAAA/Pz9+fjwaWlopqSlSlVV/Pv7////AAAA9+jFg14/+tmt99ai5LiH+M6T 97yC9c2T47h/2bF117d+47+Nyp9h1apq57SF366KkGhRaEgqKxUAPCsbZlgq c2o2xLl9r5dWwZVVtII9yY1D1pNHzX0z1YQ5zo05o3AvpHI1toAvzowutoA3 o3VEeWxfEA8ZAAAA9vX1///9/fz74Onq+vn5////////AAAA//TkcF47/+fF /dq6/dun+9CU/NOX8sqR9dSg89KZ8tOn5MuT8M6i99aa5L+QnndPVkEkPSsc cmZQ9ffl////kpR3Uk0btaBxvZ1vyZtv2Jtq36Bkyo5L3KBe1ZlVzZ5ovI9a 15lS0Y05t382lHdQhYJvDBUTAAAA6/X1////////////////////////AAAA +NzMXlk1uqqSybuYvKR42beGupdvzqNxs5Rs0LaPr49rpo5cp4tjtZJpdFMt Z04znY6Cv76z///////8/Pz4////n5J8TjQdjGdFo3ZKqWk/kVwvgWAhfWQl i2QqgV4qeEsUe0MAmlcKil0eelUvOjYqHSYkZnB6/fz97vf39P7+/v////// ///0////AAAA////U0sxtKGUlXxjrJNos5Fpu5tyq4piuZlyl39frYxssZl5 tJt7mX9d4M+n///7////////+fz69Pn0///////9////4s7Ds4d0toRsroRn wJZzwpxurZdnnJZfr55sxplj4Klr15RKzZZWvZZvt7Oo//////////////// ////////////////////AAAA ------_=_NextPart_001_01C6130C.7BA4B0CD--