in reply to Re: To register or not (2)!!!
in thread To register or not 2
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:
...and retool it like this:my $user_name = $q->param('user_name'); my $gender = $q->param('gender'); my $real_name = $q->param('real_name');
...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.=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";
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
|
|---|