This behavior is naively unexpected by me; can somebody please explain this mechanism?
You're expecting too much from a debugging feature of CGI.pm
The CGI protocol communicates through %ENV , and each child process gets the same %ENV as parent process, so to CGI.pm won't use the debugging freature and look at @ARGV
But since CGI programs don't populate @ARGV you can use
#!/usr/bin/perl -- use strict; use warnings; use CGI (); Main( @ARGV ); exit( 0 ); sub Main { my $cgi = @_ ? CGI->new(@_) : CGI->new; }
Or it might be prudent to use GetOpt::Long / --query=a=1;b=2;c=3... instead of testing only for @ARGV
In reply to Re: CGI with nested apps, each calling param() to get their args
by Anonymous Monk
in thread CGI with nested apps, each calling param() to get their args
by Zforgetaboutit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |