line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::Karabiner::Manipulator::Conditions::Frontmost_application_if ; |
2
|
|
|
|
|
|
|
$JSON::Karabiner::Manipulator::Conditions::Frontmost_application_if::VERSION = '0.018'; |
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
26
|
|
5
|
1
|
|
|
1
|
|
6
|
use JSON; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
6
|
1
|
|
|
1
|
|
135
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
75
|
|
7
|
1
|
|
|
1
|
|
478
|
use parent 'JSON::Karabiner::Manipulator::Conditions'; |
|
1
|
|
|
|
|
307
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
2
|
|
|
2
|
0
|
5
|
my $class = shift; |
11
|
2
|
|
|
|
|
7
|
my ($type, $value) = @_; |
12
|
2
|
|
|
|
|
9
|
my $obj = $class->SUPER::new($type, $value); |
13
|
2
|
|
50
|
|
|
21
|
$obj->{data} = $value || [], |
14
|
|
|
|
|
|
|
return $obj; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub add_bundle_identifiers { |
18
|
2
|
|
|
2
|
0
|
400
|
my $s = shift; |
19
|
2
|
|
|
|
|
6
|
my @identifiers = @_; |
20
|
2
|
50
|
|
|
|
6
|
croak ('No identifier regular expressions passed.') unless @identifiers; |
21
|
2
|
|
|
|
|
3
|
push @{$s->{data}}, { bundle_identifiers => [ @identifiers ] }; |
|
2
|
|
|
|
|
14
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub add_file_paths { |
26
|
1
|
|
|
1
|
0
|
329
|
my $s = shift; |
27
|
1
|
|
|
|
|
4
|
my @files = @_; |
28
|
1
|
50
|
|
|
|
5
|
croak ('No file path regular expressions passed.') unless @files; |
29
|
1
|
|
|
|
|
2
|
push @{$s->{data}}, { file_paths => [ @files ] }; |
|
1
|
|
|
|
|
6
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub add_description { |
34
|
1
|
|
|
1
|
0
|
329
|
my $s = shift; |
35
|
1
|
|
|
|
|
2
|
my $desc = shift; |
36
|
1
|
50
|
|
|
|
4
|
croak ('No file path regular expressions passed.') unless $desc; |
37
|
1
|
|
|
|
|
2
|
push @{$s->{data}}, { description => $desc }; |
|
1
|
|
|
|
|
5
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
# ABSTRACT: definition for Frontmost_application_if condition |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |