File Coverage

blib/lib/Growl/Any/CocoaGrowl.pm
Criterion Covered Total %
statement 15 21 71.4
branch n/a
condition n/a
subroutine 5 7 71.4
pod 0 2 0.0
total 20 30 66.6


line stmt bran cond sub pod time code
1             package Growl::Any::CocoaGrowl;
2              
3 3     3   18 use strict;
  3         7  
  3         113  
4 3     3   16 use warnings;
  3         6  
  3         97  
5 3     3   15 use parent qw(Growl::Any::Base);
  3         6  
  3         19  
6              
7 3     3   280 use Carp ();
  3         5  
  3         52  
8 3     3   965 use Cocoa::Growl ();
  1         2  
  1         209  
9              
10             sub register {
11 0     0 0   my ($self, $appname, $events) = @_;
12 0           $self->SUPER::register($appname, $events);
13 0           Cocoa::Growl::growl_register(
14             app => $self->appname,
15 0           notifications => [ $self->encode_list(@{$events}) ],
16             );
17             }
18              
19             sub notify {
20 0     0 0   my ($self, $event, $title, $message, $icon) = @_;
21 0           Cocoa::Growl::growl_notify(
22             name => $self->encode($event),
23             title => $self->encode($title),
24             description => $self->encode($message),
25             icon => $icon,
26             );
27             }
28              
29             1;
30             __END__