Hello community,

here is the log from the commit of package perl-File-Next for openSUSE:Factory 
checked in at 2019-08-28 18:37:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-File-Next (Old)
 and      /work/SRC/openSUSE:Factory/.perl-File-Next.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-File-Next"

Wed Aug 28 18:37:13 2019 rev:16 rq:726665 version:1.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-File-Next/perl-File-Next.changes    
2016-07-12 23:52:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-File-Next.new.7948/perl-File-Next.changes  
2019-08-28 18:37:19.453264486 +0200
@@ -1,0 +2,19 @@
+Wed Aug 28 05:09:50 UTC 2019 - Stephan Kulow <co...@suse.com>
+
+- updated to 1.18
+   see /usr/share/doc/packages/perl-File-Next/Changes
+
+  1.18 Tue Aug 27 17:08:38 CDT 2019
+      [SPEEDUP]
+      Updated the internals to minimize the number of times that stat()
+      gets called on each file or directory.
+  
+      [FIXES]
+      t/from_file.t would fail under Windows because File::Temp would
+      put a backslash in front of the name of the tempfile.  Thanks,
+      Varadinsky. (GH#32)
+  
+      Had to specify a minimum version of File::Temp.  Thanks, Justin Mohr.
+      (GH#29)
+
+-------------------------------------------------------------------

Old:
----
  File-Next-1.16.tar.gz

New:
----
  File-Next-1.18.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-File-Next.spec ++++++
--- /var/tmp/diff_new_pack.e6Tz0f/_old  2019-08-28 18:37:20.169264361 +0200
+++ /var/tmp/diff_new_pack.e6Tz0f/_new  2019-08-28 18:37:20.173264361 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-File-Next
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -12,24 +12,26 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           perl-File-Next
-Version:        1.16
+Version:        1.18
 Release:        0
 %define cpan_name File-Next
 Summary:        File-finding iterator
 License:        Artistic-2.0
 Group:          Development/Libraries/Perl
-Url:            http://search.cpan.org/dist/File-Next/
-Source0:        
http://www.cpan.org/authors/id/P/PE/PETDANCE/%{cpan_name}-%{version}.tar.gz
+Url:            https://metacpan.org/release/%{cpan_name}
+Source0:        
https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
+BuildRequires:  perl(File::Temp) >= 0.22
 BuildRequires:  perl(Test::More) >= 0.88
+Requires:       perl(File::Temp) >= 0.22
 Requires:       perl(Test::More) >= 0.88
 %{perl_requires}
 
@@ -40,11 +42,11 @@
 %setup -q -n %{cpan_name}-%{version}
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
+make %{?_smp_mflags}
 
 %check
-%{__make} test
+make test
 
 %install
 %perl_make_install

++++++ File-Next-1.16.tar.gz -> File-Next-1.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/File-Next-1.16/Changes new/File-Next-1.18/Changes
--- old/File-Next-1.16/Changes  2016-07-08 05:55:10.000000000 +0200
+++ new/File-Next-1.18/Changes  2019-08-28 00:10:20.000000000 +0200
@@ -3,6 +3,20 @@
 File::Next does NOT use rt.cpan.org for bug tracking.  Please report
 problems at http://github.com/petdance/file-next/issues.
 
+1.18 Tue Aug 27 17:08:38 CDT 2019
+    [SPEEDUP]
+    Updated the internals to minimize the number of times that stat()
+    gets called on each file or directory.
+
+    [FIXES]
+    t/from_file.t would fail under Windows because File::Temp would
+    put a backslash in front of the name of the tempfile.  Thanks,
+    Varadinsky. (GH#32)
+
+    Had to specify a minimum version of File::Temp.  Thanks, Justin Mohr.
+    (GH#29)
+
+
 1.16 Thu Jul  7 22:41:30 CDT 2016
     [FIXES]
     File::Next::from_file() would ignore the C<warning_handler> argument
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/File-Next-1.16/META.json new/File-Next-1.18/META.json
--- old/File-Next-1.16/META.json        2016-07-08 05:59:02.000000000 +0200
+++ new/File-Next-1.18/META.json        2019-08-28 00:10:42.000000000 +0200
@@ -4,13 +4,13 @@
       "Andy Lester <a...@petdance.com>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.18, CPAN::Meta::Converter 
version 2.143240",
+   "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter 
version 2.150005",
    "license" : [
       "artistic_2"
    ],
    "meta-spec" : {
       "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
-      "version" : "2"
+      "version" : 2
    },
    "name" : "File-Next",
    "no_index" : {
@@ -32,7 +32,9 @@
       },
       "runtime" : {
          "requires" : {
+            "File::Copy" : "0",
             "File::Spec" : "0",
+            "File::Temp" : "0.22",
             "Test::More" : "0.88"
          }
       }
@@ -49,5 +51,6 @@
          "url" : "http://github.com/petdance/file-next/tree/master";
       }
    },
-   "version" : "1.16"
+   "version" : "1.18",
+   "x_serialization_backend" : "JSON::PP version 4.04"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/File-Next-1.16/META.yml new/File-Next-1.18/META.yml
--- old/File-Next-1.16/META.yml 2016-07-08 05:59:01.000000000 +0200
+++ new/File-Next-1.18/META.yml 2019-08-28 00:10:42.000000000 +0200
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.18, CPAN::Meta::Converter version 
2.143240'
+generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 
2.150005'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -18,10 +18,13 @@
     - t
     - inc
 requires:
+  File::Copy: '0'
   File::Spec: '0'
+  File::Temp: '0.22'
   Test::More: '0.88'
 resources:
   bugtracker: http://github.com/petdance/file-next/issues
   license: http://dev.perl.org/licenses/
   repository: http://github.com/petdance/file-next/tree/master
-version: '1.16'
+version: '1.18'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/File-Next-1.16/Makefile.PL 
new/File-Next-1.18/Makefile.PL
--- old/File-Next-1.16/Makefile.PL      2016-07-08 05:55:10.000000000 +0200
+++ new/File-Next-1.18/Makefile.PL      2019-08-27 04:33:38.000000000 +0200
@@ -15,7 +15,9 @@
     LICENSE             => 'artistic_2',
     PREREQ_PM => {
         'Test::More' => 0.88,
+        'File::Copy' => 0,
         'File::Spec' => 0,
+        'File::Temp' => 0.22,
     },
     dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
     clean               => { FILES => 'File-Next-*' },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/File-Next-1.16/Next.pm new/File-Next-1.18/Next.pm
--- old/File-Next-1.16/Next.pm  2016-07-08 05:55:10.000000000 +0200
+++ new/File-Next-1.18/Next.pm  2019-08-28 00:10:20.000000000 +0200
@@ -9,16 +9,16 @@
 
 =head1 VERSION
 
-Version 1.16
+Version 1.18
 
 =cut
 
-our $VERSION = '1.16';
+our $VERSION = '1.18';
 
 =head1 SYNOPSIS
 
 File::Next is a lightweight, taint-safe file-finding module.
-It's lightweight and has no non-core prerequisites.
+It has no non-core prerequisites.
 
     use File::Next;
 
@@ -262,11 +262,11 @@
 
     my ($parms,@queue) = _setup( \%files_defaults, @_ );
 
+    my $filter = $parms->{file_filter};
     return sub {
-        my $filter = $parms->{file_filter};
-        while (@queue) {
-            my ($dirname,$file,$fullpath) = splice( @queue, 0, 3 );
-            if ( -f $fullpath || -p _ || $fullpath =~ m{^/dev/fd} ) {
+        while ( my $entry = shift @queue ) {
+            my ( $dirname, $file, $fullpath, $is_dir, $is_file, $is_fifo ) = 
@{$entry};
+            if ( $is_file || $is_fifo ) {
                 if ( $filter ) {
                     local $_ = $file;
                     local $File::Next::dir = $dirname;
@@ -275,7 +275,7 @@
                 }
                 return wantarray ? ($dirname,$file,$fullpath) : $fullpath;
             }
-            if ( -d _ ) {
+            if ( $is_dir ) {
                 unshift( @queue, _candidate_files( $parms, $fullpath ) );
             }
         } # while
@@ -291,9 +291,9 @@
     my ($parms,@queue) = _setup( \%files_defaults, @_ );
 
     return sub {
-        while (@queue) {
-            my (undef,undef,$fullpath) = splice( @queue, 0, 3 );
-            if ( -d $fullpath ) {
+        while ( my $entry = shift @queue ) {
+            my ( undef, undef, $fullpath, $is_dir, undef, undef ) = @{$entry};
+            if ( $is_dir ) {
                 unshift( @queue, _candidate_files( $parms, $fullpath ) );
                 return $fullpath;
             }
@@ -303,16 +303,17 @@
     }; # iterator
 }
 
+
 sub everything {
     die _bad_invocation() if @_ && defined($_[0]) && ($_[0] eq __PACKAGE__);
 
     my ($parms,@queue) = _setup( \%files_defaults, @_ );
 
+    my $filter = $parms->{file_filter};
     return sub {
-        my $filter = $parms->{file_filter};
-        while (@queue) {
-            my ($dirname,$file,$fullpath) = splice( @queue, 0, 3 );
-            if ( -d $fullpath ) {
+        while ( my $entry = shift @queue ) {
+            my ( $dirname, $file, $fullpath, $is_dir, $is_file, $is_fifo ) = 
@{$entry};
+            if ( $is_dir ) {
                 unshift( @queue, _candidate_files( $parms, $fullpath ) );
             }
             if ( $filter ) {
@@ -335,7 +336,7 @@
     my $err  = $parms->{error_handler};
     my $warn = $parms->{warning_handler};
 
-    my $filename = $queue[1];
+    my $filename = $queue[0]->[1];
 
     if ( !defined($filename) ) {
         $err->( 'Must pass a filename to from_file()' );
@@ -353,8 +354,8 @@
         }
     }
 
+    my $filter = $parms->{file_filter};
     return sub {
-        my $filter = $parms->{file_filter};
         local $/ = $parms->{nul_separated} ? "\x00" : $/;
         while ( my $fullpath = <$fh> ) {
             chomp $fullpath;
@@ -412,10 +413,8 @@
 The queue prep stuff takes the strings in I<@starting_points> and
 puts them in the format that queue needs.
 
-The C<@queue> that gets passed around is an array that has three
-elements for each of the entries in the queue: $dir, $file and
-$fullpath.  Items must be pushed and popped off the queue three at
-a time (spliced, really).
+The C<@queue> that gets passed around is an array, with each entry an
+arrayref of $dir, $file and $fullpath.
 
 =cut
 
@@ -434,7 +433,7 @@
     }
 
     # Any leftover keys are bogus
-    for my $badkey ( keys %passed_parms ) {
+    for my $badkey ( sort keys %passed_parms ) {
         my $sub = (caller(1))[3];
         $parms->{error_handler}->( "Invalid option passed to $sub(): $badkey" 
);
     }
@@ -447,12 +446,13 @@
 
     for ( @_ ) {
         my $start = reslash( $_ );
-        if (-d $start) {
-            push @queue, ($start,undef,$start);
-        }
-        else {
-            push @queue, (undef,$start,$start);
-        }
+        my $is_dir  = -d $start;
+        my $is_file = -f _;
+        my $is_fifo = (-p _) || ($start =~ m{^/dev/fd});
+        push @queue,
+            $is_dir
+                ? [ $start, undef,  $start, $is_dir, $is_file, $is_fifo ]
+                : [ undef,  $start, $start, $is_dir, $is_file, $is_fifo ];
     }
 
     return ($parms,@queue);
@@ -480,41 +480,40 @@
     my @newfiles;
     my $descend_filter = $parms->{descend_filter};
     my $follow_symlinks = $parms->{follow_symlinks};
-    my $sort_sub = $parms->{sort_files};
 
     for my $file ( grep { !exists $skip_dirs{$_} } readdir $dh ) {
-        my $has_stat;
-
         my $fullpath = File::Spec->catdir( $dirname, $file );
         if ( !$follow_symlinks ) {
             next if -l $fullpath;
-            $has_stat = 1;
         }
+        else {
+            stat($fullpath);
+        }
+        my $is_dir  = -d _;
+        my $is_file = -f _;
+        my $is_fifo = (-p _) || ($fullpath =~ m{^/dev/fd});
 
         # Only do directory checking if we have a descend_filter
         if ( $descend_filter ) {
-            if ( $has_stat ? (-d _) : (-d $fullpath) ) {
+            if ( $is_dir ) {
                 local $File::Next::dir = $fullpath;
                 local $_ = $file;
                 next if not $descend_filter->();
             }
         }
-        if ( $sort_sub ) {
-            push( @newfiles, [ $dirname, $file, $fullpath ] );
-        }
-        else {
-            push( @newfiles, $dirname, $file, $fullpath );
-        }
+        push @newfiles, [ $dirname, $file, $fullpath, $is_dir, $is_file, 
$is_fifo ];
     }
     closedir $dh;
 
+    my $sort_sub = $parms->{sort_files};
     if ( $sort_sub ) {
-        return map { @{$_} } sort $sort_sub @newfiles;
+        @newfiles = sort $sort_sub @newfiles;
     }
 
     return @newfiles;
 }
 
+
 =head1 DIAGNOSTICS
 
 =over
@@ -571,10 +570,6 @@
 
 L<http://github.com/petdance/file-next/issues>
 
-=item * AnnoCPAN: Annotated CPAN documentation
-
-L<http://annocpan.org/dist/File-Next>
-
 =item * CPAN Ratings
 
 L<http://cpanratings.perl.org/d/File-Next>
@@ -594,7 +589,9 @@
 All file-finding in this module is adapted from Mark Jason Dominus'
 marvelous I<Higher Order Perl>, page 126.
 
-Thanks also for bug fixes and typo finding to
+Thanks to these fine contributors:
+Varadinsky,
+Paulo Custodio,
 Gerhard Poul,
 Brian Fraser,
 Todd Rinaldo,
@@ -605,7 +602,7 @@
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2005-2016 Andy Lester.
+Copyright 2005-2017 Andy Lester.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the Artistic License version 2.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/File-Next-1.16/README.md new/File-Next-1.18/README.md
--- old/File-Next-1.16/README.md        2016-07-08 05:55:10.000000000 +0200
+++ new/File-Next-1.18/README.md        2019-08-27 04:33:38.000000000 +0200
@@ -35,9 +35,6 @@
 * Bug Tracker:
     * http://github.com/petdance/file-next/issues
 
-* AnnoCPAN, annotated CPAN documentation:
-    * http://annocpan.org/dist/File-Next
-
 * CPAN Ratings:
     * http://cpanratings.perl.org/d/File-Next
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/File-Next-1.16/perlcriticrc 
new/File-Next-1.18/perlcriticrc
--- old/File-Next-1.16/perlcriticrc     2016-06-06 02:03:49.000000000 +0200
+++ new/File-Next-1.18/perlcriticrc     2019-08-27 04:33:38.000000000 +0200
@@ -14,8 +14,6 @@
 [-ErrorHandling::RequireCarping]
 [-ErrorHandling::RequireUseOfExceptions]
 
-[-Miscellanea::RequireRcsKeywords]
-
 [-Modules::RequireVersionVar]
 [-Modules::RequirePerlVersion]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/File-Next-1.16/t/from_file.t 
new/File-Next-1.18/t/from_file.t
--- old/File-Next-1.16/t/from_file.t    2016-07-08 05:55:10.000000000 +0200
+++ new/File-Next-1.18/t/from_file.t    2019-08-27 04:33:38.000000000 +0200
@@ -2,7 +2,7 @@
 
 use strict;
 use warnings;
-use Test::More tests => 17;
+use Test::More tests => 22;
 
 use lib 't';
 use Util;
@@ -76,7 +76,7 @@
     my $warn_called;
     local $SIG{__WARN__} = sub { $warn_called = 1 };
 
-    my $tempfile = File::Temp->new;
+    my $tempfile = File::Temp->new(TEMPLATE => 'XXXXXXXXXX');
     File::Copy::copy('t/filelist.txt', $tempfile);
     print {$tempfile} "t/non-existent-file.txt\n";
     $tempfile->close;
@@ -94,7 +94,7 @@
     my $warn_called;
     local $SIG{__WARN__} = sub { $warn_called = 1 };
 
-    my $tempfile = File::Temp->new;
+    my $tempfile = File::Temp->new(TEMPLATE => 'XXXXXXXXXX');
     File::Copy::copy('t/filelist.txt', $tempfile);
     print {$tempfile} "t/non-existent-file.txt\n";
     $tempfile->close;
@@ -111,3 +111,32 @@
     ok(!$warn_called, 'CORE::warn() should be not called if a warning occurs 
but a warning_handler is set');
     ok($warning_handler_called, 'The set warning handler should be called if a 
warning occurs');
 }
+
+
+FROM_MISSING_FILE_WITH_ERROR_HANDLER: {
+    my $error_handler_message;
+    my $error_handler = sub { $error_handler_message = shift; };
+    my $iter = File::Next::from_file( { error_handler => $error_handler }, 
'flargle-bargle.txt' );
+
+    ok( !defined($iter), 'Iterator should be null' );
+    like( $error_handler_message, qr/\QUnable to open flargle-bargle.txt/, 
"Proper error message" );
+}
+
+
+FROM_OK_FILE_BUT_MISSING_WITH_WARNING_HANDLER: {
+    my $warning_handler_message;
+    my $warning_handler = sub { $warning_handler_message = shift; };
+
+    my $tempfile = File::Temp->new(TEMPLATE => 'XXXXXXXXXX');
+    File::Copy::copy('t/filelist.txt', $tempfile);
+    print {$tempfile} "t/non-existent-file.txt\n";
+    $tempfile->close;
+
+    my $iter = File::Next::from_file( { warning_handler => $warning_handler }, 
$tempfile->filename );
+    isa_ok( $iter, 'CODE' );
+
+    my @actual = slurp( $iter );
+    sets_match( \@actual, \@expected, 'FROM_FILESYSTEM_FILE' );
+
+    like( $warning_handler_message, qr/\Qt\/non-existent-file.txt/, "Proper 
warning message" );
+}


Reply via email to