X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind.pm;h=962264b2928dedcf4b4ddd35426d1633100c84d3;hb=af894e2502bb03d24c5179d85e7f6705e2fcd9df;hp=d003528be0d3158d2efc541426d7547aa5d05f87;hpb=272284fade82d2dc9d15ab1b564a333fb3839b19;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index d003528..962264b 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -233,10 +233,9 @@ sub import { END { if ($run and eval { require DynaLoader; 1 }) { - for (@DynaLoader::dl_librefs) { - next unless defined; - undef $_ if DynaLoader::dl_unload_file($_); - } + my @rest; + DynaLoader::dl_unload_file($_) and push @rest, $_ for @DynaLoader::dl_librefs; + @DynaLoader::dl_librefs = @rest; } }