summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2020-10-24 18:51:56 +0200
committergregor herrmann <gregoa@debian.org>2020-10-24 18:51:56 +0200
commit40ad952acc60655f58b45a83512960c3b96057db (patch)
tree5b7df00b01e1d0f21a4cc280eb94fe99c7a5cf36
parentd2b9ba9e547267c7cd47f3f9dc44c255cb81235b (diff)
parent3a48d348110deadc031414e77ffbff099b5e1f96 (diff)
Update upstream source from tag 'upstream/1.118'
Update to upstream version '1.118' with Debian dir 9c326882362fb2783b1dedf7d243b0e9f2b16942
-rw-r--r--.perltidyrc17
-rw-r--r--Changes14
-rw-r--r--MANIFEST4
-rw-r--r--MANIFEST.SKIP7
-rw-r--r--META.json6
-rw-r--r--META.yml4
-rwxr-xr-xlib/File/ShareDir.pm6
-rw-r--r--t/00_prereqs.t25
-rw-r--r--t/04_fail.t4
-rw-r--r--t/06_old.t38
-rw-r--r--t/lib/ShareDir/TestClass.pm2
-rw-r--r--testrules.yml5
12 files changed, 93 insertions, 39 deletions
diff --git a/.perltidyrc b/.perltidyrc
new file mode 100644
index 0000000..edf4f58
--- /dev/null
+++ b/.perltidyrc
@@ -0,0 +1,17 @@
+-b
+-bl
+-noll
+-pt=2
+-bt=2
+-sbt=2
+-vt=0
+-vtc=0
+-dws
+-aws
+-nsfs
+-asc
+-bbt=0
+-cab=0
+-l=130
+-ole=unix
+--noblanks-before-comments
diff --git a/Changes b/Changes
index 019017e..a852cc5 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,19 @@
Revision history for Perl extension File-ShareDir
+1.118 2020-10-21
+ - Releasing 1.117_001 without further changes
+
+1.117_001 2020-09-25
+ - fix failing test of dependencies after in 1.116 (from 1.112),
+ thanks to Dirk Stöcker for reporting via RT#127376 and
+ Mohammad S Anwar (@manwar) for providing the fix via Github
+ PR#14
+ - Fix RT#133368 (PR#15): Fix running tests in parallel submitted
+ by Kent Fredric (KENTNL) and fix provided by Tom Hukins (@tomhukins)
+ - Fix RT#125907: spelling error in manpage - thanks to Lucas Kanashiro
+ for reporting and Graham Knop (@haarg) for kicking me by submitting
+ PR#17
+
1.116 2018-06-24
- fix fail-test which incorrectly read without permission
==> introduce new CI test proving this (Thanks to Ville
diff --git a/MANIFEST b/MANIFEST
index 7ca0dfe..e208534 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,3 +1,4 @@
+.perltidyrc
Changes
foo/test_file.txt
inc/inc_File-ShareDir-Install/File/ShareDir/Install.pm
@@ -6,7 +7,7 @@ inc/latest/private.pm
lib/File/ShareDir.pm
LICENSE
Makefile.PL
-MANIFEST
+MANIFEST This list of files
MANIFEST.SKIP
README.md
share/sample.txt
@@ -19,5 +20,6 @@ t/04_fail.t
t/05_class.t
t/06_old.t
t/lib/ShareDir/TestClass.pm
+testrules.yml
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP
index 458d624..ac1377b 100644
--- a/MANIFEST.SKIP
+++ b/MANIFEST.SKIP
@@ -10,6 +10,7 @@
^Makefile$
^Build$
^Build\.bat$
+cover_db/
\.Inline/.*
_Inline/.*
\.bak$
@@ -28,8 +29,8 @@ nytprof.out
^_build/.*
~$
.*\.planner
-^\..*
+.*\.lock
+\.travis\.yml
^File-ShareDir-.*
\bxt
-^MYMETA\.json$
-^MYMETA\..*$
+^MYMETA.*
diff --git a/META.json b/META.json
index 4055aef..a37db4f 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
"Adam Kennedy <adamk@cpan.org>"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010",
+ "generated_by" : "ExtUtils::MakeMaker version 7.46, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
@@ -86,6 +86,6 @@
"web" : "https://github.com/perl5-utils/File-ShareDir"
}
},
- "version" : "1.116",
- "x_serialization_backend" : "JSON::PP version 2.97001"
+ "version" : "1.118",
+ "x_serialization_backend" : "JSON::PP version 4.05"
}
diff --git a/META.yml b/META.yml
index 880339b..3ab8d7d 100644
--- a/META.yml
+++ b/META.yml
@@ -11,7 +11,7 @@ configure_requires:
ExtUtils::MakeMaker: '0'
File::ShareDir::Install: '0.13'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.46, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -33,5 +33,5 @@ resources:
bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=File-ShareDir
homepage: https://metacpan.org/release/File-ShareDir
repository: https://github.com/perl5-utils/File-ShareDir
-version: '1.116'
+version: '1.118'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/lib/File/ShareDir.pm b/lib/File/ShareDir.pm
index c0e41e8..5e8549a 100755
--- a/lib/File/ShareDir.pm
+++ b/lib/File/ShareDir.pm
@@ -145,7 +145,7 @@ our @EXPORT_OK = qw{
our %EXPORT_TAGS = (
ALL => [@EXPORT_OK],
);
-our $VERSION = '1.116';
+our $VERSION = '1.118';
#####################################################################
# Interface Functions
@@ -251,7 +251,7 @@ sub _module_dir_old
my $long = Class::Inspector->loaded_filename($module);
$short =~ tr{/}{:} if IS_MACOS;
$short =~ tr{\\} {/} if IS_WIN32;
- $long =~ tr{\\} {/} if IS_WIN32;
+ $long =~ tr{\\} {/} if IS_WIN32;
substr($short, -3, 3, '');
$long =~ m/^(.*)\Q$short\E\.pm\z/s or Carp::croak("Failed to find base dir");
my $dir = File::Spec->catdir("$1", 'auto', $short);
@@ -573,7 +573,7 @@ to use the development copy without needing to install them first.
use Foo::Module;
- # interal calls in Foo::Module to module_file('Foo::Module','bar') now resolves to
+ # internal calls in Foo::Module to module_file('Foo::Module','bar') now resolves to
# the source trees share/ directory instead of something in @INC
=head1 SUPPORT
diff --git a/t/00_prereqs.t b/t/00_prereqs.t
index bdad9e1..5dff477 100644
--- a/t/00_prereqs.t
+++ b/t/00_prereqs.t
@@ -7,10 +7,12 @@ use Test::More;
# Prereqs-testing for File::ShareDir
-TODO:
+BEGIN
{
- local $TODO = "Just diagnostics ...";
- use_ok("CPAN::Meta") or plan skip_all => "Need CPAN::Meta for this test";
+ if (!eval { require CPAN::Meta; 1 })
+ {
+ plan skip_all => "Need CPAN::Meta for this test";
+ }
}
my $meta = CPAN::Meta->load_file(-d "xt" ? "MYMETA.json" : "META.json");
@@ -28,7 +30,7 @@ foreach my $phase (qw/configure build runtime test/, (-d "xt" ? "develop" : ()))
{
foreach my $severity (qw/requires recommends suggests/)
{
- my $reqs = $prereqs->requirements_for($phase, $severity);
+ my $reqs = $prereqs->requirements_for($phase, $severity);
my @modules = sort $reqs->required_modules;
@modules or next;
@@ -49,9 +51,18 @@ foreach my $phase (qw/configure build runtime test/, (-d "xt" ? "develop" : ()))
if (eval { require_ok($module) unless $module eq 'perl'; 1 })
{
my $version = $module eq 'perl' ? $] : $module->VERSION;
- $len{have} < length($version) and $len{have} = length($version);
- my $ok = ok($reqs->accepts_module($module, $version), "$module matches required $version");
- my $status = $ok ? "ok" : "not ok";
+ my $status;
+ if (defined $version)
+ {
+ $len{have} < length($version) and $len{have} = length($version);
+ my $ok = ok($reqs->accepts_module($module, $version), "$module matches required $version");
+ $status = $ok ? "ok" : "not ok";
+ }
+ else
+ {
+ $status = "not ok";
+ $version = "n/a";
+ }
$report{$phase}{$severity}{$module} = {
want => $want,
have => $version,
diff --git a/t/04_fail.t b/t/04_fail.t
index e2d67aa..17da29d 100644
--- a/t/04_fail.t
+++ b/t/04_fail.t
@@ -66,7 +66,7 @@ dies(
remove_tree($testautolib);
-dies(sub { my $dist_dir = dist_dir('ShareDir-TestClass'); }, qr/Failed to find share dir for dist/, "No module directory");
+dies(sub { my $dist_dir = dist_dir('ShareDir-TestClass'); }, qr/Failed to find share dir for dist/, "No module directory");
dies(sub { my $module_dir = module_dir('ShareDir::TestClass'); }, qr/No such directory/, "Old module directory but file");
make_path(dirname($testsharedirold), {mode => 0700});
@@ -101,7 +101,7 @@ open($fh, ">", $testsharedirold);
close($fh);
dies(sub { my $module_dir = module_dir('ShareDir::TestClass'); }, qr/No such directory/, "Old module directory but file");
-dies(sub { my $dist_dir = dist_dir('ShareDir-TestClass'); }, qr/Failed to find share dir for dist/,
+dies(sub { my $dist_dir = dist_dir('ShareDir-TestClass'); }, qr/Failed to find share dir for dist/,
"Old dist directory but file");
dies(
sub { my $dist_file = dist_file('ShareDir-TestClass', 'noread.txt'); },
diff --git a/t/06_old.t b/t/06_old.t
index 4e3b537..0115ef4 100644
--- a/t/06_old.t
+++ b/t/06_old.t
@@ -25,22 +25,26 @@ is(File::ShareDir::_DIST('ShareDir-TestClass'), 'ShareDir-TestClass', '_DIST
remove_tree($testautolib);
make_path($testsharedirold, {mode => 0700});
-open(my $fh, ">", File::Spec->catfile($testsharedirold, qw(sample.txt)));
-close($fh);
-
-my $module_dir = module_dir('ShareDir::TestClass');
-ok($module_dir, 'Can find our own module dir');
-ok(-d $module_dir, '... and is a dir');
-ok(-r $module_dir, '... and have read permissions');
-
-my $dist_dir = dist_dir('ShareDir-TestClass');
-ok($dist_dir, 'Can find our own dist dir');
-ok(-d $dist_dir, '... and is a dir');
-ok(-r $dist_dir, '... and have read permissions');
-
-my $dist_file = dist_file('ShareDir-TestClass', 'sample.txt');
-ok($dist_file, 'Can find our sample module file');
-ok(-f $dist_file, '... and is a file');
-ok(-r $dist_file, '... and have read permissions');
+SKIP:
+{
+ open(my $fh, ">", File::Spec->catfile($testsharedirold, qw(sample.txt)))
+ or skip "Can't write to [$testsharedirold]: $!", 9;
+ close($fh);
+
+ my $module_dir = module_dir('ShareDir::TestClass');
+ ok($module_dir, 'Can find our own module dir');
+ ok(-d $module_dir, '... and is a dir');
+ ok(-r $module_dir, '... and have read permissions');
+
+ my $dist_dir = dist_dir('ShareDir-TestClass');
+ ok($dist_dir, 'Can find our own dist dir');
+ ok(-d $dist_dir, '... and is a dir');
+ ok(-r $dist_dir, '... and have read permissions');
+
+ my $dist_file = dist_file('ShareDir-TestClass', 'sample.txt');
+ ok($dist_file, 'Can find our sample module file');
+ ok(-f $dist_file, '... and is a file');
+ ok(-r $dist_file, '... and have read permissions');
+}
done_testing;
diff --git a/t/lib/ShareDir/TestClass.pm b/t/lib/ShareDir/TestClass.pm
index 4140dc9..c84fa47 100644
--- a/t/lib/ShareDir/TestClass.pm
+++ b/t/lib/ShareDir/TestClass.pm
@@ -4,6 +4,6 @@ use strict;
use parent ("File::ShareDir");
-our $VERSION = "1.02";
+our $VERSION = "1.118";
1;
diff --git a/testrules.yml b/testrules.yml
new file mode 100644
index 0000000..81f9671
--- /dev/null
+++ b/testrules.yml
@@ -0,0 +1,5 @@
+seq:
+ - seq:
+ - t/04_fail.t
+ - t/06_old.t
+ - par: **