Priority: Urgent
Current State: Closed
Released In: 1.0.10
Target Release: patch
Applies To: Engine
Component: Configure
Branches:
See
Support.Question539. Strawberry perl 5.12 will no longer run bin/configure. Fails with following error
Failed to load the perl module Foswiki::Configure::Load. The module was found at c:/www/foswiki/lib/Foswiki/Configure/Load.pm
...
defined(%hash) is deprecated at c:/www/foswiki/lib/Foswiki/Configure/Load.pm line 152.
See perldoc -
http://perldoc.perl.org/functions/defined.html
Use of defined on aggregates (hashes and arrays) is deprecated. It used to report whether memory for that aggregate has ever been allocated. This behavior may disappear in future versions of Perl. You should instead use a simple test for size:
- if (@an_array) { print "has array elements\n" }
- if (%a_hash) { print "has hash members\n" }
The following instances were found in a quick search:
./lib/Foswiki/Configure/Load.pm: if ( defined %TWiki::cfg ) {
./lib/CPAN/lib/Locale/Maketext/Lexicon.pm: if (defined %{"$export\::Lexicon"}) {
./lib/CPAN/lib/Locale/Maketext/Lexicon/Tie.pm: eval "use $mod; 1" or die $@ unless defined %{"$mod\::"};
GeorgeClark - 14 Jun 2010
The Locale::Maketext::Lexicon ones are fixed in more recent version of these modules, so maybe we should simply update out version?
As for my comment on trunk... IIRC, I alias *TWiki::cfg = \%Foswiki::cfg a few lines above it, therefore this code is most certainly useless and potentially harmful, but I haven't had time to test it.
--
OlivierRaginel - 18 Jun 2010