sub some_mode { my $tmpl_object = $self->load_tmpl('my_tmpl.html'); $tmpl_object->param( param1 => 'foo' param2 => 'bar', param3 => 'baz'); # Poke the data for the top part of the page into the $tmpl_object get_top($tmpl_object); # Ditto for the left side of the page get_left($tmpl_object); # Display the entire templated page return $tmpl_object->output; }