blib/lib/App/Greple/md/Blocks.pm

filter: Statementstmt 30.7% 70 / 228 Branchbran 14.3% 19 / 132 Conditioncond 21.6% 13 / 60 MC/DCmcdc 14.7% 5 / 34 Subroutinesub 48.0% 12 / 25 Podpod 0.0% 0 / 14 totaltotal 24.1% 119 / 493 CC 95 SCAR 47.5
CC
95
Cov
24%
__ANON__
342.0
__ANON__
342.0
cmark_blocks
42.0
CRAP 115.1
↑ Summary blib/lib/App/Greple/md.pm »
1 package App::Greple::md::Blocks;
2  
3 157 ▶use 5.026;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 157 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 157 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 157 our $VERSION = "1.19";
8  
9 157 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 157 our @EXPORT_OK = qw(blocks available);
11  
12 # The paragraphs of a Markdown text, for the refill of App::Greple::md:
13 # blocks($text) returns the blocks as {type, depth, first, last}, where
14 # type is Para or Plain for a paragraph, depth the number of block
15 # quotes the block is in, and first and last its line numbers (from 1).
16 # The positions come from the CommonMark module (libcmark, in this
17 # process), from Markdown::Perl (pure Perl, a required dependency) or
18 # from pandoc with its sourcepos extension, whichever the parser option
19 # names; without it, from the first one that is available, in that order.
20 30 ▶sub blocks {
Subroutine blocks: called CC=6 SCAR=28.1
Pod undocumented
21 0 ▶ my($text, %opt) = @_;
Subroutine blocks: not called CC=6 SCAR=28.1
Pod undocumented
22 0 ▶ my $parser = $opt{parser} || (available())[0]
Condition30%3/10
($opt{"parser"} || (available())[0]) // die("refill: no Markdown parser is available (CommonMark, Markdown::Perl or pandoc with sourcepos) ")
l!l
300
$opt{"parser"} or (available())[0]
l!l&&r!l&&!r
2820
($opt{"parser"} || (available())[0]) // die("refill: no Markdown parser is available (CommonMark, Markdown::Perl or pandoc with sourcepos)\n")
l!l
00
$opt{"parser"} or (available())[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
($opt{"parser"} || (available())[0]) // die("refill: no Markdown parser is available (CommonMark, Markdown::Perl or pandoc with sourcepos) ")
$opt{"parser"} (available())[0]
MC/DC0%0/2
($opt{"parser"} || (available())[0]) // die("refill: no Markdown parser is available (CommonMark, Markdown::Perl or pandoc with sourcepos)\n")
$opt{"parser"} (available())[0]
Truth table66%2/3
A or B
A= $opt{"parser"}B= (available())[0]
ABresult
1X1
011
000
Truth table0%0/3
A or B
A= $opt{"parser"}B= (available())[0]
ABresult
1X1
011
000
23 // die "refill: no Markdown parser is available (CommonMark, Markdown::Perl or pandoc with sourcepos)\n";
24 0 ▶ if ($parser eq 'cmark') {
Branch: 6 branches
BranchTrueFalseTotal
if ($parser eq 'cmark') { } 0 30 30
elsif ($parser eq 'mdperl') { } 29 1 30
elsif ($parser eq 'pandoc') { } 0 1 1
if ($parser eq 'cmark') { } 0 0 0
elsif ($parser eq 'mdperl') { } 0 0 0
elsif ($parser eq 'pandoc') { } 0 0 0
25 0 return cmark_blocks($text);
26 } elsif ($parser eq 'mdperl') {
27 0 return mdperl_blocks($text);
28 } elsif ($parser eq 'pandoc') {
29 0 return pandoc_blocks($text);
30 } else {
31 0 die "refill_parser: $parser: use cmark, mdperl or pandoc\n";
32 }
33 }
34  
35 # The parsers that work here, the fastest first.
36 4 ▶sub available {
Subroutine available: called CC=4 SCAR=22.5
Pod undocumented
37 state $parsers = [
38 0 ▶ (eval { require CommonMark; 1 } ? 'cmark' : ()),
Subroutine available: not called CC=4 SCAR=22.5
Pod undocumented
Branch: 6 branches
BranchTrueFalseTotal
eval { do { require CommonMark; 1 } } ? : 0 3 3
mdperl_works() ? : 3 0 3
pandoc_works() ? : 0 3 3
eval { do { require CommonMark; 1 } } ? : 0 0 0
mdperl_works() ? : 0 0 0
pandoc_works() ? : 0 0 0
39 (mdperl_works() ? 'mdperl' : ()),
40 (pandoc_works() ? 'pandoc' : ()),
41 ];
42 0 @$parsers;
43 }
44  
45 # pandoc with the sourcepos extension (2.11.3 or later): run the reader
46 # that pandoc_blocks uses, so that the check and the use agree.
47 3 ▶sub pandoc_works {
Subroutine pandoc_works: called CC=1 SCAR=1.2
Pod undocumented
48 0 ▶ system(q(printf "x\n" | pandoc -f gfm+sourcepos+definition_lists -t json >/dev/null 2>&1)) == 0;
Subroutine pandoc_works: not called CC=1 SCAR=1.2
Pod undocumented
49 }
50  
51 # CommonMark gives every node its first and last line. Only the
52 # paragraphs are needed; libcmark has no tables and no definition
53 # lists, so a table and a term with its definitions are paragraphs to
54 # it, which refill_block keeps apart by their lines.
55 0 ▶sub cmark_blocks {
Subroutine cmark_blocks: not called CC=6 SCAR=37.4
Pod undocumented
56 0 ▶ my $text = shift;
Subroutine cmark_blocks: not called CC=6 SCAR=37.4
Pod undocumented
57 0 require CommonMark;
58 0 my $doc = CommonMark->parse(string => $text, sourcepos => 1);
59 0 my $iter = $doc->iterator;
60 0 my($depth, @blocks) = (0);
61 0 ▶ while (my($ev, $node) = $iter->next) {
Branch: 2 branches
BranchTrueFalseTotal
if (() = $iter->next) 0 0 0
if (() = $iter->next) 0 0 0
62 0 my $type = $node->get_type;
63 0 ▶ if ($type == CommonMark::NODE_BLOCK_QUOTE()) {
Branch: 2 branches
BranchTrueFalseTotal
if ($type == CommonMark::NODE_BLOCK_QUOTE()) 0 0 0
if ($type == CommonMark::NODE_BLOCK_QUOTE()) 0 0 0
64 0 ▶ $depth += $ev == CommonMark::EVENT_ENTER() ? 1 : -1;
Branch: 2 branches
BranchTrueFalseTotal
$ev == CommonMark::EVENT_ENTER() ? : 0 0 0
$ev == CommonMark::EVENT_ENTER() ? : 0 0 0
65 0 next;
66 }
67 0 ▶ next unless $ev == CommonMark::EVENT_ENTER()
Branch: 2 branches
BranchTrueFalseTotal
unless $ev == CommonMark::EVENT_ENTER() and $type == CommonMark::NODE_PARAGRAPH() 0 0 0
unless $ev == CommonMark::EVENT_ENTER() and $type == CommonMark::NODE_PARAGRAPH() 0 0 0
Condition0%0/6
$ev == CommonMark::EVENT_ENTER() and $type == CommonMark::NODE_PARAGRAPH()
!ll&&!rl&&r
000
$ev == CommonMark::EVENT_ENTER() and $type == CommonMark::NODE_PARAGRAPH()
!ll&&!rl&&r
000
MC/DC0%0/2
$ev == CommonMark::EVENT_ENTER() and $type == CommonMark::NODE_PARAGRAPH()
$ev == CommonMark::EVENT_ENTER() $type == CommonMark::NODE_PARAGRAPH()
MC/DC0%0/2
$ev == CommonMark::EVENT_ENTER() and $type == CommonMark::NODE_PARAGRAPH()
$ev == CommonMark::EVENT_ENTER() $type == CommonMark::NODE_PARAGRAPH()
Truth table0%0/3
A and B
A= $ev == CommonMark::EVENT_ENTER()B= $type == CommonMark::NODE_PARAGRAPH()
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= $ev == CommonMark::EVENT_ENTER()B= $type == CommonMark::NODE_PARAGRAPH()
ABresult
0X0
100
111
68 and $type == CommonMark::NODE_PARAGRAPH();
69 0 push @blocks, {
70 type => 'Para',
71 depth => $depth,
72 first => $node->get_start_line,
73 last => $node->get_end_line,
74 };
75 }
76 0 @blocks;
77 }
78  
79 # Markdown::Perl has no public parse tree and no positions, but its block
80 # parser builds a paragraph line by line in _do_paragraph and closes it
81 # in _finalize_paragraph, and it keeps the offset of the current line in
82 # last_pos. mdperl_blocks wraps those two subs while it parses and takes
83 # the line numbers from there. This leans on private names, so
84 # mdperl_works checks that they still exist, and the parser is not
85 # offered when they do not; t/10_blocks.t compares the result with the
86 # other parsers.
87 157 my @mdperl_private = qw(_do_paragraph _finalize_paragraph _parse);
88 32 ▶sub mdperl_works {
Subroutine mdperl_works: called CC=5 SCAR=22.6
Pod undocumented
89 0 ▶ eval { require Markdown::Perl; require Markdown::Perl::BlockParser; 1 } or return 0;
Subroutine mdperl_works: not called CC=5 SCAR=22.6
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
eval { do { require Markdown::Perl; require Markdown::Perl::BlockParser; 1 } } or return 0 32 0 32
eval { do { require Markdown::Perl; require Markdown::Perl::BlockParser; 1 } } or return 0 0 0 0
90 0 for my $name (@mdperl_private) {
91 0 ▶ my $pkg = $name eq '_parse' ? 'Markdown::Perl' : 'Markdown::Perl::BlockParser';
Branch: 2 branches
BranchTrueFalseTotal
$name eq '_parse' ? : 32 64 96
$name eq '_parse' ? : 0 0 0
92 0 ▶ return 0 unless defined &{"${pkg}::$name"};
Branch: 2 branches
BranchTrueFalseTotal
unless defined &{"${pkg}::$name";} 0 96 96
unless defined &{"${pkg}::$name";} 0 0 0
93 }
94 0 1;
95 }
96  
97 29 ▶sub mdperl_blocks {
Subroutine mdperl_blocks: called CC=2 SCAR=9.4
Pod undocumented
98 0 ▶ my $text = shift;
Subroutine mdperl_blocks: not called CC=2 SCAR=9.4
Pod undocumented
99 0 ▶ mdperl_works() or die "refill: Markdown::Perl is not usable\n";
Branch: 2 branches
BranchTrueFalseTotal
mdperl_works() or die "refill: Markdown::Perl is not usable " 29 0 29
mdperl_works() or die "refill: Markdown::Perl is not usable\n" 0 0 0
100 0 my @blocks;
101 my %state; # per parser object: first, last, and the line count so far
102 0 my $do = \&Markdown::Perl::BlockParser::_do_paragraph;
103 0 my $fin = \&Markdown::Perl::BlockParser::_finalize_paragraph;
104 157 ▶ no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
105 223 ▶ local *Markdown::Perl::BlockParser::_do_paragraph = sub {
Subroutine __ANON__: called CC=6 SCAR=24.5
106 0 ▶ my($this) = @_;
Subroutine __ANON__: not called CC=6 SCAR=24.5
107 0 my $before = @{$this->{paragraph}};
108 0 my $r = $do->(@_);
109 0 ▶ if (@{$this->{paragraph}} > $before) {
Branch: 2 branches
BranchTrueFalseTotal
if (@{$this->{"paragraph"};} > $before) 162 61 223
if (@{$this->{"paragraph"};} > $before) 0 0 0
110 # the line number of the current line, counting from where we
111 # last counted (the parser may step back a line)
112 0 ▶ my $s = $state{$this} //= { pos => 0, line => 1 };
Condition50%2/4
$state{$this} //= {"pos", 0, "line", 1}
l!l
13032
$state{$this} //= {"pos", 0, "line", 1}
l!l
00
MC/DC100%1/1
$state{$this} //= {"pos", 0, "line", 1}
$state{$this}
MC/DC0%0/1
$state{$this} //= {"pos", 0, "line", 1}
$state{$this}
Truth table100%2/2
A
A= $state{$this}
Aresult
11
00
Truth table0%0/2
A
A= $state{$this}
Aresult
11
00
113 0 my $pos = $this->{last_pos};
114 0 ▶ if ($pos < $s->{pos}) { @$s{qw(pos line)} = (0, 1) }
Branch: 2 branches
BranchTrueFalseTotal
if ($pos < $s->{"pos"}) 0 162 162
if ($pos < $s->{"pos"}) 0 0 0
115 0 $s->{line} += substr($this->{md}, $s->{pos}, $pos - $s->{pos}) =~ tr/\n//;
116 0 $s->{pos} = $pos;
117 # a new paragraph starts when the first line goes in (a setext
118 # heading takes the lines away without closing the paragraph)
119 0 ▶ $s->{first} = $s->{line} if $before == 0 or !defined $s->{first};
Branch: 2 branches
BranchTrueFalseTotal
if $before == 0 or not defined $s->{"first"} 69 93 162
if $before == 0 or not defined $s->{"first"} 0 0 0
Condition50%3/6
$before == 0 or not defined $s->{"first"}
l!l&&r!l&&!r
66393
$before == 0 or not defined $s->{"first"}
l!l&&r!l&&!r
000
MC/DC100%2/2
$before == 0 or not defined $s->{"first"}
$before == 0 not defined $s->{"first"}
MC/DC0%0/2
$before == 0 or not defined $s->{"first"}
$before == 0 not defined $s->{"first"}
Truth table100%3/3
A or not(B)
A= $before == 0B= not defined $s->{"first"}
ABresult
1X1
011
000
Truth table0%0/3
A or not(B)
A= $before == 0B= not defined $s->{"first"}
ABresult
1X1
011
000
120 0 $s->{last} = $s->{line};
121 }
122 0 $r;
123 0 };
124 154 ▶ local *Markdown::Perl::BlockParser::_finalize_paragraph = sub {
Subroutine __ANON__: called CC=4 SCAR=18.5
125 0 ▶ my($this) = @_;
Subroutine __ANON__: not called CC=4 SCAR=18.5
126 0 my $s = $state{$this};
127 0 ▶ if (@{$this->{paragraph}} and $s and defined $s->{first}) {
Branch: 2 branches
BranchTrueFalseTotal
if (@{$this->{"paragraph"};} and $s and defined $s->{"first"}) 65 89 154
if (@{$this->{"paragraph"};} and $s and defined $s->{"first"}) 0 0 0
Condition41%5/12
@{$this->{"paragraph"};} and $s and defined $s->{"first"}
!ll&&!rl&&r
89065
@{$this->{"paragraph"};} and $s
!ll&&!rl&&r
741565
@{$this->{"paragraph"};} and $s and defined $s->{"first"}
!ll&&!rl&&r
000
@{$this->{"paragraph"};} and $s
!ll&&!rl&&r
000
MC/DC66%2/3
@{$this->{"paragraph"};} and $s and defined $s->{"first"}
@{$this->{"paragraph"};} $s defined $s->{"first"}
MC/DC0%0/3
@{$this->{"paragraph"};} and $s and defined $s->{"first"}
@{$this->{"paragraph"};} $s defined $s->{"first"}
Truth table75%3/4
A and B and C
A= @{$this->{"paragraph"};}B= $sC= defined $s->{"first"}
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= @{$this->{"paragraph"};}B= $sC= defined $s->{"first"}
ABCresult
0XX0
10X0
1100
1111
128 push @blocks, {
129 type => 'Para',
130 0 depth => scalar(grep { $_->{block}{type} eq 'quotes' } @{$this->{blocks_stack}}),
131 first => $s->{first},
132 last => $s->{last},
133 0 };
134 0 delete @$s{qw(first last)};
135 }
136 0 $fin->(@_);
137 0 };
138 # tables are left as paragraphs, as libcmark reports them, so that the
139 # table-row rules of refill_block apply the same way for every parser
140 0 Markdown::Perl->new(mode => 'github', use_table_blocks => 0, parse_file_metadata => 'yaml')->_parse(\$text);
141 0 sort { $a->{first} <=> $b->{first} } @blocks;
142 }
143  
144 # Run pandoc on the text and return the blocks it reports with a source
145 # position. With the sourcepos extension pandoc wraps a block in a Div whose
146 # data-pos is "L:C-L:C", or several such segments separated by ";" when
147 # the block is interrupted by markers it consumed (a list item's
148 # continuation lines). An end column of 1 means the block ended with
149 # the line before. A paragraph followed by a horizontal rule without a
150 # blank line is reported up to the rule, so the end is also cut at the
151 # line before the next block that starts below the first line. depth
152 # is the number of block quotes the block is in.
153 #
154 # A block that has attributes of its own (a heading, a code block, a
155 # table) is not wrapped: its position is in its attributes, at the
156 # index below in its content. A table's segments are not in order.
157 157 my %attr_index = (Div => 0, Header => 1, CodeBlock => 0, Table => 0, Figure => 0);
158 0 ▶sub pandoc_blocks {
Subroutine pandoc_blocks: not called CC=5 SCAR=34.0
Pod undocumented
159 0 ▶ my $text = shift;
Subroutine pandoc_blocks: not called CC=5 SCAR=34.0
Pod undocumented
160 0 require Command::Run;
161 0 require JSON::PP;
162 0 my $result = Command::Run->new
163 ->command(qw(pandoc -f gfm+sourcepos+definition_lists -t json))
164 ->with(stdin => $text)
165 ->run;
166 0 ▶ die "refill: pandoc failed\n" if $result->{result} != 0;
Branch: 2 branches
BranchTrueFalseTotal
if $result->{"result"} != 0 0 0 0
if $result->{"result"} != 0 0 0 0
167 0 my $doc = JSON::PP->new->decode($result->{data});
168 0 my @blocks;
169 0 ▶ my $walk; $walk = sub {
Subroutine __ANON__: not called CC=18 SCAR=58.3
170 0 ▶ my($node, $depth) = @_;
Subroutine __ANON__: not called CC=18 SCAR=58.3
171 0 ▶ if (ref $node eq 'HASH') {
Branch: 4 branches
BranchTrueFalseTotal
if (ref $node eq 'HASH') { } 0 0 0
elsif (ref $node eq 'ARRAY') { } 0 0 0
if (ref $node eq 'HASH') { } 0 0 0
elsif (ref $node eq 'ARRAY') { } 0 0 0
172 0 ▶ my $t = $node->{t} // '';
Condition0%0/4
$node->{"t"} // ""
l!l
00
$node->{"t"} // ""
l!l
00
MC/DC0%0/1
$node->{"t"} // ""
$node->{"t"}
MC/DC0%0/1
$node->{"t"} // ""
$node->{"t"}
Truth table0%0/2
A
A= $node->{"t"}
Aresult
11
00
Truth table0%0/2
A
A= $node->{"t"}
Aresult
11
00
173 0 ▶ if (defined(my $i = $attr_index{$t})) {
Branch: 2 branches
BranchTrueFalseTotal
if (defined(my $i = $attr_index{$t})) 0 0 0
if (defined(my $i = $attr_index{$t})) 0 0 0
174 0 my $attr = $node->{c}[$i];
175 0 my %kv = map { @$_ } @{$attr->[2]};
176 0 ▶ if (defined(my $pos = $kv{'data-pos'})) {
Branch: 2 branches
BranchTrueFalseTotal
if (defined(my $pos = $kv{"data-pos"})) 0 0 0
if (defined(my $pos = $kv{"data-pos"})) 0 0 0
177 0 my($first, $last);
178 0 ▶ while ($pos =~ /(\d+):\d+-(\d+):(\d+)/g) {
Branch: 2 branches
BranchTrueFalseTotal
if ($pos =~ /(\d+):\d+-(\d+):(\d+)/gu) 0 0 0
if ($pos =~ /(\d+):\d+-(\d+):(\d+)/gu) 0 0 0
179 0 ▶ my($from, $to) = ($1, $3 == 1 ? $2 - 1 : $2);
Branch: 2 branches
BranchTrueFalseTotal
$3 == 1 ? : 0 0 0
$3 == 1 ? : 0 0 0
180 0 ▶ $first = $from if !defined $first or $from < $first;
Branch: 2 branches
BranchTrueFalseTotal
if not defined $first or $from < $first 0 0 0
if not defined $first or $from < $first 0 0 0
Condition0%0/6
not defined $first or $from < $first
l!l&&r!l&&!r
000
not defined $first or $from < $first
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $first or $from < $first
not defined $first $from < $first
MC/DC0%0/2
not defined $first or $from < $first
not defined $first $from < $first
Truth table0%0/3
not(A) or B
A= not defined $firstB= $from < $first
ABresult
1X1
011
000
Truth table0%0/3
not(A) or B
A= not defined $firstB= $from < $first
ABresult
1X1
011
000
181 0 ▶ $last = $to if !defined $last or $to > $last;
Branch: 2 branches
BranchTrueFalseTotal
if not defined $last or $to > $last 0 0 0
if not defined $last or $to > $last 0 0 0
Condition0%0/6
not defined $last or $to > $last
l!l&&r!l&&!r
000
not defined $last or $to > $last
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $last or $to > $last
not defined $last $to > $last
MC/DC0%0/2
not defined $last or $to > $last
not defined $last $to > $last
Truth table0%0/3
not(A) or B
A= not defined $lastB= $to > $last
ABresult
1X1
011
000
Truth table0%0/3
not(A) or B
A= not defined $lastB= $to > $last
ABresult
1X1
011
000
182 }
183 0 my $inner = $node->{c}[1];
184 push @blocks, {
185 type => $t ne 'Div' ? $t
186 0 ▶ : @$inner == 1 ? $inner->[0]{t} : 'Blocks',
Branch: 6 branches
BranchTrueFalseTotal
if defined $first 0 0 0
$t ne 'Div' ? : 0 0 0
@$inner == 1 ? : 0 0 0
if defined $first 0 0 0
$t ne 'Div' ? : 0 0 0
@$inner == 1 ? : 0 0 0
187 depth => $depth,
188 first => $first,
189 last => $last,
190 } if defined $first;
191 }
192 }
193 0 ▶ $depth++ if $t eq 'BlockQuote';
Branch: 2 branches
BranchTrueFalseTotal
if $t eq "BlockQuote" 0 0 0
if $t eq "BlockQuote" 0 0 0
194 0 ▶ $walk->($node->{c}, $depth) if ref $node->{c};
Branch: 2 branches
BranchTrueFalseTotal
if ref $node->{"c"} 0 0 0
if ref $node->{"c"} 0 0 0
195 } elsif (ref $node eq 'ARRAY') {
196 0 $walk->($_, $depth) for @$node;
197 }
198 0 };
199 0 $walk->($doc->{blocks}, 0);
200 0 my @starts = sort { $a <=> $b } keys %{{ map { $_->{first} => 1 } @blocks }};
201 0 for my $b (@blocks) {
202 0 my($next) = grep { $_ > $b->{first} } @starts;
203 0 ▶ $b->{last} = $next - 1 if defined $next and $next - 1 < $b->{last};
Branch: 2 branches
BranchTrueFalseTotal
if defined $next and $next - 1 < $b->{"last"} 0 0 0
if defined $next and $next - 1 < $b->{"last"} 0 0 0
Condition0%0/6
defined $next and $next - 1 < $b->{"last"}
!ll&&!rl&&r
000
defined $next and $next - 1 < $b->{"last"}
!ll&&!rl&&r
000
MC/DC0%0/2
defined $next and $next - 1 < $b->{"last"}
defined $next $next - 1 < $b->{"last"}
MC/DC0%0/2
defined $next and $next - 1 < $b->{"last"}
defined $next $next - 1 < $b->{"last"}
Truth table0%0/3
A and B
A= defined $nextB= $next - 1 < $b->{"last"}
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= defined $nextB= $next - 1 < $b->{"last"}
ABresult
0X0
100
111
204 }
205 0 @blocks;
206 }
207  
208 157 1;
209  
210 __END__
↑ Summary blib/lib/App/Greple/md.pm »