line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Widget::Filter::TrimEdges; |
2
|
|
|
|
|
|
|
|
3
|
88
|
|
|
88
|
|
81920
|
use warnings; |
|
88
|
|
|
|
|
215
|
|
|
88
|
|
|
|
|
2790
|
|
4
|
88
|
|
|
88
|
|
493
|
use strict; |
|
88
|
|
|
|
|
196
|
|
|
88
|
|
|
|
|
2607
|
|
5
|
88
|
|
|
88
|
|
473
|
use base 'HTML::Widget::Filter'; |
|
88
|
|
|
|
|
195
|
|
|
88
|
|
|
|
|
15317
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
HTML::Widget::Filter::TrimEdges - Trim whitespaces from beginning and end of string |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $f = $widget->filter( 'TrimEdges', 'foo' ); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
TrimEdges Filter. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 METHODS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head2 filter |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub filter { |
26
|
1
|
|
|
1
|
1
|
3
|
my ( $self, $value ) = @_; |
27
|
1
|
|
|
|
|
7
|
$value =~ s/^\s+//; |
28
|
1
|
|
|
|
|
8
|
$value =~ s/\s+$//; |
29
|
1
|
|
|
|
|
9
|
return $value; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 AUTHOR |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Sebastian Riedel, C |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 LICENSE |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
39
|
|
|
|
|
|
|
the same terms as Perl itself. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |