1package Net::DNS::Check::Test::soa_retry_compare; 2 3use strict; 4use vars qw(@ISA $VERSION); 5 6@ISA = qw(Net::DNS::Check::Test); 7 8 9sub new { 10 my ($class) = shift; 11 12 my ($self) = bless {}, $class; 13 14 if ( @_ ) { 15 $self->_process_args(@_); 16 } 17 18 $self->test(); 19 20 return $self; 21} 22 23 24sub test() { 25 my ($self) = shift; 26 27 # return unless ( $self->{config} ); 28 29 my $test_status = 1; 30 my %compare_hash; 31 my $test_detail = {}; 32 33 foreach my $nsquery ( @{$self->{nsquery}} ) { 34 my $soa_retry = $nsquery->soa_retry(); 35 my $ns_name = $nsquery->ns_name(); 36 $compare_hash{$soa_retry}++; 37 $test_detail->{$ns_name}->{desc} = $soa_retry; 38 } 39 40 41 if ((scalar keys %compare_hash) > 1) { 42 $test_status = 0; 43 } 44 45 $self->{test_status} = $test_status; 46 $self->{test_detail} = $test_detail; 47 48 return $test_status; 49} 50 511; 52 53__END__ 54 55=head1 NAME 56 57Net::DNS::Check::Test::soa_retry_compare - Compare the retry time in the SOA RR of all the authoritative nameservers 58 59=head1 SYNOPSIS 60 61C<use Net::DNS::Check::Test::soa_retry_compare>; 62 63=head1 DESCRIPTION 64 65Compare the retry time in the SOA RR of all the authoritative nameservers. 66 67=head1 METHODS 68 69=head1 COPYRIGHT 70 71Copyright (c) 2005 Lorenzo Luconi Trombacchi - IIT-CNR 72 73All rights reserved. This program is free software; you may redistribute 74it and/or modify it under the same terms as Perl itself. 75 76=head1 SEE ALSO 77 78L<perl(1)> 79 80=cut 81 82