This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Quick integration of mainline changes to date
[perl5.git] / t / pragma / warn / op
index 950c0c8..9a278ef 100644 (file)
@@ -558,7 +558,7 @@ Useless use of a constant in void context at - line 3.
 Useless use of a constant in void context at - line 4.
 ########
 # op.c
-$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; # known scalar leak
+BEGIN{ $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; } # known scalar leak
 use warnings 'unsafe' ;
 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
 @a =~ /abc/ ;