summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2022-08-05 17:28:55 +0200
committergregor herrmann <gregoa@debian.org>2022-08-05 17:28:55 +0200
commit7ee0b415e15d3a442457dc16b0cc4613beafc02e (patch)
treec31c4ab14cc17c5a28b1aee3c90c475f8ec73b33
parent63ca3f1337da776c9ffdfaa78bdd81e2d64038f3 (diff)
parenta7e319dce9a7fe7f25b7a60ea48d7297627b1653 (diff)
Update upstream source from tag 'upstream/0.16'
Update to upstream version '0.16' with Debian dir 6f6a1b1646fcb7104df2d4ce6679a900c7db2a0f
-rw-r--r--Find.pm20
-rw-r--r--MANIFEST2
-rw-r--r--META.json9
-rw-r--r--META.yml21
-rw-r--r--Makefile.PL4
-rw-r--r--README6
-rw-r--r--t/07-symlinks.t13
-rw-r--r--t/12-loadfail.t25
-rw-r--r--t/test/LoadFailTest/LoadFailMod.pm3
9 files changed, 75 insertions, 28 deletions
diff --git a/Find.pm b/Find.pm
index 675a4c9..fc72fb4 100644
--- a/Find.pm
+++ b/Find.pm
@@ -1,13 +1,13 @@
package Module::Find;
-use 5.006001;
+use 5.008001;
use strict;
use warnings;
use File::Spec;
use File::Find;
-our $VERSION = '0.15';
+our $VERSION = '0.16';
our $basedir = undef;
our @results = ();
@@ -345,11 +345,23 @@ Fixed RT#127657 (bug report contributed by Karen Etheridge): Module::Find now us
directories that did not contain @INC, Module::Find would find the modules correctly, but load
them from @INC.
+=item 0.16, 2022-08-01
+
+Fixes an issue where symlink tests failed on systems that do not support creation of symlinks.
+The issue appears on Windows systems due to changed behaviour in C<File::Find> described
+in L<perl5/issue #19995|https://github.com/Perl/perl5/issues/19995>
+Symlink tests were previously skipped if C<symlink()> is not available, and now
+also if creation of a symlink is not possible.
+
+Fixes L<issue #9|https://github.com/crenz/Module-Find/issues/9>. Note that on Windows system,
+the patch to C<File::Find> from L<perl5/PR #20008|https://github.com/Perl/perl5/pull/20008>
+will be required for proper operation.
+
=back
=head1 DEVELOPMENT NOTES
-Please report any bugs using the CPAN RT system. The development repository for this module is hosted on GitHub: L<http://github.com/crenz/Module-Find/>.
+The development repository for this module is hosted on GitHub: L<http://github.com/crenz/Module-Find/>. Please report any bugs by opening an issue there.
=head1 SEE ALSO
@@ -361,7 +373,7 @@ Christian Renz, E<lt>crenz@web42.comE<gt>
=head1 COPYRIGHT AND LICENSE
-Copyright 2004-2019 by Christian Renz <crenz@web42.com>. All rights reserved.
+Copyright 2004-2022 by Christian Renz <crenz@web42.com>. All rights reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
diff --git a/MANIFEST b/MANIFEST
index d688945..3dbcc3f 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -17,12 +17,14 @@ t/08-taint.t
t/09-inc-hook.t
t/10-wrong-module-sub.t
t/11-wrong-module-all.t
+t/12-loadfail.t
t/50-meta.t
t/51-pod.t
t/52-pod-coverage.t
t/test/duplicates/ModuleFindTest.pm
t/test/duplicates/ModuleFindTest/SubMod.pm
t/test/duplicates/ModuleFindTest/SubMod/SubSubMod.pm
+t/test/LoadFailTest/LoadFailMod.pm
t/test/ModuleFindTest.pm
t/test/ModuleFindTest/SubMod.pm
t/test/ModuleFindTest/SubMod/SubSubMod.pm
diff --git a/META.json b/META.json
index 0231c01..1cb38e8 100644
--- a/META.json
+++ b/META.json
@@ -4,13 +4,13 @@
"Christian Renz <crenz@web42.com>"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.133380",
+ "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : "2"
+ "version" : 2
},
"name" : "Module-Find",
"no_index" : {
@@ -38,7 +38,7 @@
"requires" : {
"File::Find" : "0",
"File::Spec" : "0",
- "perl" : "5.006001"
+ "perl" : "5.008001"
}
}
},
@@ -48,5 +48,6 @@
"url" : "http://github.com/crenz/Module-Find"
}
},
- "version" : "0.15"
+ "version" : "0.16",
+ "x_serialization_backend" : "JSON::PP version 4.02"
}
diff --git a/META.yml b/META.yml
index 46f8fb3..4ff9a24 100644
--- a/META.yml
+++ b/META.yml
@@ -3,27 +3,28 @@ abstract: 'Find and use installed modules in a (sub)category'
author:
- 'Christian Renz <crenz@web42.com>'
build_requires:
- Test::More: 0
+ Test::More: '0'
configure_requires:
- ExtUtils::MakeMaker: 0
+ ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.133380'
+generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Module-Find
no_index:
directory:
- t
- inc
recommends:
- Test::Pod: 1.14
- Test::Pod::Coverage: 1.04
+ Test::Pod: '1.14'
+ Test::Pod::Coverage: '1.04'
requires:
- File::Find: 0
- File::Spec: 0
- perl: 5.006001
+ File::Find: '0'
+ File::Spec: '0'
+ perl: '5.008001'
resources:
repository: http://github.com/crenz/Module-Find
-version: 0.15
+version: '0.16'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/Makefile.PL b/Makefile.PL
index dcb39f4..8184e6b 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,12 +1,12 @@
use strict;
use warnings;
-use 5.006001;
+use 5.008001;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile1(
- MIN_PERL_VERSION => '5.006001',
+ MIN_PERL_VERSION => '5.008001',
META_MERGE => {
resources => {
repository => 'http://github.com/crenz/Module-Find',
diff --git a/README b/README
index 1591fd4..252d481 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
-Module::Find
-============
+Module::Find version 0.16
+=========================
Module::Find lets you find and use modules in categories. This can be very
useful for auto-detecting driver or plugin modules. You can differentiate
@@ -24,7 +24,7 @@ This module requires these other modules and libraries:
COPYRIGHT AND LICENCE
-Copyright (C) 2004-2019 Christian Renz <crenz@web42.com>. All rights reserved.
+Copyright (C) 2004-2022 Christian Renz <crenz@web42.com>. All rights reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
diff --git a/t/07-symlinks.t b/t/07-symlinks.t
index a380dd4..429b6ac 100644
--- a/t/07-symlinks.t
+++ b/t/07-symlinks.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More tests => 13;
+use Test::More tests => 14;
use Module::Find qw(ignoresymlinks followsymlinks findsubmod findallmod);
@@ -11,11 +11,15 @@ my $dirName = "ModuleFindTest";
my $linkName = "./t/test/ModuleFindTestSymLink";
SKIP: {
- eval { symlink($dirName, $linkName) };
- skip "Symlinks not supported on this system", 13 if $@;
+ my $r = eval { symlink($dirName, $linkName) };
+ skip "Symlinks not supported on this system", 14 if $@;
+ skip "Unable to create symlink", 14 if $r == 0;
+
+ # Ensure link was created and is actually a symlink
+ ok(-l $linkName);
my @l;
-
+
# Default behaviour: follow symlinks -----------------------
@l = findsubmod ModuleFindTestSymLink;
ok($#l == 0);
@@ -48,7 +52,6 @@ SKIP: {
ok($l[1] eq 'ModuleFindTestSymLink::SubMod::SubSubMod');
-
# Clean up
unlink $linkName;
ok(!-e $linkName);
diff --git a/t/12-loadfail.t b/t/12-loadfail.t
new file mode 100644
index 0000000..2bfbdd3
--- /dev/null
+++ b/t/12-loadfail.t
@@ -0,0 +1,25 @@
+use strict;
+use warnings;
+
+use Test::More tests => 8;
+
+use Module::Find;
+
+use lib qw(./t/test);
+
+my @l;
+
+@l = findsubmod LoadFailTest;
+
+ok($#l == 0);
+ok($l[0] eq 'LoadFailTest::LoadFailMod');
+
+eval { @l = usesub LoadFailTest };
+ok($#l == 0);
+ok($l[0] eq 'LoadFailTest::LoadFailMod');
+ok($@); # OK if loading failed and returned an error
+
+eval { @l = useall LoadFailTest };
+ok($#l == 0);
+ok($l[0] eq 'LoadFailTest::LoadFailMod');
+ok($@); # OK if loading failed and returned an error
diff --git a/t/test/LoadFailTest/LoadFailMod.pm b/t/test/LoadFailTest/LoadFailMod.pm
new file mode 100644
index 0000000..0341898
--- /dev/null
+++ b/t/test/LoadFailTest/LoadFailMod.pm
@@ -0,0 +1,3 @@
+package LoadFailTest::LoadFailMod;
+
+return 0;