<%def .main>
Hello <% $name %>.

% $m->current_comp->owner->call_method('foo');
% $m->current_comp->owner->call_method('bar');
<& .baz &>
</%def>

<%method foo>
This is the foo method, <% $name %>.
</%method>
<%method bar>
This is the bar method, <% $name %>.
</%method>
<%def .baz>
This is the baz subcomponent, <% $name %>.
</%def>

<& .main &>

% $name = 'Mary';
<& .main &>

<%shared>
my $name = 'Joe';
</%shared>
