X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind.pm;h=4b1b5268d6a98d38db9ca98d34113cb36d3bd1de;hb=fad4c11177b48a2cee604fe643b3e477687c9400;hp=3ea8c8fcab54fac8525df48d1e03c8c6c20e98c1;hpb=b06c4c98acd1452e8836c2cd1798e27a6b194703;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index 3ea8c8f..4b1b526 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.07 +Version 0.08 =cut -our $VERSION = '0.07'; +our $VERSION = '0.08'; =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($_) or 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. @@ -276,7 +285,7 @@ H.Merijn Brand, for daring to test this thing. =head1 COPYRIGHT & LICENSE -Copyright 2008 Vincent Pit, all rights reserved. +Copyright 2008-2009 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.