Egg::Plugin::Filter - Filter of request query for Egg plugin.
use Egg qw/ Filter /; # The received form data is filtered. $e->filter( myname => [qw/hold_html abs_strip trim/], address=> [qw/hold_html crlf1 abs_strip trim/], tel => [qw/hold phone/], ); # Cookie is filtered. my $cookie= $e->filter( { nick_name=> [qw/strip_html abs_strip trim/], email => [qw/hold_html hold/], }, $e->request->cookies );
It is filter plugin to pass it as for data.
The space character in the back and forth is deleted.
The space character is deleted.
The continuousness of the space character is substituted for one half angle space.
The tab is deleted.
Consecutive half angle space is settled in one.
A consecutive changing line is settled in [NUM] piece. * The tab is deleted.
Default when [NUM] is omitted is 1.
Continuousness in the tab is substituted for one half angle space.
It is 'hold' for changing line and the tab.
It is 'strip' for changing line and the tab.
The character string seen the HTML tag is deleted.
The character string seen the HTML tag is substituted for one half angle space.
HTML::Entities::encode_entities is done.
It deletes it excluding the normal-width figure.
It deletes it excluding the alphanumeric character.
It deletes it excluding the integer.
It deletes it excluding the positive integer.
It deletes it excluding the negative integer.
It deletes it excluding the integer including small number of people.
It deletes it excluding a positive integer including small number of people.
It deletes it excluding a negative integer including small number of people.
It deletes it excluding the figure that can be used with dollar currency.
lc is done.
uc is done.
ucfirst is done.
The character that cannot be used by the telephone number is deleted.
'*' is substituted for '%'.
quotemeta is done.
It is possible to set it by 'plugin_filter' as follows.
List of plugin module to enhance filter.
The specified name is progressed and treated with 'Egg::Plugin::Filter::[PLUGIN_NAME]' usually. When + is applied to the head, the name is treated as it is as a module name.
plugins => [qw/ Japanese::EUC /],
The filter is processed according to ATTR_HASH, and the result is returned.
When TARGET_PARAM is omitted, $e->request->params is used.
Please set the list of the filter name to the parameter name of the object about ATTR_HASH.
$e->filter( param_name1 => [qw/ strip space trim /], param_name2 => [qw/ strip_html space trim /], param_name3 => [qw/ strip_html crlf:3 trim /], );
HTML::Entities, Egg::Request, Egg::Release,
Masatoshi Mizuno <lushe@cpan.org>
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Egg::Release, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Egg::Release
CPAN shell
perl -MCPAN -e shell install Egg::Release
For more information on module installation, please visit the detailed CPAN module installation guide.