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.


In reply to Re: CGI::Application usage question by PodMaster
in thread CGI::Application usage question by freddo411

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.