line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Growl::Any::GrowlGNTP; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
16
|
use strict; |
|
3
|
|
|
|
|
21
|
|
|
3
|
|
|
|
|
94
|
|
4
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
92
|
|
5
|
3
|
|
|
3
|
|
15
|
use parent qw(Growl::Any::Base); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
14
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
160
|
use Carp (); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
38
|
|
8
|
3
|
|
|
3
|
|
919
|
use Growl::GNTP (); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
193
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub register { |
11
|
0
|
|
|
0
|
0
|
|
my ($self, $appname, $events) = @_; |
12
|
0
|
|
|
|
|
|
$self->SUPER::register($appname, $events); |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
$self->{instance} = Growl::GNTP->new( |
15
|
|
|
|
|
|
|
AppName => $self->appname, |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my @e = (); |
19
|
0
|
|
|
|
|
|
push @e, { Name => $self->encode($_) } for @$events; |
20
|
0
|
|
|
|
|
|
push @e, { Name => 'Error' }; |
21
|
0
|
|
|
|
|
|
$self->{instance}->register(\@e); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub notify { |
25
|
0
|
|
|
0
|
0
|
|
my ($self, $event, $title, $message, $icon, $link) = @_; |
26
|
0
|
|
|
|
|
|
$self->{instance}->notify( |
27
|
|
|
|
|
|
|
Title => $self->encode($title), |
28
|
|
|
|
|
|
|
Message => $self->encode($message), |
29
|
|
|
|
|
|
|
Event => $self->encode($event), |
30
|
|
|
|
|
|
|
Icon => $self->encode($icon), |
31
|
|
|
|
|
|
|
CallbackTarget => $self->encode($link), |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |