line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Twirc::Plugin::SquashWhiteSpace; |
2
|
|
|
|
|
|
|
$App::Twirc::Plugin::SquashWhiteSpace::VERSION = '0.20'; |
3
|
1
|
|
|
1
|
|
13084
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
104
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
0
|
4171
|
sub new { bless {}, shift } |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub cmd_post { |
9
|
5
|
|
|
5
|
0
|
1077
|
my (undef, undef, undef, undef, $textref) = @_; |
10
|
|
|
|
|
|
|
|
11
|
5
|
|
|
|
|
21
|
$$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 |