blib/lib/Term/Fabulous/Event/SortChange.pm untested

filter: Statementstmt 0.0% 0 / 33 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 6 Podpod n/a totaltotal 0.0% 0 / 46 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Term::Fabulous::Event::SortChange;
2  
3 use v5.32;
4 use warnings;
5 use feature 'signatures';
6 no warnings 'experimental::signatures';
7  
8 our $VERSION = '0.05';
9  
10 use Object::Pad 0.825;
11  
12 use Clay::UI::Events::Event;
13  
14 class Term::Fabulous::Event::SortChange :isa(Clay::UI::Events::Event) :strict(params) {
15 field $sort :param;
16  
17 ADJUST {
18 die "Term::Fabulous::Event::SortChange: sort must be an array reference of [ key, direction ] pairs" unless ref $sort eq 'ARRAY' && !grep { ref $_ ne 'ARRAY' } @$sort;
19 $sort = [ map { [@$_] } @$sort ];
20 }
21  
22 method event_name :common { 'SortChange' }
23  
24 method sort () {
25 return [ map { [@$_] } @$sort ];
26 }
27 }
28  
29 1;
30  
31 __END__