Flute/Filter/LowerDash.pm untested

filter: Statementstmt 0.0% 0 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
filter
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Template::Flute::Filter::LowerDash;
2  
3 use strict;
4 use warnings;
5  
6 use base 'Template::Flute::Filter';
7  
8 =head1 NAME
9  
10 Template::Flute::Filter::LowerDash - LowerDashcase filter
11  
12 =head1 DESCRIPTION
13  
14 LowerDashcase filter. Replace spaces with dashes and make lowercase.
15  
16 =head1 METHODS
17  
18 =head2 filter
19  
20 LowerDashcase filter.
21  
22 =cut
23  
24 sub filter {
25 my $self = shift;
26
27 (my $value = shift) =~ s/\s+/-/g;
28  
29 return lc($value);
30 }
31  
32 =head1 AUTHOR
33  
34 William Carr (Mr. Maloof), <bill@bottlenose-wine.com>
35  
36 =head1 LICENSE AND COPYRIGHT
37  
38 Copyright 2011-2019 Stefan Hornburg (Racke) <racke@linuxia.de>.
39  
40 This program is free software; you can redistribute it and/or modify it
41 under the terms of either: the GNU General Public License as published
42 by the Free Software Foundation; or the Artistic License.
43  
44 See http://dev.perl.org/licenses/ for more information.
45  
46 =cut
47  
48 1;