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: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Bug: dbmsghandle(undef) vs. { $x = undef; dbmsghandle($x); }
Date: Mar 23 2001 4:11PM

Vallon, Justin (Exchange) writes:
 > Michael Peppler & SybPerl List,
 > 
 > I am trying to set and restore dbmsghandle and dberrhandle, but once they
 > have been set to something that is not undef, it cannot be reset to undef
 > via a variable, but it can be unset if "undef" is passed literally.  My
 > work-around is to use dbmsghandle($new || undef) when setting with the
 > possibility of !defined($new).

Ah.

Yeah - I see the problem:

    if(msg_handle == &PL_sv_undef)
	msg_callback.sub = NULL;
    else
    {

which compares to the global 'undef' value, but not to the SV passed
in being undef.

I'll fix that for 2.14

Michael
-- 
Michael Peppler - Data Migrations Inc. - mpeppler@peppler.org
http://www.mbay.net/~mpeppler - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com