in reply to problems with CGI module's command line debugging

I think all you're missing is quotes. You can't pass &s and ;s on the shell and expect it to act like simple strings.

~/perl_programs$ ./my_prog.pl 'name1=value1&name2=value2'

Replies are listed 'Best First'.
Re^2: problems with CGI module's command line debugging
by 7stud (Deacon) on Apr 05, 2014 at 02:26 UTC

    Thanks for taking a look Your Mother. Your solution works for me using the pragma:

    use CGI qw{:standard -debug};

    Then I can use all the formats shown in the CGI docs as long as they are surrounded by quotes. As a result, the CGI docs need patching. Do you have the ability to submit a patch? I do not. I've tried it before, and I spent all day and got nowhere.

      Even you can Open Source. :P

      What I suggest–

      • You can find the repository https://github.com/markstos/CGI.pm/tree/master from reading the Makefile.PL at https://metacpan.org/pod/CGI -> Browse -> ../ -> Makefile.PL
      • Get or make sure you are signed-in to a github account.
      • Click on "Fork" on the github page -OR- visit https://github.com/markstos/CGI.pm/blob/master/lib/CGI.pm#L7451 and click "Edit" (back at the top of the page) which forks for you and opens an editor to the right area of the file. (You may have to reload this URL depending on your browser.)
      • Add in text in the paragraph along these lines-
        • Your command line will probably require you to quote your arguments. Single quote bash-style arguments are shown in the examples.
      • Edit the various command lines along these lines-
        • your_script.pl 'name1=value1&name2=value2'
      • "Propose file change" and add your rationale for doing so.

      Update your résumé (patched CGI.pm documentation, assuming it's accepted) and watch yourself become a part of Perl history!