X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind.pm;h=e70a912d2d089512750322f9a8d84fb5165daadb;hb=1990c796ff7ec945e5a48d1601b3fd7547c479d3;hp=3ea8c8fcab54fac8525df48d1e03c8c6c20e98c1;hpb=b06c4c98acd1452e8836c2cd1798e27a6b194703;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index 3ea8c8f..e70a912 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -139,7 +139,8 @@ sub import { $callers = int $callers; my $vg = Test::Valgrind::Suppressions::VG_PATH; if (!$vg || !-x $vg) { - for (split /:/, $ENV{PATH}) { + require Config; + for (split /$Config::Config{path_sep}/, $ENV{PATH}) { $_ .= '/valgrind'; if (-x) { $vg = $_; @@ -230,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.