Given the large clumps of data being thrown around in a project I'm working on, I'd like a sophisticated way to find sub-clumps of it. XPath springs immediately to mind, but it seems impractical to convert the whole mess into XML just to XPath it and convert the results back to Perl data.

On the other hand, the docs for Data::Find read like something rather close to what I'd need.

Would there be community interest in a module that was API-identical to Data::Find, except that it took XPath-like expressions instead of (or as well as, in some way, maybe?) the search criteria that that module takes?

Just struck me, while typing this out: Would I rather be better off trying to add support for XPath-like expressions to Data::Find and submitting a patch? Maybe some kind of Data::Find::Criteria:: namespace, objects of subclasses of which (such as Data::Find::Criteria::XPath, Data::Find::Criteria::Disgronifier, or whatever) could be fed as the search criteria to Data::Find? There'd need to be some cleverness in the API of those subclasses, but I reckon it's non-magical cleverness.



--
Paul (PWBENNETT)

Reply via email to