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


Text-MetaMarkup documentation  | view source Contained in the Text-MetaMarkup distribution.

Index


NAME

Top

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

SYNOPSIS

Top

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

DESCRIPTION

Top

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

Top

(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

Top

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

Top

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


Text-MetaMarkup documentation  | view source Contained in the Text-MetaMarkup distribution.