diff --git a/lib/bind.pm b/lib/bind.pm index d18499b..fc491dc 100644 --- a/lib/bind.pm +++ b/lib/bind.pm @@ -259,11 +259,11 @@ sub bind_update { my $data = XMLin($response->content); my $value; - # BIND v9.9+ has different statistics layout than BIND v9.5+, - # so attempt first to get stats from a BIND v9.9+ - if(!($value = $data->{'statistics version'})) { - # otherwise attempt it on a BIND v9.5+ - $value = $data->{bind}->{statistics}->{version}; + # BIND v9.9+ has different statistics layout than BIND v9.5+. + # we attempt first to get stats from a BIND v9.5+ + if(!($value = $data->{bind}->{statistics}->{version})) { + # otherwise attempt it on a BIND v9.9+ + $value = $data->{version}; } my ($major, $minor) = split('\.', $value); $minor =~ m/^(\d+)/;