Zapp/Type/Text.pm

filter: Statementstmt 63.6% 7 / 11 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 33.3% 2 / 6 Podpod 100% 4 / 4 totaltotal 50.0% 13 / 26 CC 2 SCAR 10.5
CC
2
Cov
50%
process_input
6.0
process_config
2.0
task_input
2.0
CRAP 2.9
« Zapp/Formula.pm ↑ Summary Zapp/Task/SQL.pm »
1 package Zapp::Type::Text;
2 4 ▶use Mojo::Base 'Zapp::Type', -signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use Mojo::Loader qw( data_section );
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 # XXX: Array type to hold another type
6 # XXX: KeyValue type?
7  
8 # "die" for validation errors
9  
10 # Form value -> Type value
11 ▶sub process_config( $self, $c, $form_value ) {
Subroutine process_config: not called CC=1 SCAR=6.9
Pod documented
12 0 return $form_value;
13 }
14  
15 ▶sub process_input( $self, $c, $config_value, $form_value ) {
Subroutine process_input: not called CC=2 SCAR=17.9
Pod documented
16 0 ▶ return $form_value // $config_value;
Condition0%0/3
$form_value // $config_value
l!l&&r!l&&!r
000
MC/DC0%0/2
$form_value // $config_value
$form_value $config_value
Truth table0%0/3
A // B
A= $form_valueB= $config_value
ABresult
1X1
011
000
17 }
18  
19 # Type value -> Task value
20 ▶sub task_input( $self, $config_value, $input_value ) {
Subroutine task_input: not called CC=1 SCAR=6.9
Pod documented
21 0 return $input_value;
22 }
23  
24 # Task value -> Type value
25 ▶sub task_output( $self, $config_value, $task_value ) {
Subroutine task_output: not called CC=1 SCAR=6.9
Pod documented
26 0 return $task_value;
27 }
28  
29 4 1;
30  
31 =pod
32  
33 =head1 NAME
34  
35 Zapp::Type::Text
36  
37 =head1 VERSION
38  
39 version 0.004
40  
41 =head1 AUTHOR
42  
43 Doug Bell <preaction@cpan.org>
44  
45 =head1 COPYRIGHT AND LICENSE
46  
47 This software is copyright (c) 2021 by Doug Bell.
48  
49 This is free software; you can redistribute it and/or modify it under
50 the same terms as the Perl 5 programming language system itself.
51  
52 =cut
53  
54 __DATA__
« Zapp/Formula.pm ↑ Summary Zapp/Task/SQL.pm »