« Karabiner/Manipulator/Actions/To_delayed_if_canceled.pm
↑ Summary
Karabiner/Manipulator/Conditions/Keyboard_type_if.pm »
| 1 | package JSON::Karabiner::Manipulator::Conditions::Frontmost_application_if ; | ||||||||||||
| 2 | 1 | $JSON::Karabiner::Manipulator::Conditions::Frontmost_application_if::VERSION = '0.018'; | |||||||||||
| 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::Conditions'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||
| 10 | 2 | my $class = shift; | |||||||||||
| 11 | 2 | my ($type, $value) = @_; | |||||||||||
| 12 | 2 | my $obj = $class->SUPER::new($type, $value); | |||||||||||
| 13 | 2 | ▶ | $obj->{data} = $value || [], | ||||||||||
|
Condition50%1/2
$value || []
MC/DC0%0/1
$value || []
$value
Truth table50%1/2
A
A= $value
| |||||||||||||
| 14 | return $obj; | ||||||||||||
| 15 | } | ||||||||||||
| 16 | |||||||||||||
| 17 | 2 | ▶ | sub add_bundle_identifiers { | ||||||||||
|
Subroutine
add_bundle_identifiers: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||
| 18 | 2 | my $s = shift; | |||||||||||
| 19 | 2 | my @identifiers = @_; | |||||||||||
| 20 | 2 | ▶ | croak ('No identifier regular expressions passed.') unless @identifiers; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 21 | 2 | push @{$s->{data}}, { bundle_identifiers => [ @identifiers ] }; | |||||||||||
| 22 | |||||||||||||
| 23 | } | ||||||||||||
| 24 | |||||||||||||
| 25 | 1 | ▶ | sub add_file_paths { | ||||||||||
|
Subroutine
add_file_paths: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||
| 26 | 1 | my $s = shift; | |||||||||||
| 27 | 1 | my @files = @_; | |||||||||||
| 28 | 1 | ▶ | croak ('No file path regular expressions passed.') unless @files; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 29 | 1 | push @{$s->{data}}, { file_paths => [ @files ] }; | |||||||||||
| 30 | |||||||||||||
| 31 | } | ||||||||||||
| 32 | |||||||||||||
| 33 | 1 | ▶ | sub add_description { | ||||||||||
|
Subroutine
add_description: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||
| 34 | 1 | my $s = shift; | |||||||||||
| 35 | 1 | my $desc = shift; | |||||||||||
| 36 | 1 | ▶ | croak ('No file path regular expressions passed.') unless $desc; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 37 | 1 | push @{$s->{data}}, { description => $desc }; | |||||||||||
| 38 | |||||||||||||
| 39 | } | ||||||||||||
| 40 | # ABSTRACT: definition for Frontmost_application_if condition | ||||||||||||
| 41 | |||||||||||||
| 42 | 1 | 1; | |||||||||||
| 43 | |||||||||||||
| 44 | __END__ | ||||||||||||