MacGrowl/Cocoa.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 24 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::Cocoa;
4  
5 use strict;
6 use vars qw($VERSION);
7 use Cocoa::Growl ();
8  
9 $VERSION = '0.01';
10  
11 sub log_message {
12 my $self = shift;
13 my %p = @_;
14  
15 Cocoa::Growl::growl_notify(
16 name => $self->_notification_name,
17 icon => $self->{icon_file},
18 sticky => $self->{sticky},
19 priority => $self->{priority},
20 title => $self->{title},
21 description => $p{message},
22 );
23 }
24  
25 sub _set_global {
26 my $self = shift;
27  
28 Cocoa::Growl::growl_register(
29 app => $self->{app_name},
30 notifications => [ $self->_notification_name ],
31 );
32 }
33  
34 1;
35  
36 __END__