| line |
true |
false |
branch |
|
72
|
1 |
15 |
unless (@q) |
|
74
|
1 |
0 |
if $NetAddr::MAC::die_on_error |
|
82
|
15 |
0 |
@q % 2 ? : |
|
|
1 |
3 |
unless $self->_init(@q % 2 ? ("mac", shift @q, @q) : @q) |
|
99
|
0 |
23 |
if (defined $args{'die_on_error'}) { } |
|
101
|
0 |
0 |
if $args{'die_on_error'} |
|
105
|
11 |
12 |
if $NetAddr::MAC::die_on_error |
|
110
|
1 |
22 |
if ($args{'mac'} =~ /^(\d+)\#(.+)$/) |
|
117
|
1 |
11 |
unless ($self->{'mac'}) |
|
118
|
0 |
1 |
if $self->{'_die'} |
|
122
|
1 |
10 |
if (defined $self->{'priority'}) { } |
|
123
|
0 |
1 |
if ($args{'priority'} and $args{'priority'} != $self->{'priority'}) |
|
125
|
0 |
0 |
if $self->{'_die'} |
|
135
|
70 |
0 |
unless not defined $_ |
|
|
0 |
11 |
if (&first(sub {
0 == length $_ unless not defined $_;
}
, @{$$self{"mac"};})) |
|
137
|
0 |
0 |
if $self->{'_die'} |
|
154
|
2 |
358 |
unless ($mac) |
|
167
|
6 |
352 |
if $mac =~ /[a-f0-9]{1,4}:[a-f0-9]{1,4}::([a-f0-9]{1,4})?/i |
|
168
|
3 |
349 |
if $mac =~ /[a-f0-9]{1,4}::[a-f0-9]{1,4}:[a-f0-9]{1,4}/i |
|
173
|
19 |
330 |
if &first(sub {
/[^a-f0-9]/i;
}
, @parts) |
|
178
|
1088 |
72 |
length($o) % 2 == 0 ? : |
|
184
|
0 |
1 |
if (@parts == 1 and length $parts[0] == 12 || length $parts[0] == 16) |
|
196
|
321 |
9 |
if (@parts == 6 or @parts == 8) |
|
201
|
1 |
8 |
if (@parts == 3 or @parts == 4) |
|
207
|
1 |
0 |
if &first(sub {
length $_ < 4;
}
, @parts) |
|
211
|
0 |
0 |
if /^ ([a-f0-9]{2}) ([a-f0-9]{2}) $/xi |
|
221
|
11 |
28 |
if (defined $_die) { } |
|
|
20 |
8 |
elsif ($NetAddr::MAC::die_on_error) { } |
|
222
|
11 |
0 |
if $_die |
|
238
|
0 |
10 |
unless defined $oui |
|
247
|
0 |
10 |
if &first(sub {
/[^a-f0-9]/i;
}
, @parts) |
|
251
|
39 |
0 |
length($o) % 2 == 0 ? : |
|
256
|
2 |
8 |
unless @parts >= $min and @parts <= $max |
|
269
|
2 |
8 |
@q % 2 ? : |
|
272
|
0 |
10 |
unless ($oui_str) |
|
274
|
0 |
0 |
if ($NetAddr::MAC::die_on_error or $args{'_die'}) |
|
282
|
3 |
7 |
$eui64 ? : |
|
284
|
2 |
8 |
unless ($oui_ints) |
|
285
|
1 |
1 |
$eui64 ? : |
|
286
|
0 |
2 |
if ($NetAddr::MAC::die_on_error or $args{'_die'}) |
|
300
|
0 |
8 |
unless $self->_init("mac", $mac_str) |
|
331
|
0 |
0 |
unless ref $self |
|
360
|
20 |
12 |
if $_ != 255 |
|
503
|
0 |
0 |
if (is_eui48($self)) |
|
515
|
0 |
0 |
if @tmpmac |
|
592
|
0 |
0 |
if (is_eui64($self)) |
|
593
|
0 |
0 |
if (@{$$self{'mac'};}[3] == 255 and @{$$self{'mac'};}[4] == 255 || @{$$self{'mac'};}[4] == 254) { } |
|
603
|
0 |
0 |
if $self->{'_die'} |
|
618
|
0 |
0 |
if (is_eui48($self)) { } |
|
638
|
0 |
31 |
if ref $mac eq __PACKAGE__ |
|
640
|
0 |
31 |
if (ref $mac) |
|
642
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
647
|
0 |
21 |
unless $mac = _mac_to_integers($mac) |
|
656
|
0 |
31 |
if ref $mac eq __PACKAGE__ |
|
658
|
0 |
31 |
if (ref $mac) |
|
660
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
665
|
0 |
21 |
unless $mac = _mac_to_integers($mac) |
|
674
|
0 |
15 |
if ref $mac eq __PACKAGE__ |
|
676
|
0 |
15 |
if (ref $mac) |
|
678
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
683
|
0 |
15 |
unless $mac = _mac_to_integers($mac) |
|
693
|
0 |
15 |
if ref $mac eq __PACKAGE__ |
|
695
|
0 |
15 |
if (ref $mac) |
|
697
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
702
|
0 |
15 |
unless $mac = _mac_to_integers($mac) |
|
711
|
0 |
15 |
if ref $mac eq __PACKAGE__ |
|
713
|
0 |
15 |
if (ref $mac) |
|
715
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
720
|
0 |
15 |
unless $mac = _mac_to_integers($mac) |
|
729
|
0 |
40 |
if ref $mac eq __PACKAGE__ |
|
731
|
0 |
40 |
if (ref $mac) |
|
733
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
739
|
0 |
40 |
unless $mac = _mac_to_integers($mac) |
|
748
|
0 |
4 |
if ref $mac eq __PACKAGE__ |
|
750
|
0 |
4 |
if (ref $mac) |
|
752
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
758
|
0 |
4 |
unless $mac = _mac_to_integers($mac) |
|
767
|
0 |
4 |
if ref $mac eq __PACKAGE__ |
|
769
|
0 |
4 |
if (ref $mac) |
|
771
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
777
|
0 |
4 |
unless $mac = _mac_to_integers($mac) |
|
786
|
0 |
32 |
if ref $mac eq __PACKAGE__ |
|
788
|
0 |
32 |
if (ref $mac) |
|
790
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
796
|
0 |
32 |
unless $mac = _mac_to_integers($mac) |
|
805
|
0 |
35 |
if ref $mac eq __PACKAGE__ |
|
807
|
0 |
35 |
if (ref $mac) |
|
809
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
815
|
0 |
35 |
unless $mac = _mac_to_integers($mac) |
|
824
|
0 |
32 |
if ref $mac eq __PACKAGE__ |
|
826
|
0 |
32 |
if (ref $mac) |
|
828
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
834
|
0 |
32 |
unless $mac = _mac_to_integers($mac) |
|
843
|
0 |
28 |
if ref $mac eq __PACKAGE__ |
|
845
|
0 |
28 |
if (ref $mac) |
|
847
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
852
|
0 |
28 |
unless $mac = _mac_to_integers($mac) |
|
861
|
0 |
28 |
if ref $mac eq __PACKAGE__ |
|
863
|
0 |
28 |
if (ref $mac) |
|
865
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
870
|
0 |
28 |
unless $mac = _mac_to_integers($mac) |
|
879
|
0 |
13 |
if ref $mac eq __PACKAGE__ |
|
881
|
0 |
13 |
if (ref $mac) |
|
883
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
888
|
7 |
6 |
unless $mac = _mac_to_integers($mac) |
|
897
|
0 |
1 |
if ref $mac eq __PACKAGE__ |
|
899
|
0 |
1 |
if (ref $mac) |
|
901
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
906
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
915
|
0 |
2 |
if ref $mac eq __PACKAGE__ |
|
917
|
0 |
2 |
if (ref $mac) |
|
919
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
924
|
0 |
2 |
unless $mac = _mac_to_integers($mac) |
|
933
|
0 |
2 |
if ref $mac eq __PACKAGE__ |
|
935
|
0 |
2 |
if (ref $mac) |
|
937
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
942
|
0 |
2 |
unless $mac = _mac_to_integers($mac) |
|
951
|
0 |
0 |
if ref $mac eq __PACKAGE__ |
|
953
|
0 |
0 |
if (ref $mac) |
|
955
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
960
|
0 |
0 |
unless $mac = _mac_to_integers($mac) |
|
970
|
0 |
1 |
if ref $mac eq __PACKAGE__ |
|
972
|
0 |
1 |
if (ref $mac) |
|
974
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
979
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
989
|
0 |
2 |
if ref $mac eq __PACKAGE__ |
|
991
|
0 |
2 |
if (ref $mac) |
|
993
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
998
|
0 |
2 |
unless $mac = _mac_to_integers($mac) |
|
1008
|
0 |
2 |
if ref $mac eq __PACKAGE__ |
|
1010
|
0 |
2 |
if (ref $mac) |
|
1012
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
1017
|
0 |
2 |
unless $mac = _mac_to_integers($mac) |
|
1027
|
0 |
1 |
if ref $mac eq __PACKAGE__ |
|
1029
|
0 |
1 |
if (ref $mac) |
|
1031
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
1036
|
0 |
1 |
unless $mac = _mac_to_integers($mac) |
|
1046
|
0 |
3 |
if ref $mac eq __PACKAGE__ |
|
1048
|
0 |
3 |
if (ref $mac) |
|
1050
|
0 |
0 |
if $NetAddr::MAC::die_on_error |
|
1055
|
0 |
3 |
unless $mac = _mac_to_integers($mac) |