1CGI::Untaint::object(3)User Contributed Perl DocumentatioCnGI::Untaint::object(3)
2
3
4

NAME

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

SYNOPSIS

9         package MyUntaint::foo;
10
11         use base 'CGI::Untaint::object';
12
13         sub _untaint_re {
14           return qr/$your_regex/;
15         }
16
17         sub is_valid {
18           my $self = shift;
19           return is_ok($self->value);
20         }
21
22         1;
23

DESCRIPTION

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

METHODS TO SUBCLASS

28       is_valid / _untaint_re
29
30       Your subclass should either provide a regular expression in _untaint_re
31       (and yes, I should really make this public), or an entire is_valid
32       method.
33

METHODS TO CALL

35       value
36
37       This should really have been two methods, but too many other modules
38       now rely on the fact that this does double duty. As an accessor, this
39       is the 'raw' value. As a mutator it's the extracted one.
40
41       re_all / re_none
42
43       Regular expressions to match anything, or nothing, untained.  These
44       should only be used if you have already validated your entry in some
45       way that means you completely trust the data.
46
47       untainted
48
49       Are we clean yet?
50
51
52
53perl v5.8.8                       2005-09-20           CGI::Untaint::object(3)
Impressum