Skip to content

Instantly share code, notes, and snippets.

@gslin
Created March 24, 2011 08:03
Show Gist options
  • Save gslin/884726 to your computer and use it in GitHub Desktop.
Save gslin/884726 to your computer and use it in GitHub Desktop.
package Mojolicious::Plugin::MarkaplRenderer;
use strict;
use warnings;
use Mojo::Base 'Mojolicious::Plugin';
sub register {
my ($self, $app, $conf) = @_;
$conf ||= {};
my $name = $conf->{name} || 'markapl';
$app->renderer->add_handler(
$name => sub {
my ($r, $c, $output, $options) = @_;
$$output = 'always test';
return 1;
}
);
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment