Subject: | Insufficient version verification |
I'm not sure how important this is in the practical world but it seems
to me a cheap way to protect the enduser from bitrot, so please consider
to address it.
Four of my CPAN smokers exhibited the same problem that could have been
detected better if Moose and/or Class::MOP would track required versions.
In Moose 2.006 I find:
% egrep 'use Class::MOP[ ;]' lib/**/*.pm
lib/metaclass.pm:use Class::MOP;
lib/Moose/Exporter.pm:use Class::MOP;
lib/Moose/Meta/Attribute.pm:use Class::MOP ();
lib/Moose/Meta/Class/Immutable/Trait.pm:use Class::MOP;
lib/Moose/Meta/Class.pm:use Class::MOP;
lib/Moose.pm:use Class::MOP;
lib/Moose/Util.pm:use Class::MOP;
lib/Moose/Util/TypeConstraints/OptimizedConstraints.pm:use Class::MOP;
lib/oose.pm:use Class::MOP;
None of these require a minimum version of Class::MOP even though some
of them are not compatible with some older versions of Class::MOP.
What happened on my four smokers was that (for some unknown reason)
Class::MOP 1.12 was installed on top of Moose 2.0006. Instant brokenness
of third party modules like WWW::Google::PageSpeedOnline was the
consequence as can be seen in
http://www.cpantesters.org/cpan/report/c6e55292-7cb0-11e0-be9b-271c7b75c068
Re-installing Moose 2.0006 resolved the issue.
It would be nice if you could start adding some version sanity checks to
your code as a defensive mechanism for whatever chances there are to get
partially broken installations.
Thanks,