File Coverage

blib/lib/Mastodon/Entity/Mention.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Mastodon::Entity::Mention;
2              
3 3     3   5111 use strict;
  3         9  
  3         122  
4 3     3   18 use warnings;
  3         6  
  3         131  
5              
6             our $VERSION = '0.017';
7              
8 3     3   17 use Moo;
  3         8  
  3         27  
9             with 'Mastodon::Role::Entity';
10              
11 3     3   1021 use Types::Standard qw( Str Int );
  3         7  
  3         24  
12 3     3   2861 use Mastodon::Types qw( URI Acct );
  3         6  
  3         19  
13              
14             has acct => ( is => 'ro', isa => Acct, coerce => 1, required => 1, );
15             has id => ( is => 'ro', isa => Int, );
16             has url => ( is => 'ro', isa => URI, coerce => 1, );
17             has username => ( is => 'ro', isa => Str, required => 1, );
18              
19             1;
20              
21             =encoding utf8
22              
23             =head1 NAME
24              
25             Mastodon::Entity::Mention - A mention in Mastodon
26              
27             =head1 DESCRIPTION
28              
29             This object should not be manually created. It is intended to be generated
30             from the data received from a Mastodon server using the coercions in
31             L<Mastodon::Types>.
32              
33             For current information, see the
34             L<Mastodon API documentation|https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#mention>
35              
36             =head1 ATTRIBUTES
37              
38             =over 4
39              
40             =item B<url>
41              
42             URL of user's profile (can be remote).
43              
44             =item B<username>
45              
46             The C<username> of the account.
47              
48             =item B<acct>
49              
50             Equals C<username> for local users, includes C<@domain> for remote ones.
51              
52             =item B<id>
53              
54             Account ID.
55              
56             =back
57              
58             =head1 AUTHOR
59              
60             =over 4
61              
62             =item *
63              
64             José Joaquín Atria <jjatria@cpan.org>
65              
66             =back
67              
68             =head1 COPYRIGHT AND LICENSE
69              
70             This software is copyright (c) 2017 by José Joaquín Atria.
71              
72             This is free software; you can redistribute it and/or modify it under
73             the same terms as the Perl 5 programming language system itself.
74              
75             =cut