NAME

Text::Template::Tiny - Variable substituting template processor

SYNOPSIS

This is a very small and limited template processor. The only thing it can do is substitute variables in a text.

Often that is all you need :-).

Example:

    use Text::Template::Tiny;

    # Create a template processor, with preset subtitutions.
    my $xp = Text::Template::Tiny->new(
      home    => $ENV{HOME},
      lib     => {
	      dev => "/tmp/mylib",
	      std => "/etc/mylib",
	  },
      version => 1.02,
    );

    # Add some more substitutions.
    $xp->add( app => "MyApp" );

    # Apply it.
    print $xp->expand(<<EOD);
    For [% app %] version [% version %], the home of all operations
    will be [% home %], and the library is [% lib.std %].
    EOD

    # Same, with additional substitutions for this call only.
    print $xp->expand( <<EOD, { app => "ThisApp" } );
    For [% app %] version [% version %], the home of all operations
    will be [% home %], and the library is [% lib.std %].
    EOD

AUTHOR

Johan Vromans, <jv at cpan.org>

SUPPORT AND DOCUMENTATION

Development of this module takes place on GitHub: https://github.com/sciurius/perl-Text-Template-Tiny.

You can find documentation for this module with the perldoc command.

perldoc Text::Template::Tiny

Please report any bugs or feature requests using the issue tracker on GitHub.

COPYRIGHT & LICENSE

Copyright 2008,2015,2024 Johan Vromans, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.