DHCPClient/InetLease.pm

filter: Statementstmt 22.2% 10 / 45 Branchbran 0.0% 0 / 12 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 30.0% 3 / 10 Podpod 0.0% 0 / 7 totaltotal 16.4% 13 / 79 SCAR 38.1
CC
8
Cov
17%
new
6.0
interface
6.0
fixed_address
6.0
CRAP 45.0
« DHCPClient/Inet6Lease.pm ↑ Summary
1 package Net::ISC::DHCPClient::InetLease;
2  
3 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7  
8 =head1 NAME
9  
10 Net::ISC::DHCPClient - ISC dhclient AF inet lease object
11  
12 =head1 VERSION
13  
14 Version 0.01
15  
16 =cut
17  
18 1 our $VERSION = '0.01';
19  
20  
21 sub new {
22 0 ▶ my $proto = shift;
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
23 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
24 0 my $self = {};
25 0 $self->{INTERFACE} = undef;
26 0 $self->{FIXED_ADDRESS} = undef;
27 0 $self->{OPTION} = {};
28 0 $self->{RENEW} = undef;
29 0 $self->{REBIND} = undef;
30 0 $self->{EXPIRE} = undef;
31  
32 0 bless ($self, $class);
33  
34 0 return $self;
35 }
36  
37 sub interface {
38 0 ▶ my $self = shift;
Subroutine interface: not called CC=2 SCAR=17.9
Pod undocumented
39 0 ▶ if (@_) { $self->{INTERFACE} = shift }
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
40 0 return $self->{INTERFACE};
41 }
42 sub fixed_address {
43 0 ▶ my $self = shift;
Subroutine fixed_address: not called CC=2 SCAR=17.9
Pod undocumented
44 0 ▶ if (@_) { $self->{FIXED_ADDRESS} = shift }
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
45 0 return $self->{FIXED_ADDRESS};
46 }
47 sub option {
48 0 ▶ my $self = shift;
Subroutine option: not called CC=2 SCAR=17.9
Pod undocumented
49 0 ▶ if (@_) { $self->{OPTION} = shift }
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
50 0 return $self->{OPTION};
51 }
52 sub renew {
53 0 ▶ my $self = shift;
Subroutine renew: not called CC=2 SCAR=17.9
Pod undocumented
54 0 ▶ if (@_) { $self->{RENEW} = shift }
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
55 0 return $self->{RENEW};
56 }
57 sub rebind {
58 0 ▶ my $self = shift;
Subroutine rebind: not called CC=2 SCAR=17.9
Pod undocumented
59 0 ▶ if (@_) { $self->{REBIND} = shift }
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
60 0 return $self->{REBIND};
61 }
62 sub expire {
63 0 ▶ my $self = shift;
Subroutine expire: not called CC=2 SCAR=17.9
Pod undocumented
64 0 ▶ if (@_) { $self->{EXPIRE} = shift }
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
65 0 return $self->{EXPIRE};
66 }
67  
68 # vim: tabstop=4 shiftwidth=4 softtabstop=4 expandtab:
69  
70 1 1;
« DHCPClient/Inet6Lease.pm ↑ Summary