The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

CGI::okTemplate - Perl extension for easy creating websites with using templates

SYNOPSIS

use CGI::okTemplate;
my $tmp = new CGI::okTemplate();
$tmp->read_template('t/test.tpl');
print $tmp->parse($data);

DESCRIPTION

This is an object oriented template module which parses template files and puts data instead of macros.

Srtucture of the template file is:

Document: <Items>

Items: <Item> | <Item><Items>

Item: <Text> | <Block> | <Macro> | NOTHING

Text: <Symbols>

Symbols: <Symbol> | <Symbol><Symbols>

Symbol: <NameSymbol> | !<NameSymbol>

Block: <!--TemplateBlock <BlockName>--><Items><!--/TemplateBlock <BlockName>-->

BlockName: <NameSymbols>

NameSymbols: <NameSymbol>[<NameSymbols>]

NameSymbol: ['A'..'Z''a'..'z''0'..'9''_'<Space>]

Space: [\s\t]

Macro: <%<Spaces>?<MacroName><Spaces>?%>

Spaces: <Space> | <Space><Spaces>

MacroName: <NameSymbols>

You can put Blocks inside outer Blocks.

Stub documentation for CGI::okTemplate, created by h2xs. It looks like the author of the extension was negligent enough to leave the stub unedited.

EXPORT

None by default.

SEE ALSO

Mention other useful documentation such as the documentation of related modules or operating system documentation (such as man pages in UNIX), or any relevant external documentation such as RFCs or standards.

If you have a mailing list set up for your module, mention it here.

If you have a web site set up for your module, mention it here.

AUTHOR

Oleg Kobyakovskiy, <ok &at; softaddicts &dot; com>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Oleg Kobyakovskiy

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.