[dsc] Obsolete Syntax

Oliver Peter lists at peter.de.com
Fri Nov 28 11:55:35 UTC 2014


DSC's usage of qw() has been obsoleted in perl 5.16 and results in a
syntax error >= 5.18.  Easy to fix:

Index: presenter/perllib/DSC/grapher.pm
===================================================================
--- presenter/perllib/DSC/grapher.pm    (revision 13913)
+++ presenter/perllib/DSC/grapher.pm    (working copy)
@@ -1577,7 +1577,7 @@
        my $s = shift;
        my $a;
        my $v;
-       foreach my $u qw(years weeks days hours minutes) {
+       foreach my $u (qw(years weeks days hours minutes)) {
                $a = Math::Calc::Units::convert("$s seconds", $u);
                $a =~ /^([-\.\de]+)/ or die "bad units $a";
                $v = $1;

Works under Ubuntu 14.04 and FreeBSD 10.1.


-- 
Oliver PETER       oliver at gfuzz.de       0x456D688F


More information about the dsc mailing list