diff Lib/IMPL/Web/View/TTLoader.pm @ 336:86336d451b82

sync
author cin
date Fri, 14 Jun 2013 03:32:55 +0400
parents d3b5a67ad2e8
children 9bdccdf1f50b
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/TTLoader.pm	Thu Jun 13 20:13:24 2013 +0400
+++ b/Lib/IMPL/Web/View/TTLoader.pm	Fri Jun 14 03:32:55 2013 +0400
@@ -3,6 +3,7 @@
 
 use Template::Constants qw(:status);
 
+use File::Spec();
 use IMPL::Const qw(:prop);
 use IMPL::declare {
     require => {
@@ -118,6 +119,15 @@
     return $tt;
 }
 
+sub ResolveFileName {
+    my ($this,$fname) = @_;
+    
+    $fname = $this->_appendExt($fname);
+    
+    my @files = grep -f , map File::Spec->catfile($_,$fname), @{$this->provider->paths()};
+    return shift @files;
+}
+
 sub _appendExt {
     my ($this,$name) = @_;