This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don’t give unavailability warnings about our vars
[perl5.git] / t / lib / warnings / pad
index 03c4ddb..4e31fe3 100644 (file)
@@ -227,6 +227,13 @@ sub x {
 EXPECT
 
 ########
+# pad.c
+use warnings 'closure';
+my $x;
+our $y;
+sub { $x = $y }->();  # should not warn about $y being unavailable
+EXPECT
+########
 use warnings 'misc' ;
 my $x;
 {