in reply to Re: Debugging Perl .cgi forms
in thread Debugging Perl .cgi forms

I know the first 3 are all covered. I can get the script working, but I often make errors while modifying the script (I'm new at this) and that's when I get the ISE's.

In regards to your last suggestion:
--I have "use CGI;" at the top of my script
--I have tried using CGI::Carp qw(fatalsToBrowser) but it didn't provide any useful information. I have never tried the other two lines (and don't know what they are) but I will slap them in there and see what happens.

Thanks.

Replies are listed 'Best First'.
Re: Re: Re: Debugging Perl .cgi forms
by dvergin (Monsignor) on Apr 01, 2001 at 07:06 UTC
    nysus, is sounds like you are over the big hurdles. This is the point where I just proceed incrementally, adding more material a bit at a time until something goes wrong.

    If you get to a point where no amount of staring at the screen brings enlightenment, show us some code and output. We love looking at the real stuff.

    But be sure you 'use strict;' and have '-w' in your hashbang line or you will get gently (?) scolded.  ;-)

      Here it is by popular demand. I've only put in the code that I changed which broke the script. Look at the password setting to see my level of frustration. :)
      #!/usr/bin/perl -w use strict; use CGI; my $query = new CGI; my $error_message = ""; my $pwd = ""; ############################################### # # # Variable initiation # # # ############################################### my $form_submission_check = "Submit"; # Set to the +name of an object on the form ############################################### # # # Script program logic # # # ############################################### if ($query->param('cancel')) { &get_password; } elsif ($query->param('change1')) { &change_password(); } elsif ($query->param('change2')) { &process_change_password(); } else { $pwd = $query->param('password'); if ($pwd eq "suckmydick") { $pwd = 1; &form; } else { &get_password(); } }
      Thanks.
        One nagging question I have.

        Are you producing a Content-type line anywhere? (The header method of CGI does that...)

Re: Re: Re: Debugging Perl .cgi forms
by nysus (Parson) on Apr 01, 2001 at 06:42 UTC
    I slapped those lines in there but get no extra info in my browser.