Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 68198
Status: resolved
Priority: 0/
Queue: Moose

People
Owner: DROLSKY [...] cpan.org
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.0006
Fixed in: (no value)



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,
On Sat May 14 09:44:20 2011, ANDK wrote: Show quoted text
> 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 Show quoted text
> > 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.
We already have a check in Moose.pm: BEGIN { die "Class::MOP version $Moose::VERSION required--this is version $Class::MOP::VERSION" if $Moose::VERSION && $Class::MOP::VERSION ne $Moose::VERSION; } We can't just add a version number on use lines because we use dzil, so the code in the repo doesn't have a version set. I'm not sure why this didn't fire for you. I'd check the test report but the cpantesters server is currently down.
Looks like this was fixed some time in 2014.