File Coverage

blib/lib/App/Alice/Notifier/LibNotify.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             package App::Alice::Notifier::LibNotify;
2              
3 2     2   863 use Desktop::Notify;
  0            
  0            
4             use Any::Moose;
5              
6             has 'client' => (
7             is => 'ro',
8             isa => 'Desktop::Notify',
9             default => sub {
10             return Desktop::Notify->new;
11             }
12             );
13              
14             sub display {
15             my ($self, $message) = @_;
16             my $notification = $self->client->create(
17             summary => $message->{nick} . " in " . $message->{window}->{title},
18             body => $message->{body},
19             timeout => 3000);
20             $notification->show;
21             }
22              
23             __PACKAGE__->meta->make_immutable;
24             1;