The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

use strict;
use Dancer::FileUtils 'path';
sub view {
my ($self, $view) = @_;
foreach my $path (@{ $self->config->{INCLUDE_PATH} }) {
foreach my $template ($self->_template_name($view)) {
my $view_path = path($path, $template);
return $view_path if -f $view_path;
}
}
# No matching view path was found
return;
}
1;