NAME
Oak::Web::Additional::Template - Component for adding free text
DESCRIPTION
This module will be used to insert free text inside your web page. It will substitute text enclosed by <% and %> with the key setted in the __VARS__ property.
HIERARCHY
Oak::Object
Oak::Persistent
Oak::Component
Oak::Web::Visual
Oak::Web::Additional::Template
PROPERTIES
- type
-
file or string. If type eq file, it will try to open the source and use it. Else it will print the source.
- source
-
This property indicates where is the source file to be printed or if the type is string, the code itself.
- __VARS__
-
There is a shortcut method to set this, set_vars. This property contains a hashref to the list of variables to be substituted.
METHODS
EXCEPTIONS
The following exceptions are introduced by Oak::Web::Additional::Template
- Oak::Web::Additional::Template::Error::FileNotFound
-
When source file is not found this error is thrown
EXAMPLES
text.htm
-----------
Hi <%fullName%>,
It is a pleasure to meet you.
Cheers
-----------
The method set_vars will receive a hash with the variables to
be substituted.
When you want to substitute some variable put its name between <% and %>
COPYRIGHT
Copyright (c) 2001 Daniel Ruoso <daniel@ruoso.com> All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.