[baltimorepm] Closures and Late-Binding Subroutine Calls
Bernie Simon
bsimon at stsci.edu
Thu Apr 26 08:07:19 PDT 2012
On 4/26/12 10:24 AM, "Stephen Belcher" <sbelcher at gmail.com> wrote:
>I'm wondering if anyone has an answer to this?
>https://gist.github.com/2499830
Normally the way you do something like this is to call a method on an
object reference. The method is looked up at run time, so by varying the
object reference, you get a different method. The package the method is
defined in can be require'd at run time, making the whole thing as dynamic
as you like.
I know this doesn't answer the question you asked, but if you tell us the
problem you are trying to solve, maybe we can tell you a way of
accomplishing it without fighting Perl.
More information about the Baltimore-pm
mailing list