| 1 | package HTML::Widget::Filter::Whitespace; | ||
| 2 | |||
| 3 | use warnings; | ||
| 4 | use strict; | ||
| 5 | use base 'HTML::Widget::Filter'; | ||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | HTML::Widget::Filter::Whitespace - Whitespace Filter | ||
| 10 | |||
| 11 | =head1 SYNOPSIS | ||
| 12 | |||
| 13 | my $f = $widget->filter( 'Whitespace', 'foo' ); | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | Whitespace Filter. | ||
| 18 | |||
| 19 | =head1 METHODS | ||
| 20 | |||
| 21 | =head2 filter | ||
| 22 | |||
| 23 | =cut | ||
| 24 | |||
| 25 | sub filter { | ||
| 26 | my ( $self, $value ) = @_; | ||
| 27 | $value =~ s/\s+//g; | ||
| 28 | return $value; | ||
| 29 | } | ||
| 30 | |||
| 31 | =head1 AUTHOR | ||
| 32 | |||
| 33 | Sebastian Riedel, C<sri@oook.de> | ||
| 34 | |||
| 35 | =head1 LICENSE | ||
| 36 | |||
| 37 | This library is free software, you can redistribute it and/or modify it under | ||
| 38 | the same terms as Perl itself. | ||
| 39 | |||
| 40 | =cut | ||
| 41 | |||
| 42 | 1; |