]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind.pm
Remove entries from @dl_unload_file when unload succeed instead of undefining them
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind.pm
index e70a912d2d089512750322f9a8d84fb5165daadb..962264b2928dedcf4b4ddd35426d1633100c84d3 100644 (file)
@@ -233,7 +233,9 @@ sub import {
 
 END {
  if ($run and eval { require DynaLoader; 1 }) {
-  DynaLoader::dl_unload_file($_) for @DynaLoader::dl_librefs;
+  my @rest;
+  DynaLoader::dl_unload_file($_) and push @rest, $_ for @DynaLoader::dl_librefs;
+  @DynaLoader::dl_librefs = @rest;
  }
 }