perl plugin: Fixed the "EnableDebugger after LoadPlugin" warning.
[collectd.git] / src / perl.c
index 6d3326f..d17551e 100644 (file)
@@ -1478,6 +1478,11 @@ static int perl_config_enabledebugger (pTHX_ oconfig_item_t *ci)
                return 1;
        }
 
+       if (NULL != perl_threads) {
+               log_warn ("EnableDebugger has no effects if used after LoadPlugin.");
+               return 1;
+       }
+
        value = ci->values[0].value.string;
 
        perl_argv = (char **)realloc (perl_argv,
@@ -1514,11 +1519,6 @@ static int perl_config_includedir (pTHX_ oconfig_item_t *ci)
                return 1;
        }
 
-       if (NULL == aTHX) {
-               log_warn ("EnableDebugger has no effects if used after LoadPlugin.");
-               return 1;
-       }
-
        value = ci->values[0].value.string;
 
        if (NULL == aTHX) {