line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# This file is part of DNS-NIOS |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This software is Copyright (c) 2021 by Christian Segundo. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This is free software, licensed under: |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# The Artistic License 2.0 (GPL Compatible) |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
## no critic |
11
|
|
|
|
|
|
|
package DNS::NIOS::Traits::ApiMethods; |
12
|
|
|
|
|
|
|
$DNS::NIOS::Traits::ApiMethods::VERSION = '0.005'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# ABSTRACT: Convenient sugar for NIOS |
15
|
|
|
|
|
|
|
# VERSION |
16
|
|
|
|
|
|
|
# AUTHORITY |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
## use critic |
19
|
2
|
|
|
2
|
|
1356
|
use strictures 2; |
|
2
|
|
|
|
|
43
|
|
|
2
|
|
|
|
|
108
|
|
20
|
2
|
|
|
2
|
|
591
|
use namespace::clean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
37
|
|
21
|
2
|
|
|
2
|
|
614
|
use Role::Tiny; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
requires qw( create get ); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub create_a_record { |
26
|
1
|
|
|
1
|
1
|
666
|
shift->create( path => 'record:a', @_ ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub create_cname_record { |
30
|
0
|
|
|
0
|
1
|
0
|
shift->create( path => 'record:cname', @_ ); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub create_host_record { |
34
|
0
|
|
|
0
|
1
|
0
|
shift->create( path => 'record:host', @_ ); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub list_a_records { |
38
|
3
|
|
|
3
|
1
|
4229
|
shift->get( path => 'record:a', @_ ); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub list_aaaa_records { |
42
|
0
|
|
|
0
|
1
|
|
shift->get( path => 'record:aaaa', @_ ); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub list_cname_records { |
46
|
0
|
|
|
0
|
1
|
|
shift->get( path => 'record:cname', @_ ); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub list_host_records { |
50
|
0
|
|
|
0
|
1
|
|
shift->get( path => 'record:host', @_ ); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub list_ptr_records { |
54
|
0
|
|
|
0
|
1
|
|
shift->get( path => 'record:ptr', @_ ); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub list_txt_records { |
58
|
0
|
|
|
0
|
1
|
|
shift->get( path => 'record:txt', @_ ); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |