This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make goto &CORE::sub use the right lexical scope
[perl5.git] / t / op / coresubs.t
index f0ebe8e..b3dd3ce 100644 (file)
@@ -108,6 +108,13 @@ while(<$kh>) {
   }
 }
 
+$tests++;
+# This subroutine is outside the warnings scope:
+sub foo { goto &CORE::abs }
+use warnings;
+$SIG{__WARN__} = sub { like shift, qr\^Use of uninitialized\ };
+foo(undef);
+
 is curr_test, $tests+1, 'right number of tests';
 done_testing;