Re: How to dynamically generate function name and call it?




Robert 'phaylon' Sedlacek wrote:

*{'Create' . $TableName . 'Table'}->(@arguments);

Or, more simply:

"Create${TableName}Table"->(@arguments);

Note: If you were creating a module, say My::FreakyModule, then I'd
suggest separating all your subroutines that are accessed by symref
into separate namespaces:

"My::FreakyModule::Tables::${TableName}::Create"->(@arguments);

.