There are many debugging option available, but it says you need to compile Perl with -DDEBUGGER option. How do we do that on Windows with ActivePerl.
Also, I had this problem of out of memory with Perl. I was reading a XML file with 5 lines but the second line was way way too big, (the file size was 4.3Mb) for 5 lines. It does not parse this second line and fails to print the line:
print $_ if /match/ ; #match does exists fyi
How do I parse this second line then?
-
Are you sure your ActivePerl binary isn't already compiled with debugging support? I know that ActiveState offers a graphical debugger with pretty much the same features as the native Perl debugger, so I had assumed their binaries were already compiled with debugging support.
Your second question is really not related to the first, you should probably post it as a separate question. But to attempt an answer: I doubt that it's "way too big" to parse, since you are limited only by your system's memory and 4.3Mb is not that large by modern standards, even if your regex was fairly complicated (which it doesn't seem to be). Are you sure the pattern you are matching is really contained in that line?
I am a little lost as I don't understand the point of printing a multi-megabyte single line from a file based on a simple regex match, esp. when the entire file only has 5 lines in it. What exactly are you trying to accomplish?
brian d foy : The -DDEBUGGING is extra debugging stuff, not just the stuff yuo'd get from a normal -d.Adam Bellaire : Good point, I'm still not clear on whether the standard ActiveState binary is compiled with that option on or not.Brad Gilbert : run perl -v to find out what options are present. -
ActiveState contributes its sources back to the main Perl source code, so you can compile it yourself if you like. You just have to use the same compiler that ActiveState uses. You should be able to see all the compilation options ActiveState used by running
perl -V
from a command window.However, you might not have to do this. If you tell us what you are trying to accomplish, we might be able to give you a better answer. :)
0 comments:
Post a Comment