1HTML::FormFu::Filter::CUaslelrbaCcokn(t3r)ibuted Perl DoHcTuMmLe:n:tFaotrimoFnu::Filter::Callback(3)
2
3
4
6 HTML::FormFu::Filter::Callback - filter with custom subroutine
7
9 $field->filter({
10 type => 'Callback',
11 callback => \&my_filter,
12 });
13
14 ---
15 elements:
16 - type: Text
17 name: foo
18 filters:
19 - type: Callback
20 callback: "main::my_filter"
21
22 sub my_filter {
23 my ($value) = @_;
24
25 # do something to $value
26
27 return $value;
28 }
29
31 Filter using a user-provided subroutine.
32
34 callback
35 Arguments: \&code-reference
36
37 Arguments: "subroutine-name"
38
40 Carl Franks, "cfranks@cpan.org"
41
42 Based on the original source code of HTML::Widget::Filter::Callback, by
43 Lyo Kato, "lyo.kato@gmail.com"
44
46 This library is free software, you can redistribute it and/or modify it
47 under the same terms as Perl itself.
48
49
50
51perl v5.12.1 2010-05-16 HTML::FormFu::Filter::Callback(3)