On Sat, Dec 25, 2010 at 11:01 AM, Gabor Szabo <szabgab@gmail.com> wrote:
In the end I found some other way. I am not sure if it is blessed by
the Dancer developers or not:

my $prefix = Dancer::App->current->prefix();
load_app "Foo::User", prefix => "$prefix/user";
Dancer::App->current->prefix($prefix);

Actually, I do something much simpler.

I have a Foo::User.pm, which has:
package Foo::User;
use Dancer ':syntax';
prefix '/user';

get '/' => sub {...};
get '/view/' => sub {...};
--

Then from Foo.pm, I set up:
load path( qw/ Foo User.pm / );

That's it.