Commit
b8c38f0a2a65 accidentally made prototype("CORE::CORE") return
undef instead of dying. This is the only case that reached the line
with the ‘Should not happen...’ comment.
This commit changes it to be handled earlier and also adds an asser-
tion to make sure that unreachable code really is unreachable (which
it should be now, I think, I hope...).
PERL_ARGS_ASSERT_CORE_PROTOTYPE;
- if (!code) {
+ if (!code || code == -KEY_CORE) {
if (croak)
return (SV *)Perl_die(aTHX_
"Can't find an opnumber for \"%s\"", name
}
i++;
}
- return NULL; /* Should not happen... */
+ assert(0); return NULL; /* Should not happen... */
found:
defgv = PL_opargs[i] & OA_DEFGV;
oa = PL_opargs[i] >> OASHIFT;
}
BEGIN { require './test.pl'; }
-plan tests => 243;
+plan tests => 244;
while (<DATA>) {
chomp;
__PACKAGE__ ()
__DATA__ undef
__END__ undef
+CORE unknown
abs (_)
accept (**)
alarm (_)