...this is what I was about to say. Short of grabbing the whole program and setting up a test environment (which may not be that onerous), there's not even a clue here about what the program doesn't do right.

So eoin if you can give us a hint about what isn't working right, perhaps someone can suggest an answer to the problem.

In the meantime, try running the program in the debugger (invoke it with your input parameters on the command-line) and stepping through to what you consider to be the trouble spot. With the program stopped at that point, inspect the current value of your most important variables.

Also, consider adding a section that hard-codes the input parameters for your testing purposes. By that I mean you could comment out the section that looks like this:

my $user_name = $q->param('user_name'); my $gender = $q->param('gender'); my $real_name = $q->param('real_name');
...and retool it like this:
=deadcode # production version my $user_name = $q->param('user_name'); my $gender = $q->param('gender'); my $real_name = $q->param('real_name'); =cut # test version my $user_name = "Mary"; my $gender = "Queen"; my $real_name = "She Who Must Be Obeyed";
...while you're testing, it's better to have a static set of input values, and even better if you don't have to provide them by hand each test run.

Probably the most common problem I've seen with new CGI programs is that they haven't been tested fully the way we test other (command-line) programs. So be sure that it runs from the command-line and with the same permissions that the web server will have when the program is invoked in a CGI environment.

Good luck, and bring more details about your program for additional help.

update: Somebody apparently doesn't like the use of fake POD to comment out code?

...All the world looks like -well- all the world, when your hammer is Perl.
---v


In reply to Re: Re: To register or not (2)!!! by agentv
in thread To register or not 2 by eoin

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.