[Catalyst-dev] subdomain hook for Catalyst::Test
Jason Gottshall
jgottshall at capwiz.com
Wed Oct 8 18:06:46 BST 2008
Ashley wrote:
> On Oct 8, 2008, at 9:03 AM, Jason Gottshall wrote:
>> Matt S Trout wrote:
>>> On Tue, Oct 07, 2008 at 10:07:32AM -0400, Jason Gottshall wrote:
>>>> Here's a thought: if the (optional) alternate domain info is stored
>>>> in a package var, and therefore localizable, couldn't I then
>>>> dispense with the added argument to request() altogether? It
>>>> certainly simplifies the code; I don't have to mess with @_
>>>> anywhere. Tests can just localize the defaults as necessary. Done.
>>> You could. But isn't that gonna get kinda gross if you want to make lots
>>> of requests each to a different domain?
>>
>
> Just throwing this out there: "domain" is probably the wrong technical
> nomenclature for this however it ends up being done. URI.pm and friends
> use "host" and I argue for toeing that line.
Excellent. I've been wondering about that myself. I'll accept the idea
of going with "host" (and "default_host" as the package var) for
fully-qualified "white-label" values
Now, how do you feel about that which I've been calling "subdomain"?
That is, one or more of the left-most domain/host name elements, to be
added to whatever the standing host is at the time: 'localhost' for
local requests, or the hostname component of $ENV{CATALYST_SERVER}, or
even the newly minted "host" value noted above. I think I pulled the
term from a DNS-related RFC, but that means nothing. I'm open to
suggestions.
More information about the Catalyst-dev
mailing list