Mattermost/V4/API/Object/Log.pm

filter: Statementstmt 68.7% 11 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 2 / 6 Podpod n/a totaltotal 59.0% 13 / 22 CC 1 SCAR 5.1
CC
1
Cov
69%
_build_caller
2.0
_build_msg
2.0
_build_ts
2.0
CRAP 1.7
« Mattermost/V4/API/Resource/LDAP.pm ↑ Summary Mattermost/V4/API/Object/Application.pm »
1 package WebService::Mattermost::V4::API::Object::Log;
2  
3 # ABSTRACT: A log item.
4  
5 12 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use Types::Standard qw(Maybe InstanceOf Int Str);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 12 extends 'WebService::Mattermost::V4::API::Object';
9 12 with 'WebService::Mattermost::V4::API::Object::Role::Level';
10  
11 ################################################################################
12  
13 12 has [ qw(caller msg ts) ] => (is => 'ro', isa => Maybe[Str], lazy => 1, builder => 1);
14 12 has timestamp => (is => 'ro', isa => Maybe[InstanceOf['DateTime']], lazy => 1, builder => 1);
15  
16 ################################################################################
17  
18 0 ▶sub _build_caller { shift->raw_data->{caller} }
Subroutine _build_caller: not called CC=1 SCAR=6.9
19 0 ▶sub _build_msg { shift->raw_data->{msg} }
Subroutine _build_msg: not called CC=1 SCAR=6.9
20 0 ▶sub _build_ts { shift->raw_data->{ts} }
Subroutine _build_ts: not called CC=1 SCAR=6.9
21  
22 sub _build_timestamp {
23 0 ▶ my $self = shift;
Subroutine _build_timestamp: not called CC=1 SCAR=6.9
24  
25 0 return $self->_from_epoch($self->ts);
26 }
27  
28 ################################################################################
29  
30 12 1;
31  
32 __END__
33  
34 =pod
35  
36 =encoding UTF-8
37  
38 =head1 NAME
39  
40 WebService::Mattermost::V4::API::Object::Log - A log item.
41  
42 =head1 VERSION
43  
44 version 0.28
45  
46 =head1 DESCRIPTION
47  
48 Details a Mattermost Log object.
49  
50 =head2 ATTRIBUTES
51  
52 =over 4
53  
54 =item C<caller>
55  
56 =item C<msg>
57  
58 =item C<ts>
59  
60 UNIX timestamp.
61  
62 =item C<timestamp>
63  
64 DateTime.
65  
66 =back
67  
68 =head1 AUTHOR
69  
70 Mike Jones <mike@netsplit.org.uk>
71  
72 =head1 COPYRIGHT AND LICENSE
73  
74 This software is Copyright (c) 2020 by Mike Jones.
75  
76 This is free software, licensed under:
77  
78 The MIT (X11) License
79  
80 =cut
« Mattermost/V4/API/Resource/LDAP.pm ↑ Summary Mattermost/V4/API/Object/Application.pm »