]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind.pm
Unload dynamically loaded libraries at END-time
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind.pm
index 31a63234601267e148152ffd4f031ee85f68af74..e70a912d2d089512750322f9a8d84fb5165daadb 100644 (file)
@@ -231,6 +231,12 @@ sub import {
  }
 }
 
+END {
+ if ($run and eval { require DynaLoader; 1 }) {
+  DynaLoader::dl_unload_file($_) for @DynaLoader::dl_librefs;
+ }
+}
+
 =head1 CAVEATS
 
 You can't use this module to test code given by the C<-e> command-line switch.