GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CGI::Untaint::object(3) User Contributed Perl Documentation CGI::Untaint::object(3)

CGI::Untaint::object - base class for Input Handlers

  package MyUntaint::foo;

  use base 'CGI::Untaint::object';

  sub _untaint_re {
    return qr/$your_regex/;
  }

  sub is_valid {
    my $self = shift;
    return is_ok($self->value);
  }

  1;

This is the base class that all Untaint objects should inherit from.

Your subclass should either provide a regular expression in _untaint_re (and yes, I should really make this public), or an entire is_valid method.

This should really have been two methods, but too many other modules now rely on the fact that this does double duty. As an accessor, this is the 'raw' value. As a mutator it's the extracted one.

Regular expressions to match anything, or nothing, untained. These should only be used if you have already validated your entry in some way that means you completely trust the data.

Are we clean yet?
2005-09-20 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.