sub render {
my ($self, $c, $template, $args) = @_;
- $c->log->debug(qq/Rendering template "$template"/) if $c->debug;
+ $c->log->debug(qq/Rendering template "$template"/) if $c && $c->debug;
my $output;
my $vars = {
sub template_vars {
my ( $self, $c ) = @_;
+ return () unless $c;
my $cvar = $self->config->{CATALYST_VAR};
defined $cvar
process, including the name of a template file or a reference to a test string.
See L<Template::process|Template/process> for a full list of supported formats.
+To use the render method outside of your Catalyst app, just pass a undef context.
+This can be useful for tests, for instance.
+
=head2 template_vars
Returns a list of keys/values to be used as the catalyst variables in the