Markdent/Types/Internal.pm

filter: Statementstmt 87.5% 35 / 40 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 10 / 14 Podpod n/a totaltotal 83.3% 45 / 54 CC 1 SCAR 2.5
CC
1
Cov
88%
__ANON__
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.3
« Markdent/Role/FilterHandler.pm ↑ Summary Markdent/Handler/Multiplexer.pm »
1 package Markdent::Types::Internal;
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  
6 35 our $VERSION = '0.39';
7  
8 35 ▶use IO::Handle;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 35 ▶use Specio::Declare;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 35 ▶use Specio::Library::Builtins;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 35 ▶use parent 'Specio::Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 declare(
16 'HeaderLevel',
17 parent => t('Int'),
18 239 ▶ inline => sub {"$_[1] >= 1 && $_[1] <= 6"},
Subroutine __ANON__: called CC=1 SCAR=0.0
19 message_generator =>
20 0 ▶ sub {"Header level must be a number from 1-6 (not $_)"},
Subroutine __ANON__: not called CC=1 SCAR=6.9
21 35 );
22  
23 35 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 140 ▶ "$_[1]->can('does') && $_[1]->does('Markdent::Role::BlockParser')";
Subroutine __ANON__: called CC=1 SCAR=0.0
33 },
34 35 );
35  
36 35 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 140 ▶ "$_[1]->can('does') && $_[1]->does('Markdent::Role::SpanParser')";
Subroutine __ANON__: called CC=1 SCAR=0.0
46 },
47 35 );
48  
49 35 object_does_type(
50 'EventObject',
51 role => 'Markdent::Role::Event',
52 );
53  
54 declare(
55 'ExistingFile',
56 parent => t('Str'),
57 0 ▶ inline => sub {"$_[1] eq '-' || -f $_[1]"},
Subroutine __ANON__: not called CC=1 SCAR=6.9
58 35 );
59  
60 35 object_does_type(
61 'HandlerObject',
62 role => 'Markdent::Role::Handler',
63 );
64  
65 declare(
66 'NonEmptyArrayRef',
67 parent => t('ArrayRef'),
68 0 ▶ inline => sub {"@{$_[1]} >= 1"},
Subroutine __ANON__: not called CC=1 SCAR=6.9
69 35 );
70  
71 declare(
72 'OutputStream',
73 parent => t('Item'),
74 inline => sub {
75 98 ▶ sprintf(
Subroutine __ANON__: called CC=1 SCAR=0.0
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 0 ▶ 'The output stream must be a Perl file handle or an object with a print method';
Subroutine __ANON__: not called CC=1 SCAR=6.9
82 },
83 35 );
84  
85 35 enum(
86 'TableCellAlignment',
87 values => [qw( left right center )],
88 );
89  
90 35 1;
« Markdent/Role/FilterHandler.pm ↑ Summary Markdent/Handler/Multiplexer.pm »