File Coverage

blib/lib/Markdent/Role/BlockParser.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 Markdent::Role::BlockParser;
2              
3 35     35   24373 use strict;
  35         108  
  35         1188  
4 35     35   224 use warnings;
  35         88  
  35         1022  
5 35     35   230 use namespace::autoclean;
  35         84  
  35         270  
6              
7             our $VERSION = '0.40';
8              
9 35     35   3300 use Specio::Declare;
  35         97  
  35         385  
10              
11 35     35   7817 use Moose::Role;
  35         91  
  35         361  
12              
13             with 'Markdent::Role::AnyParser';
14              
15             requires 'parse_document';
16              
17             has _span_parser => (
18             is => 'ro',
19             does => object_does_type('Markdent::Role::SpanParser'),
20             init_arg => 'span_parser',
21             required => 1,
22             );
23              
24             1;
25              
26             # ABSTRACT: A role for block parsers
27              
28             __END__
29              
30             =pod
31              
32             =encoding UTF-8
33              
34             =head1 NAME
35              
36             Markdent::Role::BlockParser - A role for block parsers
37              
38             =head1 VERSION
39              
40             version 0.40
41              
42             =head1 DESCRIPTION
43              
44             This role implements behavior shared by all block parsers.
45              
46             =head1 REQUIRED METHODS
47              
48             =over 4
49              
50             =item * $parse->parse_document(\$text)
51              
52             This method takes a scalar reference to a markdown document and parses it for
53             block-level markup.
54              
55             =back
56              
57             =head1 ATTRIBUTES
58              
59             This roles provides the following attributes:
60              
61             =head2 _span_parser
62              
63             This is a read-only attribute. It is an object which does the
64             L<Markdent::Role::SpanParser> role.
65              
66             This is required for all block parsers.
67              
68             =head1 ROLES
69              
70             This role does the L<Markdent::Role::AnyParser> and
71             L<Markdent::Role::DebugPrinter> roles.
72              
73             =head1 BUGS
74              
75             See L<Markdent> for bug reporting details.
76              
77             Bugs may be submitted at L<https://github.com/houseabsolute/Markdent/issues>.
78              
79             I am also usually active on IRC as 'autarch' on C<irc://irc.perl.org>.
80              
81             =head1 SOURCE
82              
83             The source code repository for Markdent can be found at L<https://github.com/houseabsolute/Markdent>.
84              
85             =head1 AUTHOR
86              
87             Dave Rolsky <autarch@urth.org>
88              
89             =head1 COPYRIGHT AND LICENSE
90              
91             This software is copyright (c) 2021 by Dave Rolsky.
92              
93             This is free software; you can redistribute it and/or modify it under
94             the same terms as the Perl 5 programming language system itself.
95              
96             The full text of the license can be found in the
97             F<LICENSE> file included with this distribution.
98              
99             =cut