File Coverage

blib/lib/CXC/Form/Tiny/Plugin/OptArgs2/Class.pm
Criterion Covered Total %
statement 31 31 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod 3 3 100.0
total 43 43 100.0


line stmt bran cond sub pod time code
1             package CXC::Form::Tiny::Plugin::OptArgs2::Class;
2              
3             # ABSTRACT: Class role for OptArgs2
4              
5 6     6   259127 use v5.20;
  6         28  
6              
7 6     6   41 use warnings;
  6         14  
  6         599  
8              
9             our $VERSION = '0.12';
10              
11 6     6   4144 use Hash::Fold ();
  6         341126  
  6         216  
12              
13 6     6   641 use Moo::Role;
  6         11853  
  6         62  
14 6     6   4149 use experimental 'signatures', 'postderef';
  6         1945  
  6         54  
15              
16 6     6   2127 use namespace::clean;
  6         21897  
  6         64  
17              
18              
19              
20              
21              
22              
23              
24              
25              
26              
27 10     10 1 29294 sub optargs ( $self ) {
  10         31  
  10         19  
28 10         54 return $self->form_meta->optargs;
29             }
30              
31              
32              
33              
34              
35              
36              
37              
38              
39              
40 2     2 1 39336 sub set_input_from_optargs ( $self, $optargs ) {
  2         5  
  2         6  
  2         3  
41             # inflate the flat hash into the nested structure and set the
42             # form's input
43 2         11 $self->set_input( $self->inflate_optargs( $optargs ) );
44             }
45              
46              
47              
48              
49              
50              
51              
52              
53              
54              
55              
56              
57 2     2 1 5 sub inflate_optargs ( $self, $optargs ) {
  2         4  
  2         15  
  2         5  
58 2         15 return $self->form_meta->inflate_optargs( $optargs );
59             }
60              
61              
62             #
63             # This file is part of CXC-Form-Tiny-Plugin-OptArgs2
64             #
65             # This software is Copyright (c) 2023 by Smithsonian Astrophysical Observatory.
66             #
67             # This is free software, licensed under:
68             #
69             # The GNU General Public License, Version 3, June 2007
70             #
71              
72             1;
73              
74             __END__