[Catalyst-dev] subdomain hook for Catalyst::Test
Jason Gottshall
jgottshall at capwiz.com
Thu Oct 9 17:23:35 BST 2008
Ashley wrote:
> On Oct 8, 2008, at 10:38 AM, Jason Gottshall wrote:
>> No clubs here, but honestly the "subdomain" case is the original
>> problem I was trying to solve. We use virtual subdomains to enable
>> customer-specific behaviors, and they could be tacked on to any number
>> of white-labeled base domains. My aim is to be able to modify only the
>> subdomain value in a test, irrespective of the rest of base domain name.
>
> I only skimmed most of the earlier stuff. I suppose there could possibly
> be some dynamic configuration management based on the host. It might
> have to be a plugin if it sits in the top of the request cycle.
>
> Catalyst::Plugin::ConfigPerHost ...
> # load configuration variables by the c->req->uri->host
>
> Then in config (YAML style)
>
> Plugin::ConfigPerHost:
> my.host.com: config stuff
> your.host.com:
> config_file: ...?
>
> ...or allow your.host.com.(conf|yml) to just work?
>
> No idea if that's a good tack though.
I appreciate your thoughts in this direction, but right now I'm not
trying to solve any configuration problem in the app; that's already
working just fine. The point here is how to patch Catalyst::Test to
allow me to specify a subdomain value to be used in a test request.
We've already solved the problem of specifying a fully qualified "host",
and hearing no objections I'm going to continue to use the term
"subdomain" for the mechanism that allows you to specify just a portion
of the host.
More information about the Catalyst-dev
mailing list