The return value of can is a function reference:
if ( my $handler = "some::cool::${module}"->can("method") ) { $handler->( ... some arguments ... ) } else { ... }
In reply to Re: Elegant way to call a method
by Corion
in thread Elegant way to call a method
by siberia-man
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |