develooper Front page | perl.qa | Postings from September 2016

Re: CPANifying our test framework - or parts of it

Thread Previous | Thread Next
From:
David Cantrell
Date:
September 12, 2016 16:43
Subject:
Re: CPANifying our test framework - or parts of it
Message ID:
20160912164337.GB602@bytemark.barnyard.co.uk
On Sat, Sep 10, 2016 at 03:34:02AM +0200, Sam Kington wrote:

> (A) To say, flexibly, ???I want a data structure that looks like this???, and to be able to say (1) this field must look exactly like this, (2) this field should look like this, and remember it, (3) this field should exist, but I don???t care what its value is, and (4) there might be additional fields but I don???t care about them for the purpose of this test.

Investigate Params::Validate (which you're already using elsewhere in
your code, although you're not using all of its functionality). It's pretty
powerful.

For checking deeply nested data structures in XML I like XPath.
Data::DPath appears to allow similar syntax for inspecting perl data
structures.

-- 
David Cantrell | London Perl Mongers Deputy Chief Heretic

Just because it is possible to do this sort of thing
in the English language doesn't mean it should be done

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About