in reply to Re: Calling $function from $module
in thread Calling $function from $module
I'm refactoring a big if/else decision tree that sets some $args, loads a module, possibly does other random stuff, and then calls a function from that module. Previously each elsif had contained code to set $args, load the module, do the random stuff, and call the function. Being able to call ( &{ $module.'::'.$function } )->( $args ); gets rid of much of the repetitive code.
|
|---|