$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 = $_;
}
}
+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.