On Mon, Jun 18, 2001 at 04:36:00PM +0100, Greg McCarroll wrote:
> In a moment of stupidity[1] I agreed to write an article for lathos on
> templating solutions for Perl. This was an attempt to finally break my 
> writing block/issues/mindset problems. It is going to be a compare and 
> contrast article and so far I've looked at,
> 
>       Template Toolkit
>       HTML::Mason
>       Text::Template 
>       HTML::Template
>       HTML::Embperl
>   
> First, are there any others that I should look at? Also I'd really like
> any objective input people have about templating with these modules. It
> is important to me to try and not just get the article done and dusted,
> but for once to write a piece of text that I am happy with.

Very simple, but what I've done in the past is simply read in a file and
do something like:

    $text =~ s/\$(\w+)/$1/eeg;

Which substitutes any perl vars in the file for stuff in your current
program.  Not very pretty, but cheap and easy.

-Dom

-- 
| Semantico: creators of major online resources          |
|       URL: http://www.semantico.com/                   |
|       Tel: +44 (1273) 722222                           |
|   Address: 33 Bond St., Brighton, Sussex, BN1 1RD, UK. |

Reply via email to