|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: RE: using CTlib callbacks
Date: Oct 2 2001 4:02PM
McCarthy, John writes:
> Below are the errors and the module :
> Errors:
> ----------------------
> Bareword "CS_SUCCEED" not allowed while "strict subs" in use at JMc.pm line
> 52.
> Bareword "CS_CLIENTMSG_CB" not allowed while "strict subs" in use at JMc.pm
> line 66.
> Bareword "CS_SERVERMSG_CB" not allowed while "strict subs" in use at JMc.pm
> line 67.
> Execution of JMc.pm aborted due to compilation errors.
Right.
You just have a slight logic error in your code. The "use
Sybase::CTlib" happens in package "main", but the rest of your code is
in package "JMc". The "use" statement imports the symbols from the
other package into the current package, so you need to move your "use
Sybase::CTlib" call into the JMc package and things should work as expected.
> ----------------------
> Module:
> ----------------------
> #!/usr/local/apps/perl-5.6.0/bin/perl -w
> use strict;
> require 'ctime.pl';
> use Sybase::CTlib;
> package JMc;
Change to:
> #!/usr/local/apps/perl-5.6.0/bin/perl -w
> use strict;
> require 'ctime.pl';
> package JMc;
> use Sybase::CTlib;
Michael
--
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
mpeppler@peppler.org - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
|