| 1 | package Growl::Any::DesktopNotify; | ||||||||||
| 2 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use parent qw(Growl::Any::Base); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 3 | ▶ | use Carp (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 3 | ▶ | use Desktop::Notify (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 0 | ▶ | sub register { | ||||||||
|
Subroutine
register: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 10 | 0 | my ($self, $appname, $events) = @_; | |||||||||
| 11 | 0 | $self->SUPER::register($appname, $events); | |||||||||
| 12 | 0 | $self->{instance} = Desktop::Notify->new( | |||||||||
| 13 | "app_name" => $self->appname, | ||||||||||
| 14 | ); | ||||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | sub notify { | ||||||||
|
Subroutine
notify: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 18 | 0 | my ($self, $event, $title, $message, $icon) = @_; | |||||||||
| 19 | 0 | ▶ | $icon = $self->icon_file($icon) if defined $icon; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | my $notify = $self->{instance}->create( | ||||||||||
| 21 | 0 | body => $self->encode($message), | |||||||||
| 22 | summary => $self->encode($title), | ||||||||||
| 23 | timeout => 5000, | ||||||||||
| 24 | app_icon => $icon, | ||||||||||
| 25 | ); | ||||||||||
| 26 | 0 | $notify->show(); | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 1; | ||||||||||
| 30 | __END__ | ||||||||||