sub redirect { my($self,@p) = self_or_default(@_); my($url,$target,$cookie,$nph,@other) = rearrange([[LOCATION,URI,URL],TARGET,['COOKIE','COOKIES'],NPH],@p); $url ||= $self->self_url; my(@o); foreach (@other) { tr/\"//d; push(@o,split("=",$_,2)); } unshift(@o, '-Status' => '302 Moved', '-Location'=> $url, '-nph' => $nph); unshift(@o,'-Target'=>$target) if $target; unshift(@o,'-Type'=>''); my @unescaped; unshift(@unescaped,'-Cookie'=>$cookie) if $cookie; return $self->header((map {$self->unescapeHTML($_)} @o),@unescaped); }