MacGrowl/Mac.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
log_message
2.0
_set_global
2.0
BEGIN
2.0
CRAP 2.0
1 #
2  
3 package Log::Dispatch::MacGrowl::Mac;
4  
5 use strict;
6 use vars qw($VERSION);
7 use Mac::Growl ();
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__