[Catalyst] hostname

Carl Johnstone catalyst at fadetoblack.me.uk
Thu Jan 10 15:44:30 GMT 2008


> from the context object, but is unavailable to MyApp.pm.  cookie_domain

Both the context object and the hostname should be available to code within 
MyApp.pm, but only if the code is running during a request.

In any case I wouldn't point multiple domains at the same site, you're 
always best off choosing your preferred name and redirecting alternatives. 
Otherwise you're going to have fun with users following links to domain1.com 
and coming back via links to domain2.com - often within minutes of each 
other.

That said, there's a case for needing to know the hostname if you've got 
multiple sites running from the same Cat App.


Carl




More information about the Catalyst mailing list