Another couple alternatives for executing a subroutine in a package determined at run time:
If it can be invoked as a static method, $name->somesub() will work.
In the general case, $name->can( 'somesub' )->() will also work. If you need to call somesub() more than once,
my $somesub = $name->can( 'somesub' ); $somesub->();
In reply to Re: using a variable with require
by Anonymous Monk
in thread using a variable with require
by geoffleach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |