The simplest test case is 226 lines of code?
The problem isn't "the whole thing", you specifically request assistance in calling a subroutine via a variable (presumably holding a sub ref). So boil the example code down to that portion of the problem so that we don't have to wade through 226 lines of code to see what you're asking about. 20-30 lines of code ought to be more than adequate.
BrowserUk already made such a suggestion a year ago in Re^2: Advanced GUI with threads, to which you followed-up with a 427 line dump of code.