Thanks, I didn't know about Catalyst::Plugin::Static::Simple but that looks like just what I am after.
> -----Original Message----- > From: Kieren Diment [mailto:[email protected]] > Sent: 02 October 2009 12:28 > To: The elegant MVC web framework > Subject: Re: [Catalyst] Serving a static document > > > 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. > > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail- > archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
