| 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 | ||