Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^5: Unwanted parameter when executing CGI scripts

by tobyink (Abbot)
on Jan 05, 2013 at 23:08 UTC ( #1011812=note: print w/replies, xml ) Need Help??


in reply to Re^4: Unwanted parameter when executing CGI scripts
in thread [SOLVED] Unwanted parameter when executing CGI scripts

Indeed, the whole line doesn't get executed. But the line doesn't need to be executed because there's no query string. Thus there will be no keywords; nothing to clean up; no work needs to be done.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
  • Comment on Re^5: Unwanted parameter when executing CGI scripts

Replies are listed 'Best First'.
Re^6: Unwanted parameter when executing CGI scripts
by Nocturnus (Beadle) on Jan 07, 2013 at 08:07 UTC

    But that was exactly my problem: If I called

    /cgi-bin/script.pl

    (i.e. without any parameters and without query string), CGI.pm behaved like if I had called

    /cgi-bin/script.pl?keywords=

    I should have mentioned that my application in this case needed to get the parameters from the query string only (GET parameters) and that it should not get the POST parameters. Thus, I was using

    $q -> url_params

    instead of

    $q -> param

    Perhaps that's the reason for the misbehavior. Furthermore, I have seen some more misbehavior (see post below), so I dumped CGI.pm; I am now parsing the query string myself.

    Regards,

    Nocturnus

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011812]
help
Chatterbox?
[erix]: ( also: UniCorn Throne )
[zentara]: erix I hope both tusks pointed in the same direction :-)
LanX "♪..♫ Last night a DJ killed my wife ♪..♫ "
zentara...oO 1 more reason I prefer Perl to Python is I can't believe how long Python takes to compile, and you can't disable the myriad of tests
[LanX]: so that's where you've been the last two years? Compiling Python?
[zentara]: LanX no! I was learning why Krishna made me into a unicorn. :-)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-03-30 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (361 votes). Check out past polls.