File Coverage

blib/lib/Net/Async/Slack/Event/PresenceChange.pm
Criterion Covered Total %
statement 10 14 71.4
branch n/a
condition 0 3 0.0
subroutine 4 7 57.1
pod 0 4 0.0
total 14 28 50.0


line stmt bran cond sub pod time code
1             package Net::Async::Slack::Event::PresenceChange;
2              
3 4     4   367675 use strict;
  4         10  
  4         198  
4 4     4   22 use warnings;
  4         8  
  4         345  
5              
6             our $VERSION = '0.015'; # VERSION
7              
8 4     4   565 use Net::Async::Slack::EventType;
  4         12  
  4         33  
9              
10             =head1 DESCRIPTION
11              
12             {
13             "type":"presence_change",
14             "presence":"active",
15             "user":"U5GSPCF1C"
16             }
17              
18             =cut
19              
20             sub user {
21 0     0 0 0 my ($self) = @_;
22 0   0     0 $self->{user} //= $self->slack->user_info($self->user_id)
23             }
24 0     0 0 0 sub user_id { shift->{user_id} }
25              
26 0     0 0 0 sub presence { shift->{presence} }
27              
28 8     8 0 61 sub type { 'presence_change' }
29              
30             1;
31