Randy J. Ray wrote:
> Seeing as one of the
> CPANTS metrics gauges whether a distro's META.yml conforms to the
> most-recent spec, I was wondering if there is an existing approach to
> comparing a YAML doc to a given "spec". Or what constitutes a YAML spec, for
> that matter.

The YAML specifications can be found here:
http://yaml.org/

Or do you mean a YAML data validation schema?  For that you can use Rx.
http://rjbs.manxome.org/rx/

It might be interesting to write up the META.yml spec as an Rx schema.


> I've seen the spec for META.yml, which is itself a YAML doc. I
> wondered what the CPANTS framework does, in terms of validating? Is is
> something generic that I could adapt? Or is it a one-off that has to be
> adjusted each time changes are made to the spec itself?

There's Test::CPAN::Meta and Test::YAML::Meta... they look like the same thing
and its not clear why there's two parallel distributions.

Anyhow, it just has a big data structure of what keys are allowed, what's
mandatory, what's optional and what the values can be.


-- 
170. Not allowed to "defect" to OPFOR during training missions.
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/

Reply via email to