Example:
hook on_route_exception => sub {
# This code is not executed
}
hook on_handler_exception => sub {
# This code is not executed
}
hook after => sub {
# This code is not executed
}
hook after_error_render => sub {
# This code is not executed
}
hook before => sub {
if ($some_condition) {
halt("Unauthorized");
# This code is not executed :
do_stuff();
}
};
get '/' => sub {
"hello there";
};
I can find this piece of documentation:
Thus, any code after a halt is ignored, until the end of the route.
But hooks are after the end of route, so should not be ignored. Should be?
Why hooks are ignored too?