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.016'; |
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
12
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
23
|
|
5
|
1
|
|
|
1
|
|
9
|
use JSON; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
156
|
use Carp; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
83
|
|
7
|
1
|
|
|
1
|
|
549
|
use parent 'JSON::Karabiner::Manipulator::Conditions'; |
|
1
|
|
|
|
|
339
|
|
|
1
|
|
|
|
|
7
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
2
|
|
|
2
|
0
|
5
|
my $class = shift; |
11
|
2
|
|
|
|
|
6
|
my ($type, $value) = @_; |
12
|
2
|
|
|
|
|
11
|
my $obj = $class->SUPER::new($type, $value); |
13
|
2
|
|
50
|
|
|
23
|
$obj->{data} = $value || [], |
14
|
|
|
|
|
|
|
return $obj; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub add_bundle_identifiers { |
18
|
2
|
|
|
2
|
0
|
448
|
my $s = shift; |
19
|
2
|
|
|
|
|
16
|
my @identifiers = @_; |
20
|
2
|
50
|
|
|
|
5
|
croak ('No identifier regular expressions passed.') unless @identifiers; |
21
|
2
|
|
|
|
|
5
|
push @{$s->{data}}, { bundle_identifiers => [ @identifiers ] }; |
|
2
|
|
|
|
|
14
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub add_file_paths { |
26
|
1
|
|
|
1
|
0
|
332
|
my $s = shift; |
27
|
1
|
|
|
|
|
4
|
my @files = @_; |
28
|
1
|
50
|
|
|
|
3
|
croak ('No file path regular expressions passed.') unless @files; |
29
|
1
|
|
|
|
|
3
|
push @{$s->{data}}, { file_paths => [ @files ] }; |
|
1
|
|
|
|
|
6
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub add_description { |
34
|
1
|
|
|
1
|
0
|
342
|
my $s = shift; |
35
|
1
|
|
|
|
|
3
|
my $desc = shift; |
36
|
1
|
50
|
|
|
|
3
|
croak ('No file path regular expressions passed.') unless $desc; |
37
|
1
|
|
|
|
|
2
|
push @{$s->{data}}, { description => $desc }; |
|
1
|
|
|
|
|
6
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
# ABSTRACT: definition for Frontmost_application_if condition |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |