til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

Mojolicious::Plugin::Config

The default for suffix for configuration files, which might be used by other frameworks etc. and the contents of the Mojolicious::Plugin::Config files are actually Perl.

Mojolicious::Plugin::Config is quite powerful so you can just configure it to respect your new extension.

So in order to differentiate and get my text editor to enforce a distinction for syntax highlighting, I renamed my configuration file to .pconfindicating Perl formatted configuration.

See examples below, for how to configure Mojolicious::Plugin::Config to respect the new extension - do note the dot/period . is not specified.

Mojolicious::Lite

plugin Config => {ext => 'pconf'};

Mojolicious Application

my $config = $self->plugin('Config', ext => 'pconf');

References