Hello community,
here is the log from the commit of package perl-Test-Compile for openSUSE:Factory checked in at 2019-06-28 16:36:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-Compile (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-Compile.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Compile"
Fri Jun 28 16:36:49 2019 rev:6 rq:712339 version:2.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Test-Compile/perl-Test-Compile.changes 2019-06-24 21:54:20.324151179 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Test-Compile.new.4615/perl-Test-Compile.changes 2019-06-28 16:37:01.774878275 +0200
@@ -1,0 +2,10 @@
+Fri Jun 28 05:40:24 UTC 2019 - Stephan Kulow
+
+- updated to 2.1.0
+ see /usr/share/doc/packages/perl-Test-Compile/Changes
+
+ v2.1.0 2019-XX-XX
+ - Update copyright
+ - Add all_pm_files_ok() and all_pl_files_ok() methods to the internal class
+
+-------------------------------------------------------------------
Old:
----
Test-Compile-v2.0.1.tar.gz
New:
----
Test-Compile-v2.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-Compile.spec ++++++
--- /var/tmp/diff_new_pack.rmIW0s/_old 2019-06-28 16:37:02.118878781 +0200
+++ /var/tmp/diff_new_pack.rmIW0s/_new 2019-06-28 16:37:02.122878786 +0200
@@ -17,7 +17,7 @@
Name: perl-Test-Compile
-Version: 2.0.1
+Version: 2.1.0
Release: 0
%define cpan_name Test-Compile
Summary: Check whether Perl files compile correctly
++++++ Test-Compile-v2.0.1.tar.gz -> Test-Compile-v2.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/Changes new/Test-Compile-v2.1.0/Changes
--- old/Test-Compile-v2.0.1/Changes 2019-06-23 23:16:00.000000000 +0200
+++ new/Test-Compile-v2.1.0/Changes 2019-06-27 12:26:28.000000000 +0200
@@ -1,5 +1,9 @@
Revision history for Perl extension Test-Compile
+v2.1.0 2019-XX-XX
+ - Update copyright
+ - Add all_pm_files_ok() and all_pl_files_ok() methods to the internal class
+
v2.0.1 2019-06-18 (Evan Giles )
- Export most of the old functions (CPAN-RT 129888)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/MANIFEST new/Test-Compile-v2.1.0/MANIFEST
--- old/Test-Compile-v2.0.1/MANIFEST 2019-06-23 23:16:00.000000000 +0200
+++ new/Test-Compile-v2.1.0/MANIFEST 2019-06-27 12:26:28.000000000 +0200
@@ -9,10 +9,12 @@
META.yml
README
t/000-compile.t
+t/100-internal--find-files.t
+t/100-internal--is-in-taint-mode.t
+t/100-internal--read-shebang.t
t/100-internal-all-pl-files.t
t/100-internal-all-pm-files.t
t/100-internal-basic.t
-t/100-internal-is-in-taint-mode.t
t/100-internal-mess-with-lib.t
t/100-internal-pl-file-compiles.t
t/100-internal-pm-file-compiles.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/META.json new/Test-Compile-v2.1.0/META.json
--- old/Test-Compile-v2.0.1/META.json 2019-06-23 23:16:00.000000000 +0200
+++ new/Test-Compile-v2.1.0/META.json 2019-06-27 12:26:28.000000000 +0200
@@ -35,11 +35,11 @@
"provides" : {
"Test::Compile" : {
"file" : "lib/Test/Compile.pm",
- "version" : "v2.0.1"
+ "version" : "v2.1.0"
},
"Test::Compile::Internal" : {
"file" : "lib/Test/Compile/Internal.pm",
- "version" : "v2.0.1"
+ "version" : "v2.1.0"
}
},
"release_status" : "stable",
@@ -51,6 +51,6 @@
"url" : "http://github.com/egiles/test-compile"
}
},
- "version" : "v2.0.1",
+ "version" : "v2.1.0",
"x_serialization_backend" : "JSON::PP version 2.27400_02"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/META.yml new/Test-Compile-v2.1.0/META.yml
--- old/Test-Compile-v2.0.1/META.yml 2019-06-23 23:16:00.000000000 +0200
+++ new/Test-Compile-v2.1.0/META.yml 2019-06-27 12:26:28.000000000 +0200
@@ -15,10 +15,10 @@
provides:
Test::Compile:
file: lib/Test/Compile.pm
- version: v2.0.1
+ version: v2.1.0
Test::Compile::Internal:
file: lib/Test/Compile/Internal.pm
- version: v2.0.1
+ version: v2.1.0
recommends:
Devel::CheckOS: '0'
requires:
@@ -30,5 +30,5 @@
resources:
license: http://dev.perl.org/licenses/
repository: http://github.com/egiles/test-compile
-version: v2.0.1
+version: v2.1.0
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/Makefile.PL new/Test-Compile-v2.1.0/Makefile.PL
--- old/Test-Compile-v2.0.1/Makefile.PL 2019-06-23 23:16:00.000000000 +0200
+++ new/Test-Compile-v2.1.0/Makefile.PL 2019-06-27 12:26:28.000000000 +0200
@@ -3,16 +3,16 @@
use ExtUtils::MakeMaker;
WriteMakefile
(
+ 'NAME' => 'Test::Compile',
'INSTALLDIRS' => 'site',
+ 'EXE_FILES' => [],
'PREREQ_PM' => {
+ 'parent' => '0.225',
'UNIVERSAL::require' => 0,
- 'version' => 0,
'Exporter' => '5.68',
- 'parent' => '0.225'
+ 'version' => 0
},
- 'EXE_FILES' => [],
- 'PL_FILES' => {},
'VERSION_FROM' => 'lib/Test/Compile.pm',
- 'NAME' => 'Test::Compile'
+ 'PL_FILES' => {}
)
;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/README new/Test-Compile-v2.1.0/README
--- old/Test-Compile-v2.0.1/README 2019-06-23 23:16:00.000000000 +0200
+++ new/Test-Compile-v2.1.0/README 2019-06-27 12:26:28.000000000 +0200
@@ -20,7 +20,7 @@
./Build install
COPYRIGHT AND LICENSE
- Copyright 2007-2015.
+ Copyright 2007-2019.
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/lib/Test/Compile/Internal.pm new/Test-Compile-v2.1.0/lib/Test/Compile/Internal.pm
--- old/Test-Compile-v2.0.1/lib/Test/Compile/Internal.pm 2019-06-23 23:16:00.000000000 +0200
+++ new/Test-Compile-v2.1.0/lib/Test/Compile/Internal.pm 2019-06-27 12:26:28.000000000 +0200
@@ -3,7 +3,7 @@
use warnings;
use strict;
-use version; our $VERSION = qv("v2.0.1");
+use version; our $VERSION = qv("v2.1.0");
use File::Spec;
use UNIVERSAL::require;
use Test::Builder;
@@ -58,14 +58,47 @@
sub all_files_ok {
my ($self, @dirs) = @_;
+ $self->all_pm_files_ok(@dirs);
+ $self->all_pl_files_ok(@dirs);
+}
+
+
+=item C
+
+Checks all the perl module files it can find for compilation errors.
+
+If C<@dirs> is defined then it is taken as an array of directories to
+be searched for perl files, otherwise it searches some default locations
+- see L.
+
+=cut
+sub all_pm_files_ok {
+ my ($self, @dirs) = @_;
+
my $test = $self->{test};
- for my $file ( $self->all_pl_files(@dirs) ) {
- my $ok = $self->pl_file_compiles($file);
+ for my $file ( $self->all_pm_files(@dirs) ) {
+ my $ok = $self->pm_file_compiles($file);
$test->ok($ok, "$file compiles");
}
+}
- for my $file ( $self->all_pm_files(@dirs) ) {
+
+=item C
+
+Checks all the perl program files it can find for compilation errors.
+
+If C<@dirs> is defined then it is taken as an array of directories to
+be searched for perl files, otherwise it searches some default locations
+- see L.
+
+=cut
+sub all_pl_files_ok {
+ my ($self, @dirs) = @_;
+
+ my $test = $self->{test};
+
+ for my $file ( $self->all_pl_files(@dirs) ) {
my $ok = $self->pm_file_compiles($file);
$test->ok($ok, "$file compiles");
}
@@ -96,7 +129,7 @@
in C<@dirs> and in directories below. If C<@dirs> is undefined, it
searches F<blib> if F<blib> exists, or else F<lib>.
-Skips any files in C<CVS> or C<.svn> directories.
+Skips any files in C<CVS>, C<.svn>, or C<.git> directories.
The order of the files returned is machine-dependent. If you want them
sorted, you'll have to sort them yourself.
@@ -124,7 +157,7 @@
If C<@dirs> is undefined, it searches F<script> if F<script> exists, or else
F<bin> if F<bin> exists.
-Skips any files in C<CVS> or C<.svn> directories.
+Skips any files in C<CVS>, C<.svn>, or C<.git> directories.
The order of the files returned is machine-dependent. If you want them
sorted, you'll have to sort them yourself.
@@ -310,11 +343,16 @@
exit ($rv ? 0 : 1);
}
+# Works it's way through the input array (files and/or directories), recursively
+# finding files
sub _find_files {
- my ($self, @queue) = @_;
+ my ($self, @searchlist) = @_;
- for my $file (@queue) {
- if (defined($file) && -d $file) {
+ my @output;
+ for my $file (@searchlist) {
+ if (defined($file) && -f $file) {
+ push @output, $file;
+ } elsif (defined($file) && -d $file) {
local *DH;
opendir DH, $file or next;
my @newfiles = readdir DH;
@@ -324,14 +362,14 @@
for my $newfile (@newfiles) {
my $filename = File::Spec->catfile($file, $newfile);
if (-f $filename) {
- push @queue, $filename;
+ push @output, $filename;
} else {
- push @queue, File::Spec->catdir($file, $newfile);
+ push @searchlist, File::Spec->catdir($file, $newfile);
}
}
}
}
- return @queue;
+ return @output;
}
sub _pm_starting_points {
@@ -375,7 +413,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright 2007-2015 by the authors.
+Copyright 2007-2019 by the authors.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/lib/Test/Compile.pm new/Test-Compile-v2.1.0/lib/Test/Compile.pm
--- old/Test-Compile-v2.0.1/lib/Test/Compile.pm 2019-06-23 23:16:00.000000000 +0200
+++ new/Test-Compile-v2.1.0/lib/Test/Compile.pm 2019-06-27 12:26:28.000000000 +0200
@@ -3,7 +3,7 @@
use warnings;
use strict;
-use version; our $VERSION = qv("v2.0.1");
+use version; our $VERSION = qv("v2.1.0");
use parent 'Exporter';
use UNIVERSAL::require;
use Test::Compile::Internal;
@@ -392,7 +392,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright 2007-2015 by the authors.
+Copyright 2007-2019 by the authors.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/t/100-internal--find-files.t new/Test-Compile-v2.1.0/t/100-internal--find-files.t
--- old/Test-Compile-v2.0.1/t/100-internal--find-files.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Test-Compile-v2.1.0/t/100-internal--find-files.t 2019-06-27 12:26:28.000000000 +0200
@@ -0,0 +1,29 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Compile::Internal;
+
+my $internal = Test::Compile::Internal->new();
+
+my @files;
+
+@files = sort $internal->_find_files();
+is(scalar @files, 0, 'Found no files in the empty list');
+
+@files = sort $internal->_find_files('IDoNotExist/');
+is(scalar @files, 0 ,'Found no files in non existant directory');
+
+@files = sort $internal->_find_files('t/scripts/');
+is(scalar @files, 11 ,'Found all the files in the scripts dir');
+
+@files = sort $internal->_find_files('t/scripts/datafile');
+is(scalar @files, 1 ,'Found the file we specified');
+
+## Hrmm, it would nice if _find_files could ignore this CVS dir
+#@files = sort $internal->_find_files('t/scripts/CVS/');
+#is(scalar @files, 0 ,'Ignored the files in the CVS dir');
+
+$internal->done_testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/t/100-internal--is-in-taint-mode.t new/Test-Compile-v2.1.0/t/100-internal--is-in-taint-mode.t
--- old/Test-Compile-v2.0.1/t/100-internal--is-in-taint-mode.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Test-Compile-v2.1.0/t/100-internal--is-in-taint-mode.t 2019-06-27 12:26:28.000000000 +0200
@@ -0,0 +1,20 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Compile::Internal;
+
+my $internal = Test::Compile::Internal->new();
+
+my $TAINT = $internal->_is_in_taint_mode('t/scripts/taint.pl');
+is($TAINT,"T","Found taint flag in taint.pl");
+
+my $taint = $internal->_is_in_taint_mode('t/scripts/CVS/taint2.pl');
+is($taint,"t","Found taint warning flag in taint2.pl");
+
+my $not = $internal->_is_in_taint_mode('t/scripts/subdir/success.pl');
+is($not,"","No taint flags found in success.pl");
+
+done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/t/100-internal--read-shebang.t new/Test-Compile-v2.1.0/t/100-internal--read-shebang.t
--- old/Test-Compile-v2.0.1/t/100-internal--read-shebang.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Test-Compile-v2.1.0/t/100-internal--read-shebang.t 2019-06-27 12:26:28.000000000 +0200
@@ -0,0 +1,19 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Compile::Internal;
+
+my $internal = Test::Compile::Internal->new();
+my $perl;
+
+$perl = $internal->_read_shebang('t/scripts/datafile');
+ok(!$perl, "The datafile doesn't look like a perl program");
+
+$perl = $internal->_read_shebang('t/scripts/perlscript');
+ok($perl, "The perlscript does look like a perl program");
+
+$internal->done_testing
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v2.0.1/t/100-internal-is-in-taint-mode.t new/Test-Compile-v2.1.0/t/100-internal-is-in-taint-mode.t
--- old/Test-Compile-v2.0.1/t/100-internal-is-in-taint-mode.t 2019-06-23 23:16:00.000000000 +0200
+++ new/Test-Compile-v2.1.0/t/100-internal-is-in-taint-mode.t 1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use Test::More;
-use Test::Compile::Internal;
-
-my $internal = Test::Compile::Internal->new();
-
-my $TAINT = $internal->_is_in_taint_mode('t/scripts/taint.pl');
-is($TAINT,"T","Found taint flag in taint.pl");
-
-my $taint = $internal->_is_in_taint_mode('t/scripts/CVS/taint2.pl');
-is($taint,"t","Found taint warning flag in taint2.pl");
-
-my $not = $internal->_is_in_taint_mode('t/scripts/subdir/success.pl');
-is($not,"","No taint flags found in success.pl");
-
-done_testing();