[Dancer-users] Version numbers hard coded in templates

ambs ambs+dancer at perl-hackers.net
Sat Feb 26 19:09:44 CET 2011


I remember to see that hardcoded, but I am almost sure it got fixed for 
1.3x versions.

Yes, confirmed it. It is already fixed in the views/layout/main.tt footer.

Regarding views/index.tt, and specifically the piece of code you show, I 
do not think it is that relevant, as most users would delete that piece 
of code.

But it isn't hard to fix :)

Cheers

On 26/02/2011 18:04, Brian E. Lozier wrote:
> I'm talking about the application generated with dancer -a myapp.  If
> you go to the page after that you have a link called "About your
> application's environment" and when you click it, it expands and shows
> perl version, dancer version, etc.  The template is called
> views/index.tt and the lines are generated at some point and look like
> this:
>
>              <table>
>                  <tbody>
>                  <tr>
>                      <td>Perl version</td>
>                      <td><tt>5.012002</tt></td>
>                  </tr>
>                  <tr>
>                      <td>Dancer version</td>
>                      <td><tt>1.3011</tt></td>
>                  </tr>
>                  <tr>
>                      <td>Backend</td>
>                      <td><tt><% settings.apphandler %></tt></td>
>                  </tr>
>                  <tr>
>                      <td>Appdir</td>
>                      <td><tt>/home/brian/projects/dancertest2</tt></td>
>                  </tr>
>                  <tr>
>                      <td>Template engine</td>
>                      <td><tt><% settings.template %></tt></td>
>                  </tr>
>                  <tr>
>                      <td>Logger engine</td>
>                      <td><tt><% settings.logger %></tt></td>
>                  </tr>
>                  <tr>
>                      <td>Running environment</td>
>                      <td><tt><% settings.environment %></tt></td>
>                  </tr>
>                  </tbody>
>              </table>
>
> I think using the dancer_version as you indicated would be a perfect solution.
>
> I had originally generated my app with dancer 1.2xx and later upgraded
> to 1.3xx and was confused when I went back to the app and the version
> number had not changed.  This is not a big deal!
>
> Thanks,
> Brian
>
> On Sat, Feb 26, 2011 at 9:15 AM, sawyer x<xsawyerx at gmail.com>  wrote:
>> On Fri, Feb 25, 2011 at 5:50 PM, Brian E. Lozier<brian at massassi.com>  wrote:
>>>
>>> I realize these pages are meant to
>>> be replaced with my code but it would be cool if it would report the
>>> version correctly.
>>
>> If you're referring to the "Powered by Dancer ..." at the bottom of the
>> pages, you're absolutely right, and it's now done this way.
>> We use a variable that is added by the abstract layer of templates, called
>> "dancer_version".
>>
>> Here's from the main.tt I just scaffolded:
>> Powered by<a href="http://perldancer.org/">Dancer</a>  <% dancer_version %>
>>
>> All the best,
>> Sawyer.
>>
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users



More information about the Dancer-users mailing list