Can perl be compiled with the -DDEBUGGER option on Windows using ActivePerl?

There are many options for debugging, but it says you need to compile Perl with -DDEBUGGER. How we do it in Windows using ActivePerl.

Also, I had an out of memory problem with Perl. I was reading an XML file with 5 lines, but the second line was too big (file size was 4.3Mb) for 5 lines. It does not parse this second line and it does not print the line:

print $_ if /match/ ; #match does exists fyi

      

How do I parse this second line?

+1


source to share


2 answers


Are you sure your ActivePerl binary is not yet compiled with debugging support? I know that ActiveState offers a graphical debugger with almost the same functionality as Perl's own debugger, so I assumed their binaries were already compiled with debugging support.

Your second question is not really related to the first, you should probably post it as a separate question. But try to answer: I doubt it's "too big" to parse, since you're only limited by your system memory and 4.3Mb isn't that big by modern standards, even if your regex was pretty complex (which it doesn't " t seems to be) Are you sure the pattern you are using is actually contained in this line?



I'm a little lost as I don't understand how to print multiple megabytes of a single line from a file based on a simple regular match, especially. when the whole file has only 5 lines. What exactly are you trying to accomplish?

+1


source


ActiveState contributes its sources back to the main Perl source, so you can compile it yourself if you want. You just need to use the same compiler that ActiveState uses. You should be able to see all of the ActiveState compilation options used when running perl -V

from a command window.



However, you may not need to do this. If you tell us what you are trying to accomplish, we can give you a better answer. :)

+1


source







All Articles