From 18159adcefb255db5a5234a8476e703deb6cc09f Mon Sep 17 00:00:00 2001 From: Ruud van Melick Date: Tue, 30 Jun 2015 16:08:49 +0000 Subject: [PATCH] Fix Perl errors "my" variable $cmd masks earlier declaration in same scope at /tmp/contrib_collectd2html.pl line 223. syntax error at /tmp/contrib_collectd2html.pl line 219, near "$span qw(1hour 1day 1week 1month)" Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 221. Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 224. Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 225. Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 232. Global symbol "$span" requires explicit package name at /tmp/contrib_collectd2html.pl line 237. syntax error at /tmp/contrib_collectd2html.pl line 245, near "}" --- contrib/collectd2html.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/collectd2html.pl b/contrib/collectd2html.pl index fe4e2bdb..511b3f9d 100644 --- a/contrib/collectd2html.pl +++ b/contrib/collectd2html.pl @@ -216,7 +216,7 @@ for (my $i = 0; $i < scalar(@rrds); ++$i) { END # graph various ranges - foreach my $span qw(1hour 1day 1week 1month){ + foreach my $span (qw(1hour 1day 1week 1month)){ system("mkdir -p $IMG_DIR/" . dirname($bn)); my $img = "$IMG_DIR/${bn}-$span$IMG_SFX"; -- 2.11.0