Mojolicious::Plugin::HTMLLint - HTML::Lint support for Mojolicious
# Mojolicious $self->plugin('HTMLLint'); # In development mode only $self->plugin('HTMLLint') if $self->mode eq 'development'; # Mojolicious (skip errors that contain "placeholder" string) $self->plugin( 'HTMLLint', { skip => [ qr/placeholder/ ] } ); # Mojolicious::Lite plugin 'HTMLLint';
Mojolicious::Plugin::HTMLLint - allows you to validate HTML rendered by your application. The plugin uses HTML::Lint for validation. Errors will appear in Mojolicious log.
Config will be passed to HTML::Lint->new(); For supported options see HTML::Lint
skip
$app->plugin('HTMLLint', { skip => [ qr//, qr// ]} );
This options says what message not to show. This option plugin processes by its own(without passing to HTML::Lint).
on_error
You can pass custom error handling callback. For example
$self->plugin('HTMLLint', on_error => sub { my ($c, $mes) = @_; $c->render_text($mes); });
This option plugin processes by its own(without passing to HTML::Lint).
Viktor Turskyi <koorchik@cpan.org>
Please report any bugs or feature requests to Github https://github.com/koorchik/Mojolicious-Plugin-HTMLLint
Mojolicious, HTML::Lint, HTML::Tidy
Same as Perl 5.
To install Mojolicious::Plugin::HTMLLint, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::HTMLLint
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::HTMLLint
For more information on module installation, please visit the detailed CPAN module installation guide.