Hello community, here is the log from the commit of package perl-Path-Tiny for openSUSE:Factory checked in at 2018-07-18 22:37:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Path-Tiny (Old) and /work/SRC/openSUSE:Factory/.perl-Path-Tiny.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Path-Tiny" Wed Jul 18 22:37:22 2018 rev:19 rq:623030 version:0.106 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Path-Tiny/perl-Path-Tiny.changes 2017-02-22 13:44:50.290598505 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Path-Tiny.new/perl-Path-Tiny.changes 2018-07-18 22:37:24.150249933 +0200 @@ -1,0 +2,30 @@ +Sun Jul 15 05:54:57 UTC 2018 - co...@suse.com + +- updated to 0.106 + see /usr/share/doc/packages/perl-Path-Tiny/Changes + + 0.106 2018-07-14 09:37:00-04:00 America/New_York + + [Tests] + + - Protected t/locking.t from PERL_PATH_TINY_NO_FLOCK already + in the environment. + + 0.105 2018-07-07 10:09:04-04:00 America/New_York (TRIAL RELEASE) + + [Additions] + + - The PERL_PATH_TINY_NO_FLOCK environment variable has been added to + allow users to disable file locking (and any associated warnings). + + [Changes] + + - Detection of unsupported 'flock' is no longer BSD-specific. This + allows detecting and warning, for example, with the Luster filesystem + on Linux. + + [Tests] + + - Improve reliability and diagnostics of tests run via 'do'. + +------------------------------------------------------------------- Old: ---- Path-Tiny-0.104.tar.gz New: ---- Path-Tiny-0.106.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Path-Tiny.spec ++++++ --- /var/tmp/diff_new_pack.ayvXOW/_old 2018-07-18 22:37:24.982247177 +0200 +++ /var/tmp/diff_new_pack.ayvXOW/_new 2018-07-18 22:37:24.986247164 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Path-Tiny # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: perl-Path-Tiny -Version: 0.104 +Version: 0.106 Release: 0 %define cpan_name Path-Tiny Summary: File path utility @@ -56,7 +56,7 @@ object gives you back the path (after some clean up). File input/output methods 'flock' handles before reading or writing, as -appropriate (if supported by the platform). +appropriate (if supported by the platform and/or filesystem). The '*_utf8' methods ('slurp_utf8', 'lines_utf8', etc.) operate in raw mode. On Windows, that means they will not have CRLF translation from the ++++++ Path-Tiny-0.104.tar.gz -> Path-Tiny-0.106.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/Changes new/Path-Tiny-0.106/Changes --- old/Path-Tiny-0.104/Changes 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/Changes 2018-07-14 15:37:34.000000000 +0200 @@ -1,5 +1,29 @@ Revision history for Path-Tiny +0.106 2018-07-14 09:37:00-04:00 America/New_York + + [Tests] + + - Protected t/locking.t from PERL_PATH_TINY_NO_FLOCK already + in the environment. + +0.105 2018-07-07 10:09:04-04:00 America/New_York (TRIAL RELEASE) + + [Additions] + + - The PERL_PATH_TINY_NO_FLOCK environment variable has been added to + allow users to disable file locking (and any associated warnings). + + [Changes] + + - Detection of unsupported 'flock' is no longer BSD-specific. This + allows detecting and warning, for example, with the Luster filesystem + on Linux. + + [Tests] + + - Improve reliability and diagnostics of tests run via 'do'. + 0.104 2017-02-17 07:17:00-05:00 America/New_York - No changes from 0.103-TRIAL. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/MANIFEST new/Path-Tiny-0.106/MANIFEST --- old/Path-Tiny-0.104/MANIFEST 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/MANIFEST 2018-07-14 15:37:34.000000000 +0200 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.008. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. CONTRIBUTING.mkdn Changes LICENSE @@ -44,10 +44,10 @@ tidyall.ini xt/author/00-compile.t xt/author/critic.t +xt/author/minimum-version.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/portability.t xt/author/test-version.t xt/release/distmeta.t -xt/release/minimum-version.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/META.json new/Path-Tiny-0.106/META.json --- old/Path-Tiny-0.104/META.json 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/META.json 2018-07-14 15:37:34.000000000 +0200 @@ -4,7 +4,7 @@ "David Golden <dagol...@cpan.org>" ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", "license" : [ "apache_2_0" ], @@ -44,7 +44,6 @@ "Dist::Zilla::Plugin::ReleaseStatus::FromVersion" : "0", "Dist::Zilla::Plugin::RemovePrereqs" : "0", "Dist::Zilla::PluginBundle::DAGOLDEN" : "0.072", - "English" : "0", "File::Spec" : "0", "File::Temp" : "0", "IO::Handle" : "0", @@ -55,12 +54,12 @@ "Test::CPAN::Meta" : "0", "Test::MinimumVersion" : "0", "Test::More" : "0", + "Test::Perl::Critic" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", - "Test::Version" : "1", - "blib" : "1.01" + "Test::Version" : "1" } }, "runtime" : { @@ -81,11 +80,11 @@ "File::Temp" : "0.19", "File::stat" : "0", "constant" : "0", - "if" : "0", "overload" : "0", "perl" : "5.008001", "strict" : "0", - "warnings" : "0" + "warnings" : "0", + "warnings::register" : "0" } }, "test" : { @@ -95,6 +94,7 @@ "Test::MockRandom" : "0" }, "requires" : { + "Digest::MD5" : "0", "ExtUtils::MakeMaker" : "0", "File::Basename" : "0", "File::Spec" : "0.86", @@ -111,11 +111,11 @@ "provides" : { "Path::Tiny" : { "file" : "lib/Path/Tiny.pm", - "version" : "0.104" + "version" : "0.106" }, "Path::Tiny::Error" : { "file" : "lib/Path/Tiny.pm", - "version" : "0.104" + "version" : "0.106" } }, "release_status" : "stable", @@ -130,10 +130,11 @@ "web" : "https://github.com/dagolden/Path-Tiny" } }, - "version" : "0.104", + "version" : "0.106", "x_authority" : "cpan:DAGOLDEN", "x_contributors" : [ "Alex Efros <power...@powerman.name>", + "Aristotle Pagaltzis <pagalt...@gmx.de>", "Chris Williams <bin...@cpan.org>", "Dave Rolsky <auta...@urth.org>", "David Steinbrunner <dsteinbrun...@pobox.com>", @@ -145,6 +146,7 @@ "Goro Fuji <gf...@cpan.org>", "Graham Knop <ha...@haarg.org>", "Graham Ollis <plice...@cpan.org>", + "Ian Sillitoe <i...@sillit.com>", "James Hunt <ja...@niftylogic.com>", "John Karr <brain...@brainbuz.org>", "Karen Etheridge <et...@cpan.org>", @@ -162,6 +164,7 @@ "Yanick Champoux <yan...@babyl.dyndns.org>", "\uae40\ub3c4\ud615 - Keedi Kim <ke...@cpan.org>" ], - "x_serialization_backend" : "Cpanel::JSON::XS version 3.0225" + "x_generated_by_perl" : "v5.28.0", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.04" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/META.yml new/Path-Tiny-0.106/META.yml --- old/Path-Tiny-0.104/META.yml 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/META.yml 2018-07-14 15:37:34.000000000 +0200 @@ -3,6 +3,7 @@ author: - 'David Golden <dagol...@cpan.org>' build_requires: + Digest::MD5: '0' ExtUtils::MakeMaker: '0' File::Basename: '0' File::Spec: '0.86' @@ -17,7 +18,7 @@ ExtUtils::MakeMaker: '6.17' perl: '5.008001' dynamic_config: 0 -generated_by: 'Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' license: apache meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -35,10 +36,10 @@ provides: Path::Tiny: file: lib/Path/Tiny.pm - version: '0.104' + version: '0.106' Path::Tiny::Error: file: lib/Path/Tiny.pm - version: '0.104' + version: '0.106' recommends: Unicode::UTF8: '0.58' requires: @@ -55,19 +56,20 @@ File::Temp: '0.19' File::stat: '0' constant: '0' - if: '0' overload: '0' perl: '5.008001' strict: '0' warnings: '0' + warnings::register: '0' resources: bugtracker: https://github.com/dagolden/Path-Tiny/issues homepage: https://github.com/dagolden/Path-Tiny repository: https://github.com/dagolden/Path-Tiny.git -version: '0.104' +version: '0.106' x_authority: cpan:DAGOLDEN x_contributors: - 'Alex Efros <power...@powerman.name>' + - 'Aristotle Pagaltzis <pagalt...@gmx.de>' - 'Chris Williams <bin...@cpan.org>' - 'Dave Rolsky <auta...@urth.org>' - 'David Steinbrunner <dsteinbrun...@pobox.com>' @@ -79,6 +81,7 @@ - 'Goro Fuji <gf...@cpan.org>' - 'Graham Knop <ha...@haarg.org>' - 'Graham Ollis <plice...@cpan.org>' + - 'Ian Sillitoe <i...@sillit.com>' - 'James Hunt <ja...@niftylogic.com>' - 'John Karr <brain...@brainbuz.org>' - 'Karen Etheridge <et...@cpan.org>' @@ -95,4 +98,5 @@ - 'Toby Inkster <toby...@cpan.org>' - 'Yanick Champoux <yan...@babyl.dyndns.org>' - '김도형 - Keedi Kim <ke...@cpan.org>' -x_serialization_backend: 'YAML::Tiny version 1.69' +x_generated_by_perl: v5.28.0 +x_serialization_backend: 'YAML::Tiny version 1.73' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/Makefile.PL new/Path-Tiny-0.106/Makefile.PL --- old/Path-Tiny-0.104/Makefile.PL 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/Makefile.PL 2018-07-14 15:37:34.000000000 +0200 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.008. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012. use strict; use warnings; @@ -30,12 +30,13 @@ "File::Temp" => "0.19", "File::stat" => 0, "constant" => 0, - "if" => 0, "overload" => 0, "strict" => 0, - "warnings" => 0 + "warnings" => 0, + "warnings::register" => 0 }, "TEST_REQUIRES" => { + "Digest::MD5" => 0, "ExtUtils::MakeMaker" => 0, "File::Basename" => 0, "File::Spec" => "0.86", @@ -46,7 +47,7 @@ "lib" => 0, "open" => 0 }, - "VERSION" => "0.104", + "VERSION" => "0.106", "test" => { "TESTS" => "t/*.t" } @@ -57,6 +58,7 @@ "Carp" => 0, "Cwd" => 0, "Digest" => "1.03", + "Digest::MD5" => 0, "Digest::SHA" => "5.45", "Exporter" => "5.57", "ExtUtils::MakeMaker" => 0, @@ -72,12 +74,12 @@ "File::stat" => 0, "Test::More" => "0.96", "constant" => 0, - "if" => 0, "lib" => 0, "open" => 0, "overload" => 0, "strict" => 0, - "warnings" => 0 + "warnings" => 0, + "warnings::register" => 0 ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/README new/Path-Tiny-0.106/README --- old/Path-Tiny-0.104/README 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/README 2018-07-14 15:37:34.000000000 +0200 @@ -2,7 +2,7 @@ Path::Tiny - File path utility VERSION - version 0.104 + version 0.106 SYNOPSIS use Path::Tiny; @@ -59,7 +59,7 @@ the object gives you back the path (after some clean up). File input/output methods "flock" handles before reading or writing, as - appropriate (if supported by the platform). + appropriate (if supported by the platform and/or filesystem). The *_utf8 methods ("slurp_utf8", "lines_utf8", etc.) operate in raw mode. On Windows, that means they will not have CRLF translation from @@ -226,9 +226,9 @@ path("foo.txt")->append_raw(@data); path("foo.txt")->append_utf8(@data); - Appends data to a file. The file is locked with "flock" prior to - writing. An optional hash reference may be used to pass options. Valid - options are: + Appends data to a file. The file is locked with "flock" prior to writing + and closed afterwards. An optional hash reference may be used to pass + options. Valid options are: * "binmode": passed to "binmode()" on the handle used for writing. @@ -303,6 +303,11 @@ "catfile" or "catdir" from File::Spec, but without caring about file or directories. + WARNING: because the argument could contain ".." or refer to symlinks, + there is no guarantee that the new path refers to an actual descendent + of the original. If this is important to you, transform parent and child + with "realpath" and check them with "subsumes". + Current API available since 0.001. children @@ -572,7 +577,8 @@ path("foo.txt")->move("bar.txt"); Move the current path to the given destination path using Perl's - built-in rename function. Returns the result of the "rename" function. + built-in rename function. Returns the result of the "rename" function + (except it throws an exception if it fails). Current API available since 0.001. @@ -927,6 +933,12 @@ Exception objects will stringify as the "msg" field. +ENVIRONMENT + PERL_PATH_TINY_NO_FLOCK + If the environment variable "PERL_PATH_TINY_NO_FLOCK" is set to a true + value then flock will NOT be used when accessing files (this is not + recommended). + CAVEATS Subclassing not supported For speed, this class is implemented as an array based object and uses @@ -937,15 +949,24 @@ If flock is not supported on a platform, it will not be used, even if locking is requested. + In situations where a platform normally would support locking, but the + flock fails due to a filesystem limitation, Path::Tiny has some + heuristics to detect this and will warn once and continue in an unsafe + mode. If you want this failure to be fatal, you can fatalize the 'flock' + warnings category: + + use warnings FATAL => 'flock'; + See additional caveats below. NFS and BSD On BSD, Perl's flock implementation may not work to lock files on an NFS - filesystem. Path::Tiny has some heuristics to detect this and will warn - once and let you continue in an unsafe mode. If you want this failure to - be fatal, you can fatalize the 'flock' warnings category: + filesystem. If detected, this situation will warn once, as described + above. - use warnings FATAL => 'flock'; + Lustre + The Lustre filesystem does not support flock. If detected, this + situation will warn once, as described above. AIX and locking AIX requires a write handle for locking. Therefore, calls that normally @@ -1035,6 +1056,8 @@ CONTRIBUTORS * Alex Efros <power...@powerman.name> + * Aristotle Pagaltzis <pagalt...@gmx.de> + * Chris Williams <bin...@cpan.org> * Dave Rolsky <auta...@urth.org> @@ -1057,6 +1080,8 @@ * Graham Ollis <plice...@cpan.org> + * Ian Sillitoe <i...@sillit.com> + * James Hunt <ja...@niftylogic.com> * John Karr <brain...@brainbuz.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/cpanfile new/Path-Tiny-0.106/cpanfile --- old/Path-Tiny-0.104/cpanfile 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/cpanfile 2018-07-14 15:37:34.000000000 +0200 @@ -11,14 +11,15 @@ requires "File::Temp" => "0.19"; requires "File::stat" => "0"; requires "constant" => "0"; -requires "if" => "0"; requires "overload" => "0"; requires "perl" => "5.008001"; requires "strict" => "0"; requires "warnings" => "0"; +requires "warnings::register" => "0"; recommends "Unicode::UTF8" => "0.58"; on 'test' => sub { + requires "Digest::MD5" => "0"; requires "ExtUtils::MakeMaker" => "0"; requires "File::Basename" => "0"; requires "File::Spec" => "0.86"; @@ -54,7 +55,6 @@ requires "Dist::Zilla::Plugin::ReleaseStatus::FromVersion" => "0"; requires "Dist::Zilla::Plugin::RemovePrereqs" => "0"; requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.072"; - requires "English" => "0"; requires "File::Spec" => "0"; requires "File::Temp" => "0"; requires "IO::Handle" => "0"; @@ -65,10 +65,10 @@ requires "Test::CPAN::Meta" => "0"; requires "Test::MinimumVersion" => "0"; requires "Test::More" => "0"; + requires "Test::Perl::Critic" => "0"; requires "Test::Pod" => "1.41"; requires "Test::Pod::Coverage" => "1.08"; requires "Test::Portability::Files" => "0"; requires "Test::Spelling" => "0.12"; requires "Test::Version" => "1"; - requires "blib" => "1.01"; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/lib/Path/Tiny.pm new/Path-Tiny-0.106/lib/Path/Tiny.pm --- old/Path-Tiny-0.104/lib/Path/Tiny.pm 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/lib/Path/Tiny.pm 2018-07-14 15:37:34.000000000 +0200 @@ -5,7 +5,7 @@ package Path::Tiny; # ABSTRACT: File path utility -our $VERSION = '0.104'; +our $VERSION = '0.106'; # Dependencies use Config; @@ -23,7 +23,6 @@ DIR => 3, FILE => 4, TEMP => 5, - IS_BSD => ( scalar $^O =~ /bsd$/ ), IS_WIN32 => ( $^O eq 'MSWin32' ), }; @@ -111,26 +110,26 @@ return $mode; } -# flock doesn't work on NFS on BSD. Since program authors often can't control -# or detect that, we warn once instead of being fatal if we can detect it and -# people who need it strict can fatalize the 'flock' category +# flock doesn't work on NFS on BSD or on some filesystems like lustre. +# Since program authors often can't control or detect that, we warn once +# instead of being fatal if we can detect it and people who need it strict +# can fatalize the 'flock' category #<<< No perltidy -{ package flock; use if Path::Tiny::IS_BSD(), 'warnings::register' } +{ package flock; use warnings::register } #>>> -my $WARNED_BSD_NFS = 0; +my $WARNED_NO_FLOCK = 0; sub _throw { my ( $self, $function, $file, $msg ) = @_; - if ( IS_BSD() - && $function =~ /^flock/ - && $! =~ /operation not supported/i + if ( $function =~ /^flock/ + && $! =~ /operation not supported|function not implemented/i && !warnings::fatal_enabled('flock') ) { - if ( !$WARNED_BSD_NFS ) { - warnings::warn( flock => "No flock for NFS on BSD: continuing in unsafe mode" ); - $WARNED_BSD_NFS++; + if ( !$WARNED_NO_FLOCK ) { + warnings::warn( flock => "Flock not available: '$!': continuing in unsafe mode" ); + $WARNED_NO_FLOCK++; } } else { @@ -503,8 +502,9 @@ #pod path("foo.txt")->append_raw(@data); #pod path("foo.txt")->append_utf8(@data); #pod -#pod Appends data to a file. The file is locked with C<flock> prior to writing. An -#pod optional hash reference may be used to pass options. Valid options are: +#pod Appends data to a file. The file is locked with C<flock> prior to writing +#pod and closed afterwards. An optional hash reference may be used to pass +#pod options. Valid options are: #pod #pod =for :list #pod * C<binmode>: passed to C<binmode()> on the handle used for writing. @@ -665,6 +665,11 @@ #pod like C<catfile> or C<catdir> from File::Spec, but without caring about #pod file or directories. #pod +#pod B<WARNING>: because the argument could contain C<..> or refer to symlinks, +#pod there is no guarantee that the new path refers to an actual descendent of +#pod the original. If this is important to you, transform parent and child with +#pod L</realpath> and check them with L</subsumes>. +#pod #pod Current API available since 0.001. #pod #pod =cut @@ -1019,7 +1024,7 @@ $binmode = "" unless defined $binmode; my ( $fh, $lock, $trunc ); - if ( $HAS_FLOCK && $args->{locked} ) { + if ( $HAS_FLOCK && $args->{locked} && !$ENV{PERL_PATH_TINY_NO_FLOCK} ) { require Fcntl; # truncating file modes shouldn't truncate until lock acquired if ( grep { $opentype eq $_ } qw( > +> ) ) { @@ -1337,7 +1342,7 @@ #pod #pod Move the current path to the given destination path using Perl's #pod built-in L<rename|perlfunc/rename> function. Returns the result -#pod of the C<rename> function. +#pod of the C<rename> function (except it throws an exception if it fails). #pod #pod Current API available since 0.001. #pod @@ -2138,7 +2143,7 @@ =head1 VERSION -version 0.104 +version 0.106 =head1 SYNOPSIS @@ -2197,7 +2202,7 @@ the object gives you back the path (after some clean up). File input/output methods C<flock> handles before reading or writing, -as appropriate (if supported by the platform). +as appropriate (if supported by the platform and/or filesystem). The C<*_utf8> methods (C<slurp_utf8>, C<lines_utf8>, etc.) operate in raw mode. On Windows, that means they will not have CRLF translation from the @@ -2371,8 +2376,9 @@ path("foo.txt")->append_raw(@data); path("foo.txt")->append_utf8(@data); -Appends data to a file. The file is locked with C<flock> prior to writing. An -optional hash reference may be used to pass options. Valid options are: +Appends data to a file. The file is locked with C<flock> prior to writing +and closed afterwards. An optional hash reference may be used to pass +options. Valid options are: =over 4 @@ -2459,6 +2465,11 @@ like C<catfile> or C<catdir> from File::Spec, but without caring about file or directories. +B<WARNING>: because the argument could contain C<..> or refer to symlinks, +there is no guarantee that the new path refers to an actual descendent of +the original. If this is important to you, transform parent and child with +L</realpath> and check them with L</subsumes>. + Current API available since 0.001. =head2 children @@ -2740,7 +2751,7 @@ Move the current path to the given destination path using Perl's built-in L<rename|perlfunc/rename> function. Returns the result -of the C<rename> function. +of the C<rename> function (except it throws an exception if it fails). Current API available since 0.001. @@ -3097,7 +3108,7 @@ =for Pod::Coverage openr_utf8 opena_utf8 openw_utf8 openrw_utf8 openr_raw opena_raw openw_raw openrw_raw -IS_BSD IS_WIN32 FREEZE THAW TO_JSON abs2rel +IS_WIN32 FREEZE THAW TO_JSON abs2rel =head1 EXCEPTION HANDLING @@ -3129,6 +3140,14 @@ Exception objects will stringify as the C<msg> field. +=head1 ENVIRONMENT + +=head2 PERL_PATH_TINY_NO_FLOCK + +If the environment variable C<PERL_PATH_TINY_NO_FLOCK> is set to a true +value then flock will NOT be used when accessing files (this is not +recommended). + =head1 CAVEATS =head2 Subclassing not supported @@ -3142,17 +3161,26 @@ If flock is not supported on a platform, it will not be used, even if locking is requested. +In situations where a platform normally would support locking, but the +flock fails due to a filesystem limitation, Path::Tiny has some heuristics +to detect this and will warn once and continue in an unsafe mode. If you +want this failure to be fatal, you can fatalize the 'flock' warnings +category: + + use warnings FATAL => 'flock'; + See additional caveats below. =head3 NFS and BSD On BSD, Perl's flock implementation may not work to lock files on an -NFS filesystem. Path::Tiny has some heuristics to detect this -and will warn once and let you continue in an unsafe mode. If you -want this failure to be fatal, you can fatalize the 'flock' warnings -category: +NFS filesystem. If detected, this situation will warn once, as described +above. - use warnings FATAL => 'flock'; +=head3 Lustre + +The Lustre filesystem does not support flock. If detected, this situation +will warn once, as described above. =head3 AIX and locking @@ -3269,7 +3297,7 @@ =head1 CONTRIBUTORS -=for stopwords Alex Efros Chris Williams Dave Rolsky David Steinbrunner Doug Bell Gabor Szabo Gabriel Andrade George Hartzell Geraud Continsouzas Goro Fuji Graham Knop Ollis James Hunt John Karr Karen Etheridge Mark Ellis Martin Kjeldsen Michael G. Schwern Nigel Gregoire Philippe Bruhat (BooK) Regina Verbae Roy Ivy III Shlomi Fish Smylers Tatsuhiko Miyagawa Toby Inkster Yanick Champoux 김도형 - Keedi Kim +=for stopwords Alex Efros Aristotle Pagaltzis Chris Williams Dave Rolsky David Steinbrunner Doug Bell Gabor Szabo Gabriel Andrade George Hartzell Geraud Continsouzas Goro Fuji Graham Knop Ollis Ian Sillitoe James Hunt John Karr Karen Etheridge Mark Ellis Martin Kjeldsen Michael G. Schwern Nigel Gregoire Philippe Bruhat (BooK) Regina Verbae Roy Ivy III Shlomi Fish Smylers Tatsuhiko Miyagawa Toby Inkster Yanick Champoux 김도형 - Keedi Kim =over 4 @@ -3279,6 +3307,10 @@ =item * +Aristotle Pagaltzis <pagalt...@gmx.de> + +=item * + Chris Williams <bin...@cpan.org> =item * @@ -3323,6 +3355,10 @@ =item * +Ian Sillitoe <i...@sillit.com> + +=item * + James Hunt <ja...@niftylogic.com> =item * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/t/00-report-prereqs.dd new/Path-Tiny-0.106/t/00-report-prereqs.dd --- old/Path-Tiny-0.104/t/00-report-prereqs.dd 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/t/00-report-prereqs.dd 2018-07-14 15:37:34.000000000 +0200 @@ -17,7 +17,6 @@ 'Dist::Zilla::Plugin::ReleaseStatus::FromVersion' => '0', 'Dist::Zilla::Plugin::RemovePrereqs' => '0', 'Dist::Zilla::PluginBundle::DAGOLDEN' => '0.072', - 'English' => '0', 'File::Spec' => '0', 'File::Temp' => '0', 'IO::Handle' => '0', @@ -28,18 +27,18 @@ 'Test::CPAN::Meta' => '0', 'Test::MinimumVersion' => '0', 'Test::More' => '0', + 'Test::Perl::Critic' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', - 'Test::Version' => '1', - 'blib' => '1.01' + 'Test::Version' => '1' } }, 'runtime' => { 'recommends' => { - 'Unicode::UTF8' => '0.58' - }, + 'Unicode::UTF8' => '0.58' + }, 'requires' => { 'Carp' => '0', 'Cwd' => '0', @@ -54,20 +53,21 @@ 'File::Temp' => '0.19', 'File::stat' => '0', 'constant' => '0', - 'if' => '0', 'overload' => '0', 'perl' => '5.008001', 'strict' => '0', - 'warnings' => '0' + 'warnings' => '0', + 'warnings::register' => '0' } }, 'test' => { 'recommends' => { - 'CPAN::Meta' => '2.120900', - 'Test::FailWarnings' => '0', - 'Test::MockRandom' => '0' - }, + 'CPAN::Meta' => '2.120900', + 'Test::FailWarnings' => '0', + 'Test::MockRandom' => '0' + }, 'requires' => { + 'Digest::MD5' => '0', 'ExtUtils::MakeMaker' => '0', 'File::Basename' => '0', 'File::Spec' => '0.86', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/t/00-report-prereqs.t new/Path-Tiny-0.106/t/00-report-prereqs.t --- old/Path-Tiny-0.104/t/00-report-prereqs.t 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/t/00-report-prereqs.t 2018-07-14 15:37:34.000000000 +0200 @@ -3,7 +3,7 @@ use strict; use warnings; -# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.025 +# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 use Test::More tests => 1; @@ -68,7 +68,7 @@ ); # Add static prereqs to the included modules list -my $static_prereqs = do 't/00-report-prereqs.dd'; +my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( @@ -78,12 +78,14 @@ # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; +my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { + $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } @@ -169,10 +171,18 @@ diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } +if ( $cpan_meta_error || @dep_errors ) { + diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; +} + +if ( $cpan_meta_error ) { + my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; + diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; +} + if ( @dep_errors ) { diag join("\n", - "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", - "The following REQUIRED prerequisites were not satisfied:\n", + "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/t/digest.t new/Path-Tiny-0.106/t/digest.t --- old/Path-Tiny-0.104/t/digest.t 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/t/digest.t 2018-07-14 15:37:34.000000000 +0200 @@ -8,6 +8,7 @@ use Path::Tiny; use Digest; +use Digest::MD5; # for dependency detection my $dir = Path::Tiny->tempdir; my $file = $dir->child('foo.bin'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/t/input_output.t new/Path-Tiny-0.106/t/input_output.t --- old/Path-Tiny-0.104/t/input_output.t 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/t/input_output.t 2018-07-14 15:37:34.000000000 +0200 @@ -552,6 +552,8 @@ }; done_testing; + +1; # # This file is part of Path-Tiny # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/t/input_output_no_PU_UU.t new/Path-Tiny-0.106/t/input_output_no_PU_UU.t --- old/Path-Tiny-0.104/t/input_output_no_PU_UU.t 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/t/input_output_no_PU_UU.t 2018-07-14 15:37:34.000000000 +0200 @@ -11,7 +11,7 @@ note "Hiding Unicode::UTF8 and PerlIO::utf8_strict"; -do "./t/input_output.t"; +do "./t/input_output.t" or die $@ || $!; # # This file is part of Path-Tiny diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/t/input_output_no_UU.t new/Path-Tiny-0.106/t/input_output_no_UU.t --- old/Path-Tiny-0.104/t/input_output_no_UU.t 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/t/input_output_no_UU.t 2018-07-14 15:37:34.000000000 +0200 @@ -12,7 +12,7 @@ note "Hiding Unicode::UTF8"; -do "./t/input_output.t"; +do "./t/input_output.t" or die $@ || $!; # # This file is part of Path-Tiny diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/t/locking.t new/Path-Tiny-0.106/t/locking.t --- old/Path-Tiny-0.104/t/locking.t 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/t/locking.t 2018-07-14 15:37:34.000000000 +0200 @@ -11,9 +11,7 @@ use Fcntl ':flock'; use Path::Tiny; -my $IS_BSD = $^O =~ /bsd$/; - -if ($IS_BSD) { +{ # is temp partition lockable? my $file = Path::Tiny->tempfile; open my $fh, ">>", $file; @@ -21,7 +19,21 @@ or plan skip_all => "Can't lock tempfiles on this OS/filesystem"; } +# Guard against external environment +local $ENV{PERL_PATH_TINY_NO_FLOCK} = 0; + subtest 'write locks blocks read lock' => sub { + my $rc = check_flock(); + is( $rc >> 8, 0, "subprocess failed to get lock" ); +}; + +subtest 'flock ignored if PERL_PATH_TINY_NO_FLOCK=1' => sub { + local $ENV{PERL_PATH_TINY_NO_FLOCK} = 1; + my $rc = check_flock(); + is( $rc >> 8, 1, "subprocess managed to get lock" ); +}; + +sub check_flock { my $file = Path::Tiny->tempfile; ok $file, "Got a tempfile"; my $fh = $file->openw( { locked => 1 } ); @@ -39,7 +51,7 @@ HERE my $rc = system( $^X, $locktester ); isnt( $rc, -1, "ran process to try to get lock" ); - is( $rc >> 8, 0, "process failed to get lock" ); -}; + return $rc; +} done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/xt/author/00-compile.t new/Path-Tiny-0.106/xt/author/00-compile.t --- old/Path-Tiny-0.104/xt/author/00-compile.t 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/xt/author/00-compile.t 2018-07-14 15:37:34.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.056 +# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More; @@ -46,7 +46,7 @@ is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ - and not eval { require blib; blib->VERSION('1.01') }; + and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/xt/author/critic.t new/Path-Tiny-0.106/xt/author/critic.t --- old/Path-Tiny-0.104/xt/author/critic.t 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/xt/author/critic.t 2018-07-14 15:37:34.000000000 +0200 @@ -3,10 +3,5 @@ use strict; use warnings; -use Test::More; -use English qw(-no_match_vars); - -eval "use Test::Perl::Critic"; -plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; -Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; +use Test::Perl::Critic (-profile => "perlcritic.rc") x!! -e "perlcritic.rc"; all_critic_ok(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/xt/author/minimum-version.t new/Path-Tiny-0.106/xt/author/minimum-version.t --- old/Path-Tiny-0.104/xt/author/minimum-version.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Path-Tiny-0.106/xt/author/minimum-version.t 2018-07-14 15:37:34.000000000 +0200 @@ -0,0 +1,6 @@ +#!perl + +use Test::More; + +use Test::MinimumVersion; +all_minimum_version_ok( qq{5.010} ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/xt/author/pod-spell.t new/Path-Tiny-0.106/xt/author/pod-spell.t --- old/Path-Tiny-0.104/xt/author/pod-spell.t 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/xt/author/pod-spell.t 2018-07-14 15:37:34.000000000 +0200 @@ -2,7 +2,7 @@ use warnings; use Test::More; -# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007004 +# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007005 use Test::Spelling 0.12; use Pod::Wordlist; @@ -13,6 +13,7 @@ AIX Alex Andrade +Aristotle BENCHMARKING Bell BooK @@ -40,6 +41,7 @@ Hartzell Hunt III +Ian Inkster Ivy James @@ -57,6 +59,7 @@ NFS Nigel Ollis +Pagaltzis Path Philippe Regina @@ -65,6 +68,7 @@ SHA Schwern Shlomi +Sillitoe Smylers Steinbrunner Szabo @@ -92,6 +96,7 @@ gfuji haarg hartzell +ian james keedi lib @@ -107,6 +112,7 @@ openr openrw openw +pagaltzis plicease powerman realpath diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.104/xt/release/minimum-version.t new/Path-Tiny-0.106/xt/release/minimum-version.t --- old/Path-Tiny-0.104/xt/release/minimum-version.t 2017-02-17 13:17:37.000000000 +0100 +++ new/Path-Tiny-0.106/xt/release/minimum-version.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -#!perl - -use Test::More; - -eval "use Test::MinimumVersion"; -plan skip_all => "Test::MinimumVersion required for testing minimum versions" - if $@; -all_minimum_version_ok( qq{5.010} );