From cfa90dc368a1ac3441185c94d287829d3985ef6d Mon Sep 17 00:00:00 2001 From: David Phillips Date: Fri, 21 Sep 2018 14:10:58 +1200 Subject: Validate configuration parameter presence and type --- Plugin/Timezone.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Plugin/Timezone.pm') diff --git a/Plugin/Timezone.pm b/Plugin/Timezone.pm index c679340..5e649b1 100644 --- a/Plugin/Timezone.pm +++ b/Plugin/Timezone.pm @@ -4,6 +4,7 @@ use strict; use warnings; use DateTime; +use IdaliusConfig qw/assert_dict/; my $config; @@ -13,6 +14,8 @@ sub configure { shift; # run_command $config = shift; + IdaliusConfig::assert_dict($config, $self, "timezone"); + $cmdref->("time", sub { $self->time(@_); } ); return $self; -- cgit v1.1