line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Growl::Any::MacGrowl; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
649
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
105
|
|
4
|
3
|
|
|
3
|
|
24
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
104
|
|
5
|
3
|
|
|
3
|
|
2534
|
use parent qw(Growl::Any::Base); |
|
3
|
|
|
|
|
915
|
|
|
3
|
|
|
|
|
14
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
193
|
use Carp (); |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
49
|
|
8
|
3
|
|
|
3
|
|
916
|
use Mac::Growl (); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
197
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub register { |
11
|
0
|
|
|
0
|
0
|
|
my ($self, $appname, $events) = @_; |
12
|
0
|
|
|
|
|
|
$self->SUPER::register($appname, $events); |
13
|
0
|
|
|
|
|
|
my @e = $self->encode_list_from('MacRoman', @{$events}); |
|
0
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
Mac::Growl::RegisterNotifications($self->appname, [ @e, 'Error'], \@e); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub notify { |
18
|
0
|
|
|
0
|
0
|
|
my ($self, $event, $title, $message, $icon) = @_; |
19
|
0
|
0
|
|
|
|
|
if (defined $icon) { |
20
|
0
|
|
|
|
|
|
$icon = $self->icon_file($icon); |
21
|
|
|
|
|
|
|
} |
22
|
0
|
|
|
|
|
|
Mac::Growl::PostNotification($self->appname, |
23
|
|
|
|
|
|
|
$self->encode_list_from( 'MacRoman', $event, $title, $message ), 0, 0, $icon); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
__END__ |