summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-04-26 20:38:37 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-29 09:36:24 -0700
commitd885f758c395fc9ced8e329d176848c477181d17 (patch)
tree3d3b14386f714a82d9a3df45ecddf93bfc611774
parent6c871ae8e236db6f8ab52923bb5d23408e69162e (diff)
downloadperl-d885f758c395fc9ced8e329d176848c477181d17.tar.gz
Add &CORE::defined
-rw-r--r--gv.c8
-rw-r--r--t/op/coreamp.t2
-rw-r--r--t/op/coresubs.t2
3 files changed, 5 insertions, 7 deletions
diff --git a/gv.c b/gv.c
index 4dc9409dff..b8f92e7867 100644
--- a/gv.c
+++ b/gv.c
@@ -455,12 +455,10 @@ S_maybe_add_coresub(pTHX_ HV * const stash, GV *gv,
if (!code) return NULL; /* Not a keyword */
switch (code < 0 ? -code : code) {
/* no support for \&CORE::infix;
- no support for funcs that take labels, as their parsing is
- weird;
- no support (yet) for keywords that are not overridable */
+ no support for funcs that do not parse like funcs */
case KEY___DATA__: case KEY___END__: case KEY_and: case KEY_AUTOLOAD:
case KEY_BEGIN : case KEY_CHECK : case KEY_cmp: case KEY_CORE :
- case KEY_default : case KEY_defined: case KEY_delete: case KEY_DESTROY:
+ case KEY_default : case KEY_delete : case KEY_DESTROY:
case KEY_do : case KEY_dump : case KEY_else : case KEY_elsif :
case KEY_END : case KEY_eq : case KEY_eval : case KEY_exists :
case KEY_for : case KEY_foreach: case KEY_format: case KEY_ge :
@@ -478,7 +476,7 @@ S_maybe_add_coresub(pTHX_ HV * const stash, GV *gv,
case KEY_x : case KEY_xor : case KEY_y :
return NULL;
case KEY_chdir:
- case KEY_chomp: case KEY_chop:
+ case KEY_chomp: case KEY_chop: case KEY_defined:
case KEY_each: case KEY_eof: case KEY_exec:
case KEY_keys:
case KEY_lstat:
diff --git a/t/op/coreamp.t b/t/op/coreamp.t
index c1075b09fa..65b299fbc6 100644
--- a/t/op/coreamp.t
+++ b/t/op/coreamp.t
@@ -886,7 +886,7 @@ like $@, qr'^Undefined format "STDOUT" called',
my $word = $1;
next if
$word =~ /^(?:s(?:t(?:ate|udy)|(?:pli|or)t|calar|ay|ub)?|d(?:e(?:f
- (?:ault|ined)|lete)|ump|o)|p(?:r(?:ototype|intf?)|ackag
+ ault|lete)|ump|o)|p(?:r(?:ototype|intf?)|ackag
e|os)|e(?:ls(?:if|e)|xists|val|q)|g(?:[et]|iven|lob|oto
|rep)|u(?:n(?:less|def|til)|se)|l(?:(?:as)?t|ocal|e)|re
(?:quire|turn|do)|__(?:DATA|END)__|for(?:each|mat)?|(?:
diff --git a/t/op/coresubs.t b/t/op/coresubs.t
index c7efa2d656..84528b52ec 100644
--- a/t/op/coresubs.t
+++ b/t/op/coresubs.t
@@ -17,7 +17,7 @@ my $bd = new B::Deparse '-p';
my %unsupported = map +($_=>1), qw (
__DATA__ __END__ AUTOLOAD BEGIN UNITCHECK CORE DESTROY END INIT CHECK and
- cmp default defined delete do dump else elsif eq eval exists for foreach
+ cmp default delete do dump else elsif eq eval exists for foreach
format ge given glob goto grep gt if last le local lt m map my ne next
no or our package pos print printf prototype q qq qr qw qx redo require
return s say scalar sort split state study sub tr undef unless until use