Config::Any::TT2 - Config::Any plugin for Config::TT2 files
use Config::Any; my $cfg_file = 'cfg.tt2'; my $configs = Config::Any->load_files( { files => [$cfg_file], flatten_to_hash => 1, use_ext => 1, } ); my $cfg = $configs->{$cfg_file};
Loads Config::TT2 files. Example:
[% # tt2 directive start-tag scalar = 'string' array = [ 10 20 30 ] # commas are optional rev = array.reverse # powerful virtual methods item = array.0 # interpolate previous value hash = { foo = 'bar' # hashes to any depth moo = array # points to above arrayref } %] # tt2 directive end-tag
return an array of valid extensions (tt2, tt).
tt2
tt
Attempts to load $file via Config::TT2.
$file
Specifies that this module requires Config::TT2 in order to work.
Karl Gaissmaier <gaissmai@cpan.org>
Copyright 2012 by Karl Gaissmaier
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Config::Any
Config::TT2
To install Config::Any::TT2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Any::TT2
CPAN shell
perl -MCPAN -e shell install Config::Any::TT2
For more information on module installation, please visit the detailed CPAN module installation guide.