diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-09-10 23:46:47 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-01-04 05:10:02 -0800 |
commit | 8372457d1524e39b82376911e4ffb3a9d3864269 (patch) | |
tree | 91bdc518502b36cf70494c5eea9e572879d44a6c /vxs.inc | |
parent | 04df8d4df8f6391c0726976d187ee9caf7a049c2 (diff) | |
download | perl-8372457d1524e39b82376911e4ffb3a9d3864269.tar.gz |
vxs.inc: arg list checking for UNIVERSAL::VERSION
This brings it in line with the CPAN implementation. It’s hard to
test this, as the tests should go in cpan/version, but the pure-Perl
implementation doesn’t check the number of arguments.
Diffstat (limited to 'vxs.inc')
-rw-r--r-- | vxs.inc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -62,6 +62,9 @@ XS(XS_UNIVERSAL_VERSION) const char *undef; PERL_UNUSED_ARG(cv); + if (items < 1) + Perl_croak(aTHX_ "Usage: UNIVERSAL::VERSION(sv, ...)"); + if (SvROK(ST(0))) { sv = MUTABLE_SV(SvRV(ST(0))); if (!SvOBJECT(sv)) |