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: holt at roguewave dot com
Subject: RE: Looking for CGI/Sybperl examples?
Date: Feb 13 1998 9:36PM

Michael et al..
I just looked at the src for SybWWW.pm, and I didn't know about the
dbstrcpy thing for getting the cmd buffer.  Cool!  I'll be adding that
in to our current msg/error handlers.  Here's some code we use in our
msg/error handlers that also greatly helps us figure out what's happened
when using Sybperl in CGIs.  First, we dump the environment vars, which
helps for knowing what script we're talking about, who browsed it, etc.
Second, we do a call stack dump to show just what Perl funcs were
called.  Also helps greatly when you've got thousands of lines of code,
w/Sybperl here and there.
        print
"\n----------------------------------------------------------------\n";
        print "Environment Vars Dump\n";
        print
"----------------------------------------------------------------\n";
        foreach $tstr (keys %ENV) {
            print "  ENV{$tstr} = $ENV{$tstr}\n";
        }
        print
"\n----------------------------------------------------------------\n";
        print "Call Stack Dump\n";
        print
"----------------------------------------------------------------\n";
        $i = 0;
        while (($pack, $file, $line, $subname, $hasargs, $wantarray) =
caller($i++)) {
            print "$i:
$pack\t$file\t$line\t$subname\t$hasargs\t$wantarray\n";
        }
>