Don't parse the required version of perl #25

Merged
merged 1 commit into from Nov 6, 2012

Conversation

Projects
None yet
2 participants
Collaborator

schwern commented Nov 6, 2012

I ran into an old version of version.pm which has this in its META.yml.
https://metacpan.org/source/JPEACOCK/version-0.76/META.yml

requires:
  perl: '> 5.005'

This is valid meta spec, but an invalid version. Worked around it by bailing out
as early as possible on a Perl version. The real fix is to read these versions
using CPAN::Meta.

I couldn't figure out how to write a test for it. Suggestions?

Don't bother parsing the perl version.
I ran into an old version of version.pm which has this in its META.yml.

    requires:
      perl: '> 5.005'

This is valid meta spec, but an invalid version.  Work around it by bailing out
as early as possible on a Perl version.  The real fix is to read these versions
using CPAN::Meta.
Owner

thaljef commented Nov 6, 2012

On Nov 6, 2012, at 1:59 PM, Michael G. Schwern wrote:

requires:
perl: '> 5.005'
This is valid meta spec, but an invalid version. Worked around it by bailing out
as early as possible on a Perl version. The real fix is to read these versions
using CPAN::Meta.

I haven't looked at the code yet (my internet is down) but that sounds reasonable. I'm pretty sure it was just ignoring the perl prereq anyway.
I couldn't figure out how to write a test for it. Suggestions?

Pinto::Tester and Pinto::Tester::Util have tools for making dummy distributions with various package & dependencies. But they may not be good at letting you create "invalid" distributions. Give them a try though. The trick is figuring out the shorthand notation for specifying a distribution. Documentation is in the comments at the moment.

-Jeff

thaljef pushed a commit that referenced this pull request Nov 6, 2012

Merge pull request #25 from schwern/master
Don't parse the required version of perl

@thaljef thaljef merged commit 68ce2a8 into thaljef:master Nov 6, 2012

1 check failed

default The Travis build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment