The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Config::Any::TT2 - Config::Any plugin for Config::TT2 files

SYNOPSIS

    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};

DESCRIPTION

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

METHODS

extensions( )

return an array of valid extensions (tt2, tt).

load( $file )

Attempts to load $file via Config::TT2.

requires_all_of( )

Specifies that this module requires Config::TT2 in order to work.

AUTHOR

Karl Gaissmaier <gaissmai@cpan.org>

COPYRIGHT AND LICENSE

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.

SEE ALSO