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:
<% content %>
Here is the output from the console.
richard@gemini:~/Dancer2/MyApp$ plackup -r bin/app.psgi
Watching bin/lib bin/app.psgi for file updates.
HTTP::Server::PSGI: Accepting connections at
http://0:5000/
[MyApp:2230] core @2015-08-10 07:47:43> looking for get
/ in /home/richard/perl5/lib/perl5/Dancer2/Core/App.pm l.
1180
[MyApp:2230] core @2015-08-10 07:47:43> Entering hook
core.app.before_request in (eval 78) l. 1
[MyApp:2230] core @2015-08-10 07:47:43> Entering hook
core.app.after_request in (eval 78) l. 1
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"
[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
[MyApp:2230] core @2015-08-10 07:47:43> Entering hook
core.error.init in (eval 78) l. 1
[MyApp:2230] core @2015-08-10 07:47:43> Entering hook
core.error.before in (eval 78) l. 1
[MyApp:2230] core @2015-08-10 07:47:43> Entering hook
core.error.after in (eval 78) l. 1
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 "
http://0:5000/"
"Mozilla/5.0 (X11; Linux i686; rv:39.0) Gecko/20100101
Firefox/39.0"
[MyApp:2230] core @2015-08-10 07:52:35> looking for get
/ in /home/richard/perl5/lib/perl5/Dancer2/Core/App.pm l.
1180
[MyApp:2230] core @2015-08-10 07:52:35> Entering hook
core.app.before_request in (eval 78) l. 1
[MyApp:2230] core @2015-08-10 07:52:35> Entering hook
core.app.after_request in (eval 78) l. 1
127.0.0.1 - - [10/Aug/2015:07:52:35 -0500] "GET /
HTTP/1.1" 200 835 "-" "Wget/1.13.4 (linux-gnu)"
Here is my ouput from wget.
richard@gemini:~/Dancer2/MyApp$ wget -O -
http://0:5000/
--2015-08-10 08:32:23--
http://0:5000/
Resolving 0 (0)... 0.0.0.0
Connecting to 0 (0)|0.0.0.0|:5000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 835 [text/html]
Saving to: `STDOUT'
0%
[
] 0 --.-K/s <!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">
<head>
<meta http-equiv="Content-type" content="text/html;
settings.charset %>" />
<title>MyApp</title>
<link rel="stylesheet" href="<% request.uri_base
%>/css/style.css" />
<!-- Grab jQuery from a CDN, fall back to local if
necessary -->
<script src="//
code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript">/* <![CDATA[ */
!window.jQuery && document.write('<script
type="text/javascript" src="<% request.uri_base
%>/javascripts/jquery.js"><\/script>')
/* ]]> */</script>
</head>
<body>
<% content %>
<div id="footer">
Powered by <a href="
http://perldancer.org/">Dancer2</a>
<% dancer_version %>
</div>
</body>
</html>
100%[========================================================================================>]
835 --.-K/s in 0s
2015-08-10 08:32:23 (77.0 MB/s) - written to stdout
[835/835]
Again, this is just the basic Dancer2 app created with: $:
Dancer2 -a MyApp.