This doesn't change anything but makes things clearer.
for my $path (@paths) {
next unless defined($path) and MM->maybe_command($path);
my $output = qx/$path --version/;
- $version = do {
+ my $ver = do {
local $@;
eval { Test::Valgrind::Version->new(command_output => $output) };
};
- if (defined $version) {
- next if defined $min_version and $version < $min_version;
+ if (defined $ver) {
+ next if defined $min_version and $ver < $min_version;
$valgrind = $path;
+ $version = $ver;
last;
}
}