« Karabiner/Manipulator/Actions/To_delayed_if_canceled.pm
↑ Summary
Karabiner/Manipulator/Conditions.pm »
| 1 | package JSON::Karabiner::Manipulator::Actions::To_delayed_if_invoked ; | ||||||||||
| 2 | 1 | $JSON::Karabiner::Manipulator::Actions::To_delayed_if_invoked::VERSION = '0.011'; | |||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use JSON; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use parent 'JSON::Karabiner::Manipulator::Actions::To'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | sub new { | ||||||||||
| 10 | 3 | ▶ | my $class = shift; | ||||||||
|
Subroutine
new: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 11 | 3 | my ($type, $value) = @_; | |||||||||
| 12 | 3 | my $obj = $class->SUPER::new('to_delayed_action', $value); | |||||||||
| 13 | 3 | $obj->{delayed_type} = 'invoked'; | |||||||||
| 14 | 3 | ▶ | if ($value) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 0 | $obj->{data} = $value, | |||||||||
| 16 | } else { | ||||||||||
| 17 | 3 | $obj->{data} = {}; | |||||||||
| 18 | 3 | $obj->{data}{to_if_invoked} = []; | |||||||||
| 19 | |||||||||||
| 20 | # $obj->{data}{to_delayed_action}{to_if_invoked} = []; | ||||||||||
| 21 | } | ||||||||||
| 22 | 3 | return $obj; | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | # ABSTRACT: to_delayed_if_invoked action | ||||||||||
| 26 | |||||||||||
| 27 | 1 | 1; | |||||||||
| 28 | |||||||||||
| 29 | __END__ | ||||||||||