File Coverage

blib/lib/WebService/Mattermost/V4/API/Object/Role/BelongingToPost.pm
Criterion Covered Total %
statement 9 11 81.8
branch n/a
condition n/a
subroutine 3 5 60.0
pod n/a
total 12 16 75.0


line stmt bran cond sub pod time code
1             package WebService::Mattermost::V4::API::Object::Role::BelongingToPost;
2:

3: # ABSTRACT: Mark an object as belonging to a post. 4:
5: use Moo::Role;
6: use Types::Standard qw(Maybe InstanceOf Str);
7:
8: use WebService::Mattermost::Helper::Alias 'view';
9:
10: ################################################################################
11:
12: has post_id => (is => 'ro', isa => Maybe[Str], lazy => 1, builder => 1);
13: has post => (is => 'ro', isa => Maybe[InstanceOf[view 'Post']], lazy => 1, builder => 1);
14:
15: ################################################################################
16:
17: sub _build_post_id { shift->raw_data->{post_id} }
18:
19: sub _build_post {
20: # TODO
21: return undef;
22: }
23:
24: ################################################################################
25:
26: 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.30
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) 2023 by Mike Jones.
67:
68: This is free software, licensed under:
69:
70: The MIT (X11) License
71:
72: =cut
73: