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