[% USE date; books = [ { title => "Practical mod_perl", url => "http://modperlbook.org/", image => { uri => "/images/books/practical_modperl.jpg", height => 169, width => 128, }, authors => "Stas Bekman, Eric Cholet", }, { title => "The mod_perl Developer's Cookbook", url => "http://www.modperlcookbook.org/", image => { uri => "/images/books/modperlcookbook.jpg", height => 140, width => 113, }, authors => "Geoffrey Young, Paul Lindner, Randy Kobes", }, { title => "mod_perl Pocket Reference", url => "http://www.oreilly.com/catalog/modperlpr/", image => { uri => "/images/books/modperlpr.jpg", height => 140, width => 85, }, authors => "Andrew Ford", }, { title => "Writing Apache Modules with Perl and C", url => "http://www.modperl.com/", image => { uri => "/images/books/wrapmod.jpg", height => 140, width => 107, }, authors => "Lincoln Stein, Doug MacEachern", }, { title => "Embedding Perl in HTML with Mason", url => "http://www.masonbook.com/", image => { uri => "/images/books/masonbook.jpg", height => 140, width => 107, }, authors => "Dave Rolsky, Ken Williams", }, ]; max_items = 3; num_items = books.size; seconds = date.format(date.now, '%S'); first_book = seconds % num_items; -%] [%- WRAPPER wrap_box title = "Books" -%] [%- i_max = max_items - 1; FOREACH i = [0..i_max]; cur = (i + first_book) % num_items; book = books.$cur; %]
[% book.title %]

[% book.title %]

By [% book.authors %]

[% END %]
More mod_perl books...

[% END %]