Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chaoticset (2105)

  (email not shown publicly)
AOL IM: chaoticset23 (Add Buddy, Send Message)
Yahoo! ID: illuminatus_foil (Add User, Send Message)

JAPH. (That's right -- I'm not Really Inexperienced any more.)

I'm not just here, I'm here [], and here [] too, I ramble randomly in my philosophical blog [] and my other blog []. Soon I'll come in a convenient six-pack.

Journal of chaoticset (2105)

Sunday October 28, 2001
01:21 PM

Debugging (I Wish I Had Raid)

[ #1093 ]
Well, if it were something so simple as just typing it in and watching it work, I wouldn't need to learn how to do it right...right?

I've finally hit a stride of sorts with this: Bring up the page, attempt to access the script, bring up the error log, fix those errors, rinse, and repeat. Time to debug.

Okay...fiddle fiddle fiddle. Realize I wrote the *loop* for this in one place and the code in another; combine and rip out some common elements. Declare one of my stupid variables and run.

A whole series of these pop up:
[Sun Oct 28 12:44:43 2001] [error] [client] File does not exist: c:/program files/apache group/apache/htdocs/scripts/root.exe

To which I can only mirror my internal reaction: "HUH?!"

I may not know what caused *those* errors, but I can safely assume something is wrong with what I'm trying to do. Near the end of the ten or so errors is this very understandable line:
[Sun Oct 28 13:03:30 2001] [error] [client] Missing $ on loop variable at c:\PROGRA~1\APACHE~1\APACHE\CGI-BIN\CARTER.PL line 111.

I've found that when I fix the errors that make sense, the nonsensical (to me) ones tend to fall away as well. But I didn't write a new loop...!

I found the problem immediately; it was a line or two above. A naked 'for' statement, an aborted thought halfway through my fingers.

Backspace, backspace, backspace. Gone.


Crap. Two pertinent errors stand out on this one:

[Sun Oct 28 13:04:25 2001] [error] [client] main::get_cart_name() called too early to check prototype at c:\PROGRA~1\APACHE~1\APACHE\CGI-BIN\CARTER.PL line 93.
[Sun Oct 28 13:04:25 2001] [error] [client] Global symbol "$card" requires explicit package name at c:\PROGRA~1\APACHE~1\APACHE\CGI-BIN\CARTER.PL line 132.

Huh. I thought you could put subs anywhere and the script would handle it, but if it says it wants that earlier, I won't argue. I move get_cart_name above where it's called.

Where I had 'my $card', I changed it to 'my $cart', because I *thought* I had weeded out all uses of $card. I was wrong, it seems. Fixed.

Let's see what happens... Page hasn't loaded yet. Another friggin' infinity problem.

I'm going to the prompt for this one, since it seems to help with these.

Well, that and I'm going to get some real food. Peanut butter on whole-wheat toast is a nice little fake breakfast, but my body is crying out for at least some ramen. Kitchen time, then prompt this problem out of my life.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.