File Coverage

blib/lib/DNS/NIOS/Traits/ApiMethods.pm
Criterion Covered Total %
statement 11 18 61.1
branch n/a
condition n/a
subroutine 5 12 41.6
pod 9 9 100.0
total 25 39 64.1


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.003';
13              
14             # ABSTRACT: Convenient sugar for NIOS
15             # VERSION
16             # AUTHORITY
17              
18             ## use critic
19 2     2   1627 use strictures 2;
  2         41  
  2         101  
20 2     2   578 use namespace::clean;
  2         5  
  2         44  
21 2     2   603 use Role::Tiny;
  2         5  
  2         16  
22              
23             requires qw( create get );
24              
25             sub create_a_record {
26 1     1 1 582 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 5188 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__