1package Dancer::Template::NetdiscoTemplateToolkit; 2 3use strict; 4use warnings; 5 6use Dancer::FileUtils 'path'; 7use base 'Dancer::Template::TemplateToolkit'; 8 9sub view { 10 my ($self, $view) = @_; 11 12 foreach my $path (@{ $self->config->{INCLUDE_PATH} }) { 13 foreach my $template ($self->_template_name($view)) { 14 my $view_path = path($path, $template); 15 return $view_path if -f $view_path; 16 } 17 } 18 19 # No matching view path was found 20 return; 21} 22 231; 24