Any/GrowlGNTP.pm

filter: Statementstmt 62.5% 15 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 2 totaltotal 60.6% 20 / 33 CC 2 SCAR 8.6
CC
2
Cov
62%
register
6.0
notify
2.0
BEGIN
1.0
CRAP 2.4
« Any/DesktopNotify.pm ↑ Summary Any/IOHandle.pm »
1 package Growl::Any::GrowlGNTP;
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 Growl::GNTP ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 0 ▶sub register {
Subroutine register: not called CC=2 SCAR=17.9
Pod undocumented
11 0 my ($self, $appname, $events) = @_;
12 0 $self->SUPER::register($appname, $events);
13  
14 0 $self->{instance} = Growl::GNTP->new(
15 AppName => $self->appname,
16 );
17  
18 0 my @e = ();
19 0 push @e, { Name => $self->encode($_) } for @$events;
20 0 push @e, { Name => 'Error' };
21 0 $self->{instance}->register(\@e);
22 }
23  
24 0 ▶sub notify {
Subroutine notify: not called CC=1 SCAR=6.9
Pod undocumented
25 0 my ($self, $event, $title, $message, $icon, $link) = @_;
26 $self->{instance}->notify(
27 0 Title => $self->encode($title),
28 Message => $self->encode($message),
29 Event => $self->encode($event),
30 Icon => $self->encode($icon),
31 CallbackTarget => $self->encode($link),
32 );
33 }
34  
35 1;
36 __END__
« Any/DesktopNotify.pm ↑ Summary Any/IOHandle.pm »