Mojolicious::Plugin::Charset(3pm)

Mojolicious::Plugin::Charset3pm

Charset plugin

Usage

  # Mojolicious
  $self->plugin(Charset => {charset => 'Shift_JIS'});
  # Mojolicious::Lite
  plugin Charset => {charset => 'Shift_JIS'};

Overview

Mojolicious::Plugin::Charset is a plugin to easily set the default charset and encoding on all layers of Mojolicious.

The code of this plugin is a good example for learning to build new plugins, you're welcome to fork it.

See "PLUGINS" in Mojolicious::Plugins for a list of plugins that are available by default.

Options

Mojolicious::Plugin::Charset supports the following options.

charset

  # Mojolicious::Lite
  plugin Charset => {charset => 'Shift_JIS'};

Application charset.

Methods

Mojolicious::Plugin::Charset inherits all methods from Mojolicious::Plugin and implements the following new ones.

register

  $plugin->register(Mojolicious->new, {charset => 'Shift_JIS'});

Register hook "before_dispatch" in Mojolicious in application and change a few defaults.

Releases

3 releases since Debian 6.0 (Squeeze); the text changed 2 times.

  1. 6.0
  2. 7
  3. 8

From libmojolicious-perl 5.54+dfsg-1 in Debian 8 (Jessie). Parsed by carta from the page's man source.