[Chicago-talk] Creating dynamic, callable subroutines

Jay Strauss me at heyjay.com
Sat Aug 2 13:31:45 PDT 2008


I have a list of subroutines of the form:

sub Order {
   return __PACKAGE__.'::com::ib::client::Order';

sub ScannerSubscription {
   return __PACKAGE__.'::com::ib::client::ScannerSubscription';

sub TickType {
   return __PACKAGE__.'::com::ib::client::TickType';

But the list of subroutines changes with each version of a vendor supplied API.

I can create a list of names of subroutines dynamically.  I can create
the code above dynamically (they all look the same).

How can I create the actual subroutines dynamically, so that they can
be called from the outside using the normal:




More information about the Chicago-talk mailing list