Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-PrereqScanner CPAN distribution.

Report information
The Basics
Id: 72062
Status: resolved
Priority: 0/
Queue: Perl-PrereqScanner

People
Owner: Nobody in particular
Requestors: cjm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.007
Fixed in: 1.008



Subject: Allow minimum version with require
It would be nice if you could specify a minimum version as a comment with a require. Something like: require Foo; # VERSION: 1.01 I realize that with dzil I can use the [Prereqs] plugin in dist.ini to supply the version, but it would be nice to keep the version number in the code. That way, if the requirement is ever removed, the [Prereqs] plugin won't add it unnecessarily.
After further thought, I decided that it would be better if the minimum version were enforced in code. That also makes the syntax easier to remember. I've submitted a pull request on GitHub that looks for require Foo; Foo->VERSION(1.01); and extracts the minimum version from the VERSION call.