Skip Menu |

This queue is for tickets about the XML-Easy CPAN distribution.

Report information
The Basics
Id: 96560
Status: new
Priority: 0/
Queue: XML-Easy

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.009
Fixed in: (no value)



Subject: Avoid usage of "use re 'eval'"
Hi Andrew, I need an XML parser to work with perl in an embedded environment (perl 5.10.1, Linux, but reduced memory, slow CPU). XML::Easy seems to fit, except for one thing: in XML::Easy, "use re 'eval'" is used ( to allow (??{}) in regexp), and the 're' module is not small. I suspect that you implemented $XML::Easy::Syntax::xml10_content_rx that way to allow $xml10_element_rx to be local-ized while parsing. Am I right? Anyway, would it be possible to refactor $XML::Easy::Syntax::xml10_content_rx to avoid the usage of (??{ ... }) ? A general solution (a new release of XML::Easy) would be preferred, but a solution requiring me to use a patched version of XML::Easy::Syntax only for our internal usage would be acceptable too. Thanks for your help, -- Olivier Mengué - http://perlresume.org/DOLMEN
Hi Andrew,

One year later I'm still interested in a response to my query.
So far I'm using a patched version of XML::Easy::Syntax where I removed $xml10_content_rx and all its dependencies ($xml10_element_rx, $xml10_document_xdtd_rx, $xml10_extparsedent_rx) and I'm able to use xml10_read_document().

Chears,

Olivier.

Le 2014-06-19 15:37:47, DOLMEN a écrit :
Show quoted text
> Hi Andrew,
>
> I need an XML parser to work with perl in an embedded environment
> (perl 5.10.1, Linux, but reduced memory, slow CPU).
>
> XML::Easy seems to fit, except for one thing: in XML::Easy, "use re
> 'eval'" is used ( to allow (??{}) in regexp), and the 're' module is
> not small.
> I suspect that you implemented $XML::Easy::Syntax::xml10_content_rx
> that way to allow $xml10_element_rx to be local-ized while parsing. Am
> I right?
>
> Anyway, would it be possible to refactor
> $XML::Easy::Syntax::xml10_content_rx to avoid the usage of (??{ ... })
> ?
> A general solution (a new release of XML::Easy) would be preferred,
> but a solution requiring me to use a patched version of
> XML::Easy::Syntax only for our internal usage would be acceptable too.
>
> Thanks for your help,


-- 
Olivier Mengué - http://perlresume.org/DOLMEN - https://gratipay.com/dolmen/