If you're looking at using OO, have you read perlboot, perltoot, perltooc, and perlbot?
OO works, but is not exactly intuitive in Perl, so you'll have to decide if it's worth the steep learning curve. -----Original Message----- From: The Ghost [mailto:[EMAIL PROTECTED] Sent: Thursday, February 16, 2006 1:48 PM To: Perl Beginners Subject: passing subroutine/Module I have many HTML::Mason components that don't return content and are just used as functions (return a value). I would like to turn these into a set of subs in a module, preferably an OO module. I'm wondering what the best way to do this is. $m->comp('/path/to/component.mas', attr1 => "some value", attr4 => "4", attr2 => \%hash, attr0 => [EMAIL PROTECTED]); /path/to/component.mas: <%args> $attr0 # things in args represent required parameters, ones with values are defaults that are overridden by the passed value (if present) $attr4 => 5 $attr1 => "defaultValue" </%args> <%init> ...stuff happens.... </%init> Maybe I should ask Dave Rolsky? Thanks! Ryan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>