-- Basehandler.pm -- package Basehandler; use Module::I::Always::Use::1; ... use Module::I::Always::Use::35; sub handler { ... same 50 lines of code that do validation and then a jump table to my real work functions ... } sub setup_environment { .... } -- MyHandler/ForThisEndpoint.pm -- package MyHandler::ForThisEndpoint; use Basehandler; sub work_function_1 {} ... sub work_function_100 {} -- MyHandler/ForAnotherEndpoint.pm -- package MyHandler::ForAnotherEndpoint; use Basehandler; sub work_function_1 {} ... sub work_function_100 {}