This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #125540] handle already being at EOF while not finding a heredoc terminator
[perl5.git] / t / op / symbolcache.t
index b3e567b..2596ae6 100644 (file)
@@ -28,7 +28,7 @@ sub replaced { 'meth' }
 # simple removal
 sub removed2 { 24 }
 sub bound2 { removed2() }
-undef $main::{removed2};
+{ no strict; undef *{"removed2"} }
 eval { bound2() };
 like( $@, qr/Undefined subroutine &main::removed2 called/,
     'function not bound' );