line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Log::Dispatch::MacGrowl::Mac; |
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
18
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
132
|
|
6
|
3
|
|
|
3
|
|
15
|
use vars qw($VERSION); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
118
|
|
7
|
3
|
|
|
3
|
|
2654
|
use Mac::Growl (); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$VERSION = '0.01'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub log_message { |
12
|
|
|
|
|
|
|
my $self = shift; |
13
|
|
|
|
|
|
|
my %p = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Mac::Growl::PostNotification( $self->{app_name}, $self->_notification_name, |
16
|
|
|
|
|
|
|
$self->{title}, $p{message}, |
17
|
|
|
|
|
|
|
$self->{sticky}, $self->{priority}, $self->{icon_file} ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _set_global { |
21
|
|
|
|
|
|
|
my $self = shift; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $global = [ $self->_notification_name ]; |
24
|
|
|
|
|
|
|
Mac::Growl::RegisterNotifications( $self->{app_name}, $global, $global ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |