Hello community,

here is the log from the commit of package perl-Archive-Tar-Wrapper for 
openSUSE:Factory checked in at 2019-08-27 10:25:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Archive-Tar-Wrapper (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Archive-Tar-Wrapper.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Archive-Tar-Wrapper"

Tue Aug 27 10:25:40 2019 rev:7 rq:726157 version:0.37

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Archive-Tar-Wrapper/perl-Archive-Tar-Wrapper.changes
        2019-04-14 12:23:13.543818959 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Archive-Tar-Wrapper.new.7948/perl-Archive-Tar-Wrapper.changes
      2019-08-27 10:25:43.071921926 +0200
@@ -1,0 +2,9 @@
+Sat Aug 24 05:02:48 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to 0.37
+   see /usr/share/doc/packages/perl-Archive-Tar-Wrapper/Changes
+
+  0.37 (2019/08/24):
+      Fixed issue 14 - 
https://github.com/glasswalk3r/archive-tar-wrapper-perl/issues/14
+
+-------------------------------------------------------------------

Old:
----
  Archive-Tar-Wrapper-0.36.tar.gz

New:
----
  Archive-Tar-Wrapper-0.37.tar.gz

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

Other differences:
------------------
++++++ perl-Archive-Tar-Wrapper.spec ++++++
--- /var/tmp/diff_new_pack.ZNLxCO/_old  2019-08-27 10:25:43.487921894 +0200
+++ /var/tmp/diff_new_pack.ZNLxCO/_new  2019-08-27 10:25:43.487921894 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Archive-Tar-Wrapper
-Version:        0.36
+Version:        0.37
 Release:        0
 #Upstream: GPL-1.0-or-later
 %define cpan_name Archive-Tar-Wrapper
@@ -31,7 +31,6 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
-BuildRequires:  perl(Dumbbench) >= 0.111
 BuildRequires:  perl(File::Which)
 BuildRequires:  perl(IPC::Run)
 BuildRequires:  perl(Log::Log4perl)

++++++ Archive-Tar-Wrapper-0.36.tar.gz -> Archive-Tar-Wrapper-0.37.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.36/Changes 
new/Archive-Tar-Wrapper-0.37/Changes
--- old/Archive-Tar-Wrapper-0.36/Changes        2019-04-12 00:29:52.000000000 
+0200
+++ new/Archive-Tar-Wrapper-0.37/Changes        2019-08-24 06:13:48.000000000 
+0200
@@ -1,6 +1,9 @@
 ######################################################################
 Revision history for Perl extension Archive::Tar::Wrapper
 
+0.37 (2019/08/24):
+    Fixed issue 14 - 
https://github.com/glasswalk3r/archive-tar-wrapper-perl/issues/14
+
 0.36 (2019/04/11):
     Bug fixes since tests on Windows were failing after latests changes.
     Refactored code due unexpected way bsdtar on Windows and tar on OpenBSD 
behave.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.36/MANIFEST 
new/Archive-Tar-Wrapper-0.37/MANIFEST
--- old/Archive-Tar-Wrapper-0.36/MANIFEST       2019-04-12 01:07:21.000000000 
+0200
+++ new/Archive-Tar-Wrapper-0.37/MANIFEST       2019-08-24 06:15:15.000000000 
+0200
@@ -5,6 +5,7 @@
 Makefile.PL
 MANIFEST                       This list of files
 MANIFEST.SKIP
+META.yml                       Module meta-data (added by MakeMaker)
 t/001Basic.t
 t/002Mult.t
 t/003Dirs.t
@@ -12,7 +13,6 @@
 t/005Cwd.t
 t/006DirPerms.t
 t/007bzip.t
-t/008performance.t
 t/009compressed.t
 t/010openbsd.t
 t/011remdots.t
@@ -20,9 +20,9 @@
 t/data/bar.tar
 t/data/foo.tar.bz2
 t/data/foo.tgz
-t/lib/ATWDumbbench.pm
+xt/lib/ATWDumbbench.pm
+xt/performance.t
 xt/performance-small.t
 README.md
 CONTRIBUTING.md
-META.yml                                 Module YAML meta-data (added by 
MakeMaker)
 META.json                                Module JSON meta-data (added by 
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.36/META.json 
new/Archive-Tar-Wrapper-0.37/META.json
--- old/Archive-Tar-Wrapper-0.36/META.json      2019-04-12 01:07:21.000000000 
+0200
+++ new/Archive-Tar-Wrapper-0.37/META.json      2019-08-24 06:15:15.000000000 
+0200
@@ -5,7 +5,7 @@
       "Alceu Rodrigues de Freitas Junior <[email protected]>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.36, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "gpl_3"
    ],
@@ -44,7 +44,6 @@
       },
       "test" : {
          "requires" : {
-            "Dumbbench" : "0.111",
             "Test::Simple" : "1.302073"
          }
       }
