UNIVERSAL::VERSION should treat "version" as a string
authorFather Chrysostomos <sprout@cpan.org>
Wed, 23 Nov 2011 06:34:07 +0000 (22:34 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 23 Nov 2011 14:04:43 +0000 (06:04 -0800)
commitc2a3bbbf95242da21477313087361902cd3b026e
tree2afc45eac8b6375dc5ad07e05627600b8b0f1444
parent47a0660e68fc38d8d2ff11855d0d5fa5e2af0b82
UNIVERSAL::VERSION should treat "version" as a string

It was treating it as a version object and then failing the validation
test, instead of treating it as an invalid version format, as it does
with "versions":

$ ./perl -Ilib -e'$VERSION = "versions"; main->VERSION(1)'
Invalid version format (dotted-decimal versions require at least three parts) at -e line 1.
$ ./perl -Ilib -e'$VERSION = "version"; main->VERSION(1)'
Invalid version object at -e line 1.

See also perl #102586.
t/op/universal.t
universal.c