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

NAME

Text::MetaMarkup::AddOn::Perl - Add-on for MM to support embedded Perl

SYNOPSIS

    package Text::MetaMarkup::Subclass;
    use base qw(Text::MetaMarkup Text::MetaMarkup::AddOn::Perl);

DESCRIPTION

Text::MetaMarkup::AddOn::Perl adds support for the following special tags:

Paragraph tag perl

Executes a block of Perl in its own lexical scope. If the returned value is an array reference, the elements are parsed as paragraphs, other return values are discarded. Use of print is useless, assign to a variable instead.

Inline tag perl

Evaluates a Perl expression in scalar context in its own lexcial scope. The returned value is interpolated (parsed as paragraph text).

EXAMPLE

(When used together with Text::MetaMarkup::HTML)

Input

    h2: Now is {perl:localtime}

    perl:
    [ map "p: $_", 1..3 ]

Output

    <h2>Now is Mon Jun  9 19:17:07 2003</h2>

    <p>1</p>

    <p>2</p>

    <p>3</p>

LICENSE

There is no license. This software was released into the public domain. Do with it what you want, but on your own risk. The author disclaims any responsibility.

AUTHOR

Juerd Waalboer <juerd@cpan.org> <http://juerd.nl/>