Re: AUTOLOAD method
Jonathan Swartz <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
> On Sat, 5 Jun 2004, Vadim O. Ustiansky wrote:
>
>
>>I would like Mason to have the possibility to handle non-existent
>>methods in a way, similar to perl's AUTOLOAD. In particular one
>>may want to be able to write components like the following:
>>
>> ...
>>% $m->comp('SELF:foo');
>>% $m->comp('SELF:bar');
>> ...
>><%method AUTOLOAD>
>><%perl>
>> my $method_name = $m->autoload();
>> if($method_name eq 'foo'){
>> # handle call SELF:foo
>> }elsif($method_name eq 'bar'){
>> # handle call SELF:bar
>> }
>></%perl>
>></%method>
>>
>>The attached patch seems to implement this feature.
>>
>>I would like to here your opinion on this topic.
>
I don't want to add anything to the existing rickety OO framework. But
at some point, we might change the implementation of component OO to use
actual Perl OO, in which case we'd get this for free.
Jon
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click