Skip Menu |

This queue is for tickets about the CGI-Untaint CPAN distribution.

Report information
The Basics
Id: 60611
Status: new
Priority: 0/
Queue: CGI-Untaint

People
Owner: Nobody in particular
Requestors: mike [...] mlxvi.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: An idea for you?
Date: Sun, 22 Aug 2010 21:17:22 +1200
To: bug-CGI-Untaint [...] rt.cpan.org
From: Mike Edmonds <mike [...] mlxvi.org>
I had occasion to place my handlers in two locations, thus requiring my INCLUDE_PATH to be a list reference rather than a scalar. I subclassed CGI::Untaint and used this, but it might be something that you are interested in for future releases. Mike Edmonds sub _load_module { my $self = shift; my $name = $self->_get_module_name(shift()); # added from here my @include_path ; if (ref($self->{__config}{INCLUDE_PATH})) { @include_path = @{$self->{__config}{INCLUDE_PATH}} ; } else { push @include_path, $self->{__config}{INCLUDE_PATH} ; } # to here foreach # and the next line is changed my $prefix (grep defined, "CGI::Untaint", @include_path) { my $mod = "$prefix\::$name"; return $self->{__loaded}{$mod} if defined $self->{__loaded}{$mod}; eval { $mod->require; $mod->can('_untaint') or die; }; return $self->{__loaded}{$mod} = $mod unless $@; } die "Can't find extraction handler for $name\n"; }