We shouldn’t consider ver and version to be the same class.
If ver inherits from version, ver->new should give a ver object.
This string comparison bug has only ever existed in the perl core
version of the version routines. It was
ed1db70e1224 in 5.16 that
introduced it.
is $v->numify, '0.520', 'Correctly nummified';
}
+ { # https://rt.cpan.org/Ticket/Display.html?id=88495
+ @ver::ISA = "version";
+ is ref(ver->new), 'ver', 'ver can inherit from version';
+ }
+
}
1;
}
rv = new_version(vs);
- if ( strnNE(classname,"version", len) ) /* inherited new() */
+ if ( len != 7
+ || strnNE(classname,"version", len) ) /* inherited new() */
sv_bless(rv, gv_stashpvn(classname, len, GV_ADD | flags));
mPUSHs(rv);