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       Your subclass should either provide a regular expression in _untaint_re
30       (and yes, I should really make this public), or an entire is_valid
31       method.
32

METHODS TO CALL

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