Valiant/Util/Exception/NameNotFilter.pm untested

filter: Statementstmt 0.0% 0 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 13 CC 1 SCAR 6.9
CC
1
Cov
0%
_build_message
2.0
BEGIN
2.0
CRAP 2.0
1 package Valiant::Util::Exception::NameNotFilter;
2  
3 use Moo;
4 extends 'Valiant::Util::Exception';
5  
6 has name => (is=>'ro', required=>1);
7 has packages => (is=>'ro', required=>1);
8  
9 sub _build_message {
10 my ($self) = @_;
11 my $ns = join(', ', @{$self->packages});
12 return "Filter namepart '@{[ $self->name ]}' not found in existing namespace \@INC: $ns";
13 }
14  
15 1;
16  
17 =head1 NAME
18  
19 Valiant::Util::Exception::NameNotFilter - Failure to load a filter
20  
21 =head1 SYNOPSIS
22  
23 throw_exception('NameNotFilter', name => $key, packages => \@filter_packages)
24  
25 =head1 DESCRIPTION
26  
27 Encapsulates an error when the filter namepart you use can't be found in the filter
28 namespace.
29  
30 =head1 ATTRIBUTES
31  
32 =head2 name
33  
34 =head2 packages
35  
36 The string name of of the filter namepart and the list of package namespaces we search for
37 it in.
38  
39 =head2 message
40  
41 The actual exception message
42  
43 =head1 SEE ALSO
44
45 L<Valiant>
46  
47 =head1 AUTHOR
48
49 See L<Valiant>
50  
51 =head1 COPYRIGHT & LICENSE
52
53 See L<Valiant>
54  
55 =cut