[Catalyst] Usage of $c->uri_for and $c->res->redirect

Ashley apv at sedition.com
Wed Mar 26 20:41:33 GMT 2008


On Mar 26, 2008, at 1:31 PM, Dustin Suchter wrote:
> Can you directly control the port you redirect to? Part of my  
> problem is having consistency between the production and test  
> environments, which operate on 80/443 and 3000/3000 respectively.

Don't see why not. Just add in $c->config magick or whatnot as  
necessary.

perldoc URI

use URI;
my $u = URI->new("http://example.com");
print $u, $/;

$u->port("3000");
$u->scheme("https");
print $u, $/;


-Ashley




More information about the Catalyst mailing list