in reply to Escapes and comments in Config::General

  • Comment on Re: Escapes and comments in Config::General

Replies are listed 'Best First'.
Re^2: Escapes and comments in Config::General
by John M. Dlugosz (Monsignor) on Mar 22, 2011 at 14:13 UTC
    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.