Monks,

I must confess: I wasn't sure if this should go under SOPW, PD or Meditations, but here it is anyway.

In writing a web application (for my wife of all people) to manage a list of contacts for a dog club that I belong to. The technique that I use in designing my web applications in Perl is to use a central script that dispatches to various OO modules that contain the functionality I am after. A CGI parameter that gets carried between executions of the central script is a parmeter called "Action" that tells the central script what to do next.

Often times I use hidden fields to carry the value of Action and other times I use submit buttons to "jam" the value.

While debugging my application I got into a situation where the next action was not being executed. I started to dig into it and discovered something wierd. Here is a sniglet of the code that I was using:

A simplified version of the resultant HTML looked like: <form ... blah blah...>
<hidden name="Action" value="lastAction"/> <submit name="Action" value="insertNext">
</form>

Now: what I want to know is was I smoking too much crack that day or has anybody else seen this sort of odd behavior.

I was able to fix the issue but invoking $cgi->delete_all prior to building the new form.


Peter @ Berghold . Net

Sieze the cow! Bite the day!

Test the code? We don't need to test no stinkin' code! All code posted here is as is where is unless otherwise stated.

Brewer of Belgian style Ales


In reply to Odd CGI.pm behavior. by blue_cowdawg

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.