Hi, 
after reading  some articles on the dancer advent calendar I started to examine 
dance in order to see, if I can replace my current MasonX::WebApp application 
with dancer. 
So I installed dancer 1.3 , and since I use Mason, I installed 
Dancer::Template::Mason. 

Now I found , that auto_page bypasses the template  engine by checking, if a 
specific template exists , and that behavior its still present in Dancer2.

In Dancer1 the code in Dancer::Renderer is 

    my $view = Dancer::engine('template')->view($viewpath) || '';

    if ($view && -f $view) {

and in Dancer 2 in Dancer::Handler::AutoPage

        my $view_path = $template->view($page);
        if (! -f $view_path) {


In  Dancer::Template::Abstract  a method "view_exists "  exists  ,  so why not 
use this? 
For  Dancer1 the docs  tells, override this function in your template class 
accordingly.  
But for auto_page, the template class is not asked if a template exists, and in 
my opinion,
this behavior is not correct.  
What  do you think about this ?

Rolf



_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to