Catalyst::Plugin::CGI::Untaint - Plugin for Catalyst
# In your MainApp.pm: use Catalyst qw/CGI::Untaint/; # Put into your form handler: my $email = $c->untaint(-as_email => 'email'); # Will extract only a valid email address from $c->req->params->{email} # Use -last_error to get the rejection reason: if (not $email) { $error = $c->untaint(-last_error => 'email'); } # (note, you will need to have CGI::Untaint and CGI::Untaint::email installed # in order for the above example to work)
This module wraps CGI::Untaint up into a Catalyst plugin.
For info on using CGI::Untaint, see its own documentation.
Catalyst
CGI::Untaint
Toby Corkindale, <cpan@corkindale.net>
Copyright (C) 2006 by Toby Corkindale
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.7 or, at your option, any later version of Perl 5 you may have available.
To install Catalyst::Plugin::CGI::Untaint, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::CGI::Untaint
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::CGI::Untaint
For more information on module installation, please visit the detailed CPAN module installation guide.