Subject: | please add method : redirect |
sub redirect {
my $session = shift;
my($url,$param) = split(/\?/,shift);
my %param = map {split /=/,$_,2} split /&/ ,$param;
unless(exists $param{$session->name}){
$param{$session->name} = $session->id;
}
my $r = $url;
my $r_param = join "&",map {"$_=$param{$_}"} keys %param;
$r = "$r?$r_param" if($r_param);
return CGI->redirect(-uri => $r , @_);
}