Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: SAX filter in mod_perl

by ironchicken (Novice)
on May 05, 2012 at 01:10 UTC ( [id://969005]=note: print w/replies, xml ) Need Help??


in reply to Re: SAX filter in mod_perl
in thread SAX filter in mod_perl

Of course, this would make answering the question a lot easier and would also help me to identify further problems. However, having spent the last hour trying, I can't reproduce the problem with a simplified version.

Futhermore, I've actually now fixed the problem in the real application. Unfortunately, I'm not sure exactly what it was. I had a nested subroutine which was calling substr on a string variable from its outer scope; this variable contained the character data being chunked. I tried moving the procedure encoded in that subroutine into inline statements of the enclosing subroutine, thus dispensing with the nested subroutine, and now the problem does not occur. Possibly it was some sort of scoping problem, such as an unintended closing over that string variable?

Replies are listed 'Best First'.
Re^3: SAX filter in mod_perl
by roboticus (Chancellor) on May 05, 2012 at 13:07 UTC

    ironchicken:

    If you don't know what caused the problem, I wouldn't claim that you've fixed it. It's certainly possible that the bug is gone, but it's also possible that the bug still exists, and simply isn't manifesting itself right now. It may just need a different pattern of data to cause some other odd symptom. If you have a suspicion about what the problem *might* have been, I'd encourage you to experiment a little bit more and try to reproduce the bug.

    If you can identify the problem then you can remove the bug with confidence. Additionally, you may learn something new about perl. I frequently find that tracking down bugs helps me either (a) learn more about the workings of perl, (b) figure out coding methods that are less error-prone, and/or (c) improve my ability to question my assumptions and locate bugs more easily.

    I'm sure you've got tasks to complete, and since your immediate problem gone, there's a strong temptation to proceed with the next item in your list. I'm not going to tell you to pull a Captain Ahab and treat this bug as your Moby Dick, but I'd definitely put a little more time into it trying to find the definite cause.

    </ramble_mode>

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://969005]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-20 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found