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