line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Mattermost::V4::API::Object::Role::BelongingToUser; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
5
|
7
|
|
|
7
|
|
3785
|
use Moo::Role; |
|
7
|
|
|
|
|
19
|
|
|
7
|
|
|
|
|
44
|
|
6
|
7
|
|
|
7
|
|
3100
|
use Types::Standard qw(InstanceOf Maybe Str); |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
50
|
|
7
|
|
|
|
|
|
|
|
8
|
7
|
|
|
7
|
|
4976
|
use WebService::Mattermost::Helper::Alias 'view'; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
1774
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has creator_id => (is => 'ro', isa => Maybe[Str], lazy => 1, builder => 1); |
13
|
|
|
|
|
|
|
has [ qw(user created_by) ] => (is => 'ro', isa => Maybe[InstanceOf[view 'User']], lazy => 1, builder => 1); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _build_creator_id { |
18
|
1
|
|
|
1
|
|
2106
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
return $self->raw_data->{creator_id} |
21
|
|
|
|
|
|
|
|| $self->raw_data->{owner_id} |
22
|
1
|
|
33
|
|
|
26
|
|| $self->raw_data->{user_id}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _build_created_by { |
26
|
1
|
|
|
1
|
|
94
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
1
|
50
|
|
|
|
18
|
return unless $self->creator_id; |
29
|
1
|
|
|
|
|
25
|
return $self->api->user->get($self->creator_id)->item; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
|
|
sub _build_user { shift->created_by } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=pod |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=encoding UTF-8 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 NAME |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
WebService::Mattermost::V4::API::Object::Role::BelongingToUser - Mark an object as belonging to a user. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 VERSION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
version 0.26 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 DESCRIPTION |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Link a view object to its creator. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 ATTRIBUTES |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=over 4 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item C<creator_id> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
The creator's string ID. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item C<created_by|user> |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Linked L<WebService::Mattermost::V4::API::Object::User> object. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=back |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHOR |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Mike Jones <mike@netsplit.org.uk> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This software is Copyright (c) 2020 by Mike Jones. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This is free software, licensed under: |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The MIT (X11) License |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
|