On Sep 30, 2011, at 9:10 AM, Dave Doyle wrote:
On Fri, Sep 30, 2011 at 9:51 AM, Mr. Puneet Kishor <punk.kish@gmail.com>wrote:
In other words, this meta method returns all the resources available at the http://server/app.
Of course, I could code this for each app, but it would be nice to automate it.
Suggestions? Ideas?
I would imagine you could use Dancer::Plugin::Sitemap as a starting point to do something to this effect. It looks through the routes and you could create your own plugin to do it.
wow! this is awesome. Of course, it doesn't work for me as is, as all routes with params (essentially, all routes with `.:format` are ignored). But, it definitely is a great starting point. Looking at the source, it calls for my $app ( Dancer::App->applications ) { my $routes = $app->{registry}->{routes}; This `Dancer::App->applications` array and the routes registry, obviously these are not publicly available methods, so it seems I have to delve into the innards of Dancer to modify/adapt these, no? -- Puneet Kishor