File Coverage

blib/lib/JSON/Karabiner/Manipulator/Actions/To_if_alone.pm
Criterion Covered Total %
statement 19 19 100.0
branch n/a
condition 1 2 50.0
subroutine 6 6 100.0
pod 1 1 100.0
total 27 28 96.4


line stmt bran cond sub pod time code
1             package JSON::Karabiner::Manipulator::Actions::To_if_alone ;
2             $JSON::Karabiner::Manipulator::Actions::To_if_alone::VERSION = '0.018';
3 1     1   7 use strict;
  1         2  
  1         30  
4 1     1   6 use warnings;
  1         2  
  1         24  
5 1     1   5 use JSON;
  1         2  
  1         7  
6 1     1   135 use Carp;
  1         3  
  1         57  
7 1     1   469 use parent 'JSON::Karabiner::Manipulator::Actions::To';
  1         284  
  1         5  
8              
9             sub new {
10 2     2 1 6 my $class = shift;
11 2         7 my ($type, $value) = @_;
12 2         11 my $obj = $class->SUPER::new($type, $value);
13 2   50     13 $obj->{data} = $value || [],
14             return $obj;
15             }
16              
17             # ABSTRACT: to_if_alone action class
18              
19             1;
20              
21             __END__