http://qs321.pair.com?node_id=29867

rodry has asked for the wisdom of the Perl Monks concerning the following question:

Scripts that accept parameters from a form are tested from the shell by typing in gthe form parameters and its values in their respective name=value pairs. Then you hit control+D to actually run the script.

However, for no apparent reason, PERL started just running the scripts without prompting the user for the name=value pairs.

This concerns me since that is the only way I know that I can debug those types of scripts.

  • Comment on PERL interpreter not asking for name=value pairs!! -HELP

Replies are listed 'Best First'.
Re: PERL interpreter not asking for name=value pairs!! -HELP
by btrott (Parson) on Aug 27, 2000 at 10:28 UTC
    Well, uh... that's not actually perl itself that's doing that. It's (most likely) CGI.pm, which should be included in CGI scripts for form processing (and more! :). So are you using CGI.pm, and if so, are you constructing a new CGI object? Some things to check, at least.

    Also, if you *are* using CGI.pm, and you're sure about that, check that you aren't setting the $CGI::NO_DEBUG variable to 1. That will prevent CGI.pm from prompting you for keywords.

Re: PERL interpreter not asking for name=value pairs!! -HELP
by chromatic (Archbishop) on Aug 27, 2000 at 22:04 UTC
    It looks like the latest version of CGI has changed things a bit. Now you have to use the -debug pragma to get that behavior:

    use CGI qw/:standard -debug/;

    This is present in version 2.68, to which I upgraded a couple of weeks ago. I believe I read something about this in the changelog, but you'll have to check on the CPAN: CGI.

Re: PERL interpreter not asking for name=value pairs!! -HELP
by rodry (Beadle) on Aug 28, 2000 at 00:36 UTC
    Thanks guys, I figured that out myself. Btrott pointed me in the right direction so after reading his post I hit the CGI.pm documentation.