[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Test::CPAN::Meta and friends



On Sat, Feb 19, 2011 at 9:37 PM, Jonathan Yu <jawnsy@cpan.org> wrote:
> 2. You mentioned that the validation is supposed to be more complete,
> but is this currently the case?

My point of view: the new canonical validation is in
CPAN::Meta::Validator.  Everything should be using that.  And really,
one can just do this code below and get the YAML/JSON parsing with
Parse::CPAN::Meta behind the scenes:

    eval { CPAN::Meta->load_file( $file, {lazy_validation => 0} ) };
    is( $@, q{}, "$file is valid" );

That works for META.yml or META.json.  Whatever exists should probably
be revised to do that.

> 3. Are there issues where something might pass according to
> Test::CPAN::Meta but fail according to Test::CPAN::Meta::YAML?
>
> 4. Doesn't testing against something that is available to most users
> (Parse::CPAN::Meta) make the most sense?

It's possible that someone has a META.yml that will fail with
Parse::CPAN::Meta (using CPAN::Meta::YAML) and pass with other YAML
parsers.  But since the CPAN toolchain uses Parse::CPAN::Meta, that's
all that really matters.

-- David


Reply to: