[%- 
    USE Comma;
    USE JSON;

    page = {
            title = template.title,
            style = template.style or 'cpan.html'
            stub  = '',
    };

    # Configuration for this site
    SET site = {
        name            => 'www.cpan.org',
        crum            => '<a href="/">Home</a>',
    };

    # Defaults ( should be overwritten through tpl/data/cpan-stats )
    SET cpan_stats = {};
    
	PROCESS "tpl/data/cpan-stats";

-%]
[%- BLOCK rss_feed %]
    [% TRY %]
    [% json_data = INSERT $conf.json_file %]
    [% items = JSON.json_decode(json_data) %]
    <ul>
    [% FOREACH item = items %]
        <li><a href="[% item.link %]">[% item.title %]</a></li>
        [% LAST IF loop.count >= conf.max %]
    [% END %]
    [% rss_footer || "" %]
    </ul>
    [% CATCH %]
    [% END %]
[% END -%]
