I know that it's possible to chain Apache handlers in a way that the next handler is executed if the previous handler returned DECLINED.
It sound like you're looking for this: http://perl.apache.org/docs/1.0/guide/config.html#Stacked_Handlers
The next handler is also executed if you return OK.
- Perrin