John Peacock wrote: >> 2) _verify_att() currently uses ref() because it has only had to deal with >> references so far. This means any subclass instances of 'version' will be >> rejected and that would be impolite. It should be fixed to use isa(). > > isa() would normally be correct from an OO point of view, but there are > limitations that mean that the more strict ref() is the correct choice. The > _only_ non-numeric initializers for $VERSION that are supported by PAUSE and > CPAN are version.pm objects. version.pm objects *always* return a ref() of > 'version' (whether implemented by XS or pure Perl code). Even though I > uploaded > version::AlphaBeta to CPAN (as a proof of concept), that subclass of > version.pm > is not supported by PAUSE, so any module using that class would not be > indexable. > > To this end, it would be entirely appropriate that EU::MM *would* complain > about > a subclass of version.pm being used instead of version.pm itself. No subclass > of version.pm is supported by the entire toolchain
That strikes me as odd. Why not? > We do not want to support any random subclass of > version.pm - we only want to support true version.pm objects. This, too, strikes me as odd. Why not?