line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Markdent::Types::Internal; |
2
|
|
|
|
|
|
|
|
3
|
34
|
|
|
34
|
|
257
|
use strict; |
|
34
|
|
|
|
|
97
|
|
|
34
|
|
|
|
|
965
|
|
4
|
34
|
|
|
34
|
|
170
|
use warnings; |
|
34
|
|
|
|
|
83
|
|
|
34
|
|
|
|
|
1349
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.38'; |
7
|
|
|
|
|
|
|
|
8
|
34
|
|
|
34
|
|
17412
|
use IO::Handle; |
|
34
|
|
|
|
|
199773
|
|
|
34
|
|
|
|
|
1593
|
|
9
|
|
|
|
|
|
|
|
10
|
34
|
|
|
34
|
|
16541
|
use Specio::Declare; |
|
34
|
|
|
|
|
1675005
|
|
|
34
|
|
|
|
|
279
|
|
11
|
34
|
|
|
34
|
|
23681
|
use Specio::Library::Builtins; |
|
34
|
|
|
|
|
817127
|
|
|
34
|
|
|
|
|
516
|
|
12
|
|
|
|
|
|
|
|
13
|
34
|
|
|
34
|
|
314518
|
use parent 'Specio::Exporter'; |
|
34
|
|
|
|
|
91
|
|
|
34
|
|
|
|
|
292
|
|
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; |