line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mac::OSA::Dialog::Tiny; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
132110
|
use 5.006; use strict; use warnings;our $VERSION = '0.03'; |
|
2
|
|
|
2
|
|
20
|
|
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
57
|
|
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
112
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
13
|
use base 'Import::Export'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1008
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our %EX = ( |
8
|
|
|
|
|
|
|
dialog => [qw/all/] |
9
|
|
|
|
|
|
|
); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub dialog { |
12
|
4
|
50
|
|
4
|
1
|
1999
|
my %params = ref $_[0] ? %{ $_[0] } : @_; |
|
0
|
|
|
|
|
0
|
|
13
|
|
|
|
|
|
|
readpipe(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
|
4
|
100
|
50
|
|
|
47
|
( $params{b} ? sprintf q| buttons { %s }|, join ",", map { sprintf '\"%s\"', $_ } @{ $params{b} } : '')); |
|
1
|
100
|
|
|
|
9
|
|
|
1
|
100
|
|
|
|
5
|
|
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
__END__ |