From 80f20ce82099d92efd5655cf26237823e547a602 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 14 Nov 2012 19:08:30 +0100 Subject: [PATCH] perl plugin: Emit a warning when accessing $interval_g. Rather, point to plugin_get_interval(). --- src/perl.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 *) */ -- 2.30.2