Valiant/Util/Exception/MissingCountKey.pm untested

filter: Statementstmt 0.0% 0 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 11 CC 1 SCAR 6.9
CC
1
Cov
0%
_build_message
2.0
BEGIN
2.0
CRAP 2.0
1 package Valiant::Util::Exception::MissingCountKey;
2  
3 use Moo;
4 extends 'Valiant::Util::Exception';
5  
6 has tag => (is=>'ro', required=>1);
7 has count => (is=>'ro', required=>1);
8  
9 sub _build_message {
10 my ($self) = @_;
11 return "Translation tag '@{[ $self->tag ]}' has no count subkey matching '@{[ $self->count ]}'.";
12 }
13  
14 1;
15  
16 =head1 NAME
17  
18 Valiant::Util::Exception::MissingCountKey - Not count subkey for the translation tag
19  
20 =head1 SYNOPSIS
21  
22 throw_exception('MissingCountKey', tag=>$original, count=>$count);
23  
24 =head1 DESCRIPTION
25  
26 Your translation tag defines count subkeys but there's nothing matching the current count
27  
28 =head1 ATTRIBUTES
29  
30 =head2 tag
31  
32 =head2 count
33  
34 The original tag whose count we cannot translate. This usually means you are missing a count
35 key.
36  
37 =head2 message
38  
39 The actual exception message
40  
41 =head1 SEE ALSO
42
43 L<Valiant>
44  
45 =head1 AUTHOR
46
47 See L<Valiant>
48  
49 =head1 COPYRIGHT & LICENSE
50
51 See L<Valiant>
52  
53 =cut