which will return a new page object that first searches the page's lineage, then the plugin's lineage. Then I can call a subpage like:sub plugin { my $self = shift; my $name = shift; return $self->new('*' => $self->name_to_page($name)); }
and in that subpage, self.THIS and self.THAT can refer to either original-lineage methods or the mixin methods. Cool. And yet, the mixin can also have defaults and overrides. This even works for sub-sub pages.[% INCLUDE subpage.tt self=self.plugin("subpage") other=parms go=here +%]
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re^2: Mixins (problem in CGI::Prototype and Class::Protototyped with subtemplates)
by merlyn
in thread Mixins (problem in CGI::Prototype and Class::Protototyped with subtemplates)
by merlyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |