[Catalyst] A different approach to static content

Christopher H. Laco claco at chrislaco.com
Tue Aug 16 21:22:47 CEST 2005


Matt S Trout wrote:
> On Tue, Aug 16, 2005 at 01:55:42PM -0400, Christopher H. Laco wrote:
> 
>>Matt S Trout wrote:
>>
>>>It's potentially fragile, your apache config is suddenly part created by
>>>something else (Cobalt RaQs dothis, it's a nightmare to debug), and I dunno
>>>how the hell you'd manage to handle regex actions (translate to 
>>>LocationMatch?
>>>good luck ...)
>>
>>
>>Re: regex... -> LocationMatch blocks...
> 
> 
> Given I already said that with "good luck" on the end, either your e-mail
> was missing the end or it was content-free.
> 
> You're never going to make that work. Ever. In any way, shape or form. Apache
> doesn't have powerful enough regexes. mod_rewrite doesn't have powerful enough
> regexes. If you want to limited yourself to the apache feature set, fine, but
> that kinda defied the point of writing in perl.

True. But how many people are actually using complicated Regexes in 
controllers? If you have to, and you can't get the info via args/params, 
then I'd say your URLS are way too complicated and breaking the point of 
web site accessibility (human rememberable urls). But, true none the 
less that the Apache regexes suck in comparison.

That's not to say that your LocationMatch URL has to be as complicated 
as your Controller action Regexp. It only has to be generic anough to 
get the request to the appropriate Catalyst handler.


> 
> Plus, of course, you get to write a regex parser/generator.
> 
> Concept: 8 points
> Style: 5 points
> KISS: nul points
> 
> :)
> 


Then I guess the real answer is, if you want the best static performance 
and need to intermingle static and Catalyst in the same /, then one 
would have to manually create Location/LocationMatch directives and 
set-handler to PerlHandler/MyApp and let the other content fall through 
without going through Catalyst for every request; static or not.

-=Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3178 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20050816/c3dae461/smime-0001.bin


More information about the Catalyst mailing list