line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FormValidator::Simple::Plugin::NetAddr::MAC; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
3896
|
use 5.008005; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
142
|
|
4
|
4
|
|
|
4
|
|
22
|
use strict; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
130
|
|
5
|
4
|
|
|
4
|
|
29
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
150
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
4071
|
use NetAddr::MAC; |
|
4
|
|
|
|
|
21762
|
|
|
4
|
|
|
|
|
253
|
|
8
|
4
|
|
|
4
|
|
892
|
use FormValidator::Simple::Constants; |
|
4
|
|
|
|
|
190
|
|
|
4
|
|
|
|
|
1343
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# ABSTRACT: MAC Address validation |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = "0.01"; |
13
|
|
|
|
|
|
|
our @CARP_NOT = qw(NetAddr::MAC); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub NETADDR_MAC { |
16
|
12
|
|
|
12
|
1
|
20074
|
my ($self, $params, $args) = @_; |
17
|
|
|
|
|
|
|
|
18
|
12
|
100
|
|
|
|
18
|
return eval { NetAddr::MAC->new( mac => $params->[0], die_on_error => 1 ) } ? TRUE : FALSE; |
|
12
|
|
|
|
|
40
|
|
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub NETADDR_MAC_LOCAL { |
22
|
25
|
|
|
25
|
1
|
38274
|
my ($self, $params, $args) = @_; |
23
|
|
|
|
|
|
|
|
24
|
25
|
100
|
|
|
|
32
|
return eval { NetAddr::MAC->new( mac => $params->[0], die_on_error => 1 )->is_local } ? TRUE : FALSE; |
|
25
|
|
|
|
|
111
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub NETADDR_MAC_UNIVERSAL { |
28
|
25
|
|
|
25
|
1
|
52873
|
my ($self, $params, $args) = @_; |
29
|
|
|
|
|
|
|
|
30
|
25
|
100
|
|
|
|
40
|
return eval { NetAddr::MAC->new( mac => $params->[0], die_on_error => 1 )->is_universal } ? TRUE : FALSE; |
|
25
|
|
|
|
|
120
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |