DBIx/Class/Valiant/Validates.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 18 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Catalyst/View/Valiant/Form.pm ↑ Summary DBIx/Class/Valiant/Validator/locale/errors.pl »
1 package DBIx::Class::Valiant::Validates;
2  
3 7 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use Valiant::I18N;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use Scalar::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 7 with 'Valiant::Validates';
8  
9 around default_validator_namespaces => sub {
10 297 ▶ my ($orig, $self, @args) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
11 297 return 'DBIx::Class::Valiant::Validator', $self->$orig(@args);
12 7 };
13  
14 7 1;
15  
16 =head1 NAME
17  
18 DBIx::Class::Valiant::Validates - Add Valiant to DBIC
19  
20 =head1 DESCRIPTION
21  
22 This is a role which extends L<Valiant::Validates> so that is finds validators
23 under the L<DBIx::Class::Valiant::Validator> namespace. It adds this namespace
24 to the top of the call list, that way we can if needed override core validators
25 with versions that work properly under L<DBIx::Class>.
26  
27 You shouldn't need to use this code directly yourself, it gets added automatically
28 for you.
29  
30 =head1 SEE ALSO
31
32 See L<Valiant>, L<DBIx::Class::Valiant>
33  
34 =head1 AUTHOR
35  
36 See L<Valiant>.
37  
38 =head1 COPYRIGHT & LICENSE
39  
40 See L<Valiant>.
41  
42 =cut
« Catalyst/View/Valiant/Form.pm ↑ Summary DBIx/Class/Valiant/Validator/locale/errors.pl »