X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind.pm;h=962264b2928dedcf4b4ddd35426d1633100c84d3;hb=af894e2502bb03d24c5179d85e7f6705e2fcd9df;hp=7d5ba0a0953b6614b4e9d1fe925e15aea6780e44;hpb=de22e7ac96367456e9580b5097f8eb3d7609641d;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index 7d5ba0a..962264b 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -18,11 +18,11 @@ Test::Valgrind - Test Perl code through valgrind. =head1 VERSION -Version 0.06 +Version 0.07 =cut -our $VERSION = '0.06'; +our $VERSION = '0.07'; =head1 SYNOPSIS @@ -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,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. @@ -256,7 +265,7 @@ L, L, L. Vincent Pit, C<< >>, L. -You can contact me by mail or on #perl @ FreeNode (vincent or Prof_Vince). +You can contact me by mail or on C (vincent). =head1 BUGS