line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Markdent::Types::Internal; |
2
|
|
|
|
|
|
|
|
3
|
35
|
|
|
35
|
|
240
|
use strict; |
|
35
|
|
|
|
|
108
|
|
|
35
|
|
|
|
|
1021
|
|
4
|
35
|
|
|
35
|
|
184
|
use warnings; |
|
35
|
|
|
|
|
163
|
|
|
35
|
|
|
|
|
1681
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.39'; |
7
|
|
|
|
|
|
|
|
8
|
35
|
|
|
35
|
|
18006
|
use IO::Handle; |
|
35
|
|
|
|
|
199590
|
|
|
35
|
|
|
|
|
1772
|
|
9
|
|
|
|
|
|
|
|
10
|
35
|
|
|
35
|
|
17796
|
use Specio::Declare; |
|
35
|
|
|
|
|
1693030
|
|
|
35
|
|
|
|
|
300
|
|
11
|
35
|
|
|
35
|
|
24787
|
use Specio::Library::Builtins; |
|
35
|
|
|
|
|
819254
|
|
|
35
|
|
|
|
|
542
|
|
12
|
|
|
|
|
|
|
|
13
|
35
|
|
|
35
|
|
309799
|
use parent 'Specio::Exporter'; |
|
35
|
|
|
|
|
91
|
|
|
35
|
|
|
|
|
343
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
declare( |
16
|
|
|
|
|
|
|
'HeaderLevel', |
17
|
|
|
|
|
|
|
parent => t('Int'), |
18
|
|
|
|
|
|
|
inline => sub {"$_[1] >= 1 && $_[1] <= 6"}, |
19
|
|
|
|
|
|
|
message_generator => |
20
|
|
|
|
|
|
|
sub {"Header level must be a number from 1-6 (not $_)"}, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
object_does_type( |
24
|
|
|
|
|
|
|
'BlockParserDialectRole', |
25
|
|
|
|
|
|
|
role => 'Markdent::Role::Dialect::BlockParser', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
declare( |
29
|
|
|
|
|
|
|
'BlockParserClass', |
30
|
|
|
|
|
|
|
parent => t('ClassName'), |
31
|
|
|
|
|
|
|
inline => sub { |
32
|
|
|
|
|
|
|
"$_[1]->can('does') && $_[1]->does('Markdent::Role::BlockParser')"; |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
object_does_type( |
37
|
|
|
|
|
|
|
'SpanParserDialectRole', |
38
|
|
|
|
|
|
|
role => 'Markdent::Role::Dialect::SpanParser', |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
declare( |
42
|
|
|
|
|
|
|
'SpanParserClass', |
43
|
|
|
|
|
|
|
parent => t('ClassName'), |
44
|
|
|
|
|
|
|
inline => sub { |
45
|
|
|
|
|
|
|
"$_[1]->can('does') && $_[1]->does('Markdent::Role::SpanParser')"; |
46
|
|
|
|
|
|
|
}, |
47
|
|
|
|
|
|
|
); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
object_does_type( |
50
|
|
|
|
|
|
|
'EventObject', |
51
|
|
|
|
|
|
|
role => 'Markdent::Role::Event', |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
declare( |
55
|
|
|
|
|
|
|
'ExistingFile', |
56
|
|
|
|
|
|
|
parent => t('Str'), |
57
|
|
|
|
|
|
|
inline => sub {"$_[1] eq '-' || -f $_[1]"}, |
58
|
|
|
|
|
|
|
); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
object_does_type( |
61
|
|
|
|
|
|
|
'HandlerObject', |
62
|
|
|
|
|
|
|
role => 'Markdent::Role::Handler', |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
declare( |
66
|
|
|
|
|
|
|
'NonEmptyArrayRef', |
67
|
|
|
|
|
|
|
parent => t('ArrayRef'), |
68
|
|
|
|
|
|
|
inline => sub {"@{$_[1]} >= 1"}, |
69
|
|
|
|
|
|
|
); |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
declare( |
72
|
|
|
|
|
|
|
'OutputStream', |
73
|
|
|
|
|
|
|
parent => t('Item'), |
74
|
|
|
|
|
|
|
inline => sub { |
75
|
|
|
|
|
|
|
sprintf( |
76
|
|
|
|
|
|
|
<<'EOF', t('FileHandle')->inline_check( $_[1] ), t('Object')->inline_check( $_[1] ), $_[1] ); |
77
|
|
|
|
|
|
|
( %s || %s ) && %s->can('print') |
78
|
|
|
|
|
|
|
EOF |
79
|
|
|
|
|
|
|
}, |
80
|
|
|
|
|
|
|
message_generator => sub { |
81
|
|
|
|
|
|
|
'The output stream must be a Perl file handle or an object with a print method'; |
82
|
|
|
|
|
|
|
}, |
83
|
|
|
|
|
|
|
); |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
enum( |
86
|
|
|
|
|
|
|
'TableCellAlignment', |
87
|
|
|
|
|
|
|
values => [qw( left right center )], |
88
|
|
|
|
|
|
|
); |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
1; |