You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jo...@apache.org on 2014/03/25 22:51:29 UTC

svn commit: r1581545 - /thrift/cms-site/trunk/lib/view.pm

Author: joes
Date: Tue Mar 25 21:51:28 2014
New Revision: 1581545

URL: http://svn.apache.org/r1581545
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=1581545&r1=1581544&r2=1581545&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/view.pm (original)
+++ thrift/cms-site/trunk/lib/view.pm Tue Mar 25 21:51:28 2014
@@ -2,4 +2,22 @@ package view;
 
 # see https://svn.apache.org/repos/infra/websites/cms/build/lib/ASF/View.pm
 use base 'ASF::View';
+use ASF::Util qw/read_text_file parse_filename/;
+use strict;
+use warnings;
+
+# for the speed freak in you
+
+sub fetch_deps {
+    my ($path, $data) = @_;
+    for (@{$path::dependencies{$path}}) {
+        my $file = $_;
+        my ($filename, $dirname) = parse_filename;
+        $file = $filename eq "index" ? $dirname : "$dirname$filename.html";
+        $data->{$file} = {};
+        read_text_file $_, $data->{$file};
+        $data->{$file}->{headers}->{title} //= $filename;
+    }
+}
+
 1;