On Sat, Jan 8, 2011 at 3:50 PM, Moritz Lenz <mor...@faui2k3.org> wrote:

> class MyMatcher {
>    for <FOO BAR BAZ BLETCH QUUX> -> $field {
>        MyMatcher.^add_method($field, method() {
>                 self!matches($field);
>            }
>        );
>    }
> }
>
> The .^  means a method of the metaclass is called, here add_method
>
> Maybe you'll find
> http://perlgeek.de/en/article/discovering-meta-object-protocolinteresting.
>
>
I did, but now I'm wondering how one would do this in the case of an
anonymous class.  Neither the link you provided, nor Apocalypse or Synopsis
12, seem to address that question.  At least, scanning those pages for the
word "anonymous" didn't land me near anything that appeared to be relevant.

Reply via email to