I provide support for a large dictionary editing project working with XML data. As part of this, I have to maintain some Perl programs which are used to check for errors in the content of the entries which cannot be found by parsing against an XML DTD. The scripts use XML Twig and LibXML.
We have recently found that these content validation scripts generate a "deep recursion" warning when run against one particular entry:
Report for entry lie, v.2 (id : 108042)
Deep recursion on subroutine "XML::LibXML::Error::as_string" at /usr/l
+ib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/XML/LibXML/Error
+.pm line 182, line 1.
I think the script is running correctly apart from this warning as it finds errors in the entry including some near the end (previous Perl errors have caused the script to bail out before finding every error)
One option I am considering is to switch it off but adding "no warnings 'recursion';" to the script does not turn the warning off.
So my questions are:
Is it safe to turn off the deep recursion warning?
How can I track down what in the entry might be causing the deep recursion?
Do I have to add the "no warnings 'recursion';" to the Error.pm script in LibXML to stop this message? As I said, I have tried adding it to my script but that does not stop the message.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.