Regarding your comment, "not sure why you are manually altering your query string", . . .a fair question. In fact the authors (ibid., p.95) comment "It may seem odd that you would ever want to modify parameters yourself, . . .Setting parameters is useful for many reasons, but especially when assigning default values to fields in forms."

Thanks for your suggestion. Looks like it will work. Still, I wonder why such a method function is not workable within CGI.pm (module). I'm new to Perl modules, etc., and I wonder if I'm just not "getting it?"

There may even (probably) be a better approach to my immediate purpose. I've designed a module that will handle single transactions: Inquire, Update, Insert and Delete, on a MySQL database table. The module is totally generic, and will accept a parameter list consisting of $host_name, $db_name, $userid, $passwd, $table, and $pkey. To wit, I have also created a module that copies-in these "standard" parameters, and optionally contains a subroutine that will print the six hidden fields that can become parameters in the query string. My concept is analogous to using copy-books in COBOL, the #include in RPG's, or the include etc.h (file) in C. What I've discovered it that if a parent pgm-A (that does not specify a value for $table) calls child pgm-B, and this child makes the decision to specify the Vendor Master Table (in my application, the user has transversed through a host server/database login, and has made an application selection from a menu of business applications), then it is apparently difficult to insert the literal value "vndr_mstr" into the query string already containing the parameter, "&table=", i.e., (NULL), that will eventually be presented to my DBI_API.pm module.


In reply to Re^2: Modifying Parameter Values w/CGI.pm by rtwingfield
in thread Modifying Parameter Values w/CGI.pm by rtwingfield

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.