summary refs log tree commit diff
diff options
context:
space:
mode:
authorFayland Lam <fayland@gmail.com>2011-11-26 11:33:40 +0800
committerFayland Lam <fayland@gmail.com>2011-11-26 11:33:40 +0800
commit4d3212158e0fa20ce2aa1731b66e26fe3a68459a (patch)
treee1f8f5ee391f187a05ff1cfbbce41cea7c621867
parentfix tests (diff)
downloaddancer-template-xslate-4d3212158e0fa20ce2aa1731b66e26fe3a68459a.tar.gz
fix a warnings
-rw-r--r--lib/Dancer/Template/Xslate.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Dancer/Template/Xslate.pm b/lib/Dancer/Template/Xslate.pm
index bbcd3ab..7f5632c 100644
--- a/lib/Dancer/Template/Xslate.pm
+++ b/lib/Dancer/Template/Xslate.pm
@@ -39,7 +39,7 @@ sub render {
     
     # absolute filename will never work under Windows even we hard set path as ['/']
     my $view_dir = Dancer::App->current->setting('views');
-    $template =~ s/^\Q$view_dir\E//;
+    $template =~ s/^\Q$view_dir\E// if $view_dir;
 
     my $content = eval {
         $_engine->render($template, $tokens)