Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Path-Tiny for openSUSE:Factory checked in at 2022-11-09 12:55:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Path-Tiny (Old) and /work/SRC/openSUSE:Factory/.perl-Path-Tiny.new.1597 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Path-Tiny" Wed Nov 9 12:55:58 2022 rev:30 rq:1034336 version:0.130 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Path-Tiny/perl-Path-Tiny.changes 2022-09-10 20:16:44.060743041 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Path-Tiny.new.1597/perl-Path-Tiny.changes 2022-11-09 12:56:03.887884292 +0100 @@ -1,0 +2,23 @@ +Fri Oct 21 03:09:03 UTC 2022 - Tina M??ller <timueller+p...@suse.de> + +- updated to 0.130 + see /usr/share/doc/packages/perl-Path-Tiny/Changes + + 0.130 2022-10-20 07:08:01-04:00 America/New_York + [Bug fixes] + - mkdir no longer fails when applied to an existing directory. + 0.128 2022-10-19 15:32:39-04:00 America/New_York + - No changes from 0.127-TRIAL. + 0.127 2022-10-05 17:17:36-04:00 America/New_York (TRIAL RELEASE) + [Testing] + - Fixed has_same_bytes test for Windows. + 0.125 2022-09-30 17:08:36-04:00 America/New_York (TRIAL RELEASE) + [*** DEPRECATIONS ***] + - The 'mkpath' method is deprecated in favor of 'mkdir'. + [Additions] + - Added 'mkdir' to replace 'mkpath', but returning the path object for chaining. + - Added `has_same_bytes` to efficiently compare the contents of two files. + [Documentation] + - Edited SYNOPSIS + +------------------------------------------------------------------- Old: ---- Path-Tiny-0.124.tar.gz New: ---- Path-Tiny-0.130.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Path-Tiny.spec ++++++ --- /var/tmp/diff_new_pack.enejRh/_old 2022-11-09 12:56:04.427887337 +0100 +++ /var/tmp/diff_new_pack.enejRh/_new 2022-11-09 12:56:04.435887381 +0100 @@ -18,7 +18,7 @@ %define cpan_name Path-Tiny Name: perl-Path-Tiny -Version: 0.124 +Version: 0.130 Release: 0 License: Apache-2.0 Summary: File path utility ++++++ Path-Tiny-0.124.tar.gz -> Path-Tiny-0.130.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/Changes new/Path-Tiny-0.130/Changes --- old/Path-Tiny-0.124/Changes 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/Changes 2022-10-20 13:08:18.000000000 +0200 @@ -1,5 +1,37 @@ Revision history for Path-Tiny +0.130 2022-10-20 07:08:01-04:00 America/New_York + + [Bug fixes] + + - mkdir no longer fails when applied to an existing directory. + +0.128 2022-10-19 15:32:39-04:00 America/New_York + + - No changes from 0.127-TRIAL. + +0.127 2022-10-05 17:17:36-04:00 America/New_York (TRIAL RELEASE) + + [Testing] + + - Fixed has_same_bytes test for Windows. + +0.125 2022-09-30 17:08:36-04:00 America/New_York (TRIAL RELEASE) + + [*** DEPRECATIONS ***] + + - The 'mkpath' method is deprecated in favor of 'mkdir'. + + [Additions] + + - Added 'mkdir' to replace 'mkpath', but returning the path object for chaining. + + - Added `has_same_bytes` to efficiently compare the contents of two files. + + [Documentation] + + - Edited SYNOPSIS + 0.124 2022-09-02 11:06:12-04:00 America/New_York - No changes from 0.123-TRIAL. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/MANIFEST new/Path-Tiny-0.130/MANIFEST --- old/Path-Tiny-0.124/MANIFEST 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/MANIFEST 2022-10-20 13:08:18.000000000 +0200 @@ -25,11 +25,13 @@ t/fakelib/PerlIO/utf8_strict.pm t/fakelib/Unicode/UTF8.pm t/filesystem.t +t/has_same_bytes.t t/input_output.t t/input_output_no_PU_UU.t t/input_output_no_UU.t t/lib/TestUtils.pm t/locking.t +t/mkdir.t t/mkpath.t t/mutable_tree_while_iterating.t t/normalize.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/META.json new/Path-Tiny-0.130/META.json --- old/Path-Tiny-0.124/META.json 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/META.json 2022-10-20 13:08:18.000000000 +0200 @@ -74,6 +74,7 @@ "Encode" : "0", "Exporter" : "5.57", "Fcntl" : "0", + "File::Compare" : "0", "File::Copy" : "0", "File::Glob" : "0", "File::Path" : "2.07", @@ -112,11 +113,11 @@ "provides" : { "Path::Tiny" : { "file" : "lib/Path/Tiny.pm", - "version" : "0.124" + "version" : "0.130" }, "Path::Tiny::Error" : { "file" : "lib/Path/Tiny.pm", - "version" : "0.124" + "version" : "0.130" } }, "release_status" : "stable", @@ -131,7 +132,7 @@ "web" : "https://github.com/dagolden/Path-Tiny" } }, - "version" : "0.124", + "version" : "0.130", "x_authority" : "cpan:DAGOLDEN", "x_contributors" : [ "Alex Efros <power...@powerman.name>", @@ -141,6 +142,7 @@ "Dave Rolsky <auta...@urth.org>", "David Steinbrunner <dsteinbrun...@pobox.com>", "Doug Bell <madcity...@gmail.com>", + "Elvin Aslanov <rwp.prim...@gmail.com>", "Flavio Poletti <fla...@polettix.it>", "Gabor Szabo <szab...@cpan.org>", "Gabriel Andrade <gabi...@gmail.com>", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/META.yml new/Path-Tiny-0.130/META.yml --- old/Path-Tiny-0.124/META.yml 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/META.yml 2022-10-20 13:08:18.000000000 +0200 @@ -36,10 +36,10 @@ provides: Path::Tiny: file: lib/Path/Tiny.pm - version: '0.124' + version: '0.130' Path::Tiny::Error: file: lib/Path/Tiny.pm - version: '0.124' + version: '0.130' recommends: Unicode::UTF8: '0.58' requires: @@ -50,6 +50,7 @@ Encode: '0' Exporter: '5.57' Fcntl: '0' + File::Compare: '0' File::Copy: '0' File::Glob: '0' File::Path: '2.07' @@ -66,7 +67,7 @@ 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.124' +version: '0.130' x_authority: cpan:DAGOLDEN x_contributors: - 'Alex Efros <power...@powerman.name>' @@ -76,6 +77,7 @@ - 'Dave Rolsky <auta...@urth.org>' - 'David Steinbrunner <dsteinbrun...@pobox.com>' - 'Doug Bell <madcity...@gmail.com>' + - 'Elvin Aslanov <rwp.prim...@gmail.com>' - 'Flavio Poletti <fla...@polettix.it>' - 'Gabor Szabo <szab...@cpan.org>' - 'Gabriel Andrade <gabi...@gmail.com>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/Makefile.PL new/Path-Tiny-0.130/Makefile.PL --- old/Path-Tiny-0.124/Makefile.PL 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/Makefile.PL 2022-10-20 13:08:18.000000000 +0200 @@ -24,6 +24,7 @@ "Encode" => 0, "Exporter" => "5.57", "Fcntl" => 0, + "File::Compare" => 0, "File::Copy" => 0, "File::Glob" => 0, "File::Path" => "2.07", @@ -48,7 +49,7 @@ "lib" => 0, "open" => 0 }, - "VERSION" => "0.124", + "VERSION" => "0.130", "test" => { "TESTS" => "t/*.t" } @@ -66,6 +67,7 @@ "ExtUtils::MakeMaker" => 0, "Fcntl" => 0, "File::Basename" => 0, + "File::Compare" => 0, "File::Copy" => 0, "File::Glob" => 0, "File::Path" => "2.07", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/README new/Path-Tiny-0.130/README --- old/Path-Tiny-0.124/README 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/README 2022-10-20 13:08:18.000000000 +0200 @@ -2,45 +2,45 @@ Path::Tiny - File path utility VERSION - version 0.124 + version 0.130 SYNOPSIS use Path::Tiny; - # creating Path::Tiny objects + # Creating Path::Tiny objects - $dir = path("/tmp"); - $foo = path("foo.txt"); + my $dir = path("/tmp"); + my $foo = path("foo.txt"); - $subdir = $dir->child("foo"); - $bar = $subdir->child("bar.txt"); + my $subdir = $dir->child("foo"); + my $bar = $subdir->child("bar.txt"); - # stringifies as cleaned up path + # Stringifies as cleaned up path - $file = path("./foo.txt"); + my $file = path("./foo.txt"); print $file; # "foo.txt" - # reading files + # Reading files - $guts = $file->slurp; - $guts = $file->slurp_utf8; + my $guts = $file->slurp; + my $guts = $file->slurp_utf8; - @lines = $file->lines; - @lines = $file->lines_utf8; + my @lines = $file->lines; + my @lines = $file->lines_utf8; - ($head) = $file->lines( {count => 1} ); - ($tail) = $file->lines( {count => -1} ); + my ($head) = $file->lines( {count => 1} ); + my ($tail) = $file->lines( {count => -1} ); - # writing files + # Writing files - $bar->spew( @data ); - $bar->spew_utf8( @data ); + my $bar->spew( @data ); + my $bar->spew_utf8( @data ); - # reading directories + # Reading directories for ( $dir->children ) { ... } - $iter = $dir->iterator; + my $iter = $dir->iterator; while ( my $next = $iter->() ) { ... } DESCRIPTION @@ -478,6 +478,20 @@ Current API available since 0.066. + has_same_bytes + if ( path("foo.txt")->has_same_bytes("bar.txt") ) { + # ... + } + + This method returns true if both the invocant and the argument can be + opened as file handles and the handles contain the same bytes. It + returns false if their contents differ. If either can't be opened as a + file (e.g. a directory or non-existent file), the method throws an + exception. If both can be opened and both have the same "realpath", the + method returns true without scanning any data. + + Current API available since 0.125. + is_absolute, is_relative if ( path("/tmp")->is_absolute ) { ... } if ( path("/tmp")->is_relative ) { ... } @@ -575,19 +589,25 @@ Current API available since 0.065. - mkpath - path("foo/bar/baz")->mkpath; - path("foo/bar/baz")->mkpath( \%options ); + mkdir + path("foo/bar/baz")->mkdir; + path("foo/bar/baz")->mkdir( \%options ); Like calling "make_path" from File::Path. An optional hash reference is passed through to "make_path". Errors will be trapped and an exception - thrown. Returns the list of directories created or an empty list if the - directories already exist, just like "make_path". + thrown. Returns the the path object to facilitate chaining. - See also "touchpath" as a chainable alternative to create a writeable - file path (though without options). + NOTE: unlike Perl's builtin "mkdir", this will create intermediate paths + similar to the Unix "mkdir -p" command. It will not error if applied to + an existing directory. - Current API available since 0.001. + Current API available since 0.125. + + mkpath (deprecated) + Like calling "mkdir", but returns the list of directories created or an + empty list if the directories already exist, just like "make_path". + + Deprecated in 0.125. move path("foo.txt")->move("bar.txt"); @@ -891,9 +911,13 @@ touchpath path("bar/baz/foo.txt")->touchpath; - Combines "mkpath" and "touch". Creates the parent directory if it - doesn't exist, before touching the file. Returns the path object like - "touch" does. + Combines "mkdir" and "touch". Creates the parent directory if it doesn't + exist, before touching the file. Returns the path object like "touch" + does. + + If you need to pass options, use "mkdir" and "touch" separately: + + path("bar/baz")->mkdir( \%options )->child("foo.txt")->touch($epoch_secs); Current API available since 0.022. @@ -1110,6 +1134,8 @@ * Doug Bell <madcity...@gmail.com> + * Elvin Aslanov <rwp.prim...@gmail.com> + * Flavio Poletti <fla...@polettix.it> * Gabor Szabo <szab...@cpan.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/cpanfile new/Path-Tiny-0.130/cpanfile --- old/Path-Tiny-0.124/cpanfile 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/cpanfile 2022-10-20 13:08:18.000000000 +0200 @@ -8,6 +8,7 @@ requires "Encode" => "0"; requires "Exporter" => "5.57"; requires "Fcntl" => "0"; +requires "File::Compare" => "0"; requires "File::Copy" => "0"; requires "File::Glob" => "0"; requires "File::Path" => "2.07"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/dist.ini new/Path-Tiny-0.130/dist.ini --- old/Path-Tiny-0.124/dist.ini 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/dist.ini 2022-10-20 13:08:18.000000000 +0200 @@ -26,6 +26,7 @@ stopwords = iec stopwords = kB stopwords = lstat +stopwords = mkdir stopwords = mkpath stopwords = opena stopwords = openr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/lib/Path/Tiny.pm new/Path-Tiny-0.130/lib/Path/Tiny.pm --- old/Path-Tiny-0.124/lib/Path/Tiny.pm 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/lib/Path/Tiny.pm 2022-10-20 13:08:18.000000000 +0200 @@ -5,7 +5,7 @@ package Path::Tiny; # ABSTRACT: File path utility -our $VERSION = '0.124'; +our $VERSION = '0.130'; # Dependencies use Config; @@ -1113,6 +1113,54 @@ return $fh; } +#pod =method has_same_bytes +#pod +#pod if ( path("foo.txt")->has_same_bytes("bar.txt") ) { +#pod # ... +#pod } +#pod +#pod This method returns true if both the invocant and the argument can be opened as +#pod file handles and the handles contain the same bytes. It returns false if their +#pod contents differ. If either can't be opened as a file (e.g. a directory or +#pod non-existent file), the method throws an exception. If both can be opened and +#pod both have the same C<realpath>, the method returns true without scanning any +#pod data. +#pod +#pod Current API available since 0.125. +#pod +#pod =cut + +sub has_same_bytes { + my ($self, $other_path) = @_; + my $other = path($other_path); + + my $fh1 = $self->openr_raw({ locked => 1 }); + my $fh2 = $other->openr_raw({ locked => 1 }); + + # check for directories + if (-d $fh1) { + $self->_throw('has_same_bytes', $self->[PATH], "directory not allowed"); + } + if (-d $fh2) { + $self->_throw('has_same_bytes', $other->[PATH], "directory not allowed"); + } + + # Now that handles are open, we know the inputs are readable files that + # exist, so it's safe to compare via realpath + if ($self->realpath eq $other->realpath) { + return 1 + } + + # result is 0 for equal, 1 for unequal, -1 for error + require File::Compare; + my $res = File::Compare::compare($fh1, $fh2, 65536); + if ($res < 0) { + $self->_throw('has_same_bytes') + } + + return $res == 0; +} + #pod =method is_absolute, is_relative #pod #pod if ( path("/tmp")->is_absolute ) { ... } @@ -1341,20 +1389,50 @@ } } -#pod =method mkpath +#pod =method mkdir #pod -#pod path("foo/bar/baz")->mkpath; -#pod path("foo/bar/baz")->mkpath( \%options ); +#pod path("foo/bar/baz")->mkdir; +#pod path("foo/bar/baz")->mkdir( \%options ); #pod #pod Like calling C<make_path> from L<File::Path>. An optional hash reference #pod is passed through to C<make_path>. Errors will be trapped and an exception -#pod thrown. Returns the list of directories created or an empty list if -#pod the directories already exist, just like C<make_path>. +#pod thrown. Returns the the path object to facilitate chaining. #pod -#pod See also L</touchpath> as a chainable alternative to create a writeable file path -#pod (though without options). +#pod B<NOTE>: unlike Perl's builtin C<mkdir>, this will create intermediate paths +#pod similar to the Unix C<mkdir -p> command. It will not error if applied to an +#pod existing directory. #pod -#pod Current API available since 0.001. +#pod Current API available since 0.125. +#pod +#pod =cut + +sub mkdir { + my ( $self, $args ) = @_; + $args = {} unless ref $args eq 'HASH'; + my $err; + $args->{error} = \$err unless defined $args->{error}; + require File::Path; + my @dirs; + my $ok = eval { + File::Path::make_path( $self->[PATH], $args ); + 1; + }; + if (!$ok) { + $self->_throw('mkdir', $self->[PATH], "error creating path: $@"); + } + if ( $err && @$err ) { + my ( $file, $message ) = %{ $err->[0] }; + $self->_throw('mkdir', $file, $message); + } + return $self; +} + +#pod =method mkpath (deprecated) +#pod +#pod Like calling C<mkdir>, but returns the list of directories created or an empty list if +#pod the directories already exist, just like C<make_path>. +#pod +#pod Deprecated in 0.125. #pod #pod =cut @@ -2119,9 +2197,13 @@ #pod #pod path("bar/baz/foo.txt")->touchpath; #pod -#pod Combines C<mkpath> and C<touch>. Creates the parent directory if it doesn't exist, +#pod Combines C<mkdir> and C<touch>. Creates the parent directory if it doesn't exist, #pod before touching the file. Returns the path object like C<touch> does. #pod +#pod If you need to pass options, use C<mkdir> and C<touch> separately: +#pod +#pod path("bar/baz")->mkdir( \%options )->child("foo.txt")->touch($epoch_secs); +#pod #pod Current API available since 0.022. #pod #pod =cut @@ -2129,7 +2211,7 @@ sub touchpath { my ($self) = @_; my $parent = $self->parent; - $parent->mkpath unless $parent->exists; + $parent->mkdir unless $parent->exists; $self->touch; } @@ -2248,46 +2330,46 @@ =head1 VERSION -version 0.124 +version 0.130 =head1 SYNOPSIS use Path::Tiny; - # creating Path::Tiny objects + # Creating Path::Tiny objects - $dir = path("/tmp"); - $foo = path("foo.txt"); + my $dir = path("/tmp"); + my $foo = path("foo.txt"); - $subdir = $dir->child("foo"); - $bar = $subdir->child("bar.txt"); + my $subdir = $dir->child("foo"); + my $bar = $subdir->child("bar.txt"); - # stringifies as cleaned up path + # Stringifies as cleaned up path - $file = path("./foo.txt"); + my $file = path("./foo.txt"); print $file; # "foo.txt" - # reading files + # Reading files - $guts = $file->slurp; - $guts = $file->slurp_utf8; + my $guts = $file->slurp; + my $guts = $file->slurp_utf8; - @lines = $file->lines; - @lines = $file->lines_utf8; + my @lines = $file->lines; + my @lines = $file->lines_utf8; - ($head) = $file->lines( {count => 1} ); - ($tail) = $file->lines( {count => -1} ); + my ($head) = $file->lines( {count => 1} ); + my ($tail) = $file->lines( {count => -1} ); - # writing files + # Writing files - $bar->spew( @data ); - $bar->spew_utf8( @data ); + my $bar->spew( @data ); + my $bar->spew_utf8( @data ); - # reading directories + # Reading directories for ( $dir->children ) { ... } - $iter = $dir->iterator; + my $iter = $dir->iterator; while ( my $next = $iter->() ) { ... } =head1 DESCRIPTION @@ -2751,6 +2833,21 @@ Current API available since 0.066. +=head2 has_same_bytes + + if ( path("foo.txt")->has_same_bytes("bar.txt") ) { + # ... + } + +This method returns true if both the invocant and the argument can be opened as +file handles and the handles contain the same bytes. It returns false if their +contents differ. If either can't be opened as a file (e.g. a directory or +non-existent file), the method throws an exception. If both can be opened and +both have the same C<realpath>, the method returns true without scanning any +data. + +Current API available since 0.125. + =head2 is_absolute, is_relative if ( path("/tmp")->is_absolute ) { ... } @@ -2851,20 +2948,27 @@ Current API available since 0.065. -=head2 mkpath +=head2 mkdir - path("foo/bar/baz")->mkpath; - path("foo/bar/baz")->mkpath( \%options ); + path("foo/bar/baz")->mkdir; + path("foo/bar/baz")->mkdir( \%options ); Like calling C<make_path> from L<File::Path>. An optional hash reference is passed through to C<make_path>. Errors will be trapped and an exception -thrown. Returns the list of directories created or an empty list if -the directories already exist, just like C<make_path>. +thrown. Returns the the path object to facilitate chaining. -See also L</touchpath> as a chainable alternative to create a writeable file path -(though without options). +B<NOTE>: unlike Perl's builtin C<mkdir>, this will create intermediate paths +similar to the Unix C<mkdir -p> command. It will not error if applied to an +existing directory. -Current API available since 0.001. +Current API available since 0.125. + +=head2 mkpath (deprecated) + +Like calling C<mkdir>, but returns the list of directories created or an empty list if +the directories already exist, just like C<make_path>. + +Deprecated in 0.125. =head2 move @@ -3198,9 +3302,13 @@ path("bar/baz/foo.txt")->touchpath; -Combines C<mkpath> and C<touch>. Creates the parent directory if it doesn't exist, +Combines C<mkdir> and C<touch>. Creates the parent directory if it doesn't exist, before touching the file. Returns the path object like C<touch> does. +If you need to pass options, use C<mkdir> and C<touch> separately: + + path("bar/baz")->mkdir( \%options )->child("foo.txt")->touch($epoch_secs); + Current API available since 0.022. =head2 visit @@ -3453,7 +3561,7 @@ =head1 CONTRIBUTORS -=for stopwords Alex Efros Aristotle Pagaltzis Chris Williams Dan Book Dave Rolsky David Steinbrunner Doug Bell Flavio Poletti Gabor Szabo Gabriel Andrade George Hartzell Geraud Continsouzas Goro Fuji Graham Knop Ollis Ian Sillitoe James Hunt John Karr Karen Etheridge Mark Ellis Martin H. Sluka 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 Dan Book Dave Rolsky David Steinbrunner Doug Bell Elvin Aslanov Flavio Poletti Gabor Szabo Gabriel Andrade George Hartzell Geraud Continsouzas Goro Fuji Graham Knop Ollis Ian Sillitoe James Hunt John Karr Karen Etheridge Mark Ellis Martin H. Sluka 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 @@ -3487,6 +3595,10 @@ =item * +Elvin Aslanov <rwp.prim...@gmail.com> + +=item * + Flavio Poletti <fla...@polettix.it> =item * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/t/00-report-prereqs.dd new/Path-Tiny-0.130/t/00-report-prereqs.dd --- old/Path-Tiny-0.124/t/00-report-prereqs.dd 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/t/00-report-prereqs.dd 2022-10-20 13:08:18.000000000 +0200 @@ -47,6 +47,7 @@ 'Encode' => '0', 'Exporter' => '5.57', 'Fcntl' => '0', + 'File::Compare' => '0', 'File::Copy' => '0', 'File::Glob' => '0', 'File::Path' => '2.07', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/t/filesystem.t new/Path-Tiny-0.130/t/filesystem.t --- old/Path-Tiny-0.124/t/filesystem.t 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/t/filesystem.t 2022-10-20 13:08:18.000000000 +0200 @@ -93,7 +93,7 @@ $dir = path( $tmpdir, 'foo', 'bar' ); $dir->parent->remove_tree if -e $dir->parent; - ok $dir->mkpath, "Created $dir"; + ok $dir->mkdir, "Created $dir"; ok -d $dir, "$dir is a directory"; $dir = $dir->parent; @@ -103,8 +103,8 @@ { $dir = path( $tmpdir, 'foo' ); - ok $dir->mkpath; - ok $dir->child('dir')->mkpath; + ok $dir->mkdir; + ok $dir->child('dir')->mkdir; ok -d $dir->child('dir'); ok $dir->child('file.x')->touch; @@ -159,10 +159,10 @@ # Try again with directory called '0', in curdir my $orig = Path::Tiny->cwd; - ok $dir->mkpath; + ok $dir->mkdir; ok chdir($dir); my $dir2 = path("."); - ok $dir2->child('0')->mkpath; + ok $dir2->child('0')->mkdir; ok -d $dir2->child('0'); subtest 'iterator' => sub { @@ -207,7 +207,7 @@ ok !$file->remove, "removing file again returns false"; my $subdir = $tmpdir->child('subdir'); - ok $subdir->mkpath; + ok $subdir->mkdir; ok exception { $subdir->remove }, "calling 'remove' on a directory throws"; ok rmdir $subdir; @@ -362,7 +362,7 @@ my $dir = $newtmp->child('foo'); $link = $newtmp->child("bar"); - ok $dir->mkpath; + ok $dir->mkdir; ok -d $dir; $file = $dir->child("baz.txt"); $file->spew("Hello World\n"); @@ -373,7 +373,7 @@ $dir = $newtmp->child('foo'); $link = $newtmp->child("bar"); - ok $dir->mkpath; + ok $dir->mkdir; ok -d $dir; $file = $dir->child("baz.txt"); $file->spew("Hello World\n"); @@ -407,7 +407,7 @@ ## ok $t->subsumes($foo_bar), "t subsumes t/foo/bar"; ## ok !$t->contains($foo_bar), "t doesn't contain t/foo/bar"; ## -## $foo_bar->mkpath; +## $foo_bar->mkdir; ## ok $t->subsumes($foo_bar), "t still subsumes t/foo/bar"; ## ok $t->contains($foo_bar), "t now contains t/foo/bar"; ## diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/t/has_same_bytes.t new/Path-Tiny-0.130/t/has_same_bytes.t --- old/Path-Tiny-0.124/t/has_same_bytes.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Path-Tiny-0.130/t/has_same_bytes.t 2022-10-20 13:08:18.000000000 +0200 @@ -0,0 +1,72 @@ +use 5.008001; +use strict; +use warnings; +use Test::More 0.96; + +use lib 't/lib'; +use TestUtils qw/exception has_symlinks/; + +use Path::Tiny; + +my $dir = Path::Tiny->tempdir; + +# identical contents in two files +my $file1a = $dir->child("file1b.txt"); +my $file1b = $dir->child("file1a.txt"); +for my $f ( $file1a, $file1b ) { + $f->spew("hello world"); +} + +# different contents +my $file2 = $dir->child("file2.txt"); +$file2->spew("goodbye world"); + +# a directory, instead of a file +my $subdir = $dir->child("subdir"); +$subdir->mkdir; + +subtest "only files" => sub { + ok( $file1a->has_same_bytes($file1a), "same file" ); + ok( $file1a->has_same_bytes($file1b), "different files, same contents" ); + ok( !$file1a->has_same_bytes($file2), "different files, different contents" ); +}; + +subtest "symlinks" => sub { + plan skip_all => "No symlink support" + unless has_symlinks(); + + my $file1c = $dir->child("file1c.txt"); + symlink "$file1a" => "$file1c"; + + ok( $file1a->has_same_bytes($file1c), "file compared to self symlink" ); + ok( $file1c->has_same_bytes($file1a), "self symlink compared to file" ); +}; + +subtest "exception" => sub { + my $doesnt_exist = $dir->child("doesnt_exist.txt"); + + # Different OSes return different errors, so we just check for any error. + ok( exception { $file1a->has_same_bytes($doesnt_exist) }, + "file->has_same_bytes(doesnt_exist)" ); + ok( exception { $doesnt_exist->has_same_bytes($file1a) }, + "doesnt_exist->has_same_bytes(file)" ); + ok( exception { $file1a->has_same_bytes($subdir) }, + "file->has_same_bytes(dir)" ); + ok( exception { $subdir->has_same_bytes($file1a) }, + "dir->has_same_bytes(file)" ); + ok( exception { $subdir->has_same_bytes($subdir) }, + "dir->has_same_bytes(dir)" ); + ok( exception { $subdir->has_same_bytes($dir) }, + "dir->has_same_bytes(different_dir)" ); +}; + +done_testing; +# +# This file is part of Path-Tiny +# +# This software is Copyright (c) 2014 by David Golden. +# +# This is free software, licensed under: +# +# The Apache License, Version 2.0, January 2004 +# diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/t/mkdir.t new/Path-Tiny-0.130/t/mkdir.t --- old/Path-Tiny-0.124/t/mkdir.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Path-Tiny-0.130/t/mkdir.t 2022-10-20 13:08:18.000000000 +0200 @@ -0,0 +1,40 @@ +use 5.008001; +use strict; +use warnings; +use Test::More 0.96; +use File::Temp (); + +use lib 't/lib'; +use TestUtils qw/exception/; + +use Path::Tiny; + +my $tempdir = File::Temp->newdir; + +my $path = path($tempdir)->child("foo"); + +ok( !-e $path, "target directory not created yet" ); +ok( $path->mkdir, "mkdir on directory returned true" ); +ok( -d $path, "target directory created" ); +ok( $path->mkdir, "mkdir on existing directory returned true" ); + +if ( $^O ne 'MSWin32' ) { + my $path2 = path($tempdir)->child("bar"); + ok( !-e $path2, "target directory not created yet" ); + ok( $path2->mkdir( { mode => 0700 } ), "mkdir on directory with mode" ); + if ( $^O ne 'msys' ) { + is( $path2->stat->mode & 0777, 0700, "correct mode" ); + } + ok( -d $path2, "target directory created" ); +} + +done_testing; +# +# This file is part of Path-Tiny +# +# This software is Copyright (c) 2014 by David Golden. +# +# This is free software, licensed under: +# +# The Apache License, Version 2.0, January 2004 +# diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/t/rel-abs.t new/Path-Tiny-0.130/t/rel-abs.t --- old/Path-Tiny-0.124/t/rel-abs.t 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/t/rel-abs.t 2022-10-20 13:08:18.000000000 +0200 @@ -107,7 +107,7 @@ my $wd = tempd; my $cwd = path(".")->realpath; my $deep = $cwd->child("foo/bar/baz/bam/bim/buz/wiz/was/woz"); - $deep->mkpath(); + $deep->mkdir(); plan skip_all => "No symlink support" unless has_symlinks(); @@ -118,44 +118,44 @@ # # A_BCD->rel(A_BEF) - common point A_BC - result: ../../C/D # - $cwd->child("A")->mkpath; + $cwd->child("A")->mkdir; symlink $deep, "A/B" or die "$!"; $path = $cwd->child("A/B/C/D"); - $path->mkpath; + $path->mkdir; is( $path->relative( $cwd->child("A/B/E/F") ), "../../C/D", "A_BCD->rel(A_BEF)" ); $cwd->child("A")->remove_tree; $deep->remove_tree; - $deep->mkpath; + $deep->mkdir; # (b) symlink in path from common to original path # # ABC_DE->rel(ABFG) - common point AB - result: ../../C/D/E # - $cwd->child("A/B/C")->mkpath; + $cwd->child("A/B/C")->mkdir; symlink $deep, "A/B/C/D" or die "$!"; $path = $cwd->child("A/B/C/D/E"); - $path->mkpath; + $path->mkdir; is( $path->relative( $cwd->child("A/B/F/G") ), "../../C/D/E", "ABC_DE->rel(ABC_FG)" ); $cwd->child("A")->remove_tree; $deep->remove_tree; - $deep->mkpath; + $deep->mkdir; # (c) symlink in path from common to new base; all path exist # # ABCD->rel(ABE_FG) - common point AB - result depends on E_F resolution # $path = $cwd->child("A/B/C/D"); - $path->mkpath; - $cwd->child("A/B/E")->mkpath; + $path->mkdir; + $cwd->child("A/B/E")->mkdir; symlink $deep, "A/B/E/F" or die $!; $base = $cwd->child("A/B/E/F/G"); - $base->mkpath; + $base->mkdir; $expect = $path->relative( $deep->child("G") ); is( $path->relative($base), $expect, "ABCD->rel(ABE_FG) [real paths]" ); $cwd->child("A")->remove_tree; $deep->remove_tree; - $deep->mkpath; + $deep->mkdir; # (d) symlink in path from common to new base; paths after symlink # don't exist @@ -163,41 +163,41 @@ # ABCD->rel(ABE_FGH) - common point AB - result depends on E_F resolution # $path = $cwd->child("A/B/C/D"); - $path->mkpath; - $cwd->child("A/B/E")->mkpath; + $path->mkdir; + $cwd->child("A/B/E")->mkdir; symlink $deep, "A/B/E/F" or die $!; $base = $cwd->child("A/B/E/F/G/H"); $expect = $path->relative( $deep->child("G/H") ); is( $path->relative($base), $expect, "ABCD->rel(ABE_FGH) [unreal paths]" ); $cwd->child("A")->remove_tree; $deep->remove_tree; - $deep->mkpath; + $deep->mkdir; # (e) symlink at end of common, with updir at start of new base # # AB_CDE->rel(AB_C..FG) - common point really AB - result depends on # symlink resolution # - $cwd->child("A/B")->mkpath; + $cwd->child("A/B")->mkdir; symlink $deep, "A/B/C" or die "$!"; $path = $cwd->child("A/B/C/D/E"); - $path->mkpath; + $path->mkdir; $base = $cwd->child("A/B/C/../F/G"); - $base->mkpath; + $base->mkdir; $expect = $path->relative( $deep->parent->child("F/G")->realpath ); is( $path->relative($base), $expect, "AB_CDE->rel(AB_C..FG)" ); $cwd->child("A")->remove_tree; $deep->remove_tree; - $deep->mkpath; + $deep->mkdir; # (f) updirs in new base [files exist] # # ABCDE->rel(ABF..GH) - common point AB - result ../../C/D/E # $path = $cwd->child("A/B/C/D/E"); - $path->mkpath; - $cwd->child("A/B/F")->mkpath; - $cwd->child("A/B/G/H")->mkpath; + $path->mkdir; + $cwd->child("A/B/F")->mkdir; + $cwd->child("A/B/G/H")->mkdir; $base = $cwd->child("A/B/F/../G/H"); $expect = "../../C/D/E"; is( $path->relative($base), $expect, "ABCDE->rel(ABF..GH) [real paths]" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/t/symlinks.t new/Path-Tiny-0.130/t/symlinks.t --- old/Path-Tiny-0.124/t/symlinks.t 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/t/symlinks.t 2022-10-20 13:08:18.000000000 +0200 @@ -14,7 +14,7 @@ subtest "relative symlinks with updir" => sub { my $temp = Path::Tiny->tempdir; my $td = $temp->realpath; - $td->child(qw/tmp tmp2/)->mkpath; + $td->child(qw/tmp tmp2/)->mkdir; my $foo = $td->child(qw/tmp foo/)->touch; my $bar = $td->child(qw/tmp tmp2 bar/); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/t/temp.t new/Path-Tiny-0.130/t/temp.t --- old/Path-Tiny-0.124/t/temp.t 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/t/temp.t 2022-10-20 13:08:18.000000000 +0200 @@ -83,7 +83,7 @@ my $basedir = Path::Tiny->cwd; my $repodir = $basedir->child('whatever'); $repodir->remove_tree if $repodir->exists; - $repodir->mkpath; + $repodir->mkdir; my $tempdir = $repodir->tempdir("helloXXXXX"); like( $tempdir, qr/hello/, "found template" ); ok( scalar($repodir->children) > 0, 'something was created' ); @@ -97,7 +97,7 @@ my $basedir = Path::Tiny->cwd; my $repodir = $basedir->child('whatever'); $repodir->remove_tree if $repodir->exists; - $repodir->mkpath; + $repodir->mkdir; my $tempdir = $repodir->tempdir("helloXXXXX"); like( $tempdir, qr/hello/, "found template" ); ok( scalar($repodir->children) > 0, 'something was created' ); @@ -111,7 +111,7 @@ my $basedir = Path::Tiny->cwd; my $repodir = $basedir->child('whatever'); $repodir->remove_tree if $repodir->exists; - $repodir->mkpath; + $repodir->mkdir; my $tempfile = $repodir->tempfile( TEMPLATE => "helloXXXXX" ); like( $tempfile, qr/hello/, "found template" ); ok( scalar($repodir->children) > 0, 'something was created' ); @@ -125,7 +125,7 @@ my $basedir = Path::Tiny->cwd; my $repodir = $basedir->child('whatever'); $repodir->remove_tree if $repodir->exists; - $repodir->mkpath; + $repodir->mkdir; my $tempfile = $repodir->tempfile( TEMPLATE => "helloXXXXX"); like( $tempfile, qr/hello/, "found template" ); ok( scalar($repodir->children) > 0, 'something was created' ); @@ -139,7 +139,7 @@ my $basedir = Path::Tiny->cwd; my $repodir = $basedir->child('whatever'); $repodir->remove_tree if $repodir->exists; - $repodir->mkpath; + $repodir->mkdir; my $bd = $basedir->stringify; my $tempfile = $repodir->tempfile("helloXXXXX", DIR => $bd); ok( $tempfile->parent ne $bd ), "DIR is overridden"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.124/xt/author/pod-spell.t new/Path-Tiny-0.130/xt/author/pod-spell.t --- old/Path-Tiny-0.124/xt/author/pod-spell.t 2022-09-02 17:06:29.000000000 +0200 +++ new/Path-Tiny-0.130/xt/author/pod-spell.t 2022-10-20 13:08:18.000000000 +0200 @@ -14,6 +14,7 @@ Alex Andrade Aristotle +Aslanov BENCHMARKING Bell BooK @@ -29,6 +30,7 @@ Doug Efros Ellis +Elvin Etheridge Fish Flavio @@ -118,6 +120,7 @@ mark miyagawa mk +mkdir mkpath mschwern nigelgregoire @@ -132,6 +135,7 @@ realpath regina rivy +rwp shlomif si stat