Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More example

  • Loading branch information...
commit 8d4171f02baf8b4a40c48418d50fa8d3bda78464 1 parent 6eb4b9f
@tomill authored
Showing with 25 additions and 0 deletions.
  1. +25 −0 lib/Template/Semantic/Cookbook.pod
View
25 lib/Template/Semantic/Cookbook.pod
@@ -207,6 +207,31 @@ Output:
</div>
+=head2 Email template?
+
+You should use the module like Template::Toolkit ;)
+But if you want to use this module anyway,
+
+ my $out = $ts->process(\*DATA, {
+ 'name' => 'Foo & Co.',
+ });
+
+ my $body = $out->dom->documentElement->findvalue('//*[@class="body"]');
+
+ __DATA__
+ <html>
+ Subject: <b class="subject">Dear <name>name</name></b>
+ <hr />
+
+ Body:
+ <pre class="body">Dear <name>name</name>,
+
+ bla bla
+ bla bla
+ </pre>
+ </html>
+
+
=head2 Include
It is easy to substitute another C<process()>.
Please sign in to comment.
Something went wrong with that request. Please try again.