Any/NetGrowlClient.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 2 totaltotal 66.6% 20 / 30 CC 1 SCAR 2.5
CC
1
Cov
71%
register
2.0
notify
2.0
BEGIN
1.0
CRAP 1.3
« Any/CocoaGrowl.pm ↑ Summary Any/NetGrowl.pm »
1 package Growl::Any::NetGrowlClient;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use parent qw(Growl::Any::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use Net::GrowlClient ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 0 ▶sub register {
Subroutine register: not called CC=1 SCAR=6.9
Pod undocumented
11 0 my ($self, $appname, $events) = @_;
12 0 $self->set_appname($appname);
13  
14 $self->{instance} = Net::GrowlClient->init(
15 CLIENT_TYPE_REGISTRATION => 0,
16 CLIENT_TYPE_NOTIFICATION => 1,
17 CLIENT_PASSWORD => $self->{password},
18 CLIENT_APPLICATION_NAME => $self->appname,
19 0 CLIENT_NOTIFICATION_LIST => [ $self->encode_list(@{$events}), 'Error'],
20 );
21 };
22  
23 0 ▶sub notify {
Subroutine notify: not called CC=1 SCAR=6.9
Pod undocumented
24 0 my ($self, $event, $title, $message, $icon) = @_;
25 $self->{instance}->notify(
26 0 title => $self->encode($title),
27 message => $self->encode($message),
28 notification => $self->encode($event),
29 );
30 }
31  
32 1;
33 __END__
« Any/CocoaGrowl.pm ↑ Summary Any/NetGrowl.pm »