]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/SectionConfig.pm
Add AbstractConfig base class
[pve-common.git] / src / PVE / SectionConfig.pm
index 95e166abce88d8101368ee93213b7dda33532525..6f85b228b81ec82c77d64fbbbc8f0197e5274e01 100644 (file)
@@ -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;