Can someone explain what exactly is ':syntax' for? Is the failing test the intended behaviour or a bug?
Lol ok :) Compare https://metacpan.org/module/Dancer#syntax to https://metacpan.org/module/Dancer#script
script loads config while syntax only exports get/true/.... all the dancer functions
In t/002_index_route.t it says
# the order is important
use MyDancerApp;
use Dancer::Test;
Well, if you remove ':syntax' from your dancer app.pm, then you need to switch the order, in t/002_index_route.t, and the test will pass
I think there are a number of seriousbasic bugs in there but I'm not sure what they are or which is most important
- the docs for :syntax are thin on the details, but don't link to all the details ("set up your app" is magic talk)
-
definitely the docs need updating to explain this and the order comment update: well Dancer::Test explains
Be careful, the module loading order in the example above is very
important. Make sure to use "Dancer::Test" after importing the
application package otherwise your appdir will be automatically set to
"lib" and your test script won't be able to find views, conffiles and
other application content.
This is dumb
- the template should be updated if the order matterrs, esp since the update works regardless of the options in the .pm
- the order shouldn't matter , but since it does, a lame comment in a template is inadequate -- Dancer::Test should die/croak when its loaded too late or too early with an error message that explains what you need to do
- at the very least you should be warned about changing the templates, because magic breaks magically
- the app should croak if the appdir is wrong
- the appdir should never be set wrong , app should die if appdir can't be set correctly
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.