projects
/
catagits/Catalyst-Runtime.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Added $c->detach for non returning forwards
[catagits/Catalyst-Runtime.git]
/
lib
/
Catalyst
/
Dispatcher.pm
diff --git
a/lib/Catalyst/Dispatcher.pm
b/lib/Catalyst/Dispatcher.pm
index
3ff54ba
..
72a8ef3
100644
(file)
--- a/
lib/Catalyst/Dispatcher.pm
+++ b/
lib/Catalyst/Dispatcher.pm
@@
-23,6
+23,18
@@
See L<Catalyst>.
=over 4
+=item $c->detach($command)
+
+Like C<forward> but doesn't return.
+
+=cut
+
+sub detach {
+ my ( $c, $command ) = @_;
+ $c->forward($command) if $command;
+ die $Catalyst::Engine::DETACH;
+}
+
=item $c->dispatch
Dispatch request to actions.