Mattermost/V4/API/Object/Role/BelongingToPost.pm

filter: Statementstmt 85.7% 12 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod n/a totaltotal 78.9% 15 / 19 CC 1 SCAR 3.4
CC
1
Cov
86%
_build_post_id
2.0
_build_post
2.0
BEGIN
1.0
CRAP 1.4
« Mattermost/V4/API/Object/User/Preference.pm ↑ Summary Mattermost/V4/API/Object.pm »
1 package WebService::Mattermost::V4::API::Object::Role::BelongingToPost;
2  
3 # ABSTRACT: Mark an object as belonging to a post.
4  
5 12 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use Types::Standard qw(Maybe InstanceOf Str);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 12 ▶use WebService::Mattermost::Helper::Alias 'view';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 ################################################################################
11  
12 12 has post_id => (is => 'ro', isa => Maybe[Str], lazy => 1, builder => 1);
13 12 has post => (is => 'ro', isa => Maybe[InstanceOf[view 'Post']], lazy => 1, builder => 1);
14  
15 ################################################################################
16  
17 0 ▶sub _build_post_id { shift->raw_data->{post_id} }
Subroutine _build_post_id: not called CC=1 SCAR=6.9
18  
19 sub _build_post {
20 # TODO
21 0 ▶ return undef;
Subroutine _build_post: not called CC=1 SCAR=6.9
22 }
23  
24 ################################################################################
25  
26 12 1;
27  
28 __END__
29  
30 =pod
31  
32 =encoding UTF-8
33  
34 =head1 NAME
35  
36 WebService::Mattermost::V4::API::Object::Role::BelongingToPost - Mark an object as belonging to a post.
37  
38 =head1 VERSION
39  
40 version 0.28
41  
42 =head1 DESCRIPTION
43  
44 Link a view object to a post.
45  
46 =head2 ATTRIBUTES
47  
48 =over 4
49  
50 =item C<post_id>
51  
52 The post's ID.
53  
54 =item C<post>
55  
56 Linked L<WebService::Mattermost::V4::API::Object::Post> object.
57  
58 =back
59  
60 =head1 AUTHOR
61  
62 Mike Jones <mike@netsplit.org.uk>
63  
64 =head1 COPYRIGHT AND LICENSE
65  
66 This software is Copyright (c) 2020 by Mike Jones.
67  
68 This is free software, licensed under:
69  
70 The MIT (X11) License
71  
72 =cut
« Mattermost/V4/API/Object/User/Preference.pm ↑ Summary Mattermost/V4/API/Object.pm »