[Pdx-pm] local extractor for CGI::Untaint

chromatic chromatic at wgz.org
Fri Apr 8 12:54:32 PDT 2005

On Fri, 2005-04-08 at 12:44 -0700, John Springer wrote:

> I'm trying to use the CGI::Untaint module with some of my own
> validation rules.
> I can't seem to get the paths right to get my mod to work.  All the
> docs seem to use the
> same example and it isn't helping me.   Can I get some help please?
> my module is in /usr/www/users/orygun/cgi-bin/MyUntaint
> (and cgi-bin is in @INC).
> in my module I have:
> package MyUntaint::digit;
> use base 'CGI::Untaint::object';
> in my program I have
> $q=new CGI;
> $q=new CGI::Untaint(
> {INCLUDE_PATH=>'/usr/www/users/orygun/cgi-bin/MyUntaint/',},
> $q->Vars);

I think the INCLUDE_PATH should be only 'MyUntaint'.  Its name isn't
clear that it's the package name prefix.

As a side note, it's occasionally safer and usually clearer to write
constructor calls as CGI->new() and CGI::Untaint->new( ).  Again, the
documentation of CGI::Untaint makes this a bit unclear.

-- c

More information about the Pdx-pm-list mailing list