From ebd2b0aca54022f80abfbea0167d1ac2143f4771 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 26 Jan 2016 13:16:19 +0100 Subject: [PATCH] SectionConfig: disable duplicate plugin registration --- src/PVE/SectionConfig.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm index 95e166a..6f85b22 100644 --- a/src/PVE/SectionConfig.pm +++ b/src/PVE/SectionConfig.pm @@ -26,6 +26,9 @@ sub register { my $type = $class->type(); my $pdata = $class->private(); + die "duplicate plugin registration (type = $type)" + if defined($pdata->{plugins}->{$type}); + my $plugindata = $class->plugindata(); $pdata->{plugindata}->{$type} = $plugindata; $pdata->{plugins}->{$type} = $class; -- 2.39.2