@@ -52,7 +51,7 @@
    "provides" : {
       "Archive::Tar::Wrapper" : {
          "file" : "lib/Archive/Tar/Wrapper.pm",
-         "version" : "0.36"
+         "version" : "0.37"
       }
    },
    "release_status" : "stable",
@@ -66,7 +65,6 @@
          "web" : "https://github.com/glasswalk3r/archive-tar-wrapper-perl";
       }
    },
-   "version" : "0.36",
-   "x_NO_MYMETA" : 1,
-   "x_serialization_backend" : "JSON::PP version 2.97001"
+   "version" : "0.37",
+   "x_serialization_backend" : "JSON::PP version 4.02"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.36/META.yml 
new/Archive-Tar-Wrapper-0.37/META.yml
--- old/Archive-Tar-Wrapper-0.36/META.yml       2019-04-12 01:07:21.000000000 
+0200
+++ new/Archive-Tar-Wrapper-0.37/META.yml       2019-08-24 06:15:15.000000000 
+0200
@@ -4,14 +4,13 @@
   - 'Mike Schilli <[email protected]>'
   - 'Alceu Rodrigues de Freitas Junior <[email protected]>'
 build_requires:
-  Dumbbench: '0.111'
   ExtUtils::MakeMaker: '0'
   Test::Simple: '1.302073'
 configure_requires:
   ExtUtils::MakeMaker: '0'
   File::Which: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.36, CPAN::Meta::Converter version 
2.150010'
 license: gpl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,7 +23,7 @@
 provides:
   Archive::Tar::Wrapper:
     file: lib/Archive/Tar/Wrapper.pm
-    version: '0.36'
+    version: '0.37'
 requires:
   Cwd: '0'
   File::Temp: '0'
@@ -35,6 +34,5 @@
 resources:
   bugtracker: https://github.com/glasswalk3r/archive-tar-wrapper-perl/issues
   repository: https://github.com/glasswalk3r/archive-tar-wrapper-perl.git
-version: '0.36'
-x_NO_MYMETA: 1
+version: '0.37'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.36/Makefile.PL 
new/Archive-Tar-Wrapper-0.37/Makefile.PL
--- old/Archive-Tar-Wrapper-0.36/Makefile.PL    2019-04-12 00:38:45.000000000 
+0200
+++ new/Archive-Tar-Wrapper-0.37/Makefile.PL    2019-08-24 06:00:48.000000000 
+0200
@@ -73,10 +73,6 @@
     };
 }
 
