I suggest you study the CGI::Application documentation a bit more (3.1 is the latest version which is what you should have).
CGI::Application (like the docs say) uses $self->query() to retrieve an object (a CGI.pm object by default),
which has a param() method that behaves like that of CGI.pm (that's all the object has to do).
Now, CGI.pm has a method called "url_param", read about it in the "
MIXING POST AND URL PARAMETERS"
section of the CGI.pm manual. You can also read there how the param method behaves in different contexts (it is context sensitive).
I leave you with a crucial snippet from CGI::Application
sub run {
my $self = shift;
my $q = $self->query();
my $rm_param = $self->mode_param() || croak("No rm_param() specifi
+ed");
my $rm;
# Support call-back instead of CGI mode param
if (ref($rm_param) eq 'CODE') {
# Get run-mode from subref
$rm = $rm_param->($self);
} else {
# Get run-mode from CGI param
$rm = $q->param($rm_param); # PodMaster: FYI - this is scala
+r context
}
# If $rm undefined, use default (start) mode
my $def_rm = $self->start_mode() || '';
$rm = $def_rm unless (defined($rm) && length($rm));
#...
You may also wanna read up on "mode_param()" in the CGI::Application docs.
I hope this helps you see what's going on and solve your problem.
| MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" |
| I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). |
| ** The third rule of perl club is a statement of fact: pod is sexy. |