Markdent/Event/Image.pm

filter: Statementstmt 100% 27 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 33 / 33 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Markdent/Event/HorizontalRule.pm ↑ Summary Markdent/Event/LineBreak.pm »
1 package Markdent::Event::Image;
2  
3 35 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 35 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 35 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 35 our $VERSION = '0.40';
8  
9 35 ▶use Markdent::Types;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 35 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 35 ▶use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 35 has uri => (
15 is => 'ro',
16 isa => t('Str'),
17 required => 1,
18 );
19  
20 35 has alt_text => (
21 is => 'ro',
22 isa => t('Str'),
23 required => 1,
24 );
25  
26 35 has title => (
27 is => 'ro',
28 isa => t('Str'),
29 predicate => 'has_title',
30 );
31  
32 35 has id => (
33 is => 'ro',
34 isa => t('Str'),
35 predicate => 'has_id',
36 );
37  
38 35 has is_implicit_id => (
39 is => 'ro',
40 isa => t('Bool'),
41 default => 0,
42 );
43  
44 35 with 'Markdent::Role::Event' => { event_class => __PACKAGE__ };
45  
46 35 __PACKAGE__->meta->make_immutable;
47  
48 35 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
« Markdent/Event/HorizontalRule.pm ↑ Summary Markdent/Event/LineBreak.pm »