Rubric/Entry/Formatter/Nil.pm

filter: Statementstmt 100% 17 / 17 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 92.8% 26 / 28 CC 3 SCAR 4.5
CC
3
Cov
100%
as_html
2.0
as_text
2.0
BEGIN
1.0
CRAP 1.6
« Rubric/WebApp/Login/Post.pm ↑ Summary Rubric/Entry/Formatter/HTMLEscape.pm »
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 package Rubric::Entry::Formatter::Nil 0.157;
4 # ABSTRACT: format entries by formatting nearly not at all
5  
6 #pod =head1 DESCRIPTION
7 #pod
8 #pod This is the default formatter. The only formatting it performs is done by
9 #pod Template::Filters' C<html_para> filter. Paragraph breaks will be
10 #pod retained from plaintext into HTML, but nothing else will be done.
11 #pod
12 #pod =cut
13  
14 2 ▶use Template::Filters;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 #pod =head1 METHODS
17 #pod
18 #pod =cut
19  
20 2 my $filter = Template::Filters->new->fetch('html_para');
21  
22 12 ▶sub as_html {
Subroutine as_html: called CC=2 SCAR=6.9
Pod undocumented
23 12 my ($class, $arg) = @_;
24 12 ▶ return '' unless $arg->{text};
Branch: 1 branch
BranchTrueFalseTotal
unless $arg->{"text"} 7 5 12
25 5 return $filter->($arg->{text});
26 }
27  
28 2 ▶sub as_text {
Subroutine as_text: called CC=2 SCAR=6.9
Pod undocumented
29 2 my ($class, $arg) = @_;
30 2 ▶ return '' unless $arg->{text};
Branch: 1 branch
BranchTrueFalseTotal
unless $arg->{"text"} 1 1 2
31 1 return $arg->{text};
32 }
33  
34 2 1;
35  
36 __END__
« Rubric/WebApp/Login/Post.pm ↑ Summary Rubric/Entry/Formatter/HTMLEscape.pm »