CGI.pm not interactive at command line

Discussion in 'Perl Misc' started by Peter_W_Levine@uhc.com, Dec 21, 2005.

  1. Guest

    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
    , Dec 21, 2005
    #1
    1. Advertising

  2. wrote:
    > 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ürgen Exner, Dec 21, 2005
    #2
    1. Advertising

  3. wrote:
    > 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
    Jürgen Exner, Dec 21, 2005
    #3
  4. On Wed, 21 Dec 2005, Jürgen Exner wrote, quoting an article that I
    can't see here:

    > wrote:
    > > 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?


    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
    Alan J. Flavell, Dec 22, 2005
    #4
  5. brian d foy Guest

    In article <6Ulqf.36063$aU4.30571@trnddc06>, Jürgen Exner
    <> wrote:

    > wrote:
    > > 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?


    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.

    --
    brian d foy,
    Subscribe to The Perl Review: http://www.theperlreview.com
    brian d foy, Dec 22, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles Fox
    Replies:
    3
    Views:
    1,739
    Charles Fox
    Apr 15, 2005
  2. Nicolas Fleury

    Reset Interactive Command Line

    Nicolas Fleury, Oct 6, 2003, in forum: Python
    Replies:
    3
    Views:
    540
    Dennis Lee Bieber
    Oct 8, 2003
  3. planetthoughtful

    Creating interactive command-line Python app?

    planetthoughtful, Dec 21, 2005, in forum: Python
    Replies:
    6
    Views:
    453
    Tim Chase
    Jan 3, 2013
  4. epsilon
    Replies:
    4
    Views:
    318
    Gabriel Genellina
    Aug 22, 2007
  5. Replies:
    1
    Views:
    124
    A. Sinan Unur
    Dec 21, 2005
Loading...

Share This Page