-if ($ExtUtils::MakeMaker::VERSION >= 6.57_02) {
-    $WriteMakefileArgs{META_MERGE}->{NO_MYMETA} = 1;
-}
-
 if ( $ExtUtils::MakeMaker::VERSION >= 6.50 ) {
     $WriteMakefileArgs{META_MERGE}->{'meta-spec'} = { version => 2 };
     $WriteMakefileArgs{META_MERGE}->{'resources'} = {
@@ -96,11 +92,9 @@
 # Test::More::is_deeply is required for testing
 if ( $ExtUtils::MakeMaker::VERSION >= 6.64 ) {
     $WriteMakefileArgs{TEST_REQUIRES}->{'Test::Simple'} = 1.302073;
-    $WriteMakefileArgs{TEST_REQUIRES}->{'Dumbbench'}    = 0.111;
 }
 else {
     $WriteMakefileArgs{PREREQ_PM}->{'Test::Simple'} = 1.302073;
-    $WriteMakefileArgs{PREREQ_PM}->{'Dumbbench'}    = 0.111;
 }
 
 if ( $ExtUtils::MakeMaker::VERSION >= 6.52 ) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.36/lib/Archive/Tar/Wrapper.pm 
new/Archive-Tar-Wrapper-0.37/lib/Archive/Tar/Wrapper.pm
--- old/Archive-Tar-Wrapper-0.36/lib/Archive/Tar/Wrapper.pm     2019-04-12 
00:29:52.000000000 +0200
+++ new/Archive-Tar-Wrapper-0.37/lib/Archive/Tar/Wrapper.pm     2019-08-24 
06:09:57.000000000 +0200
@@ -18,7 +18,7 @@
 use Symbol 'gensym';
 use Carp;
 
-our $VERSION = '0.36';
+our $VERSION = '0.37';
 my $logger = get_logger();
 
 =pod
@@ -690,7 +690,7 @@
 
 =item 2.
 
-string of the path to the file which permissions will be copied to. 
+string of the path to the file which permissions will be copied to.
 
 =back
 
@@ -863,7 +863,7 @@
     return $offset;
 }
 
-=head2 write 
+=head2 write
 
     $arch->write($tarfile, $compress);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.36/t/008performance.t 
new/Archive-Tar-Wrapper-0.37/t/008performance.t
--- old/Archive-Tar-Wrapper-0.36/t/008performance.t     2019-04-11 
21:33:54.000000000 +0200
+++ new/Archive-Tar-Wrapper-0.37/t/008performance.t     1970-01-01 
01:00:00.000000000 +0100
@@ -1,160 +0,0 @@
-use warnings;
-use strict;
-use File::Temp qw(tempfile tempdir);
-use Test::More tests => 1;
-use lib 't/lib';
-use ATWDumbbench;
-use constant BATCH_SIZE => 1000;
-
-my $bench = ATWDumbbench->new(
-    target_rel_precision => 0.005,
-    initial_runs         => BATCH_SIZE,
-);
-
-my $dir      = tempdir( CLEANUP => 1 );
-my $template = 'foobar-XXXXXXXX';
-for ( 1 .. BATCH_SIZE ) {
-    my ( $fh, $filename ) = tempfile( $template, DIR => $dir );
-    print $fh rand();
-    close($fh);
-}
-
-my $regex = qr/^\.\.?$/;
-
-$bench->add_instances(
-    Dumbbench::Instance::PerlSub->new(
-        name => 'with grep',
-        code => sub {
-            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
-            my @top_entries = grep { $_ !~ /^\.\.?$/ } readdir $dir_h;
-            closedir($dir_h);
-        }
-    ),
-    Dumbbench::Instance::PerlSub->new(
-        name => 'with grep and compiled regex',
-        code => sub {
-            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
-            my @top_entries = grep { $_ !~ $regex } readdir $dir_h;
-            closedir($dir_h);
-        }
-    ),
-    Dumbbench::Instance::PerlSub->new(
-        name => 'with eq',
-        code => sub {
-            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
-            my @temp = readdir($dir_h);
-            closedir($dir_h);
-            my @top_entries;
-            for (@temp) {
-                next if ( ( $_ eq '.' ) or ( $_ eq '..' ) );
-                push( @top_entries, $_ );
-            }
-        }
-    ),
-    Dumbbench::Instance::PerlSub->new(
-        name => 'with enhanced eq',
-        code => sub {
-            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
-            my @temp = readdir($dir_h);
-            closedir($dir_h);
-            my @top_entries;
-            for (@temp) {
-                next
-                  if (  ( length($_) <= 2 )
-                    and ( ( $_ eq '.' ) or ( $_ eq '..' ) ) );
-                push( @top_entries, $_ );
-            }
-        }
-    ),
-    Dumbbench::Instance::PerlSub->new(
-        name => 'with enhanced eq mark2',
-        code => sub {
-            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
-            my @temp = readdir($dir_h);
-            closedir($dir_h);
-            my @top_entries;
-            my $counter = 0;
-            my $found   = 0;
-
-            for (@temp) {
-                $counter++;
-
-                if (    ( length($_) <= 2 )
-                    and ( ( $_ eq '.' ) or ( $_ eq '..' ) ) )
-                {
-                    $found++;
-                    if ( $found < 2 ) {
-                        next;
-                    }
-                    else {
-                        push( @top_entries, splice( @temp, $counter ) );
-                        last;
-                    }
-
-                }
-                push( @top_entries, $_ );
-            }
-        }
-    ),
-    Dumbbench::Instance::PerlSub->new(
-        name => 'with enhanced eq mark3',
-        code => sub {
-            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
-            my @temp = readdir($dir_h);
-            closedir($dir_h);
-            my ( $first, $second );
-            my $index = 0;
-            my $found = 0;
-
-            for (@temp) {
-
-                if (    ( length($_) <= 2 )
-                    and ( ( $_ eq '.' ) or ( $_ eq '..' ) ) )
-                {
-                    if ( $found < 1 ) {
-                        $first = $index;
-                        $found++;
-                        $index++;
-                        next;
-                    }
-                    else {
-                        $second = $index;
-                        last;
-                    }
-
-                }
-                else {
-                    $index++;
-                }
-            }
-
-            splice( @temp, $first, 1 );
-            splice( @temp, ( $second - 1 ), 1 );
-        }
-    ),
-    Dumbbench::Instance::PerlSub->new(
-        name => 'sort and shift',
-        code => sub {
-            opendir( my $dir_h, $dir ) or die "Cannot open $dir: $!";
-            my @top_entries = readdir($dir_h);
-            closedir($dir_h);
-            @top_entries = sort(@top_entries);
-
-            # removing the '.' and '..' entries
-            shift(@top_entries);
-            shift(@top_entries);
-        }
-    ),
-);
-
-note('This will take a while... hang on.');
-$bench->run;
-diag( $bench->report_as_text );
-my $method_name = 'with enhanced eq mark3';
-
-cmp_ok(
-    $bench->measurements(),
-    '<=',
-    $bench->get_measure($method_name),
-    "'$method_name' is the fastest method."
-);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.36/t/lib/ATWDumbbench.pm 
new/Archive-Tar-Wrapper-0.37/t/lib/ATWDumbbench.pm
--- old/Archive-Tar-Wrapper-0.36/t/lib/ATWDumbbench.pm  2019-03-19 
18:57:18.000000000 +0100
+++ new/Archive-Tar-Wrapper-0.37/t/lib/ATWDumbbench.pm  1970-01-01 
01:00:00.000000000 +0100
@@ -1,57 +0,0 @@
-package ATWDumbbench;
-use strict;
-use warnings;
-use parent 'Dumbbench';
-
-sub new {
-    my ( $class, @args ) = @_;
-    my $self = $class->SUPER::new(@args);
-    $self->{atw_measure_map} = {};
-    return $self;
-}
-
-sub measurements {
-    my $self = shift;
-    return ( sort { $a <=> $b } values( %{ $self->{atw_measure_map} } ) )[0];
-}
-
-sub get_measure {
-    my ( $self, $name ) = @_;
-    return $self->{atw_measure_map}->{$name};
-}
-
-sub get_map {
-    my ($self) = @_;
-    return $self->{atw_measure_map};
-}
-
-sub report_as_text {
-    my ($self) = @_;
-    my $formatted;
-
-    foreach my $instance ( $self->instances ) {
-        my $result     = $instance->result;
-        my $result_str = Dumbbench::unscientific_notation($result);
-
-        my $mean  = $result->raw_number;
-        my $sigma = $result->raw_error->[0];
-        my $name  = $instance->_name_prefix;
-
-        $self->{atw_measure_map}->{ $instance->name } = $result->number;
-
-        $formatted .= sprintf(
-            "%sRan %u iterations (%u outliers).\n",
-            $name,
-            scalar( @{ $instance->timings } ),
-            scalar( @{ $instance->timings } ) - $result->nsamples
-        );
-
-        $formatted .=
-          sprintf( "%sRounded run time per iteration: %s (%.1f%%)\n",
-            $name, $result_str, $sigma / $mean * 100 );
-    }
-
-    return $formatted;
-}
-
-1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.36/xt/lib/ATWDumbbench.pm 
new/Archive-Tar-Wrapper-0.37/xt/lib/ATWDumbbench.pm
--- old/Archive-Tar-Wrapper-0.36/xt/lib/ATWDumbbench.pm 1970-01-01 
01:00:00.000000000 +0100
+++ new/Archive-Tar-Wrapper-0.37/xt/lib/ATWDumbbench.pm 2019-03-22 
03:44:17.000000000 +0100
@@ -0,0 +1,57 @@
+package ATWDumbbench;
+use strict;
+use warnings;
+use parent 'Dumbbench';
+
+sub new {
+    my ( $class, @args ) = @_;
+    my $self = $class->SUPER::new(@args);
+    $self->{atw_measure_map} = {};
+    return $self;
+}
+
+sub measurements {
+    my $self = shift;
+    return ( sort { $a <=> $b } values( %{ $self->{atw_measure_map} } ) )[0];
+}
+
+sub get_measure {
+    my ( $self, $name ) = @_;
+    return $self->{atw_measure_map}->{$name};
+}
+
+sub get_map {
+    my ($self) = @_;
+    return $self->{atw_measure_map};
+}
+
+sub report_as_text {
+    my ($self) = @_;
+    my $formatted;
+
+    foreach my $instance ( $self->instances ) {
+        my $result     = $instance->result;
+        my $result_str = Dumbbench::unscientific_notation($result);
+
+        my $mean  = $result->raw_number;
+        my $sigma = $result->raw_error->[0];
+        my $name  = $instance->_name_prefix;
+
+        $self->{atw_measure_map}->{ $instance->name } = $result->number;
+
+        $formatted .= sprintf(
+            "%sRan %u iterations (%u outliers).\n",
+            $name,
+            scalar( @{ $instance->timings } ),
+            scalar( @{ $instance->timings } ) - $result->nsamples
+        );
+
+        $formatted .=
+          sprintf( "%sRounded run time per iteration: %s (%.1f%%)\n",
+            $name, $result_str, $sigma / $mean * 100 );
+    }
+
+    return $formatted;
+}
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Archive-Tar-Wrapper-0.36/xt/performance.t 
new/Archive-Tar-Wrapper-0.37/xt/performance.t
--- old/Archive-Tar-Wrapper-0.36/xt/performance.t       1970-01-01 
01:00:00.000000000 +0100
+++ new/Archive-Tar-Wrapper-0.37/xt/performance.t       2019-08-24 
06:11:33.000000000 +0200
@@ -0,0 +1,160 @@
+use warnings;
+use strict;
+use File::Temp qw(tempfile tempdir);
+use Test::More tests => 1;
+# Author test, you will need to declare P5LIB to run this test with prove
+use ATWDumbbench;
+use constant BATCH_SIZE => 1000;
+
+my $bench = ATWDumbbench->new(
+    target_rel_precision => 0.005,
+    initial_runs         => BATCH_SIZE,
+);
+
+my $dir      = tempdir( CLEANUP => 1 );
+my $template = 'foobar-XXXXXXXX';
+for ( 1 .. BATCH_SIZE ) {
+    my ( $fh, $filename ) = tempfile( $template, DIR => $dir );
+    print $fh rand();
+    close($fh);
+}
+
+my $regex = qr/^\.\.?$/;
+
+$bench->add_instances(
+    Dumbbench::Instance::PerlSub->new(
+        name => 'with grep',
+        code => sub {
+            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
+            my @top_entries = grep { $_ !~ /^\.\.?$/ } readdir $dir_h;
+            closedir($dir_h);
+        }
+    ),
+    Dumbbench::Instance::PerlSub->new(
+        name => 'with grep and compiled regex',
+        code => sub {
+            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
+            my @top_entries = grep { $_ !~ $regex } readdir $dir_h;
+            closedir($dir_h);
+        }
+    ),
+    Dumbbench::Instance::PerlSub->new(
+        name => 'with eq',
+        code => sub {
+            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
+            my @temp = readdir($dir_h);
+            closedir($dir_h);
+            my @top_entries;
+            for (@temp) {
+                next if ( ( $_ eq '.' ) or ( $_ eq '..' ) );
+                push( @top_entries, $_ );
+            }
+        }
+    ),
+    Dumbbench::Instance::PerlSub->new(
+        name => 'with enhanced eq',
+        code => sub {
+            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
+            my @temp = readdir($dir_h);
+            closedir($dir_h);
+            my @top_entries;
+            for (@temp) {
+                next
+                  if (  ( length($_) <= 2 )
+                    and ( ( $_ eq '.' ) or ( $_ eq '..' ) ) );
+                push( @top_entries, $_ );
+            }
+        }
+    ),
+    Dumbbench::Instance::PerlSub->new(
+        name => 'with enhanced eq mark2',
+        code => sub {
+            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
+            my @temp = readdir($dir_h);
+            closedir($dir_h);
+            my @top_entries;
+            my $counter = 0;
+            my $found   = 0;
+
+            for (@temp) {
+                $counter++;
+
+                if (    ( length($_) <= 2 )
+                    and ( ( $_ eq '.' ) or ( $_ eq '..' ) ) )
+                {
+                    $found++;
+                    if ( $found < 2 ) {
+                        next;
+                    }
+                    else {
+                        push( @top_entries, splice( @temp, $counter ) );
+                        last;
+                    }
+
+                }
+                push( @top_entries, $_ );
+            }
+        }
+    ),
+    Dumbbench::Instance::PerlSub->new(
+        name => 'with enhanced eq mark3',
+        code => sub {
+            opendir my $dir_h, $dir or die "Cannot open $dir: $!";
+            my @temp = readdir($dir_h);
+            closedir($dir_h);
+            my ( $first, $second );
+            my $index = 0;
+            my $found = 0;
+
+            for (@temp) {
+
+                if (    ( length($_) <= 2 )
+                    and ( ( $_ eq '.' ) or ( $_ eq '..' ) ) )
+                {
+                    if ( $found < 1 ) {
+                        $first = $index;
+                        $found++;
+                        $index++;
+                        next;
+                    }
+                    else {
+                        $second = $index;
+                        last;
+                    }
+
+                }
+                else {
+                    $index++;
+                }
+            }
+
+            splice( @temp, $first, 1 );
+            splice( @temp, ( $second - 1 ), 1 );
+        }
+    ),
+    Dumbbench::Instance::PerlSub->new(
+        name => 'sort and shift',
+        code => sub {
+            opendir( my $dir_h, $dir ) or die "Cannot open $dir: $!";
+            my @top_entries = readdir($dir_h);
+            closedir($dir_h);
+            @top_entries = sort(@top_entries);
+
+            # removing the '.' and '..' entries
+            shift(@top_entries);
+            shift(@top_entries);
+        }
+    ),
+);
+
+note('This will take a while... hang on.');
+$bench->run;
+diag( $bench->report_as_text );
+my $method_name = 'with enhanced eq mark3';
+
+cmp_ok(
+    $bench->measurements(),
+    '<=',
+    $bench->get_measure($method_name),
+    "'$method_name' is the fastest method."
+);


Reply via email to