File Coverage

blib/lib/MIDI/RtController/Filter.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package MIDI::RtController::Filter;
2             our $AUTHORITY = 'cpan:GENE';
3              
4             # ABSTRACT: Parent class of RtController filters
5              
6             our $VERSION = '0.0102';
7              
8 2     2   707625 use Moo;
  2         18629  
  2         15  
9 2     2   4681 use strictures 2;
  2         3556  
  2         89  
10 2     2   2260 use Types::Standard qw(Bool Maybe);
  2         304607  
  2         69  
11 2     2   7262 use Types::MIDI qw(Channel Velocity);
  2         297510  
  2         53  
12 2     2   8302 use namespace::clean;
  2         45318  
  2         70  
13              
14              
15             has rtc => (
16             is => 'ro',
17             isa => sub { die 'Invalid controller' unless ref($_[0]) eq 'MIDI::RtController' },
18             );
19              
20              
21             has channel => (
22             is => 'rw',
23             isa => Channel,
24             default => sub { 0 },
25             );
26              
27              
28             has value => (
29             is => 'rw',
30             isa => Maybe[Velocity],
31             default => sub { undef },
32             );
33              
34              
35             has trigger => (
36             is => 'rw',
37             isa => Maybe[Velocity],
38             default => sub { undef },
39             );
40              
41              
42             has running => (
43             is => 'rw',
44             isa => Bool,
45             default => 0,
46             );
47              
48              
49             has halt => (
50             is => 'rw',
51             isa => Bool,
52             default => 0,
53             );
54              
55              
56             has continue => (
57             is => 'rw',
58             isa => Bool,
59             default => 0,
60             );
61              
62              
63             has verbose => (
64             is => 'rw',
65             isa => Bool,
66             default => sub { 0 },
67             );
68              
69             1;
70              
71             __END__