siberia-man has asked for the wisdom of the Perl Monks concerning the following question:
I can check the method availability as below but don't know how to proceed further in term of my question:if ( defined &{ "some::cool::${module}::method" } ) { &{ \&{ "some::cool::${module}::method" } }(some arguments); } else { ... }
if ( "some::cool::${module}"->can("method") ) { ???
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Elegant way to call a method
by Corion (Patriarch) on Dec 23, 2017 at 10:44 UTC | |
by siberia-man (Friar) on Dec 23, 2017 at 12:10 UTC | |
|
Re: Elegant way to call a method
by eyepopslikeamosquito (Archbishop) on Dec 23, 2017 at 10:57 UTC | |
by siberia-man (Friar) on Dec 23, 2017 at 12:09 UTC | |
|
Re: Elegant way to call a method
by Anonymous Monk on Dec 26, 2017 at 13:50 UTC |