Author: joes
Date: Tue Mar 25 22:01:45 2014
New Revision: 1581555

URL: http://svn.apache.org/r1581555
Log:
trial and error

Modified:
    thrift/cms-site/trunk/lib/view.pm

Modified: thrift/cms-site/trunk/lib/view.pm
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/view.pm?rev=1581555&r1=1581554&r2=1581555&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/view.pm (original)
+++ thrift/cms-site/trunk/lib/view.pm Tue Mar 25 22:01:45 2014
@@ -6,7 +6,7 @@ use ASF::Util qw/read_text_file parse_fi
 use strict;
 use warnings;
 
-# for the speed freak in you
+# for the speed freak in you- short-circuit view generation with a simple 
read_text_file
 
 sub fetch_deps {
     my ($path, $data) = @_;
@@ -14,8 +14,12 @@ sub fetch_deps {
         my $file = $_;
         my ($filename, $dirname) = parse_filename;
         $file = $filename eq "index" ? $dirname : "$dirname$filename.html";
-        $data->{$file} = {};
-        read_text_file "content$_", $data->{$file};
+        for my $p (@path::patterns) {
+            my ($re, $method, $args) = @$p;
+            next unless $_ =~ $re;
+            $data->{$file} = { path => $file, %$args };
+            read_text_file "content$_", $data->{$file};
+        }
         $data->{$file}->{headers}->{title} //= ucfirst $filename;
     }
 }


Reply via email to