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: Jeffrey Yu <jjyu at ml dot com>
Subject: CGI/Sybperl in Linux, how?
Date: Nov 5 1997 2:02PM

Hi, after having sybperl installed on my Linux box,
now I move toward using cgi to work with sybperl.  The
objective is to access Sybase through a cgi script.
Last night I typed in a sample cgi downloaded from the
net, everything runs fine.  But after I added following
line to it, the script failed.  The line is:

use Sybase::CTlib;

Here is the code:

#!/usr/bin/perl

use CGI qw(:standard);
#use Sybase::CTlib;

print header;
print start_html('A Simple Example'),
    h1('A Simple Example'),
    start_form,
    "What's your name? ",textfield('name'), p, "What's the
combination?",
    p, checkbox_group(-name=>'words', 
-values=>['eenie','meenie','minie','moe'],
                   -defaults=>['eenie','minie']),
    p, "What's your favorite color? ", popup_menu(-name=>'color',
               -values=>['red','green','blue','chartreuse']),
    p, submit, end_form, hr;

if (param()) {
    print 
        "Your name is",em(param('name')),
        p,
        "The keywords are: ",em(join(", ",param('words'))),
        p,
        "Your favorite color is ",em(param('color')),
        hr;
}
print a({href=>'../cgi_docs.html'},'Go to the documentation');
===============================================================

The current form works fine, but it fails right away if I uncomment
the "#use Sybase::CTlib;".  What is wrong?  When I use Sybperl
alone (without involving CGI), I am able to use CTlib to access
Sybase without incident.  Please help.  Thanks in advance.

--Jeff