| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::Twirc::Plugin::SquashWhiteSpace; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
20852
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
41
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
134
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
0
|
4608
|
sub new { bless {}, shift } |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub cmd_post { |
|
9
|
5
|
|
|
5
|
0
|
1719
|
my (undef, undef, undef, undef, $textref) = @_; |
|
10
|
|
|
|
|
|
|
|
|
11
|
5
|
|
|
|
|
20
|
$$textref =~ s/\s+/ /g; |
|
12
|
5
|
|
|
|
|
6
|
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 |