File Coverage

blib/lib/App/Twirc/Plugin/SquashWhiteSpace.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 2 0.0
total 14 16 87.5


line stmt bran cond sub pod time code
1             package App::Twirc::Plugin::SquashWhiteSpace;
2             $App::Twirc::Plugin::SquashWhiteSpace::VERSION = '0.18'; # TRIAL
3 1     1   12202 use warnings;
  1         2  
  1         22  
4 1     1   3 use strict;
  1         2  
  1         67  
5              
6 1     1 0 2745 sub new { bless {}, shift }
7              
8             sub cmd_post {
9 5     5 0 1166 my (undef, undef, undef, undef, $textref) = @_;
10              
11 5         20 $$textref =~ s/\s+/ /g;
12 5         7 return;
13             }
14              
15             1;
16              
17             __END__
18              
19             =head1 NAME
20              
21             App::Twirc::Plugin::SquashWhitSpace - Squash whitespace in status updates
22              
23             =head1 SYNOPSIS
24              
25             # in config (.yml in this example)
26             plugins:
27             -SquashWhiteSpace
28              
29             =head1 DESCRIPTION
30              
31             Squashes each occurence of whitespace in a status update to a single space.
32             After all, we only have 140 characters to work with!
33              
34             =head1 AUTHOR
35              
36             Marc Mims <marc@questright.com>
37              
38             =head1 LICENSE
39              
40             Copyright (c) 2009 Marc Mims
41              
42             You may distribute this code and/or modify it under the same terms as Perl itself.
43              
44             =cut