[Dancer-users] forward() and prefix

Alessandro Ranellucci aar at cpan.org
Mon May 21 15:56:25 CEST 2012


On 18-05-2012 at 15:35, Brian E. Lozier wrote:

  >Hmm, not convinced.  How would you forward to another path 
mounted at
  >a different directory (outside your current prefix)?  Maybe just
  >implement a forward_with_prefix() in your app?

How does one app know the prefix it's mounted at?
There seems to be no public API for that.

I would agree with you if we were talking about "lexical" 
prefixes, set using the prefix() method. I'm talking about mount 
prefixes which you pass to the load_app() method, thus outside 
of the app itself.
I don't think it's good design to forward() a request to another app.

- Alessandro



More information about the Dancer-users mailing list