=head1 NAME Mojolicious::Plugin::PPI - Mojolicious Plugin for Rendering Perl Code Using PPI =head1 SYNOPSIS # Mojolicious $self->plugin('PPI'); # Mojolicious::Lite plugin 'PPI'; =head1 DESCRIPTION L is a L plugin. =head1 METHODS L inherits all methods from L and implements the following new ones. =head2 C $plugin->register; Register plugin in L application. =head1 HELPERS L provides these helpers: =head2 C %== ppi 'my $code = "highlighted";' %== ppi 'file.pl' Returns HTML form of Perl snippet or file. If the argument is the name of a file that exists, it will be loaded and used. If not the string will be interpreted as an inline snippet. Either may take options: =over =item * C<< line_numbers => [0/1] >> specifies if line numbers should be generated =back Files are placed in a C<<
>> tag, and take several additional options =over =item * C<< id => 'string' >> specifies the C to be given to the encompassing C<<
>> tag =item * C<< toggle_button => [0/1] >> specifies if a button should be created to toggle the line numbers. If given C will be forced and if not specified an C will be generated. The C handler is C from the C javascript library. C may also be specified at register time to set the default. =back =head2 C Returns a Javascript snippet useful when using L. =head2 C Returns a CSS snippet for coloring the L generated HTML. Also provides a background for the code blocks. =head1 SEE ALSO L, L, L. L, L =head1 SOURCE REPOSITORY L =head1 AUTHOR Joel Berger, Ejoel.a.berger@gmail.comE =head1 COPYRIGHT AND LICENSE Copyright (C) 2011 by Joel Berger This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut