[Dancer-users] Deployment question

Alexis Sukrieh sukria at sukria.net
Wed Apr 7 09:09:21 UTC 2010


Hi,

> I guess one solution would be for me to explicitly configure my app to  
> be told where it is in the URI space, and use that information to  
> construct the appropriate css refs, etc in the templates. It would  
> have to be done for any URL that is created that is visible outside  
> the app (form POST addresses, any absolute urls, etc). 

This makes sense, I suppose a template helper like 'url_for($path)'
would be appropriate. This could be easily done with a setting like
'application_root'.

Then we could have :

    use Dancer;
    set application_root => '/myappdir';

    get '/' => sub { # the home route };

    # in templates 
    ...
    <link rel="text/css" src="<% url_for('/css/style.css) %>" />

Tell me if this feature looks to solve your issue. If this is the case,
feel free to open a ticket on GitHub
<http://github.com/sukria/Dancer/issues>

Regards,

-- 
Alexis Sukrieh



More information about the Dancer-users mailing list