[Catalyst] New plugin - request for comments

Toby Corkindale tjc at wintrmute.net
Fri Apr 28 19:13:06 CEST 2006


Hi,
I've written a plugin that wraps CGI::Untaint.
Before I upload to CPAN, I wondered if anyone would like to give me some
feedback?
It's available at:
http://www.dryft.net/tmp/Catalyst-Plugin-CGI-Untaint.tar.gz

SYNOPSIS
 # 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 -error to get the rejection reason:
 if (not $email) {
     $error = $c->untaint(-last_error => ’email’);
 }

(note - the email extraction also requires CGI::Untaint::email to be installed)

Toby

-- 
Turning and turning in the widening gyre/The falcon cannot hear the falconer;
Things fall apart, the centre cannot hold/Mere anarchy is loosed upon the world
(gpg --keyserver www.co.uk.pgp.net --recv-key B1CCF88E)



More information about the Catalyst mailing list