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: ct_connect in package
Date: Mar 18 2002 4:09PM

Branislav Devrnja writes:
 > Hi ,
 > can someone give a hint wj=hat could be the problem with this wrapping of CT library cals:
 > 
 > Here is a simple wrapper package:
 > package CTWrapper1;
 > require Exporter;
 > 
 > @CTWrapper1::ISA =  qw(Exporter Sybase::CTlib);
 > @CTWrapper1::EXPORT = qw(new );
 > 
 > $CTWrapper1::VERSION   = 1.00;           #
 > 
 > use Sybase::CTlib;
 > 
 > 
 > 
 > sub new {
 >      ($_self, $_user, $_password,$_server,$_database) = @_;
 >      print "DEBUG $_self $_user $_password $_server\n";
 >         if ( defined $_database ) { print "$_database \n"; }
 >     ct_callback(CS_CLIENTMSG_CB, \&msg_cb);
 >     ct_callback(CS_SERVERMSG_CB, "srv_cb");
 > 
 >         $_dbh = new Sybase::CTlib $_user, $_password, $_server;




For the correct way of doing that, see Sybase::Simple - available on
CPAN or from my web page.

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org           *or*          mpeppler@mbay.net
http://www.mbay.net/~mpeppler
International Sybase User Group: http://www.isug.com