roho has asked for the wisdom of the Perl Monks concerning the following question:
I have been searching for the equivalent of perltidy, HTML::Tidy, etc. for Template Toolkit files.
I have inherited some rather challenging tt files to maintain, and they are sorely in need of reformatting. There are many nested control statements (see examples below) that are not indented, which makes deciphering the logic flow next to impossible.
[% IF %] [% ELSE %] [% END %] [% WHILE %] [% FOREACH %] etc.
Does anyone know of a utility to reformat tt files? I tried Template::Plugin::PerlTidy, but unfortunately its reformatting is no better (in many ways worse) than the original tt file.
"Its not how hard you work, its how much you get done."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Tidy for Template Toolkit Files
by CountZero (Bishop) on Feb 11, 2011 at 16:18 UTC | |
Re: Tidy for Template Toolkit Files
by toolic (Bishop) on Feb 11, 2011 at 16:20 UTC | |
by roho (Bishop) on Feb 11, 2011 at 22:31 UTC | |
Re: Tidy for Template Toolkit Files
by sundialsvc4 (Abbot) on Feb 11, 2011 at 15:55 UTC | |
Re: Tidy for Template Toolkit Files
by Khen1950fx (Canon) on Feb 12, 2011 at 11:42 UTC | |
Re: Tidy for Template Toolkit Files
by Anonymous Monk on Feb 12, 2011 at 10:03 UTC |
Back to
Seekers of Perl Wisdom