On Fri, May 04, 2012 at 08:16:01PM +0200, Manfred Lotz wrote:
> Hi there,
> I'm looking for a Perl preprocessor which should roughly be able to
> work like this: 
> 
> In a document I have begin and end markers, say ## for both. Between
> those end markers there is perl code which should be run and everything
> which goes to stdout should go into the document. 
> 
> The code should be lexical in a way that later code could refer to
> previous code.
> 
> Primitive example: 
> 
> This is a sample document.
> ## my $name = 'Manfred Lotz';  ## 
> My name is ## print $name; ## and I'm from Germany.
> 
> should result in the following document:
> 
> This is a sample document.
> My name is Manfred Lotz and I'm from Germany.
> 
> 
> Does anybody know about a module which could do this?

That sounds like something that Mason could do.  And I expect there are
a number of other modules on CPAN that could also manage that.  But take
a look at https://metacpan.org/module/Mason

Good luck,

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to