Markdent/Role/BlockParser.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 25 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Markdent/Regexes.pm ↑ Summary Markdent/Role/Dialect/BlockParser.pm »
1 package Markdent::Role::BlockParser;
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.39';
8  
9 35 ▶use Specio::Declare;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 35 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 35 with 'Markdent::Role::AnyParser';
14  
15 35 requires 'parse_document';
16  
17 35 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 35 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.39
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
« Markdent/Regexes.pm ↑ Summary Markdent/Role/Dialect/BlockParser.pm »