line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Zonemaster::Engine::TestMethods; |
2
|
|
|
|
|
|
|
|
3
|
26
|
|
|
26
|
|
165
|
use version; our $VERSION = version->declare("v1.0.3"); |
|
26
|
|
|
|
|
58
|
|
|
26
|
|
|
|
|
126
|
|
4
|
|
|
|
|
|
|
|
5
|
26
|
|
|
26
|
|
2118
|
use 5.014002; |
|
26
|
|
|
|
|
94
|
|
6
|
26
|
|
|
26
|
|
117
|
use strict; |
|
26
|
|
|
|
|
55
|
|
|
26
|
|
|
|
|
452
|
|
7
|
26
|
|
|
26
|
|
118
|
use warnings; |
|
26
|
|
|
|
|
54
|
|
|
26
|
|
|
|
|
800
|
|
8
|
|
|
|
|
|
|
|
9
|
26
|
|
|
26
|
|
150
|
use List::MoreUtils qw[uniq]; |
|
26
|
|
|
|
|
55
|
|
|
26
|
|
|
|
|
248
|
|
10
|
|
|
|
|
|
|
|
11
|
26
|
|
|
26
|
|
16783
|
use Zonemaster::Engine; |
|
26
|
|
|
|
|
63
|
|
|
26
|
|
|
|
|
529
|
|
12
|
26
|
|
|
26
|
|
147
|
use Zonemaster::Engine::Util; |
|
26
|
|
|
|
|
58
|
|
|
26
|
|
|
|
|
6956
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub method1 { |
15
|
0
|
|
|
0
|
1
|
0
|
my ( $class, $zone ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
0
|
return $zone->parent; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub method2 { |
21
|
55
|
|
|
55
|
1
|
173
|
my ( $class, $zone ) = @_; |
22
|
|
|
|
|
|
|
|
23
|
55
|
|
|
|
|
1624
|
return $zone->glue_names; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub method3 { |
27
|
37
|
|
|
37
|
1
|
123
|
my ( $class, $zone ) = @_; |
28
|
|
|
|
|
|
|
|
29
|
37
|
|
|
|
|
75
|
my @child_nsnames; |
30
|
|
|
|
|
|
|
my @nsnames; |
31
|
37
|
|
|
|
|
976
|
my $ns_aref = $zone->query_all( $zone->name, q{NS} ); |
32
|
37
|
|
|
|
|
94
|
foreach my $p ( @{$ns_aref} ) { |
|
37
|
|
|
|
|
109
|
|
33
|
137
|
100
|
|
|
|
386
|
next if not $p; |
34
|
132
|
|
|
|
|
3621
|
push @nsnames, $p->get_records_for_name( q{NS}, $zone->name ); |
35
|
|
|
|
|
|
|
} |
36
|
37
|
|
|
|
|
114
|
@child_nsnames = uniq map { name( lc( $_->nsdname ) ) } @nsnames; |
|
567
|
|
|
|
|
4837
|
|
37
|
|
|
|
|
|
|
|
38
|
37
|
|
|
|
|
713
|
return [@child_nsnames]; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub method4 { |
42
|
167
|
|
|
167
|
1
|
423
|
my ( $class, $zone ) = @_; |
43
|
|
|
|
|
|
|
|
44
|
167
|
|
|
|
|
4941
|
return $zone->glue; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub method5 { |
48
|
206
|
|
|
206
|
1
|
546
|
my ( $class, $zone ) = @_; |
49
|
|
|
|
|
|
|
|
50
|
206
|
|
|
|
|
5262
|
return $zone->ns; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 NAME |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Zonemaster::Engine::TestMethods - Methods common to Test Specification used in test modules |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 SYNOPSIS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my @results = Zonemaster::Engine::TestMethods->method1($zone); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 METHODS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
For details on what these methods implement, see the test |
64
|
|
|
|
|
|
|
specification documents. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=over |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item method1($zone) |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item method2($zone) |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item method3($zone) |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item method4($zone) |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item method5($zone) |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=back |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
1; |