Probe::CommandLine and Probe::CBuilder plugins: add atleast_version arg
shawnlaffan opened this issue · 3 comments
It would be useful if the Probe::CommandLine and Probe::CBuilder plugins had an atleast_version
arg, similar to the PkgConfig plugins.
atleast_version
would only make sense if version
is also passed, so it could be applied only if the version argument is also passed, warning if not.
It is not difficult to implement a bespoke probe to achieve the same result, but the plugin model is cleaner.
Sounds reasonable. Would appreciate a PR!
I think I see where it would go. Will work something up for review.
Work in progress is at https://github.com/shawnlaffan/Alien-Build/tree/more_atleast_versions
I am currently using Sort::Versions::versioncmp
to compare versions but that would require an additional dependency. Alien::Base has a version_cmp
method but that seems not to work when comparing cases like '1.00' with '1.5.0'. In this case it only compares the first two numbers. Maybe it's a case of "alienfile writer must use the same version format as the system", in which case Alien::Base::version_cmp
can be used.
Edit - My error. Calling Alien::Base->version_cmp works.