################# # load_tmpl # ################# # # Over ride the CGI::Application load_tmpl method so that # we can automatically add our own parameters to all # templates # sub load_tmpl { my $self = shift; my $template_name = shift; my %options = @_; # Turn off 'die_on_bad_params' unless it has been explicitely set $options{die_on_bad_params} = 0 unless defined $options{die_on_bad_params}; # Turn on 'loop_context_vars' unless it's been explicitely disabled $options{loop_context_vars} = 1 unless defined $options{loop_context_vars}; # Load the template using the real CGI::Application load_tmpl method my $template = $self->SUPER::load_tmpl($template_name, %options); return $template; }