>>>>> "Ian" == Ian Hickson <ian@hixie.ch> writes: Ian> So: What I would love to see in Perl 6 is a way of having a single scalar Ian> that holds a reference to a particular instance's method. Ian> Is there any chance that this would be considered? Or is this already Ian> possible in Perl 5 but I have missed it? my $methref = sub { $foo->method(@_) }; You missed it. :) Just be sure that $foo is not a package variable, so that a proper closure is created. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!Thread Previous | Thread Next