const int code = keyword(s + 6, SvCUR(TOPs) - 6, 1);
if (code < 0) { /* Overridable. */
#define MAX_ARGS_OP ((sizeof(I32) - 1) * 2)
- int i = 0, n = 0, seen_question = 0;
+ int i = 0, n = 0, seen_question = 0, defgv = 0;
I32 oa;
char str[ MAX_ARGS_OP * 2 + 2 ]; /* One ';', one '\0' */
}
goto nonesuch; /* Should not happen... */
found:
+ defgv = PL_opargs[i] & OA_DEFGV;
oa = PL_opargs[i] >> OASHIFT;
while (oa) {
- if (oa & OA_OPTIONAL && !seen_question) {
+ if (oa & OA_OPTIONAL && !seen_question && !defgv) {
seen_question = 1;
str[n++] = ';';
}
str[n++] = ("?$@@%&*$")[oa & (OA_OPTIONAL - 1)];
oa = oa >> 4;
}
+ if (defgv && str[n - 1] == '$')
+ str[n - 1] = '_';
str[n++] = '\0';
ret = sv_2mortal(newSVpvn(str, n - 1));
}
while (<DATA>) {
chomp;
- my ($keyword, $proto) = split;
+ (my $keyword, my $proto, local $TODO) = split " ", $_, 3;
if ($proto eq 'undef') {
ok( !defined prototype "CORE::".$keyword, $keyword );
}
# the keyword list :
__DATA__
-abs (;$)
+abs (_)
accept (**)
-alarm (;$)
+alarm (_)
and ()
atan2 ($$)
bind (*$)
chomp undef
chop undef
chown (@)
-chr (;$)
-chroot (;$)
+chr (_)
+chroot (_)
close (;*)
closedir (*)
cmp unknown
connect (*$)
continue ()
-cos (;$)
+cos (_)
crypt ($$)
dbmclose (\%)
dbmopen (\%$$)
exec undef
exists undef
exit (;$)
-exp (;$)
+exp (_)
fcntl (*$$)
fileno (*)
flock (*$)
goto undef
grep undef
gt ($$)
-hex (;$)
+hex (_)
if undef
index ($$;$)
-int (;$)
+int (_)
ioctl (*$$)
join ($@)
keys (\%)
kill (@)
last undef
-lc (;$)
-lcfirst (;$)
+lc (_)
+lcfirst (_)
le ($$)
-length (;$)
+length (_)
link ($$)
listen (*$)
local undef
localtime (;$)
lock (\$)
-log (;$)
+log (_)
lstat (*)
lt ($$)
m undef
map undef
-mkdir (;$$)
+mkdir (_;$) this prototype is not supported
msgctl ($$$)
msgget ($$)
msgrcv ($$$$$)
next undef
no undef
not ($)
-oct (;$)
+oct (_)
open (*;$@)
opendir (*$)
or ()
-ord (;$)
+ord (_)
our undef
pack ($@)
package undef
q undef
qq undef
qr undef
-quotemeta (;$)
+quotemeta (_)
qw undef
qx undef
rand (;$)
read (*\$$;$)
readdir (*)
readline (;*)
-readlink (;$)
+readlink (_)
readpipe unknown
recv (*\$$$)
redo undef
-ref (;$)
+ref (_)
rename ($$)
require undef
reset (;$)
reverse (@)
rewinddir (*)
rindex ($$;$)
-rmdir (;$)
+rmdir (_)
s undef
say (;*@)
scalar undef
shmread ($$$$)
shmwrite ($$$$)
shutdown (*$)
-sin (;$)
+sin (_)
sleep (;$)
socket (*$$$)
socketpair (**$$$)
splice (\@;$$@)
split undef
sprintf ($@)
-sqrt (;$)
+sqrt (_)
srand (;$)
stat (*)
state undef
times ()
tr undef
truncate ($$)
-uc (;$)
-ucfirst (;$)
+uc (_)
+ucfirst (_)
umask (;$)
undef undef
unless undef