| line |
true |
false |
branch |
|
94
|
1 |
15 |
unless (@q) |
|
96
|
1 |
0 |
if $NetAddr::MAC::die_on_error |
|
102
|
15 |
0 |
@q % 2 ? : |
|
|
1 |
3 |
unless $self->_init(@q % 2 ? ('mac', shift @q, @q) : @q) |
|
117
|
0 |
15 |
if (defined $args{'die_on_error'}) { } |
|
118
|
0 |
0 |
if $args{'die_on_error'} |
|
121
|
11 |
4 |
if $NetAddr::MAC::die_on_error |
|
124
|
11 |
4 |
if $self->{'_die'} |
|
128
|
1 |
14 |
if ($args{'mac'} =~ /^(\d+)\#(.+)$/) |
|
135
|
1 |
3 |
unless ($self->{'mac'}) |
|
136
|
0 |
1 |
if $self->{'_die'} |
|
140
|
1 |
2 |
if (defined $self->{'priority'}) { } |
|
141
|
0 |
1 |
if ($args{'priority'} and $args{'priority'} != $self->{'priority'}) |
|
143
|
0 |
0 |
if $self->{'_die'} |
|
153
|
18 |
0 |
unless not defined $_ |
|
|
0 |
3 |
if (&first(sub {
0 == length $_ unless not defined $_;
}
, @{$$self{'mac'};})) |
|
155
|
0 |
0 |
if $self->{'_die'} |
|
171
|
1 |
294 |
unless ($mac) |
|
184
|
5 |
289 |
if $mac =~ /[a-f0-9]{1,4}:[a-f0-9]{1,4}::([a-f0-9]{1,4})?/i |
|
185
|
2 |
287 |
if $mac =~ /[a-f0-9]{1,4}::[a-f0-9]{1,4}:[a-f0-9]{1,4}/i |
|
190
|
18 |
269 |
if &first(sub {
/[^a-f0-9]/i;
}
, @parts) |
|
196
|
822 |
72 |
length($o) % 2 == 0 ? : |
|
201
|
0 |
0 |
if (@parts == 1 and length $parts[0] == 12 || length $parts[0] == 16) |
|
213
|
263 |
6 |
if (@parts == 6 or @parts == 8) |
|
218
|
1 |
5 |
if (@parts == 3 or @parts == 4) |
|
224
|
1 |
0 |
if &first(sub {
length $_ < 4;
}
, @parts) |
|
228
|
0 |
0 |
if /^ ([a-f0-9]{2}) ([a-f0-9]{2}) $/xi |
|
240
|
11 |
21 |
if (defined $_die) { } |
|
|
20 |
1 |
elsif ($NetAddr::MAC::die_on_error) { } |
|
241
|
11 |
0 |
if $_die |
|
278
|
0 |
0 |
unless ref $self |
|
308
|
20 |
12 |
if $_ != 255 |
|
430
|
0 |
0 |
if (is_eui48($self)) |
|
442
|
0 |
0 |
if @tmpmac |
|
513
|
0 |
0 |
if (is_eui64($self)) |
|
514
|
0 |
0 |
if (@{$$self{'mac'};}[3] == 255 and @{$$self{'mac'};}[4] == 255 || @{$$self{'mac'};}[4] == 254) { } |
|
524
|
0 |
0 |
if $self->{'_die'} |
|
539
|
0 |
0 |
if (is_eui48($self)) { } |
|
559
|
0 |
31 |
if ref $mac eq 'NetAddr::MAC' |
|
561
|
0 |
31 |
if (ref $mac) |
|
563
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
568
|
0 |
21 |
unless $mac = _mac_to_integers($mac) |
|
577
|
0 |
31 |
if ref $mac eq 'NetAddr::MAC' |
|
579
|
0 |
31 |
if (ref $mac) |
|
581
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
586
|
0 |
21 |
unless $mac = _mac_to_integers($mac) |
|
595
|
0 |
15 |
if ref $mac eq 'NetAddr::MAC' |
|
597
|
0 |
15 |
if (ref $mac) |
|
599
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
604
|
0 |
15 |
unless $mac = _mac_to_integers($mac) |
|
614
|
0 |
15 |
if ref $mac eq 'NetAddr::MAC' |
|
616
|
0 |
15 |
if (ref $mac) |
|
618
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
623
|
0 |
15 |
unless $mac = _mac_to_integers($mac) |
|
632
|
0 |
15 |
if ref $mac eq 'NetAddr::MAC' |
|
634
|
0 |
15 |
if (ref $mac) |
|
636
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
641
|
0 |
15 |
unless $mac = _mac_to_integers($mac) |
|
650
|
0 |
31 |
if ref $mac eq 'NetAddr::MAC' |
|
652
|
0 |
31 |
if (ref $mac) |
|
654
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
660
|
0 |
31 |
unless $mac = _mac_to_integers($mac) |
|
670
|
0 |
31 |
if ref $mac eq 'NetAddr::MAC' |
|
672
|
0 |
31 |
if (ref $mac) |
|
674
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
680
|
0 |
31 |
unless $mac = _mac_to_integers($mac) |
|
689
|
0 |
31 |
if ref $mac eq 'NetAddr::MAC' |
|
691
|
0 |
31 |
if (ref $mac) |
|
693
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
699
|
0 |
31 |
unless $mac = _mac_to_integers($mac) |
|
708
|
0 |
31 |
if ref $mac eq 'NetAddr::MAC' |
|
710
|
0 |
31 |
if (ref $mac) |
|
712
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
718
|
0 |
31 |
unless $mac = _mac_to_integers($mac) |
|
727
|
0 |
20 |
if ref $mac eq 'NetAddr::MAC' |
|
729
|
0 |
20 |
if (ref $mac) |
|
731
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
736
|
0 |
20 |
unless $mac = _mac_to_integers($mac) |
|
745
|
0 |
20 |
if ref $mac eq 'NetAddr::MAC' |
|
747
|
0 |
20 |
if (ref $mac) |
|
749
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
754
|
0 |
20 |
unless $mac = _mac_to_integers($mac) |
|
763
|
0 |
1 |
if ref $mac eq 'NetAddr::MAC' |
|
765
|
0 |
1 |
if (ref $mac) |
|
767
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
772
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
781
|
0 |
1 |
if ref $mac eq 'NetAddr::MAC' |
|
783
|
0 |
1 |
if (ref $mac) |
|
785
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
790
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
799
|
0 |
1 |
if ref $mac eq 'NetAddr::MAC' |
|
801
|
0 |
1 |
if (ref $mac) |
|
803
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
808
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
817
|
0 |
1 |
if ref $mac eq 'NetAddr::MAC' |
|
819
|
0 |
1 |
if (ref $mac) |
|
821
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
826
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
835
|
0 |
0 |
if ref $mac eq 'NetAddr::MAC' |
|
837
|
0 |
0 |
if (ref $mac) |
|
839
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
844
|
0 |
0 |
unless $mac = _mac_to_integers($mac) |
|
854
|
0 |
1 |
if ref $mac eq 'NetAddr::MAC' |
|
856
|
0 |
1 |
if (ref $mac) |
|
858
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
863
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
873
|
0 |
1 |
if ref $mac eq 'NetAddr::MAC' |
|
875
|
0 |
1 |
if (ref $mac) |
|
877
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
882
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
892
|
0 |
1 |
if ref $mac eq 'NetAddr::MAC' |
|
894
|
0 |
1 |
if (ref $mac) |
|
896
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
901
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
911
|
0 |
1 |
if ref $mac eq 'NetAddr::MAC' |
|
913
|
0 |
1 |
if (ref $mac) |
|
915
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
920
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
930
|
0 |
1 |
if ref $mac eq 'NetAddr::MAC' |
|
932
|
0 |
1 |
if (ref $mac) |
|
934
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
939
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |