line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
2173
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
145
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package HTML::FormFu::Filter::TrimEdges; |
4
|
|
|
|
|
|
|
$HTML::FormFu::Filter::TrimEdges::VERSION = '2.07'; |
5
|
|
|
|
|
|
|
# ABSTRACT: filter trimming whitespace |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
13
|
use Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
22
|
|
8
|
|
|
|
|
|
|
extends 'HTML::FormFu::Filter'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub filter { |
11
|
1
|
|
|
1
|
0
|
3
|
my ( $self, $value ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
1
|
50
|
|
|
|
4
|
return if !defined $value; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
7
|
$value =~ s/^\s+//; |
16
|
1
|
|
|
|
|
5
|
$value =~ s/\s+\z//; |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
4
|
return $value; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=pod |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=encoding UTF-8 |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
HTML::FormFu::Filter::TrimEdges - filter trimming whitespace |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 VERSION |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
version 2.07 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 DESCRIPTION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Trim whitespaces from beginning and end of string. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 AUTHOR |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Mario Minati, C<mario@minati.de> |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Based on the original source code of L<HTML::Widget::Filter::TrimEdges>, by |
48
|
|
|
|
|
|
|
Sebastian Riedel, C<sri@oook.de> |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 LICENSE |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it |
53
|
|
|
|
|
|
|
under |
54
|
|
|
|
|
|
|
the same terms as Perl itself. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 AUTHOR |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Carl Franks <cpan@fireartist.com> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This software is copyright (c) 2018 by Carl Franks. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
65
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=cut |