Mojolicious::Plugin::PODRenderer - POD renderer plugin
# Mojolicious my $route = $self->plugin('PODRenderer'); my $route = $self->plugin(PODRenderer => {name => 'foo'}); my $route = $self->plugin(PODRenderer => {preprocess => 'epl'}); # Mojolicious::Lite my $route = plugin 'PODRenderer'; my $route = plugin PODRenderer => {name => 'foo'}; my $route = plugin PODRenderer => {preprocess => 'epl'}; # foo.html.ep %= pod_to_html "=head1 TEST\n\nC<123>"
Mojolicious::Plugin::PODRenderer is a renderer for true Perl hackers, rawr!
The code of this plugin is a good example for learning to build new plugins, you're welcome to fork it.
Mojolicious::Plugin::PODRenderer supports the following options.
# Mojolicious::Lite plugin PODRenderer => {name => 'foo'};
Handler name, defaults to pod.
pod
# Mojolicious::Lite plugin PODRenderer => {no_perldoc => 1};
Disable Mojolicious::Guides documentation browser that will otherwise be available under /perldoc.
/perldoc
# Mojolicious::Lite plugin PODRenderer => {preprocess => 'epl'};
Name of handler used to preprocess POD, defaults to ep.
ep
Mojolicious::Plugin::PODRenderer implements the following helpers.
%= pod_to_html '=head2 lalala' <%= pod_to_html begin %>=head2 lalala<% end %>
Render POD to HTML without preprocessing.
Mojolicious::Plugin::PODRenderer inherits all methods from Mojolicious::Plugin and implements the following new ones.
my $route = $plugin->register(Mojolicious->new); my $route = $plugin->register(Mojolicious->new, {name => 'foo'});
Register renderer in Mojolicious application.
Mojolicious, Mojolicious::Guides, http://mojolicio.us.
To install Mojolicious, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious
CPAN shell
perl -MCPAN -e shell install Mojolicious
For more information on module installation, please visit the detailed CPAN module installation guide.