Here is the error what I am getting now. It's complaining about the call
method.
main::(test.cgi:36): my $q = $self->query; #The CGI query object.
DB<1>
Can't call method "query" without a package or object reference at test.cgi
line 36, <IN> chunk 27.
The script is as below:
#!c:/perl/bin/perl.exe -w
push (@INC,'/cgi-bin');
## Initializations Steps
use Getopt::Std;
use Sybase::CTlib;
use CGI qw/:standard/;
$startloc="e:/it support services/db architecture/sybase/sysmon-webdb";
opendir(SMD,"$startloc") || die "Failed to open Sysmon DB";
$c=0;
while ($dir = readdir(SMD))
{
@apps[$c] = $dir;
$c++;
}
closedir(SMD);
$val = "";
$x=0;
for ($i = 2; $i < $c; $i++ ) {
$val .= '$startloc/'.@apps[$i];
$x++;
if($i < $c-1)
{
$val .= ',';
}
}
$q = new CGI;
my $self = shift; #The CGI::App object;
my $q = $self->query; #The CGI query object.
print header, # create the HTTP header
start_html('Sysmon Test'), # start the HTML
h1('Sysmon Test'), # level 1 header
start_form,
"Select the Environment to view Sysmon:", scrolling_list(-name=>'app',
-values=>['$val']
-size=>[$x]),p,
submit,
reset,
end_form,
hr;
-----Original Message-----
From: Brett Sanger [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 10, 2002 2:20 PM
To: Sabherwal, Balvinder (MBS)
Cc: [EMAIL PROTECTED]
Subject: Re: [cgiapp] CGI Question
> Any ideas as what am I doing wrong??
CGI::App does that for you. You want:
my $self = shift; #The CGI::App object;
my $q = $self->query; #The CGI query object.
$q now works as you would expect.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]