Hi Matt,
On 13/02/11 10:54 PM, Harshal Shah wrote:Hi Harshal,
Hey Matt
Thanks for the work... As for ticket 284, I was trying to host multiple tiny dancer apps, sharing a core functionality. Can we take this module further and do something like
package Domain1App
prefix_domain 'domain1' ;
## domain 1 specific routes
package Domain2App
prefix_domain 'domain2' ;
## domain 2 specific routes
still running as single dancer app ? Though i cant think of a way to handle different config files for each of them ?
Harshal Shah
I am not sure, do you think the following would work ?
package Domain1App
if(request->env->{ 'domain1' }){if(request->env->{ 'domain2'}) {
## domain 1 specific routes
}
package Domain2App
## domain 2 specific routes
}
If that works can a helper function like the following be written ? Something similar to the prefix function ?
It would probably have to be a plugin as this sort of functionality is probably not desired in core
sub subdomain {
my $subdomain = shift;
...
}
Matt
_______________________________________________
Dancer-users mailing list
Dancer-users@perldancer.org
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users