Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I don't get it - Why does CGI::Application hate me?
package run_mode_test; use strict; use base qw/CGI::Application/ ; use CGI qw/:standard/; sub setup { my $self =shift; $self->start_mode('page1'); $self->run_modes('page1' => 'page1', 'page2' => 'page2'); } sub page1 { my $self =shift; my $q = $self->query(); my $output = ''; $output .= $q->start_html(-title => 'Test Run Mode'); $output .= 'this is page1'; $output .= $q->start_form(); $output .= $q->hidden(-name => 'rm', -value => 'page2'); $output .= $q->submit(); $output .= $q->end_form(); $output .= $q->end_html(); return $output; } sub page2 { my $self =shift; my $q = $self->query(); my $output = ''; $output .= $q->start_html(-title => 'Test Run Mode'); $output .= 'this is page2'; $output .= $q->start_form(); $output .= $q->hidden(-name => 'rm', -value => 'page1'); $output .= $q->submit(); $output .= $q->end_form(); $output .= $q->end_html(); return $output; } 1;
page1 displays properly, when submitted it brings up page 2. Page2 however has the hidden rm field set to page2.

In reply to CGI::Application is ignoring me by Anonymous Monk

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-05-27 22:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found