line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Device::WallyHome::Role::Validator; |
2
|
2
|
|
|
2
|
|
1395
|
use Moose::Role; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
35
|
|
3
|
2
|
|
|
2
|
|
8617
|
use MooseX::AttributeShortcuts; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
15
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
#== PRIVATE METHODS ============================================================ |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub _checkRequiredScalarParam { |
9
|
3
|
|
|
3
|
|
6
|
my ($self, $value, $paramName) = @_; |
10
|
|
|
|
|
|
|
|
11
|
3
|
|
50
|
|
|
8
|
$paramName //= 'parameter'; |
12
|
|
|
|
|
|
|
|
13
|
3
|
50
|
|
|
|
6
|
die $paramName . ' required' unless defined $value; |
14
|
|
|
|
|
|
|
|
15
|
3
|
50
|
|
|
|
10
|
die 'valid ' . $paramName . ' required' if ref($value); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |