GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TEXT::MICROTEMPLATE::EXTENDED.JA (3)

.ds Aq ’

NAME

Text::MicroTemplate::Extended::ja - Japanese document

CONTENTS

SYNOPSIS



    use Text::MicroTemplate::Extended;
   
    my $mt = Text::MicroTemplate::Extended->new(
        include_path  => [/path/to/document_root],
        template_args => { c => $c, stash => $c->stash, },
    );
   
    $mt->render(content); # render file: /path/to/document_root/content.mt



DESCRIPTION

Text::MicroTemplate::Extended X Text::MicroTemplate::File XXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXX Text::MicroTemplate::File XXXXXXXXXXXXXXX

XXXXXXX

    XXXXXXXXX

XXXXXXXXXX Django XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Text::MicroTemplate::Extended XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:



    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <link rel="stylesheet" href="style.css" />
        <title><? block title => sub { ?>My amazing site<? } ?></title>
    </head>
   
    <body>
        <div id="sidebar">
            <? block sidebar => sub { ?>
            <ul>
                <li><a href="/">Home</a></li>
                <li><a href="/blog/">Blog</a></li>
            </ul>
            <? } ?>
        </div>
   
        <div id="content">
            <? block content => sub {} ?>
        </div>
    </body>
    </html>



XXXXXXXXXXXXX 2 XXXXXXXXXXXXXXX HTML XXXXXXXXXXXXXXXXXX base.mt XXXXXXXXXXXXXXXXXXXXXXXXXXXX (child)XXXXXXXXXXXXXX

XXXXXX <? block ?> XXXXXX 3 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX block XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXX:



    ? extends base
   
    <? block title => sub { ?>My amazing blog<? } ?>
   
    ? block content => sub {
    ? for my $entry (@$blog_entries) {
        <h2><?= $entry->title ?></h2>
        <p><?= $entry->body ?></p>
    ? } # endfor
    ? } # endblock



<? extends base ?> XXXXXX ? extends baseXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX (extend) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX base.mt XXXXXX

XXXXXXXXXXXXXXXXXXXX base.mt XXXXXX <? block ?> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX blog_entries XXXXXXXXXXXXXXXXXXXX:



    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <link rel="stylesheet" href="style.css" />
        <title>My amazing blog</title>
    </head>
   
    <body>
        <div id="sidebar">
            <ul>
                <li><a href="/">Home</a></li>
                <li><a href="/blog/">Blog</a></li>
            </ul>
        </div>
   
        <div id="content">
            <h2>Entry one</h2>
            <p>This is my first entry.</p>
   
            <h2>Entry two</h2>
            <p>This is my second entry.</p>
        </div>
    </body>
    </html>



XXXXXXXXX sidebar XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX <? block ?> XXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:
1. XXXXXXXXXXXXXXXXXX base.mt XXXXXXXXXXXXX
2. XXXXXXXXXXXXXXX base_SECTIONNAME.mt XXXXXXXXXXXXXXXXXX base_news.mt, base_sports.mt XXXXXXXXXXXXXXXXXXXXX base.mt XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
3. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXX:
o XXXXXXX <? extends ?> XXXXXX1XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
o XXXXXXXXXXX <? block ?> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
o XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX <? block ?> XXXXXXXXXXXXXXX
o XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX <?= super() ?> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX <?= super() ?> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
o XXXXXXXXXXXXXXXXXXXXX <? } # endblock ?> XXXXXX XX XXXXXXX:



    <? block content => sub { ?>
    ...
    <? } # endblock content ?>

 XXXXXXXXXXXXXXXXX C<<? block ?>> XXXXXXXXXXXXXXXXXX



XXXXXXXXXXXXXXXXXXX <? block ?> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXX <? block ?> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX <? block ?> XXXXXXXXXXXXXXXXXXXXXXXXXXX

    XXXXXX

Text::MicroTemplate::Extended XXXXXXXXXXXX template_args XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



    my $mf = Text::MicroTemplate::Extended->new(
        template_args => { foo => bar, },
        ...
    );



XXXXXX



    <?= $foo ?>



X bar XXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



    my $mf = Text::MicroTemplate::Extended->new(
        template_args => { foo => sub { $self->get_foo() } },
        ...
    );



XXXXXXXXXXXXXX <?= $foo ?> X $self->get_foo XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    XXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



    my $mh = Text::MicroTemplate::Extended->new(
        macro => {
            hello => sub { return Hello World! },
        },
        ...
    );



XXXXXXXXXXXXXX hello XXXXXXXXXXXXXXXXXX



    <?= hello() ?>  # => Hello World!



XXXXX $key => $coderef XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXvalueXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX hello XXXXXXXXXXXXXXXXXXXXXXXXX



    my $mh = Text::MicroTemplate::Extended->new(
        macro => {
            hello => Hello World!,
        },
        ...
    );



    XXXXXX

XXXXXX Text::MicroTemplate::File XXXXXXXXXXXXXXXXXXXXXXX



    $mf->render_file(template_name.mt);



XXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXX .mt XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXText::MicroTemplate::Extended XX extension XXXXXXXXXXXXXXXX



    my $mf = Text::MicroTemplate::Extended->new(
        extension => .mt,
        ...
    );



XXXXXXXXXXXX



    $mf->render_file(template_name);



XXXXXXX template_name.mt XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXextension => .mt XXXX <? extends base ?> XXXXXXX base.mt XXXXXXXX

XXXXXXXXXXXXXXX .mt XXXXXXXXXX

    renderXXXXXXXXX

Text::MicroTemplate::File XX render_file XXXXXXXXXXXXXXXXXXXXXXXrender XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXText::MicroTemplate::Extended XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXText::MicroTemplate::Extended XX render XXXXX render_file XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



    $mf->render(template_name);
    $mf->render_file(template_name);



XXXXXXXXXXXX

METHODS

    new (%options)



    my $mf = Text::MicroTemplate::Extended->new(
        extension     => .mt,
        template_args => { c => $c, stash => $c->stash },
    );



Text::MicroTemplate::Extended XXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXX
extension XXXXXXXXXXXXXXXXXXXXXXXXXXXX .mt XX)
template_args XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
macro XXXXXXXXXXXXmacroXXXXXXXXXXXXXXXXXX
XXXXXXXXXXX Text::MicroTemplate::File XXXXXXXXXX

render ($template_name, CW@args)

render_file ($template_name, CW@args)

$template_name XXXXXXXXXXXXXXXXXXXXXXXXXXXX

INTERNAL METHODS

    build

    eval_builder

    template_args

    extension

    render_context

AUTHOR

Daisuke Murase <typester@cpan.org>

COPYRIGHT AND LICENSE

Copyright (c) 2009 by KAYAC Inc.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TEXT::MICROTEMPLATE::EXTENDED.JA (3) 2012-06-27

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.