line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mac::OSA::Dialog::Tiny; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
68135
|
use 5.006; use strict; use warnings;our $VERSION = '0.01'; |
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
1
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
7
|
use base 'Import::Export'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
487
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our %EX = ( |
8
|
|
|
|
|
|
|
dialog => [qw/all/] |
9
|
|
|
|
|
|
|
); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub dialog { |
12
|
0
|
0
|
|
0
|
1
|
|
my %params = ref $_[0] ? %{ $_[0] } : @_; |
|
0
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $line = sprintf q|osascript -e "display dialog \"%s\" %s %s %s"|, $params{m} || 'No message param passed - m', |
14
|
|
|
|
|
|
|
( $params{t} ? sprintf q|with title \"%s\"|, $params{t} : ''), |
15
|
|
|
|
|
|
|
( $params{i} ? sprintf q|with icon POSIX file \"${PWD}/%s\"|, $params{i} : ''), |
16
|
0
|
0
|
0
|
|
|
|
( $params{b} ? sprintf q|buttons { %s } |, join ",", map { sprintf '\"%s\"', $_ } @{ $params{b} } : ''); |
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
qx($line); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__END__ |