[Catalyst] uri_for (or lack thereof) in static pages

Ash Berlin ash at cpan.org
Fri Nov 17 00:53:33 GMT 2006


Cédric Bouvier wrote:
> I have a ѕimple yet thorny problem, which I expect most of you also have
> or had. It has several possible solutions, but I'm chiefly interested in
> knowing how *you* would solve it and why.
> 
> We're developing a Catalyst application. It serves HTML, CSS,
> JavaScript, and images. HTML is the output of TT2, but CSS, images and
> JavaScript are static. We have them served by C::P::Static::Simple on
> the built-in server, and we use a <Location> the have them directly
> served by Apache/mod_perl, one the production server. Under mod_perl,
> the application's root is not the server's root, i.e., it is
> http://server/myapp, whereas it is http://localhost:3000 on the built-in
> test server.
> 
> This would not be a problem if the CSS were not linking to images. And
> because CSS pages are static, they cannot make use of uri_for(), and
> therefore get the links to the pictures wrong.
> 

Are the images static? If so then your problem isn't a problem. Judging 
on your possible suggestions I'd guess not, but just checking.

Ash




More information about the Catalyst mailing list