<div dir="ltr"><div>Sure enough. That did the trick. On to make the changes that John prescribed above. Will let everone know how it goes.<br><br></div>Thanks very much.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-10 8:49 GMT-05:00 Tony Edwardson <span dir="ltr"><<a href="mailto:tony@edwardson.co.uk" target="_blank">tony@edwardson.co.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
That is because the default delimiters for Template toolkit are [%
and %] <br>
You have two choices :<br>
uncomment the start and end tag definitions in your config to <%
and %><br>
template: "template_toolkit"<br>
engines:<br>
template:<br>
template_toolkit:<br>
start_tag: '<%'<br>
end_tag: '%>'<br>
<br>
or change the delimeters in views/<a href="http://index.tt" target="_blank">index.tt</a> and views/layouts/<a href="http://main.tt" target="_blank">main.tt</a>
to use the template toolkit default.<br>
i.e. <% to [% and %> to %]<br>
<br>
Cheers<br>
Tony<div><div class="h5"><br>
<br>
<div>On 10/08/2015 14:33, Richard Reina
wrote:<br>
</div>
</div></div><blockquote type="cite">
<div dir="ltr">
<div>
<div><div><div class="h5">
<div>Yes, Dancer2 Template Toolkit is installed. Curiosly
when I swithc back to simple template in config.yml the
basic dancer app works. So I do not understand why it
would not if TToolkit is installed. However, when I
switch to TToolkit I continue to get this in my browser:<br>
<br>
<% content %>
<div>
Powered by <a href="http://perldancer.org/" target="_blank">Dancer2</a> <%
dancer_version %><br>
<br>
</div>
Here is the output from the console.<br>
<br>
richard@gemini:~/Dancer2/MyApp$ plackup -r bin/app.psgi<br>
Watching bin/lib bin/app.psgi for file updates.<br>
HTTP::Server::PSGI: Accepting connections at <a href="http://0:5000/" target="_blank"></a><a href="http://0:5000/" target="_blank">http://0:5000/</a><br>
[MyApp:2230] core @2015-08-10 07:47:43> looking for get
/ in /home/richard/perl5/lib/perl5/Dancer2/Core/App.pm l.
1180<br>
[MyApp:2230] core @2015-08-10 07:47:43> Entering hook
core.app.before_request in (eval 78) l. 1<br>
[MyApp:2230] core @2015-08-10 07:47:43> Entering hook
core.app.after_request in (eval 78) l. 1<br>
127.0.0.1 - - [10/Aug/2015:07:47:43 -0500] "GET /
HTTP/1.1" 200 835 "-" "Mozilla/5.0 (X11; Linux i686;
rv:39.0) Gecko/20100101 Firefox/39.0"<br>
[MyApp:2230] core @2015-08-10 07:47:43> looking for get
/<% request.uri_base %>/css/style.css in
/home/richard/perl5/lib/perl5/Dancer2/Core/App.pm l. 1180<br>
[MyApp:2230] core @2015-08-10 07:47:43> Entering hook
core.error.init in (eval 78) l. 1<br>
[MyApp:2230] core @2015-08-10 07:47:43> Entering hook
core.error.before in (eval 78) l. 1<br>
[MyApp:2230] core @2015-08-10 07:47:43> Entering hook
core.error.after in (eval 78) l. 1<br>
127.0.0.1 - - [10/Aug/2015:07:47:43 -0500] "GET
/%3C%%20request.uri_base%20%%3E/css/style.css HTTP/1.1"
404 522 "<a href="http://0:5000/" target="_blank">http://0:5000/</a>"
"Mozilla/5.0 (X11; Linux i686; rv:39.0) Gecko/20100101
Firefox/39.0"<br>
[MyApp:2230] core @2015-08-10 07:52:35> looking for get
/ in /home/richard/perl5/lib/perl5/Dancer2/Core/App.pm l.
1180<br>
[MyApp:2230] core @2015-08-10 07:52:35> Entering hook
core.app.before_request in (eval 78) l. 1<br>
[MyApp:2230] core @2015-08-10 07:52:35> Entering hook
core.app.after_request in (eval 78) l. 1<br>
127.0.0.1 - - [10/Aug/2015:07:52:35 -0500] "GET /
HTTP/1.1" 200 835 "-" "Wget/1.13.4 (linux-gnu)"<br>
<br>
<br>
</div>
<div>Here is my ouput from wget.<br>
</div>
</div></div><div><div><div class="h5"><br>
richard@gemini:~/Dancer2/MyApp$ wget -O - <a href="http://0:5000/" target="_blank"></a><a href="http://0:5000/" target="_blank">http://0:5000/</a><br>
--2015-08-10 08:32:23-- <a href="http://0:5000/" target="_blank">http://0:5000/</a><br>
Resolving 0 (0)... 0.0.0.0<br>
Connecting to 0 (0)|0.0.0.0|:5000... connected.<br>
HTTP request sent, awaiting response... 200 OK<br>
Length: 835 [text/html]<br>
Saving to: `STDOUT'<br>
<br>
0%
[
] 0 --.-K/s <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br>
"<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"><br>
<html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>"><br>
<head><br></div></div>
<meta http-equiv="Content-type" content="text/html;
settings.charset %>" /><div><div class="h5"><br>
<title>MyApp</title><br>
<link rel="stylesheet" href="<% request.uri_base
%>/css/style.css" /><br>
<br>
<!-- Grab jQuery from a CDN, fall back to local if
necessary --><br>
<script src="//<a href="http://code.jquery.com/jquery-1.11.1.min.js" target="_blank">code.jquery.com/jquery-1.11.1.min.js</a>"></script><br>
<script type="text/javascript">/* <![CDATA[ */<br>
!window.jQuery && document.write('<script
type="text/javascript" src="<% request.uri_base
%>/javascripts/jquery.js"><\/script>')<br>
/* ]]> */</script><br>
<br>
</head><br>
<body><br>
<% content %><br>
<div id="footer"><br>
Powered by <a href="<a href="http://perldancer.org/" target="_blank">http://perldancer.org/</a>">Dancer2</a>
<% dancer_version %><br>
</div><br>
</body><br>
</html><br>
100%[========================================================================================>]
835 --.-K/s in 0s <br>
<br>
2015-08-10 08:32:23 (77.0 MB/s) - written to stdout
[835/835]<br>
<br>
<br>
<br>
</div></div></div><div><div class="h5">
Again, this is just the basic Dancer2 app created with: $:
Dancer2 -a MyApp. <br>
<br>
</div></div></div><div><div class="h5">
Here is my config.yml file.<br>
<br>
# This is the main configuration file of your Dancer2 app<br>
# env-related settings should go to environments/$env.yml<br>
# all the settings in this file will be loaded at Dancer's
startup.<br>
<br>
# Your application's name<br>
appname: "MyApp"<br>
<br>
# The default layout to use for your application (located in<br>
# views/layouts/<a href="http://main.tt" target="_blank">main.tt</a>)<br>
layout: "main"<br>
<br>
# when the charset is set to UTF-8 Dancer2 will handle for you<br>
# all the magic of encoding and decoding. You should not care<br>
# about unicode within your app when this setting is set
(recommended).<br>
charset: "UTF-8"<br>
<br>
# template engine<br>
# simple: default and very basic template engine<br>
# template_toolkit: TT<br>
<br>
#template: "simple"<br>
<br>
template: "template_toolkit"<br>
# engines:<br>
# template:<br>
# template_toolkit:<br>
# start_tag: '<%'<br>
# end_tag: '%>'<br>
<br>
</div></div></div>
Thanks for any help.<br>
<br>
<br>
</div><div><div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-08-07 18:06 GMT-05:00 Warren Young
<span dir="ltr"><<a href="mailto:wyml@etr-usa.com" target="_blank">wyml@etr-usa.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Aug 7, 2015, at 4:00 PM, Richard Reina <<a href="mailto:gatorreina@gmail.com" target="_blank"></a><a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>>
wrote:<br>
><br>
> get this in the browser:<br>
><br>
> <% content %><br>
> Powered by Dancer2 <% dancer_version %><br>
<br>
</span>It looks like Dancer is not expanding the templates.
Are you sure Template::Toolkit installed correctly?<br>
<br>
Try “sudo cpanm Dancer2”, and see if it installs anything
that wasn’t there before.<br>
<div>
<div>_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm" target="_blank">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
dancer-users mailing list
<a href="mailto:dancer-users@dancer.pm" target="_blank">dancer-users@dancer.pm</a>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a>
</pre>
</div></div></blockquote>
<br>
</div>
<br>_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br></blockquote></div><br></div>