X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind.pm;h=d003528be0d3158d2efc541426d7547aa5d05f87;hb=272284fade82d2dc9d15ab1b564a333fb3839b19;hp=31a63234601267e148152ffd4f031ee85f68af74;hpb=aa1ba53f7e77b33463557fef07603e5b0881f56c;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index 31a6323..d003528 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -231,6 +231,15 @@ sub import { } } +END { + if ($run and eval { require DynaLoader; 1 }) { + for (@DynaLoader::dl_librefs) { + next unless defined; + undef $_ if DynaLoader::dl_unload_file($_); + } + } +} + =head1 CAVEATS You can't use this module to test code given by the C<-e> command-line switch.