<p>Hi David,</p>
<p>i will watch video thank you very much </p>
<div class="gmail_quote">08 Nis 2015 17:37 tarihinde "David H" <<a href="mailto:untg99@gmail.com">untg99@gmail.com</a>> yazdı:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 8, 2015 at 10:00 PM, Kadir Beyazlı <span dir="ltr"><<a href="mailto:kadirbeyazli@gmail.com" target="_blank">kadirbeyazli@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>Hi All,<br><br></div>Because I am new at Dancer, I may be asking easy questions, sorry for this issue.<br></div>I read document from following link and everything is clear for me :<br><div><div><div><i><br><a href="https://metacpan.org/pod/Dancer2::Tutorial" target="_blank">https://metacpan.org/pod/Dancer2::Tutorial</a></i><br><br></div><div>I understood full example which is located at the end of page.<br></div><div>But I tried a very very simple example and it failed!. <br><br></div><div>Here it is<br><br></div><div>I have file called <i><a href="http://test.pl" target="_blank">test.pl</a></i> <i></i>with very simple content:<br><br><b><i>MyApp/public/<a href="http://test.pl" target="_blank">test.pl</a> </i></b><br><i>use Dancer2;<br>use Template;<br><br>set 'layout'    => 'main';<br>set 'template'  => 'template_toolkit';<br><br>get '/' => sub {<br>     "hello"<br>};<br><br>start;</i><br></div><div><br></div><div>When I run it  and write <i><a href="http://localhost:3000/" target="_blank">http://localhost:3000/</a></i> to browser I see word 'hello' but I don't see layout info of <a href="http://main.tt" target="_blank">main.tt</a>. Its content is below :<br><br></div><div><i><b>MyApp/views/layouts</b><b>/<a href="http://main.tt" target="_blank">main.tt</a></b><br><!doctype html><br><html><br><head><br>  <title>Test</title><br></head><br><body><br>  <div><br><span style="background-color:rgb(255,255,0)">  Before content</span><br>  [% content %]  <br>  </div><br></body><br></html></i><br><br></div><div>I expect to see yellow backgrounded word <i>"Before content"</i> but I don't see.<br><br></div><div>Another problem is that I change code as follow:<br><br><b><i>MyApp/public/<a href="http://test.pl" target="_blank">test.pl</a> </i></b><br><i>use Dancer2;<br>use Template;<br><br>set 'layout'    => 'main';<br>set 'template'  => 'template_toolkit';<br><br>get '/' => sub {<br>    template '<a href="http://mytemplate.tt" target="_blank">mytemplate.tt</a>', {<br>        'word' => 'test',<br>  };<br>};<br><br>start;<br></i><br></div><div>When I open web page I see error message, and at console there is following error message:<br><br><i>/home/kadir/DancerExamples/willbe/public/views/<a href="http://mytemplate.tt" target="_blank">mytemplate.tt</a> is not a regular file or reference at /usr/local/share/perl/5.20.1/Dancer2/Core/Role/Template.pm line 126. in /usr/local/share/perl/5.20.1/Dancer2/Core/App.pm l. 1145<br>[main:5105] error @2015-04-08 15:06:48> Route exception: /home/kadir/DancerExamples/willbe/public/views/<a href="http://mytemplate.tt" target="_blank">mytemplate.tt</a> is not a regular file or reference at /usr/local/share/perl/5.20.1/Dancer2/Core/Role/Template.pm line 126. in /usr/local/share/perl/5.20.1/Dancer2/Core/App.pm l. 1145<br></i><br></div><div>content of <i><a href="http://mytemplate.tt" target="_blank">mytemplate.tt</a></i> is very simple again<br><br><i><b>MyApp/views/mytemplate</b><b><a href="http://main.tt" target="_blank">.tt</a></b><br><div>[% word %]</div><br><br></i></div><div>What is wrong ?<span><font color="#888888"><br><i><br></i></font></span></div><span><font color="#888888"><div><div><div dir="ltr"><div><b><i>Kadir Beyazlı<br>Computer Engineer</i></b></div><div><b><i>GSM : <a href="tel:%2B90%20535%20821%2050%2000" value="+905358215000" target="_blank">+90 535 821 50 00</a></i></b><br></div></div></div>
</div></font></span></div></div></div>
<br>_______________________________________________<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" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br></blockquote></div>Hi Kadir,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Welcome to the awesome Dancer world!</div><div class="gmail_extra">Due to it being quite late here (12 Midnight) and I've just logged on to work on (another) Dancer application, I would like to suggest only a short 20 minute tutorial which will go through a lot of what you have discussed.</div><div class="gmail_extra">I created this for the purpose of showing people a basic setup of Dancer2 and how to get started.</div><div class="gmail_extra"><a href="https://www.youtube.com/watch?v=O7dO3K-krrg" target="_blank">https://www.youtube.com/watch?v=O7dO3K-krrg</a></div><div class="gmail_extra">I plan on expanding in the near future and working on some suggestions from people but the video should give a really good idea on how to install the application and dependancies, make changes, create a route and modify the front page.</div><div class="gmail_extra"><br></div><div class="gmail_extra">So that might get you started in answering some questions but there are other experts here who can answer specifically the stuff you've raised above, especially if the video does not.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Kind Regards,</div><div class="gmail_extra"><br></div><div class="gmail_extra">David</div><div class="gmail_extra"><br></div></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" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br></blockquote></div>