blib/lib/FormValidator/Lite/Constraint.pm

filter: Statementstmt 100% 30 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 4 / 4 totaltotal 100% 42 / 42 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
import
1.0
CRAP 1.0
« _build/lib/MyBuilder.pm ↑ Summary blib/lib/FormValidator/Lite/Constraint/Email.pm »
1 package FormValidator::Lite::Constraint;
2 30 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 30 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 sub import {
6 40 ▶ strict->import;
Subroutine import: called CC=1 SCAR=0.0
7 40 warnings->import;
8  
9 30 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 40 my $pkg = caller(0);
11 40 *{"$pkg\::rule"} = \&rule;
12 40 *{"$pkg\::file_rule"} = \&file_rule;
13 40 *{"$pkg\::alias"} = \&alias;
14 40 *{"$pkg\::delsp"} = \&delsp;
15 }
16  
17 sub rule {
18 375 ▶ my ($name, $code) = @_;
Subroutine rule: called CC=1 SCAR=0.0
Pod documented
19 375 $FormValidator::Lite::Rules->{$name} = $code;
20 }
21 sub file_rule {
22 6 ▶ my ($name, $code) = @_;
Subroutine file_rule: called CC=1 SCAR=0.0
Pod documented
23 6 $FormValidator::Lite::FileRules->{$name} = $code;
24 }
25 sub alias {
26 150 ▶ my ($from, $to) = @_;
Subroutine alias: called CC=1 SCAR=0.0
Pod documented
27 150 $FormValidator::Lite::Rules->{$to} = $FormValidator::Lite::Rules->{$from};
28 }
29 sub delsp {
30 8 ▶ my $x = $_;
Subroutine delsp: called CC=1 SCAR=0.0
Pod documented
31 8 $x =~ s/\s//g;
32 8 return $x;
33 }
34  
35 30 1;
36 __END__
« _build/lib/MyBuilder.pm ↑ Summary blib/lib/FormValidator/Lite/Constraint/Email.pm »