My code that reads the file:
method fetch
{
if (!defined($data) || (my $age= -M $conffilename)) {
# must (re)load the file
my $conf= new Config::General:: (-ConfigFile => $conffilename, -UT
+F8 => 1);
my %result= $conf->getall;
$data= \%result;
$fileage= $age;
}
return $data;
}
This is a Catalyst "Model", and the resulting hash winds up in a stash passed to Template::Alloy.
<p>[% sp.priceline %]</p>
etc.
|