Groups | Search | Server Info | Login | Register


Groups > perl.qa > #7

Re: CPANifying our test framework - or parts of it

Newsgroups perl.qa
Date 2016-09-12 17:43 +0100
Subject Re: CPANifying our test framework - or parts of it
Message-ID <20160912164337.GB602@bytemark.barnyard.co.uk> (permalink)
References <92D73771-EF93-4C48-A2F8-4259E24B7E84@illuminated.co.uk>
From david@cantrell.org.uk (David Cantrell)

Show all headers | View raw


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

Back to perl.qa | Previous | Next | Find similar


Thread

Re: CPANifying our test framework - or parts of it david@cantrell.org.uk (David Cantrell) - 2016-09-12 17:43 +0100

csiph-web