App/Twirc/Plugin/SquashWhiteSpace.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 2 totaltotal 88.2% 15 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
new
1.0
CRAP 1.0
« App/Twirc/Plugin/SecondaryAccount.pm ↑ Summary
1 package App::Twirc::Plugin::SquashWhiteSpace;
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶sub new { bless {}, shift }
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
6  
7 sub cmd_post {
8 5 ▶ my (undef, undef, undef, undef, $textref) = @_;
Subroutine cmd_post: called CC=1 SCAR=0.0
Pod undocumented
9  
10 5 $$textref =~ s/\s+/ /g;
11 5 return;
12 }
13  
14 1 1;
15  
16 __END__
17  
18 =head1 NAME
19  
20 App::Twirc::Plugin::SquashWhitSpace - Squash whitespace in status updates
21  
22 =head1 SYNOPSIS
23  
24 # in config (.yml in this example)
25 plugins:
26 -SquashWhiteSpace
27  
28 =head1 DESCRIPTION
29  
30 Squashes each occurence of whitespace in a status update to a single space.
31 After all, we only have 140 characters to work with!
32  
33 =head1 AUTHOR
34  
35 Marc Mims <marc@questright.com>
36  
37 =head1 LICENSE
38  
39 Copyright (c) 2009 Marc Mims
40  
41 You may distribute this code and/or modify it under the same terms as Perl itself.
42  
43 =cut
« App/Twirc/Plugin/SecondaryAccount.pm ↑ Summary