Subject: | Perl 5.14 depreciation warning for use of qw() |
Perl 5.14.x gives a depreciation warning for use of the 'for my $i qw{
Foo Bar}'. See also
http://blogs.perl.org/users/rurban/2010/09/qw-in-list-context-deprecated.html
and especially the comments.
Since Apache::DBI uses this structure, you'll find the depreciation
warnings in your Apache error log every time. Attached a trivial patch
to use the format for 'for qw' that will not be deprecated.
BTW the README states:
"Apache::DBI is in svn at perl.org; see
http://svn.perl.org/modules/Apache-DBI"
(source: http://api.metacpan.org/source/PHRED/Apache-DBI-1.10/README)
But there I see there:
"This module is no longer maintained at svn.perl.org Please see
http://svn.apache.org/repos/asf/perl/Apache-DBI"
The problem is, in the Apache SVN I could only find version 1.08-dev.
(attached diff is against that version). So apparently the CPAN version
is newer than the SVN version. Maybe the README can be corrected?
Subject: | qw.patch |
Index: lib/Apache/DBI.pm
===================================================================
--- lib/Apache/DBI.pm (revision 14923)
+++ lib/Apache/DBI.pm (working copy)
@@ -259,7 +259,7 @@
}
if ($TaintInOut) {
- foreach my $key qw{ TaintIn TaintOut } {
+ foreach my $key (qw( TaintIn TaintOut ) ) {
$Connected{$Idx}->{private_Apache_DBI}{$key} =
$Connected{$Idx}->{$key};
}
@@ -283,7 +283,7 @@
}
if ($TaintInOut) {
- foreach my $key qw{ TaintIn TaintOut } {
+ foreach my $key (qw( TaintIn TaintOut ) ) {
$Connected{$Idx}->{$key} =
$Connected{$Idx}->{private_Apache_DBI}{$key};
}