File Coverage

blib/lib/Net/DNS/RR/CDNSKEY.pm
Criterion Covered Total %
statement 22 22 100.0
branch 6 6 100.0
path n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 35 35 100.0


line stmt bran path cond sub pod time code
1               package Net::DNS::RR::CDNSKEY;
2                
3 1       1   6 use strict;
  1           2  
  1           39  
4 1       1   3 use warnings;
  1           2  
  1           62  
5               our $VERSION = (qw$Id: CDNSKEY.pm 2003 2025-01-21 12:06:06Z willem $)[2];
6                
7 1       1   5 use base qw(Net::DNS::RR::DNSKEY);
  1           2  
  1           536  
8                
9                
10               =head1 NAME
11                
12               Net::DNS::RR::CDNSKEY - DNS CDNSKEY resource record
13                
14               =cut
15                
16 1       1   5 use integer;
  1           1  
  1           4  
17                
18                
19               sub _format_rdata { ## format rdata portion of RR string.
20 5       5   39 my $self = shift;
21                
22 5 100         12 return $self->SUPER::_format_rdata() if $self->algorithm;
23 2           3 return my @rdata = @{$self}{qw(flags protocol algorithm)}, "AA==";
  2           7  
24               }
25                
26                
27               sub algorithm {
28 22       22 1 1422 my ( $self, $arg ) = @_;
29 22 100         51 return $self->SUPER::algorithm($arg) if $arg;
30 15 100         40 return $self->SUPER::algorithm() unless defined $arg;
31 2           4 @{$self}{qw(flags protocol algorithm keybin)} = ( 0, 3, 0, chr(0) );
  2           4  
32 2           3 return;
33               }
34                
35                
36               1;
37               __END__