This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Stop lexical CORE sub from interfering with CORE::
[perl5.git] / t / op / lexsub.t
index 0be305b..07bfce5 100644 (file)
@@ -8,7 +8,7 @@ BEGIN {
     *bar::like = *like;
 }
 no warnings 'deprecated';
-plan 139;
+plan 140;
 
 # -------------------- Errors with feature disabled -------------------- #
 
@@ -284,6 +284,9 @@ sub make_anon_with_state_sub{
   state sub END { shift }
   is eval{END('jkqeudth')}, jkqeudth,
     'state sub END {shift} implies @_, not @ARGV';
+  state sub CORE { scalar reverse shift }
+  is CORE::uc("hello"), "HELLO",
+    'lexical CORE does not interfere with CORE::...';
 }
 {
   state sub redef {}