From d33bb3da8cf18cb9becf931b5f35d6f8a744df20 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 11 May 2012 21:54:03 -0700 Subject: [PATCH] Add &CORE::scalar --- gv.c | 2 +- t/op/coreamp.t | 7 ++++++- t/op/coresubs.t | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gv.c b/gv.c index c53afca..1a0351f 100644 --- a/gv.c +++ b/gv.c @@ -469,7 +469,7 @@ S_maybe_add_coresub(pTHX_ HV * const stash, GV *gv, case KEY_package: case KEY_print: case KEY_printf: case KEY_q : case KEY_qq : case KEY_qr : case KEY_qw : case KEY_qx : case KEY_redo : case KEY_require: case KEY_return: - case KEY_s : case KEY_say : case KEY_scalar : case KEY_sort : + case KEY_s : case KEY_say : case KEY_sort : case KEY_split: case KEY_state: case KEY_study : case KEY_sub : case KEY_tr : case KEY_undef: case KEY_UNITCHECK: case KEY_unless: case KEY_until: case KEY_use : case KEY_when : case KEY_while : diff --git a/t/op/coreamp.t b/t/op/coreamp.t index e0b7246..173fcd5 100644 --- a/t/op/coreamp.t +++ b/t/op/coreamp.t @@ -721,6 +721,11 @@ is &myrindex("foffooo","o"),6,'&rindex with 2 args'; test_proto 'rmdir'; +test_proto 'scalar'; +$tests += 2; +is &myscalar(3), 3, '&scalar'; +lis [&myscalar(3)], [3], '&scalar in list cx'; + test_proto 'seek'; { last if is_miniperl; @@ -938,7 +943,7 @@ like $@, qr'^Undefined format "STDOUT" called', if (m?__END__?..${\0} and /^[-+](.*)/) { my $word = $1; next if - $word =~ /^(?:s(?:t(?:ate|udy)|(?:pli|or)t|calar|ay|ub)?|d(?:ef + $word =~ /^(?:s(?:t(?:ate|udy)|(?:pli|or)t|ay|ub)?|d(?:ef ault|ump|o)|p(?:rintf?|ackag e)|e(?:ls(?:if|e)|val|q)|g(?:[et]|iven|oto |rep)|u(?:n(?:less|def|til)|se)|l(?:(?:as)?t|ocal|e)|re diff --git a/t/op/coresubs.t b/t/op/coresubs.t index 3c1e0f4..34dba10 100644 --- a/t/op/coresubs.t +++ b/t/op/coresubs.t @@ -20,7 +20,7 @@ my %unsupported = map +($_=>1), qw ( cmp default do dump else elsif eq eval for foreach format ge given goto grep gt if last le local lt m map my ne next no or our package print printf q qq qr qw qx redo require - return s say scalar sort split state study sub tr undef unless until use + return s say sort split state study sub tr undef unless until use when while x xor y ); my %args_for = ( -- 2.7.4