Closed tlhackque closed 8 years ago
I see your point but on the other hand there is in total 77 modules in CryptX distribution and I do not know of a simple way how to maintain consistent $VERSION
in 77 *.pm
files.
The workaround might be to depend not on Crypt::PK::ECC
but on the whole CryptX
where you can define required version.
I can depend on CryptX, but it's by no means obvious that one should do this.
I didn't know that Crypt::PK::ECC was part of CryptX until I started reading code.
I found the module directly (not from CryptX).
The doc only mentions CryptX in "since" under some methods...
As far as I can tell, the end user never has use CryptX;
in his code.
Are there really 77 modules that an end-user would use
in his code? The most important are what other packages use
, since that what they list for dependencies. (Also, tools such as Dist::Zilla identify the dependencies by scanning source code for require
and use
.) But even 77 is manageable.
Some ways to maintain consistent $VERSION
with a multi-module distribution:
Dist::Zilla::Plugin::GitVersionCheckCJM
, or Dist::Zilla::Plugin::PkgVersion
)our $VERSION = $CryptX::VERSION;
Dist::Zilla::Plugin::PkgVersion sounds like your best choice, if you package with Dist::Zilla.
If not, your package builder could include something like
VERSION=1.99 find lib -name '*.pm' -exec sed -i.bak -e"s/^our \$VERSION = .*'\$/our \$VERSION = '$VERSION';/g" {} \;
There are other choices depending on how you manage your development...
For the reverse dependencies (use CryptX, etc), you can do something similar, or just update them when a change makes it necessary. "It depends"...
Fixed in CryptX-0.041 which I have just uploaded to CPAN,
Thanks for your time.
Thanks!
I am using Crypt::PK::ECC in another CPAN module.
I can't specify a prerequisite version in my package's META because Crypt::PK::ECC doesn't include a $VERSION "our" variable. This makes diagnosing CPANTS reports difficult...
Apparently you only have a $VERSION in Cryptx - which I don't explicitly use or install.
Please add a $VERSION to Crypt::PK::ECC.
It looks like this should also be done for DH, RSA and DSA, though I don't currently use them.
It would also be a good idea for these modules to add a version constraint when they use Cryptx, PK, etc.
Thanks.