Subject: | [patch] defined(@array) is deprecated under Perl 5.15.7 |
Actually, defined(@array) has been deprecated for a while, but 5.15.7
started emitting deprecation warnings for package variables. Before,
only lexical variables were warned.
The symptom is messages like this from the tests:
t/1-use.t ................ defined(@array) is deprecated at
/Users/tom/.cpan/build/Module-Find-0.10-bwzr6b/blib/lib/Module/Find.pm
line 182.
(Maybe you should just omit the defined()?)
t/1-use.t ................ ok
I have marked this 'important' because although Module::Find passes its
tests, any distribution that uses Module::Find and that tests for
unexpected warnings (e.g. Module-CPANTS-Analyse) will fail.
The solution is simply to omit the 'defined'. A patch is attached.
Subject: | Module-Find.patch |
--- Find.old 2010-02-26 10:40:55.000000000 -0500
+++ Find.pm 2012-01-22 19:16:47.000000000 -0500
@@ -7,7 +7,7 @@
use File::Spec;
use File::Find;
-our $VERSION = '0.10';
+our $VERSION = '0.10_01';
our $basedir = undef;
our @results = ();
@@ -179,7 +179,7 @@
my $dir = File::Spec->catdir(split(/::/, $category));
my @dirs;
- if (defined @Module::Find::ModuleDirs) {
+ if (@Module::Find::ModuleDirs) {
@dirs = map { File::Spec->catdir($_, $dir) }
@Module::Find::ModuleDirs;
} else {