blib/lib/Rubric/Entry/Formatter/Markdown.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 2 / 2 totaltotal 67.7% 21 / 31 CC 2 SCAR 9.4
CC
2
Cov
65%
as_html
6.0
as_text
2.0
BEGIN
1.0
CRAP 2.6
↑ Summary
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Rubric::Entry::Formatter::Markdown;
5 {
6 2 $Rubric::Entry::Formatter::Markdown::VERSION = '0.555';
7 }
8 # ABSTRACT: format entries with Markdown (duh!)
9  
10  
11 2 ▶use Text::Markdown ();
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use Text::MultiMarkdown ();
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14  
15 0 ▶sub as_html {
Subroutine as_html: not called CC=2 SCAR=17.9
Pod documented
16 0 my ($class, $arg, $config) = @_;
17 0 my %config = %$config;
18 my $md = (delete $config{multimarkdown})
19 0 ▶ ? 'Text::MultiMarkdown'
Branch: 1 branch
BranchTrueFalseTotal
delete $config{'multimarkdown'} ? : 0 0 0
20 : 'Text::Markdown';
21  
22 0 return $md->new(%$config)->markdown($arg->{text});
23 }
24  
25 0 ▶sub as_text {
Subroutine as_text: not called CC=1 SCAR=6.9
Pod documented
26 0 my ($class, $arg) = @_;
27  
28 0 return $arg->{text};
29 }
30  
31 2 1;
32  
33 __END__
↑ Summary