summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-02 13:51:21 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-02 13:51:21 +0000
commite3e804c95d90aee717e2c436ebefa57599e64a70 (patch)
treead2aabacd8dc6d630fefcd2d77b5b37a23d5c7ff
parente3cbe32fd54913ec661efbd9621eea9e70c8ca47 (diff)
downloadperl-e3e804c95d90aee717e2c436ebefa57599e64a70.tar.gz
say() has the same syntax than print(), so forbid to override it
(like print()) p4raw-id: //depot/perl@29191
-rw-r--r--perl_keyword.pl4
-rw-r--r--t/op/cproto.t2
-rw-r--r--toke.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/perl_keyword.pl b/perl_keyword.pl
index 87332ee7e7..f71c7d035d 100644
--- a/perl_keyword.pl
+++ b/perl_keyword.pl
@@ -8,7 +8,7 @@ use warnings;
my @pos = qw(__DATA__ __END__ AUTOLOAD BEGIN CHECK DESTROY default defined
delete do END else eval elsif exists for format foreach given grep
goto glob INIT if last local m my map next no our pos print printf
- package prototype q qr qq qw qx redo return require s scalar sort
+ package prototype q qr qq qw qx redo return require s say scalar sort
split state study sub tr tie tied use undef UNITCHECK until untie
unless when while y);
@@ -26,7 +26,7 @@ my @neg = qw(__FILE__ __LINE__ __PACKAGE__ and abs alarm atan2 accept bless
length listen lcfirst localtime mkdir msgctl msgget msgrcv msgsnd
ne not or ord oct open opendir pop push pack pipe quotemeta ref
read rand recv rmdir reset rename rindex reverse readdir readlink
- readline readpipe rewinddir say seek send semop select semctl semget
+ readline readpipe rewinddir seek send semop select semctl semget
setpgrp seekdir setpwent setgrent setnetent setsockopt sethostent
setservent setpriority setprotoent shift shmctl shmget shmread
shmwrite shutdown sin sleep socket socketpair sprintf splice sqrt
diff --git a/t/op/cproto.t b/t/op/cproto.t
index 89bd555b24..a4dd691629 100644
--- a/t/op/cproto.t
+++ b/t/op/cproto.t
@@ -187,7 +187,7 @@ rewinddir (*)
rindex ($$;$)
rmdir (_)
s undef
-say (;*@)
+say undef
scalar undef
seek (*$$)
seekdir (*$)
diff --git a/toke.c b/toke.c
index bc705341fa..4513c4055f 100644
--- a/toke.c
+++ b/toke.c
@@ -7393,7 +7393,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords)
case 'a':
if (name[2] == 'y')
{ /* say */
- return (all_keywords || FEATURE_IS_ENABLED("say") ? -KEY_say : 0);
+ return (all_keywords || FEATURE_IS_ENABLED("say") ? KEY_say : 0);
}
goto unknown;