From 5bc6ba20b7e831ee99a50ae70e4a5b04aaacedca Mon Sep 17 00:00:00 2001 From: Petter hassberg Date: Tue, 20 Nov 2018 14:47:04 +0100 Subject: [PATCH] Add extension_preferences option This is something for the various plugins to read settings from. --- lib/Plerd.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/Plerd.pm b/lib/Plerd.pm index 482e934..7ea2fc8 100644 --- a/lib/Plerd.pm +++ b/lib/Plerd.pm @@ -261,14 +261,19 @@ has 'tags_map' => ( has 'extensions' => ( is => 'ro', - isa => 'Maybe[ArrayRef[Str]]', + isa => 'Maybe[ArrayRef[Str]]' +); + +has 'extension_preferences' => ( + is => 'ro', + isa => 'Maybe[HashRef]', ); has 'post_triggers' => ( is => 'ro', isa => 'Maybe[HashRef[Str]]', lazy_build => 1, - ); +); sub BUILD { @@ -1004,6 +1009,11 @@ particularly helpful when creating navigation. An arrayref of L objects, representing the plugins to load when a new Pled instance is created. +=item extension_preferences + +A hashref of config options for extensions. It is up to each individual extension +to decide how to act upon the contents therein. + =item post_triggers A hashref of L,L objects. The key is used as a regex to deduce what