[% USE date %]
[% curyear = date.format(date.now, '%Y') %]
[% IF curyear == '2009' %]
[% copyyear = '2009' %]
[% ELSE %]
[% copyyear = '2009 - ' _ curyear %]
[% END %]
[% # config/main
#
# This is the main configuration template which is processed before
# any other page, by virtue of it being defined as a PRE_PROCESS
# template. This is the place to define any extra template variables,
# macros, load plugins, and perform any other template setup.
IF Catalyst.debug;
# define a debug() macro directed to Catalyst's log
MACRO debug(message) CALL Catalyst.log.debug(message);
END;
# define a data structure to hold sitewide data
site = {
title => 'Catalyst::View::TTSite Example Page',
copyright => copyyear _ ' gregor herrmann',
license => 'GPL-3+',
};
# load up any other configuration items
PROCESS config/col.tt2
+ config/url.tt2;
# set defaults for variables, etc.
DEFAULT
message = 'There is no message';
-%]