Karabiner/Manipulator/Conditions/Event_changed_if.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 41 CC 3 SCAR 16.7
CC
3
Cov
0%
add_value
12.0
new
2.0
BEGIN
2.0
CRAP 5.3
1 package JSON::Karabiner::Manipulator::Conditions::Event_changed_if ;
2 $JSON::Karabiner::Manipulator::Conditions::Event_changed_if::VERSION = '0.008';
3 use strict;
4 use warnings;
5 use JSON;
6 use Carp;
7 use parent 'JSON::Karabiner::Manipulator::Conditions::Variable_if';
8  
9 sub new {
10 my $class = shift;
11 my ($type, $value) = @_;
12 my $obj = $class->SUPER::new($type, $value);
13 $obj->{data} = $value || {},
14 return $obj;
15 }
16  
17 sub add_value {
18 my $s = shift;
19 my $value = shift;
20 $value = $value eq 'true' ? JSON::true : JSON::false;
21 croak 'A value for the varaible name is required' unless $value;
22 #TODO: Validates args
23 $s->{data}{value} = $value;
24  
25 }
26  
27 # ABSTRACT: definition for event_changed_if condition
28  
29 1;
30  
31 __END__