use Test::More;
+my $dbg;
+
sub tester {
my ($a, $desc) = @_;
my $passed;
- my $dbg = eval "Test::Valgrind::DEBUGGING()";
+ if (!defined $dbg) {
+ eval "
+ use lib qw{blib/arch};
+ require XSLoader;
+ XSLoader::load('Test::Valgrind', \$Test::Valgrind::VERSION);
+ ";
+ if ($@) {
+ $dbg = 0;
+ } else {
+ my $ret = eval "Test::Valgrind::DEBUGGING()";
+ $dbg = $@ ? 0 : $ret;
+ }
+ }
if ($desc =~ /still\s+reachable/) {
$passed = $a >= 9900 && $a < 10100;
if ($dbg) {