CGI.pm not interactive at command line

P

Peter_W_Levine

Hi,

I'm attempting to test a cgi script using CGI.pm (perl v5.8.7 on
Windows 2000). However, the script does not go into interactive mode &
ask me for parameters as I exprected when I execute it on the command
line but simply runs the script.

My script begins:

my @params = param();
if(! @params)
{
display_form();
}
else
{
}

How should I begin a script to get CGI.pm to work interactively?


Pete
 
J

Jürgen Exner

Hi,

I'm attempting to test a cgi script using CGI.pm (perl v5.8.7 on
Windows 2000). However, the script does not go into interactive mode &
ask me for parameters as I exprected when I execute it on the command
line but simply runs the script.

My script begins:

my @params = param();
if(! @params)
{
display_form();
}
else
{
}

How should I begin a script to get CGI.pm to work interactively?


Pete
 
J

Jürgen Exner

I'm attempting to test a cgi script using CGI.pm (perl v5.8.7 on
Windows 2000). However, the script does not go into interactive mode &
ask me for parameters as I exprected when I execute it on the command
line but simply runs the script.

Why do you expect the script to ask for parameters?
How should I begin a script to get CGI.pm to work interactively?

Don't the methods that are described in the documentation for CGI.pm (see
section DEBUGGING) work?

jue
 
A

Alan J. Flavell

Why do you expect the script to ask for parameters?

You might recall that earlier versions of CGI.pm did precisely that
when called from the command line. At some point, it was changed so
that the interactive mode had to be called for explicitly. I would
surmise that the original poster is using some outdated documentation
or tutorial for CGI.pm.

hope this helps
 
B

brian d foy

Jürgen Exner said:
Why do you expect the script to ask for parameters?

CGI.pm used to prompt for values if it didn't find any and you
were using interactive session. Some version changed that. It's
actually quite annoying.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top