I want to Sledge::Config->path_to.

tokuhirom on 2006-11-19T14:30:33

http://use.perl.org/user/ikebe/journal/31636

I want to write tmpl_path with path_to in config. Because, tmpl_path is a configuration variable.

package Project::Config;
use strict;
use warnings;
use base qw/Sledge::Config/;
use Sledge::Plugin::PathTo;
use vars qw(%C);
*Config = \%C;

$C{TMPL_PATH} = path_to('view'); 1;


and, next version of Sledge::Config::YAML will supports path_to, likes Catalyst::Plugin::ConfigLoader::YAML.Follw is example configuration file:

common:
  tmpl_path: __path_to('view')__


Yeah, that's so cool.