http://www.perlmonks.org?node_id=758060


in reply to Perl Data Structure Validation Part 2

This sounds a little like Data::Diver except that will let you specify only one thing at a time. If you want to use an expression that allows wildcards or regular expressions, it might be a good block to build on.

  • Comment on Re: Perl Data Structure Validation Part 2

Replies are listed 'Best First'.
Re^2: Perl Data Structure Validation Part 2
by zerohero (Monk) on Apr 17, 2009 at 02:44 UTC

    RJBS just turned me on to Data::DPath which looks pretty good. I like the tagline: "DPath is not XPath!"

Re^2: Perl Data Structure Validation Part 2
by zerohero (Monk) on Apr 17, 2009 at 02:42 UTC

    Thanks for the tip. Data::Diver seems to do part of what is needed, but I doubt it's a platform to build on. The reason is that the technique being used is somewhat limited. A better approach is to just use a string, and parse it, for full control.

    I've seen that there are a couple of specs for technologies out there that are JSON related (JSON Schema, JSON Xpath). Once someone implements these, they'll probably be the way to go.