File Coverage

blib/lib/Markdent/Event/Image.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Markdent::Event::Image;
2              
3 34     34   268 use strict;
  34         80  
  34         1152  
4 34     34   209 use warnings;
  34         85  
  34         1110  
5 34     34   213 use namespace::autoclean;
  34         93  
  34         296  
6              
7             our $VERSION = '0.38';
8              
9 34     34   3064 use Markdent::Types;
  34         84  
  34         282  
10              
11 34     34   868911 use Moose;
  34         114  
  34         330  
12 34     34   242739 use MooseX::StrictConstructor;
  34         91  
  34         307  
13              
14             has uri => (
15             is => 'ro',
16             isa => t('Str'),
17             required => 1,
18             );
19              
20             has alt_text => (
21             is => 'ro',
22             isa => t('Str'),
23             required => 1,
24             );
25              
26             has title => (
27             is => 'ro',
28             isa => t('Str'),
29             predicate => 'has_title',
30             );
31              
32             has id => (
33             is => 'ro',
34             isa => t('Str'),
35             predicate => 'has_id',
36             );
37              
38             has is_implicit_id => (
39             is => 'ro',
40             isa => t('Bool'),
41             default => 0,
42             );
43              
44             with 'Markdent::Role::Event' => { event_class => __PACKAGE__ };
45              
46             __PACKAGE__->meta()->make_immutable();
47              
48             1;
49              
50             # ABSTRACT: An event for an image
51              
52             __END__
53              
54             =pod
55              
56             =encoding UTF-8
57              
58             =head1 NAME
59              
60             Markdent::Event::Image - An event for an image
61              
62             =head1 VERSION
63              
64             version 0.38
65              
66             =head1 DESCRIPTION
67              
68             This class represents an image.
69              
70             =head1 ATTRIBUTES
71              
72             This class has the following attributes:
73              
74             =head2 uri
75              
76             The uri for the image.
77              
78             =head2 alt_text
79              
80             The alt text for the image.
81              
82             =head2 title
83              
84             The image title. This is optional.
85              
86             =head2 id
87              
88             The image's id. This is optional.
89              
90             =head2 is_implicit_id
91              
92             This will be true if the image's id was not specified explicitly in the
93             Markdown text.
94              
95             =head1 ROLES
96              
97             This class does the L<Markdent::Role::Event> role.
98              
99             =head1 BUGS
100              
101             See L<Markdent> for bug reporting details.
102              
103             Bugs may be submitted at L<https://github.com/houseabsolute/Markdent/issues>.
104              
105             I am also usually active on IRC as 'autarch' on C<irc://irc.perl.org>.
106              
107             =head1 SOURCE
108              
109             The source code repository for Markdent can be found at L<https://github.com/houseabsolute/Markdent>.
110              
111             =head1 AUTHOR
112              
113             Dave Rolsky <autarch@urth.org>
114              
115             =head1 COPYRIGHT AND LICENSE
116              
117             This software is copyright (c) 2020 by Dave Rolsky.
118              
119             This is free software; you can redistribute it and/or modify it under
120             the same terms as the Perl 5 programming language system itself.
121              
122             The full text of the license can be found in the
123             F<LICENSE> file included with this distribution.
124              
125             =cut