Matthew Weir O'Phinney has created yet another tutorial surrounding the Cgiapp2software and looks this time at something he calls "pluggable applications".
He gives the example of needing a method for creating a well-structured layout in his appication, but also needing a sitewide template to apply to it. Traditional methods don't quite lend themselves to that, so he introduces a new function, cgiapp_postrun, to apply the template after the logic is through.
He includes two examples, one demonstrating the above mentioned situation and the other showing how to make a flexible method for including authentication in only certain parts of the application and not others. Both define a postrun() function to handle the changes to be made after the rest of the logic has finished.