X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;ds=sidebyside;f=lib%2FTest%2FValgrind.pm;h=46a86c6fe9509e4241f1f6577bab9956aed472a3;hb=763b4e655388ce7341369cf73fd7758360821b3d;hp=5f7414f8d7ad94a570709b1fb4cfc81edeaf2a78;hpb=de578745159a2190a170c5da40dc4950220b087c;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index 5f7414f..46a86c6 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -273,8 +273,20 @@ sub import { }); } +=head1 VARIABLES + +=head2 C<$dl_unload> + +When set to true, all dynamic extensions that were loaded during the analysis will be unloaded at C time by L. + +Since this obfuscates error stack traces, it's disabled by default. + +=cut + +our $dl_unload; + END { - if ($run and eval { require DynaLoader; 1 }) { + if ($dl_unload and $run and eval { require DynaLoader; 1 }) { my @rest; DynaLoader::dl_unload_file($_) or push @rest, $_ for @DynaLoader::dl_librefs; @DynaLoader::dl_librefs = @rest;