| HTML-FormFu documentation | Contained in the HTML-FormFu distribution. |
HTML::FormFu::Filter::TrimEdges - filter trimming whitespace
Trim whitespaces from beginning and end of string.
Mario Minati, mario@minati.de
Based on the original source code of HTML::Widget::Filter::TrimEdges, by
Sebastian Riedel, sri@oook.de
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
| HTML-FormFu documentation | Contained in the HTML-FormFu distribution. |
package HTML::FormFu::Filter::TrimEdges; use Moose; extends 'HTML::FormFu::Filter'; sub filter { my ( $self, $value ) = @_; return if !defined $value; $value =~ s/^\s+//; $value =~ s/\s+\z//; return $value; } __PACKAGE__->meta->make_immutable; 1; __END__