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: object/hash confusion
Date: Sep 13 2002 8:21AM

On Thu, 2002-09-12 at 09:35, Matthew.Persico@Lazard.com wrote:
> 
> In DBD::Sybase:
> 
> I want to use an error handler for one statement. I did this:
> 
> $dbh->{syb_err_handler} = \&mySybHandler;
> 
> my $results = $dbh->selectall_arrayref("sp_changegroup $tr{$_[0]},
> Group_login");
> 
> delete  $dbh->{syb_err_handler};
> 
> The delete is being translated into a method call on the $dbh object instead of
> a delete of the hash member.
> 
> Can I get around that? Adding parens [ delete ($dbh->{syb_err_handler}) ] did
> not help. If not, will $dbh->{syb_err_handler} = undef be sufficent to unset the
> handler for subsequent queries?

I think that this will be enough - though I don't have the source handy
to check at the moment.

Michael
-- 
Michael Peppler / mpeppler@peppler.org / http://www.mbay.net/~mpeppler
mpeppler@zetatools.com / ZetaTools, Inc / http://www.zetatools.com
ZetaTools: Call perl functions as Sybase stored procedures!