Switch branches/tags
Commits on Feb 29, 2012
  1. fix bug #751

    dams committed Feb 29, 2012
Commits on Feb 22, 2012
  1. More helpful core log message when trying to match routes.

    bigpresh committed Feb 22, 2012
    Include the method, and the pattern the compiled regex was generated from.
Commits on Feb 16, 2012
  1. Merge pull request #745 from sukria/feature/auto_page_fixup

    bigpresh committed Feb 16, 2012
    Re-implementing auto_page feature with more sanity
  2. Bugfix: only consider files in view_exists().

    bigpresh committed Feb 16, 2012
    Before, it could return true if a directory with the given name existed, which
    isn't what we want.
    See also c0f1c33 for a similar change.
  3. Avoid a pesky uninitialized value warning.

    bigpresh committed Feb 16, 2012
    No need for a silly warning if view_exists() is passed undef.
  4. Further tests for auto_page feature.

    bigpresh committed Feb 16, 2012
    Test that views in subdirs are served appropriately, and that directory indexes
    (e.g. requesting /foo/ gets views/foo/ work.
  5. Expect a 404 for a non-existent page, not a 500.

    bigpresh committed Feb 16, 2012
    For some reason, t/03_route_handler/18_auto_page.t expected a non-existent page
    to return a 500 error rather than a 404, which seems stupid and wrong.
    Unless I'm missing something, this test was merely expecting retarded behaviour
    which was previously present, and needs to be updated for now-sane behaviour.
  6. Remove documentation for deprecated before/before_template/after

    bigpresh committed Feb 16, 2012
    Replace detailed docs with a pointer to the hook keyword.
  7. Merge pull request #747 from DrHyde/devel

    bigpresh committed Feb 16, 2012
    fix test failure introduced in 65e84b2
  8. Merge pull request #746 from sukria/feature/before_hook_param

    bigpresh committed Feb 16, 2012
    Pass route handler to before hooks
Commits on Feb 15, 2012
  1. Provide the route handler to before hooks.

    bigpresh committed Feb 15, 2012
    When calling a before hook, pass a reference to the route handler about to be
    executed as a parameter.
  2. Merge pull request #744 from skington/verboser_crashes

    bigpresh committed Feb 15, 2012
    Mention the method when a route crashes.
  3. Refactor to handle index.$tmpl_ext for "dir index".

    bigpresh committed Feb 15, 2012
    If we don't find a direct match for `views/$path`, try appending `/index` to the
    path and looking again.
    This means that, if the request was for `/foo` and we didn't have
    `views/foo`, we'll then look for `views/foo/`, and use that if found.
    This is something I've missed for a long time, and makes the auto_page feature a
    lot more useful, I think.
  4. Re-implementing auto-page feature in D::Renderer.

    bigpresh committed Feb 15, 2012
    Instead of adding a route to the app to catch requests for /:page and see if we
    can handle that, and pass if not, add a new `render_autopage()` to
    `Dancer::Renderer` which is called by `Dancer::Handler` if no route / static
    file matched.
    This immediately makes the auto_page feature more usable, as it can handle
    sub-directories properly now (e.g. given a request for `/foo/bar`, a view named
    `foo/` will be rendered, as you'd expect).
    (Heh, look at that - the commit message explaining is almost as long as the code
    needed to just fucking do it :) )
  5. Remove auto_page setting code which adds /:page route.

    bigpresh committed Feb 15, 2012
    There's a far better way coming in the next few commits.
  6. Bugfix: only match files as views.

    bigpresh committed Feb 15, 2012
    Dancer::Template::Abstract::view() used `-e` to test for existence of a view to
    render; this means it would return directory names, which is obviously not good
    - a directory can't be rendered as a view :)
  7. Merge pull request #743 from kimmel/devel

    bigpresh committed Feb 15, 2012
    Things I found as a first time dancer user
  8. Changed all instances of before_template to before_template_render.

    kimmel committed Feb 15, 2012
    This provides a consistant example throughout the documentation.
  9. 'before_template' is just being translated to 'before_template_render'

    kimmel committed Feb 15, 2012
    on line 30 of Why not just have all the examples refer to
    before_template_render instead.
  10. Updated before, after, before_template to use hooks since the

    kimmel committed Feb 15, 2012
    previous functions have been deprecated since version 1.3080.
Commits on Feb 14, 2012
  1. Clarify skipping export of certain keywords.

    bigpresh committed Feb 14, 2012
    Prompted by @DrHyde.
    It was already documented, but not in big flashing red capitals, so was somewhat
    obscured by the awesomeness of his beard, I believe.
  2. Doc tweak - mention del, but not before/after in EXPORTS.

    bigpresh committed Feb 14, 2012
    In the example for exporting only the "route controllers", remove before & after
    (as they're deprecated, and it's arguable whether they ever really belonged
    there), and add del.
    Prompted by @skington - cheers Sam.
  3. Merge pull request #740 from skington/d4eb3dac44015815352ec5bd61bc4d1…

    bigpresh committed Feb 14, 2012
    Handle UTF8 more robustly
Commits on Feb 9, 2012
Commits on Jan 31, 2012
  1. Same typo as fixed in previous commit

    bigpresh committed Jan 31, 2012
    Thanks again @bor :)
Commits on Jan 30, 2012
  1. Update CHANGES

    bigpresh committed Jan 30, 2012
  2. Add exception type ::Core::Request.

    bigpresh committed Jan 30, 2012
    Fixes GH-738.
    (Arguably, though, the code that showed up this missing exception type ought to
    use Core::Route, I think, as the issue is that `params` was called wrongly from
    within a route handler - the problem isn't with the request.  I guess it comes
    down to, should the exception type indicate the point the exception was raised,
    or the original source of the problem, if known?)