[Israel.pm] Delegation in Moose and Other Delegation Modules

Shlomi Fish shlomif at iglu.org.il
Sat Jul 21 06:12:43 PDT 2007

Hi all!

We discussed delegation in Perl and other languages here before:


As I discovered Moose has a delagation mechanism called "handles":


You can pass to an accessor an array of method names and it will install 
delegates for each one. Or you can pass a hash ref and it will map from 
locally-installed names to the original names. 

What I did for this in my code is:

    handles => 
        map { '_'.$_ => $_ } 
        qw(curr_line next_line with_curr_line)

After more investigation, I also found more modules for delegation on CPAN. 


See also:



	Shlomi Fish

Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

If it's not in my E-mail it doesn't happen. And if my E-mail is saying
one thing, and everything else says something else - E-mail will conquer.
    -- An Israeli Linuxer

More information about the Perl mailing list