Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Return::MultiLevel so forward & redirect can immediately return from current hook/route code. #485

Closed
wants to merge 8 commits into from

Commits on Sep 29, 2013

  1. Configuration menu
    Copy the full SHA
    86f6eba View commit details
    Browse the repository at this point in the history
  2. Refactor Dispatcher->dispatch (no functional change)

    Move the code for calling before hooks and the route handler to its own (private)
    method. This will get wrapped by Return::MultiLevel to clean up forward/redirect
    DSL methods.
    veryrusty committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    ee58580 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0c6e92d View commit details
    Browse the repository at this point in the history
  4. Use Return::MultiLevel to wrap route dispatch.

    As suggested in PerlDancer#432, use Return::MultiLevel to wrap route dispatch.
    Cache the multilevel return coderef in the context for forward/redirect
    to use.
    
    Add Return::MultiLevel to prereqs and Scope::Upper to recommends.
    veryrusty committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    a375426 View commit details
    Browse the repository at this point in the history
  5. Do not halt the response on redirect.

    Use the with_return handler to return immediatly to the dispatcher after the
    redirect details have been added to the response.
    
    Resolves PerlDancer#432.
    veryrusty committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    205a13f View commit details
    Browse the repository at this point in the history
  6. Use with_return handler to return control back to the dispatcher afte…

    …r forward.
    
    This is the implementation of "... after a forward is executed, any remaining
    code (route and hooks) from the current dispatch will never be run." from PerlDancer#432.
    veryrusty committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    ee62c6a View commit details
    Browse the repository at this point in the history
  7. Update documentation for forward and redirect

    Include the description of forward and update that forward immediately
    returns form the current route/hook. Update redirect docs to reflect
    the immediate return from route/hook.
    veryrusty committed Sep 29, 2013
    Configuration menu
    Copy the full SHA
    d2679cb View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2013

  1. Configuration menu
    Copy the full SHA
    904bcb3 View commit details
    Browse the repository at this point in the history