[Catalyst] Serving a static document
Kieren Diment
diment at gmail.com
Fri Oct 2 11:27:43 GMT 2009
On 02/10/2009, at 9:13 PM, matthew couchman (JIC) wrote:
> Hello,
>
> I'm quite new to Catalyst so apologies if this is a naive question.
> I'm trying to create a KML document within catalyst and then
> redirect the server to that document. The problem I'm having is that
> Catalyst seems to be interpreting the URL of the document (e.g. http://localhost:3000/root/src/test.kml)
> as a call to a script which it doesn't recognise and so it reverts
> to the default page. How do I override this behaviour?
>
Something like this (untested):
sub thing :Path('test.kml') {
my ($self, $c) = @_;
$c->serve_static_file('relative/path/from/app/root/to/test.kml');
}
or similar. Catalyst::Plugin::Static::Simple does the dirty work for
you.
More information about the Catalyst
mailing list