[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#778636: unblock: cvsweb/3:3.0.6-8



Am Dienstag, den 17.02.2015, 19:44 +0100 schrieb Mehdi Dogguy:
> Le 2015-02-17 19:06, Daniel Leidert a écrit :
> > There is an incompatibility with Perl 5.18, which can be fixed by the 
> > patch
> > added in 3:3.0.6-8. The bug itself has been reported with severity 
> > important.
> > However the  reporter speaks about "errors".

I can verify, that version 3:3.0.6-7 results in an 500er error of the
server, so it doesn't work at all. Thus a higher severity is justified.

> Is this relevant for Perl >=5.18, or 5.18 only? Did you test your 
> changes using
> Perl 5.14 too? (so that it keeps working even after a partial upgrade).

I tested with both Perl versions. The patch consists of two changes and
I'll explain both below.

(1) The use of "for my $var qw()" has already been deprecated with Perl
5.14 [1] in Wheezy. cvsweb in Wheezy logs a warning here:

> Use of qw(...) as parentheses is deprecated at /usr/lib/cgi-bin/cvsweb line 1197.

So the fix applied in -8 works with Perl 5.14 too and further fixes the
one remaining loop without parenthesis (there are 3 more "for"-loops in
the script, in which the qw() is already correctly surrounded by
parenthesis). With Perl 5.18 cvsweb stops working reporting a syntax
error. This change is vital for Wheezy.

(2) The second change fixes a warning reported by Perl 5.18:

> defined(@array) is deprecated at /usr/lib/cgi-bin/cvsweb line 2956.

Seems, the defined() call is "[..] not useful on arrays because it
checks for an undefined scalar value [..]". To achieve the same a simple
"if (@array) {...}" is enough. So the second change should be safe and
it works with Perl 5.14 too.

[1] http://blogs.perl.org/users/rurban/2010/09/qw-in-list-context-deprecated.html

Regards, Daniel


Reply to: