Branch Coverage

blib/lib/Net/BGP/Update.pm
Criterion Covered Total %
branch 67 128 52.3


line true false branch
100 1 18 if (ref $_[0] eq 'Net::BGP::NLRI')
102 1 0 unless ref $proto
119 1 2 if ($arg =~ /nlri/i) { }
1 1 elsif ($arg =~ /withdraw/i) { }
143 1 4 unless ref $proto
159 2 5 @_ ? :
167 2 5 @_ ? :
177 1 0 if defined $this->{'_nlri'}
198 10 6 unless (defined $options)
217 0 39 if ($len > 255)
234 0 16 unless (defined $options)
244 0 16 if ($length > length($buffer) - $offset)
258 0 16 if ($length > length($buffer) - $offset)
265 1 15 if $length == 0
292 3 14 unless (defined $options)
298 3 14 if (exists $this->{'_as4_path_raw'})
325 3 0 if (defined $this->{'_as_path_raw'})
341 0 14 if (length $buffer != 4)
362 0 2 if (length $buffer != 4)
382 0 2 if (length $buffer != 4)
402 0 0 if (length $buffer)
421 0 0 unless (defined $options)
426 0 0 if ($options->{'as4'}) { }
427 0 0 if (length $buffer != 8)
439 0 0 if (length $buffer != 6)
453 0 0 if ($options->{'as4'})
454 0 0 unless (exists $this->{'_as4_aggregator'}[0])
456 0 0 if ($this->{'_aggregator'}[0] != 23456)
470 0 0 unless (defined $options)
475 0 0 if (length $buffer != 8)
488 0 0 if ($options->{'as4'})
489 0 0 unless (exists $this->{'_aggregator'}[0])
491 0 0 if ($this->{'_aggregator'}[0] != 23456)
507 0 2 if (length($buffer) % 4)
534 0 15 unless (defined $options)
571 0 53 if ($flags & $BGP_PATH_ATTR_FLAG_EXTLEN)
579 0 53 if ($length > $data_length - ($len_bytes + 2))
589 53 0 if (defined $decode_sub[$type])
602 3 50 if ($Net::BGP::Update::BGP_PATH_ATTR_FLAGS[$type] != $flagmasked)
605 2 1 if ($flagmasked & $BGP_PATH_ATTR_FLAG_OPTIONAL and $flagmasked & $BGP_PATH_ATTR_FLAG_TRANSITIVE and $Net::BGP::Update::BGP_PATH_ATTR_FLAGS[$type] == ($flagmasked & ~$BGP_PATH_ATTR_FLAG_PARTIAL)) { }
637 0 42 unless $this->{'_attr_mask'}[$attr]
647 129 24 if defined $_
0 14 unless $this->{'_attr_mask'}
0 14 if (grep {$_ > 1 if defined $_;} @{[] unless $this->{'_attr_mask'};})
667 8 17 $prefix_bits % 8 ? :
669 0 25 if ($prefix_bytes > $data_length - 1)
692 0 16 unless ($result)
708 0 14 unless ($result)
722 6 6 unless (defined $options)
784 0 11 unless (defined $options)
793 0 11 if (defined $as4_buffer)
831 0 0 unless (defined $options)
836 0 0 if ($options->{'as4'}) { }
0 0 elsif ($this->{'_aggregator'} <= 65535) { }
880 0 12 unless (defined $options)
888 1 11 unless (defined $this->{'_nlri'} and scalar @{$this->{'_nlri'};})
894 0 11 unless (defined $this->{'_origin'})
900 0 11 unless (defined $this->{'_as_path'})
906 0 11 unless (defined $this->{'_next_hop'})
912 2 9 if (defined $this->{'_med'})
917 2 9 if (defined $this->{'_local_pref'})
922 0 11 if (defined $this->{'_atomic_agg'})
927 0 11 if (scalar @{$this->{'_aggregator'};})
932 2 9 if (scalar @{$this->{'_communities'};})