File Coverage

blib/lib/Rubric/Entry/Formatter/Nil.pm
Criterion Covered Total %
statement 15 15 100.0
branch 4 4 100.0
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 24 26 92.3


line stmt bran cond sub pod time code
1 2     2   10 use strict;
  2         3  
  2         51  
2 2     2   9 use warnings;
  2         3  
  2         83  
3             # ABSTRACT: format entries by formatting nearly not at all
4              
5             #pod =head1 DESCRIPTION
6             #pod
7             #pod This is the default formatter. The only formatting it performs is done by
8             #pod Template::Filters' C<html_para> filter. Paragraph breaks will be
9             #pod retained from plaintext into HTML, but nothing else will be done.
10             #pod
11             #pod =cut
12              
13             use Template::Filters;
14 2     2   346  
  2         5751  
  2         195  
15             #pod =head1 METHODS
16             #pod
17             #pod =cut
18              
19             my $filter = Template::Filters->new->fetch('html_para');
20              
21             my ($class, $arg) = @_;
22             return '' unless $arg->{text};
23 12     12 0 80 return $filter->($arg->{text});
24 12 100       43 }
25 5         24  
26             my ($class, $arg) = @_;
27             return '' unless $arg->{text};
28             return $arg->{text};
29 2     2 0 4 }
30 2 100       7  
31 1         4 1;
32              
33              
34             =pod
35              
36             =encoding UTF-8
37              
38             =head1 NAME
39              
40             Rubric::Entry::Formatter::Nil - format entries by formatting nearly not at all
41              
42             =head1 VERSION
43              
44             version 0.157
45              
46             =head1 DESCRIPTION
47              
48             This is the default formatter. The only formatting it performs is done by
49             Template::Filters' C<html_para> filter. Paragraph breaks will be
50             retained from plaintext into HTML, but nothing else will be done.
51              
52             =head1 PERL VERSION
53              
54             This code is effectively abandonware. Although releases will sometimes be made
55             to update contact info or to fix packaging flaws, bug reports will mostly be
56             ignored. Feature requests are even more likely to be ignored. (If someone
57             takes up maintenance of this code, they will presumably remove this notice.)
58             This means that whatever version of perl is currently required is unlikely to
59             change -- but also that it might change at any new maintainer's whim.
60              
61             =head1 METHODS
62              
63             =head1 AUTHOR
64              
65             Ricardo SIGNES <rjbs@semiotic.systems>
66              
67             =head1 COPYRIGHT AND LICENSE
68              
69             This software is copyright (c) 2004 by Ricardo SIGNES.
70              
71             This is free software; you can redistribute it and/or modify it under
72             the same terms as the Perl 5 programming language system itself.
73              
74             =cut