Hi all! We discussed delegation in Perl and other languages here before:
http://perl.org.il/pipermail/perl/2007-January/thread.html#8390 As I discovered Moose has a delagation mechanism called "handles": http://cpan.uwinnipeg.ca/htdocs/Moose/Moose.html#i_handles_gt_ARRAY_HASH_REGEXP_ROLE_ 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. Like: http://cpan.uwinnipeg.ca/htdocs/Class-Delegator/Class/Delegator.html See also: http://cpan.uwinnipeg.ca/htdocs/Class-Delegator/Class/Delegator.html#see_also Regards, Shlomi Fish --------------------------------------------------------------------- Shlomi Fish [EMAIL PROTECTED] 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 _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl
