File Coverage

blib/lib/Dancer2/Plugin/DataTransposeValidator.pm
Criterion Covered Total %
statement 14 14 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod n/a
total 21 21 100.0


line stmt bran cond sub pod time code
1             package Dancer2::Plugin::DataTransposeValidator;
2              
3 1     1   328058 use strict;
  1         1  
  1         23  
4 1     1   4 use warnings;
  1         1  
  1         17  
5              
6 1     1   427 use Dancer2::Plugin;
  1         1607  
  1         5  
7 1     1   1608 use Dancer::Plugin::DataTransposeValidator::Validator;
  1         2  
  1         107  
8              
9             =head1 NAME
10              
11             Dancer2::Plugin::DataTransposeValidator - Data::Transpose::Validator plugin for Dancer2
12              
13             =head1 VERSION
14              
15             Version 0.009
16              
17             =cut
18              
19             our $VERSION = '0.009';
20              
21              
22             register validator => sub {
23 10     10   184063 my ( $dsl, $params, $rules_file, @additional_args ) = @_;
24              
25 10 100       66 Dancer::Plugin::DataTransposeValidator::Validator->new(
26             additional_args => @additional_args ? [@additional_args] : [],
27             appdir => $dsl->setting('appdir'),
28             params => $params,
29             plugin_setting => plugin_setting,
30             rules_file => $rules_file
31             )->transpose;
32             };
33              
34             register_plugin;
35              
36             1;
37             __END__