Branch Coverage

blib/lib/OSPF/LSDB/Cisco.pm
Criterion Covered Total %
branch 198 252 78.5


line true false branch
80 0 0 wantarray ? :
81 0 0 if $?
82 0 0 wantarray ? :
89 1 0 $file ? :
101 5 0 $file ? :
111 1 62 if (/^ Routing Process "[- \w]*" with ID $IP$/) { }
2 60 elsif (/^ Area $IP(?: \(Inactive\))?$/) { }
1 59 elsif (/^ Area BACKBONE\((0\.0\.0\.0)\)(?: \(Inactive\))?$/) { }
128 1 108 if (/^ +OSPF Router with ID \($IP\) \(Process ID \d+\)$/) { }
2 106 elsif (/^\t+Router Link States \(Area $IP\)$/) { }
22 84 elsif (/^$/) { }
5 79 elsif (not $r and /^ \w/) { }
7 100 elsif (not $l and /^ {4}\w/) { }
132 0 2 if $l
134 0 2 if $lnum
135 0 2 if $r
139 7 15 if ($l)
140 0 7 unless $type
146 15 7 unless ($lnum)
151 0 5 unless $area
156 0 7 unless $lnum
162 5 79 if (/^ LS age: (?:MAXAGE\()?$OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'}\)?$/) { }
5 74 elsif (/^ LS Type: ([\w ()]+)$/) { }
5 69 elsif (/^ Link State ID: $IP$/) { }
5 64 elsif (/^ Advertising Router: $IP$/) { }
5 59 elsif (/^ LS Seq Number: $OSPF::LSDB::Cisco::RE{'num'}{'hex'}{'-keep'}$/) { }
1 58 elsif (/^ AS Boundary Router$/) { }
2 56 elsif (/^ Area Border Router$/) { }
5 51 elsif (/^ Number of Links: $OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'}$/) { }
7 44 elsif (/^ Link connected to: ([\w -]+)$/) { }
0 44 elsif (/^ Link ID \(Neighbors Router ID\): $IP$/) { }
6 38 elsif (/^ \(Link ID\) Designated Router address: $IP$/) { }
1 37 elsif (m[^ \(Link ID\) Network/subnet number: $IP$]) { }
6 31 elsif (/^ \(Link Data\) Router Interface address: $IP$/) { }
1 30 elsif (/^ \(Link Data\) Network Mask: $IP$/) { }
7 23 elsif (/^ Number of TOS metrics: 0$/) { }
7 16 elsif (/^ TOS 0 Metrics: $OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'}$/) { }
0 16 elsif (/^ {4}\w/) { }
1 15 elsif (/^ Routing Bit Set on this LSA$/) { }
0 15 elsif (/^ Adv Router is not-reachable$/) { }
0 15 elsif (/^ Delete flag is set for this LSA$/) { }
0 15 elsif (not /^ (Options|Checksum|Length):/) { }
165 0 5 if $1 ne "Router Links"
181 0 7 if ($1 eq 'a Point-to-Point') { }
6 1 elsif ($1 eq 'a Transit Network') { }
1 0 elsif ($1 eq 'a Stub Network') { }
0 0 elsif ($1 eq 'a Virtual Link') { }
220 0 1 if $l
221 0 1 if $lnum
222 0 1 if $r
232 1 46 if (/^ +OSPF Router with ID \($IP\) \(Process ID \d+\)$/) { }
2 44 elsif (/^\t+Net Link States \(Area $IP\)$/) { }
8 36 elsif (/^$/) { }
3 33 elsif (not $n) { }
236 0 2 if $attachments
238 0 2 if $n
246 0 3 unless $area
251 3 33 if (/^ LS age: (?:MAXAGE\()?$OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'}\)?$/) { }
3 30 elsif (/^ LS Type: ([\w ()]+)$/) { }
3 27 elsif (/^ Link State ID: $IP \(address of Designated Router\)$/) { }
3 24 elsif (/^ Advertising Router: $IP$/) { }
3 21 elsif (/^ LS Seq Number: $OSPF::LSDB::Cisco::RE{'num'}{'hex'}{'-keep'}$/) { }
3 18 elsif (m[^ Network Mask: /$OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'}$]) { }
6 12 elsif (/^\tAttached Router: $IP$/) { }
3 9 elsif (/^ Routing Bit Set on this LSA$/) { }
0 9 elsif (/^ Adv Router is not-reachable$/) { }
0 9 elsif (/^ Delete flag is set for this LSA$/) { }
0 9 elsif (not /^ (Options|Checksum|Length):/) { }
254 0 3 if $1 ne "Network Links"
266 3 3 unless ($attachments)
287 1 51 if (/^ +OSPF Router with ID \($IP\) \(Process ID \d+\)$/) { }
2 49 elsif (/^\t+Summary Net Link States \(Area $IP\)$/) { }
9 40 elsif (/^$/) { }
4 36 elsif (not $s) { }
291 0 2 if $s
298 0 4 unless $area
303 4 36 if (/^ LS age: (?:MAXAGE\()?$OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'}\)?$/) { }
4 32 elsif (/^ LS Type: ([\w ()]+)$/) { }
4 28 elsif (/^ Link State ID: $IP \(summary Network Number\)$/) { }
4 24 elsif (/^ Advertising Router: $IP$/) { }
4 20 elsif (/^ LS Seq Number: $OSPF::LSDB::Cisco::RE{'num'}{'hex'}{'-keep'}$/) { }
4 16 elsif (m[^ Network Mask: /$OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'}$]) { }
4 12 elsif (/^\tTOS: 0 \tMetric: $OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'} $/) { }
0 12 elsif (/^ Routing Bit Set on this LSA$/) { }
0 12 elsif (/^ Adv Router is not-reachable$/) { }
0 12 elsif (/^ Delete flag is set for this LSA$/) { }
0 12 elsif (not /^ (Options|Checksum|Length):/) { }
306 0 4 if $1 ne "Summary Links(Network)"
335 1 15 if (/^ +OSPF Router with ID \($IP\) \(Process ID \d+\)$/) { }
1 14 elsif (/^\t+Summary ASB Link States \(Area $IP\)$/) { }
4 10 elsif (/^$/) { }
1 9 elsif (not $b) { }
339 0 1 if $b
346 0 1 unless $area
351 1 9 if (/^ LS age: (?:MAXAGE\()?$OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'}\)?$/) { }
1 8 elsif (/^ LS Type: ([\w ()]+)$/) { }
1 7 elsif (/^ Link State ID: $IP \(AS Boundary Router address\)$/) { }
1 6 elsif (/^ Advertising Router: $IP$/) { }
1 5 elsif (/^ LS Seq Number: $OSPF::LSDB::Cisco::RE{'num'}{'hex'}{'-keep'}$/) { }
1 4 elsif (/^\tTOS: 0 \tMetric: $OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'} $/) { }
0 4 elsif (/^ Routing Bit Set on this LSA$/) { }
0 4 elsif (/^ Adv Router is not-reachable$/) { }
0 4 elsif (/^ Delete flag is set for this LSA$/) { }
0 4 elsif (not /^ (Options|Checksum|Length|Network Mask):/) { }
354 0 1 if $1 ne "Summary Links(AS Boundary Router)"
382 1 148 if (/^ +OSPF Router with ID \($IP\) \(Process ID \d+\)$/) { }
1 147 elsif (/^\t+Type-5 AS External Link States$/) { }
12 135 elsif (/^$/) { }
9 126 elsif (not $e) { }
386 0 1 if $e
387 0 1 if @externals
397 9 126 if (/^ LS age: (?:MAXAGE\()?$OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'}\)?$/) { }
9 117 elsif (/^ LS Type: ([\w ()]+)$/) { }
9 108 elsif (/^ Link State ID: $IP \(External Network Number \)$/) { }
9 99 elsif (/^ Advertising Router: $IP$/) { }
9 90 elsif (/^ LS Seq Number: $OSPF::LSDB::Cisco::RE{'num'}{'hex'}{'-keep'}$/) { }
9 81 elsif (m[^ Network Mask: /$OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'}$]) { }
9 72 elsif (/^\tMetric Type: ([1-2]) /) { }
9 63 elsif (/^\tMetric: $OSPF::LSDB::Cisco::RE{'num'}{'int'}{'-keep'} $/) { }
9 54 elsif (/^\tForward Address: $IP$/) { }
18 36 elsif (/^\t(TOS|External Route Tag):/) { }
9 27 elsif (/^ Routing Bit Set on this LSA$/) { }
0 27 elsif (/^ Adv Router is not-reachable$/) { }
0 27 elsif (/^ Delete flag is set for this LSA$/) { }
0 27 elsif (not /^ (Options|Checksum|Length):/) { }
400 0 9 if $1 ne "AS External Link"