File Coverage

blib/lib/Mastodon/Entity/Tag.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::Tag;
2              
3 3     3   3344 use strict;
  3         7  
  3         79  
4 3     3   16 use warnings;
  3         5  
  3         106  
5              
6             our $VERSION = '0.016';
7              
8 3     3   14 use Moo;
  3         61  
  3         20  
9             with 'Mastodon::Role::Entity';
10              
11 3     3   918 use Types::Standard qw( Str );
  3         6  
  3         23  
12 3     3   1602 use Mastodon::Types qw( URI );
  3         5  
  3         17  
13              
14             has name => ( is => 'ro', isa => Str );
15             has url => ( is => 'ro', isa => URI, coerce => 1, required => 1);
16              
17             1;
18              
19             =encoding utf8
20              
21             =head1 NAME
22              
23             Mastodon::Entity::Tag - A tag in Mastodon
24              
25             =head1 DESCRIPTION
26              
27             This object should not be manually created. It is intended to be generated
28             from the data received from a Mastodon server using the coercions in
29             L<Mastodon::Types>.
30              
31             For current information, see the
32             L<Mastodon API documentation|https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#tag>
33              
34             =head1 ATTRIBUTES
35              
36             =over 4
37              
38             =item B<name>
39              
40             The hashtag, not including the preceding C<#>.
41              
42             =item B<url>
43              
44             The URL of the hashtag.
45              
46             =back
47              
48             =head1 AUTHOR
49              
50             =over 4
51              
52             =item *
53              
54             José Joaquín Atria <jjatria@cpan.org>
55              
56             =back
57              
58             =head1 COPYRIGHT AND LICENSE
59              
60             This software is copyright (c) 2017 by José Joaquín Atria.
61              
62             This is free software; you can redistribute it and/or modify it under
63             the same terms as the Perl 5 programming language system itself.
64              
65             =cut