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 35     35   288 use strict;
  35         88  
  35         1237  
4 35     35   222 use warnings;
  35         93  
  35         1070  
5 35     35   212 use namespace::autoclean;
  35         85  
  35         289  
6              
7             our $VERSION = '0.40';
8              
9 35     35   3388 use Markdent::Types;
  35         93  
  35         329  
10              
11 35     35   918248 use Moose;
  35         116  
  35         338  
12 35     35   253456 use MooseX::StrictConstructor;
  35         98  
  35         319  
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.40
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) 2021 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