Ah, I think keep_request should be initialized in the constructor and just refer $self->{keep_request}. No need to configure it dynamically.