From: Sebastian Harl Date: Wed, 14 Nov 2012 18:08:30 +0000 (+0100) Subject: perl plugin: Emit a warning when accessing $interval_g. X-Git-Tag: collectd-5.2.0~20^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=80f20ce82099d92efd5655cf26237823e547a602;p=collectd.git perl plugin: Emit a warning when accessing $interval_g. Rather, point to plugin_get_interval(). --- diff --git a/src/perl.c b/src/perl.c index 924cb63f..57ea7123 100644 --- a/src/perl.c +++ b/src/perl.c @@ -2120,6 +2120,9 @@ static int g_pv_set (pTHX_ SV *var, MAGIC *mg) static int g_interval_get (pTHX_ SV *var, MAGIC *mg) { + log_warn ("Accessing $interval_g is deprecated (and might not " + "give the desired results) - plugin_get_interval() should " + "be used instead."); sv_setnv (var, CDTIME_T_TO_DOUBLE (interval_g)); return 0; } /* static int g_interval_get (pTHX_ SV *, MAGIC *) */ @@ -2127,6 +2130,9 @@ static int g_interval_get (pTHX_ SV *var, MAGIC *mg) static int g_interval_set (pTHX_ SV *var, MAGIC *mg) { double nv = (double)SvNV (var); + log_warn ("Accessing $interval_g is deprecated (and might not " + "give the desired results) - plugin_get_interval() should " + "be used instead."); interval_g = DOUBLE_TO_CDTIME_T (nv); return 0; } /* static int g_interval_set (pTHX_ SV *, MAGIC *) */