Hello community,
here is the log from the commit of package perl-Test-Compile for
openSUSE:Factory checked in at 2019-10-18 14:35:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-Compile (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-Compile.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Compile"
Fri Oct 18 14:35:51 2019 rev:9 rq:738583 version:2.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Test-Compile/perl-Test-Compile.changes
2019-07-17 14:27:36.447280203 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Test-Compile.new.2352/perl-Test-Compile.changes
2019-10-18 14:35:53.119856260 +0200
@@ -1,0 +2,11 @@
+Wed Oct 9 08:23:14 UTC 2019 - <[email protected]>
+
+- updated to 2.3.0
+ see /usr/share/doc/packages/perl-Test-Compile/Changes
+
+ v2.3.0 2019-10-09
+ - Search for perl files in blib first (Alexandr Ciornii
<[email protected]>)
+ - Improve tests, remove redundant code,
+ - Refactor POD, make the deprecation of the functional interface clearer
+
+-------------------------------------------------------------------
Old:
----
Test-Compile-v2.2.2.tar.gz
New:
----
Test-Compile-v2.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-Compile.spec ++++++
--- /var/tmp/diff_new_pack.kEYRWD/_old 2019-10-18 14:35:54.159853551 +0200
+++ /var/tmp/diff_new_pack.kEYRWD/_new 2019-10-18 14:35:54.159853551 +0200
@@ -17,7 +17,7 @@
Name: perl-Test-Compile
-Version: 2.2.2
+Version: 2.3.0
Release: 0
%define cpan_name Test-Compile
Summary: Check whether Perl files compile correctly
@@ -44,8 +44,7 @@
%description
'Test::Compile' lets you check the whether your perl modules and scripts
-compile properly, and report its results in standard 'Test::Simple'
-fashion.
+compile properly, results are reported in standard 'Test::Simple' fashion.
The basic usage - as shown above, will locate your perl files and test that
they all compile.
++++++ Test-Compile-v2.2.2.tar.gz -> Test-Compile-v2.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/Changes
new/Test-Compile-v2.3.0/Changes
--- old/Test-Compile-v2.2.2/Changes 2019-07-11 11:37:59.000000000 +0200
+++ new/Test-Compile-v2.3.0/Changes 2019-10-09 00:23:20.000000000 +0200
@@ -1,5 +1,10 @@
Revision history for Perl extension Test-Compile
+v2.3.0 2019-10-09
+ - Search for perl files in blib first (Alexandr Ciornii
<[email protected]>)
+ - Improve tests, remove redundant code,
+ - Refactor POD, make the deprecation of the functional interface clearer
+
v2.2.2 2019-07-11
- Fix cpan-test failures on mswin32
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/MANIFEST
new/Test-Compile-v2.3.0/MANIFEST
--- old/Test-Compile-v2.2.2/MANIFEST 2019-07-11 11:37:59.000000000 +0200
+++ new/Test-Compile-v2.3.0/MANIFEST 2019-10-09 00:23:20.000000000 +0200
@@ -12,6 +12,7 @@
t/100-internal--find-files.t
t/100-internal--is-in-taint-mode.t
t/100-internal--read-shebang.t
+t/100-internal--skip.t
t/100-internal--test-methods.t
t/100-internal-all-pl-files.t
t/100-internal-all-pm-files.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/META.json
new/Test-Compile-v2.3.0/META.json
--- old/Test-Compile-v2.2.2/META.json 2019-07-11 11:37:59.000000000 +0200
+++ new/Test-Compile-v2.3.0/META.json 2019-10-09 00:23:20.000000000 +0200
@@ -10,7 +10,7 @@
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : "2"
+ "version" : 2
},
"name" : "Test-Compile",
"prereqs" : {
@@ -35,11 +35,11 @@
"provides" : {
"Test::Compile" : {
"file" : "lib/Test/Compile.pm",
- "version" : "v2.2.2"
+ "version" : "v2.3.0"
},
"Test::Compile::Internal" : {
"file" : "lib/Test/Compile/Internal.pm",
- "version" : "v2.2.2"
+ "version" : "v2.3.0"
}
},
"release_status" : "stable",
@@ -51,6 +51,6 @@
"url" : "http://github.com/egiles/test-compile"
}
},
- "version" : "v2.2.2",
- "x_serialization_backend" : "JSON::PP version 2.27400_02"
+ "version" : "v2.3.0",
+ "x_serialization_backend" : "JSON::PP version 2.97001"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/META.yml
new/Test-Compile-v2.3.0/META.yml
--- old/Test-Compile-v2.2.2/META.yml 2019-07-11 11:37:59.000000000 +0200
+++ new/Test-Compile-v2.3.0/META.yml 2019-10-09 00:23:20.000000000 +0200
@@ -15,10 +15,10 @@
provides:
Test::Compile:
file: lib/Test/Compile.pm
- version: v2.2.2
+ version: v2.3.0
Test::Compile::Internal:
file: lib/Test/Compile/Internal.pm
- version: v2.2.2
+ version: v2.3.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.2.2
+version: v2.3.0
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/Makefile.PL
new/Test-Compile-v2.3.0/Makefile.PL
--- old/Test-Compile-v2.2.2/Makefile.PL 2019-07-11 11:37:59.000000000 +0200
+++ new/Test-Compile-v2.3.0/Makefile.PL 2019-10-09 00:23:20.000000000 +0200
@@ -3,16 +3,16 @@
use ExtUtils::MakeMaker;
WriteMakefile
(
- 'EXE_FILES' => [],
- 'PL_FILES' => {},
+ 'NAME' => 'Test::Compile',
+ 'VERSION_FROM' => 'lib/Test/Compile.pm',
'PREREQ_PM' => {
- 'version' => 0,
'Exporter' => '5.68',
+ 'UNIVERSAL::require' => 0,
'parent' => '0.225',
- 'UNIVERSAL::require' => 0
+ 'version' => 0
},
- 'VERSION_FROM' => 'lib/Test/Compile.pm',
- 'NAME' => 'Test::Compile',
- 'INSTALLDIRS' => 'site'
+ 'INSTALLDIRS' => 'site',
+ 'EXE_FILES' => [],
+ 'PL_FILES' => {}
)
;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/lib/Test/Compile/Internal.pm
new/Test-Compile-v2.3.0/lib/Test/Compile/Internal.pm
--- old/Test-Compile-v2.2.2/lib/Test/Compile/Internal.pm 2019-07-11
11:37:59.000000000 +0200
+++ new/Test-Compile-v2.3.0/lib/Test/Compile/Internal.pm 2019-10-09
00:23:20.000000000 +0200
@@ -3,7 +3,7 @@
use warnings;
use strict;
-use version; our $VERSION = qv("v2.2.2");
+use version; our $VERSION = qv("v2.3.0");
use File::Spec;
use UNIVERSAL::require;
use Test::Builder;
@@ -49,11 +49,12 @@
=item C<all_files_ok(@dirs)>
-Checks all the perl files it can find for compilation errors.
+Looks for perl files and tests them all 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</all_pm_files(@dirs)> and L</all_pl_files(@dirs)>.
+If C<@dirs> is defined then it is taken as an array of files or directories to
be
+searched for perl files, otherwise it searches the default locations you'd
expect to find
+perl files in a perl module - see L</all_pm_files(@dirs)> and
L</all_pl_files(@dirs)>
+for details.
=cut
sub all_files_ok {
@@ -112,7 +113,7 @@
unless the compilation fails. This is probably what you want.
If C<verbose> is set to true, you'll get the output from 'perl -c'. If it's
set to
-false, all diagnostic output is supressed.
+false, all diagnostic output is suppressed.
=cut
@@ -128,14 +129,20 @@
=item C<all_pm_files(@dirs)>
-Returns a list of all the perl module files - that is any files ending in
F<.pm>
-in C<@dirs> and in directories below. If C<@dirs> is undefined, it
-searches F<blib> if F<blib> exists, or else F<lib>.
+Searches for and returns a list of perl module files - that is, files with a
F<.pm>
+extension.
+
+If you provide a list of C<@dirs>, it'll use that as a list of files to
process, or
+directories to search for perl modules.
-Skips any files in C<CVS>, C<.svn>, or C<.git> directories.
+If you don't provide C<dirs>, it'll search for perl modules in the F<blib>
directory,
+unless that directory doesn't exist, in which case it'll search the F<lib>
directory.
+
+Skips any files in F<CVS>, F<.svn>, or F<.git> directories.
The order of the files returned is machine-dependent. If you want them
sorted, you'll have to sort them yourself.
+
=cut
sub all_pm_files {
@@ -145,22 +152,24 @@
my @pm;
for my $file ( $self->_find_files(@dirs) ) {
- if (-f $file) {
- push @pm, $file if $file =~ /\.pm$/;
- }
+ push @pm, $file if $file =~ /\.pm$/;
}
return @pm;
}
=item C<all_pl_files(@dirs)>
-Returns a list of all the perl script files - that is, any files in C<@dirs>
that
-either have a F<.pl> extension, or have no extension and have a perl shebang
line.
+Searches for and returns a list of perl script files - that is, any files that
either
+have a F<.pl> extension, or have no extension but have a perl shebang line.
-If C<@dirs> is undefined, it searches F<script> if F<script> exists, or else
-F<bin> if F<bin> exists.
+If you provide a list of C<@dirs>, it'll use that as a list of files to
process, or
+directories to search for perl scripts.
-Skips any files in C<CVS>, C<.svn>, or C<.git> directories.
+If you don't provide C<dirs>, it'll search for perl scripts in the
F<blib/script/>
+directory, or if that doesn't exist, the F<script/> directory, or if that
doesn't exist,
+the F<bin/> directory.
+
+Skips any files in F<CVS>, F<.svn>, or F<.git> directories.
The order of the files returned is machine-dependent. If you want them
sorted, you'll have to sort them yourself.
@@ -174,18 +183,16 @@
my @pl;
for my $file ( $self->_find_files(@dirs) ) {
- if (defined($file) && -f $file) {
- if ( $file =~ /\.pl$/ ) {
- # Files with a .pl extension are perl scripts
+ if ( $file =~ /\.pl$/ ) {
+ # Files with a .pl extension are perl scripts
+ push @pl, $file;
+ }
+ elsif ( $file =~ /(?:^[^.]+$)/ ) {
+ # Files with no extension, but a perl shebang are perl scripts
+ my $shebang = $self->_read_shebang($file);
+ if ( $shebang =~ m/perl/ ) {
push @pl, $file;
}
- elsif ( $file =~ /(?:^[^.]+$)/ ) {
- # Files with no extension, but a perl shebang are perl scripts
- my $shebang = $self->_read_shebang($file);
- if ( $shebang =~ m/perl/ ) {
- push @pl, $file;
- }
- }
}
}
return @pl;
@@ -379,6 +386,7 @@
# Where do we expect to find perl programs?
sub _pl_starting_points {
+ return 'blib/script' if -e 'blib/script';
return 'script' if -e 'script';
return 'bin' if -e 'bin';
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/lib/Test/Compile.pm
new/Test-Compile-v2.3.0/lib/Test/Compile.pm
--- old/Test-Compile-v2.2.2/lib/Test/Compile.pm 2019-07-11 11:37:59.000000000
+0200
+++ new/Test-Compile-v2.3.0/lib/Test/Compile.pm 2019-10-09 00:23:20.000000000
+0200
@@ -3,7 +3,7 @@
use warnings;
use strict;
-use version; our $VERSION = qv("v2.2.2");
+use version; our $VERSION = qv("v2.3.0");
use parent 'Exporter';
use UNIVERSAL::require;
use Test::Compile::Internal;
@@ -18,19 +18,14 @@
use Test::Compile;
- # The OO way (recommended)
my $test = Test::Compile->new();
$test->all_files_ok();
$test->done_testing();
- # The procedural way (deprecated)
- use Test::Compile qw( all_pm_files_ok );
- all_pm_files_ok();
-
=head1 DESCRIPTION
C<Test::Compile> lets you check the whether your perl modules and scripts
-compile properly, and report its results in standard C<Test::Simple> fashion.
+compile properly, results are reported in standard C<Test::Simple> fashion.
The basic usage - as shown above, will locate your perl files and test that
they
all compile.
@@ -78,8 +73,9 @@
=item C<new()>
-A basic constructor, nothing special except that it returns a
-L<Test::Compile::Internal> object.
+The constructor, which actually returns a
+L<Test::Compile::Internal> object. This gives you access to all the methods
provided by
+C<Test::Compile::Internal>, including those listed below.
=cut
@@ -90,44 +86,9 @@
=item C<all_files_ok(@dirs)>
-Checks all the perl 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</all_pm_files(@dirs)> and L</all_pl_files(@dirs)>.
-
-=item C<all_pm_files(@dirs)>
-
-Returns a list of all the perl module files - that is any files ending in
F<.pm>
-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>, 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.
-
-=item C<all_pl_files(@dirs)>
-
-Returns a list of all the perl script files - that is, any files in C<@dirs>
that
-either have a F<.pl> extension, or have no extension and have a perl shebang
line.
+Looks for perl files and tests them all for compilation errors.
-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>, 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.
-
-=back
-
-=head2 Test Methods
-
-C<Test::Compile::Internal> encapsulates a C<Test::Builder> object, and provides
-access to some of its methods.
-
-=over 4
+See L<Test::Compile::Internal/all_files_ok(@dirs)> for the full documentation.
=item C<done_testing()>
@@ -161,13 +122,17 @@
a more consistent interface. For example: C<all_pm_files_ok()> calls the
C<plan()> function - so you can't call multiple test functions in the same
test file.
-You should definately use the object oriented interface described in the
L</SYNOPSIS>
+You should definitely use the object oriented interface described in the
L</SYNOPSIS>
and in L<Test::Compile::Internal> instead of calling these functions.
=over 4
=item C<all_pm_files_ok(@files)>
+B<This function is deprecated>. Please use
+L<Test::Compile::Internal/all_pm_files_ok(@dirs)> instead. It's pretty much
the
+same, except it doesn't call the C<plan()> function.
+
Checks all the perl module files it can find for compilation errors.
It uses C<all_pm_files(@files)> to find the perl module files.
@@ -184,15 +149,15 @@
sub all_pm_files_ok {
my @files = @_ ? @_ : all_pm_files();
$Test->plan(tests => scalar @files);
- my $ok = 1;
- for (@files) {
- pm_file_ok($_) or undef $ok;
- }
- $ok;
+ return $Test->all_pm_files_ok(@files);
}
=item C<all_pl_files_ok(@files)>
+B<This function is deprecated>. Please use
+L<Test::Compile::Internal/all_pl_files_ok(@dirs)> instead. It's pretty much
the
+same, except it doesn't call the C<plan()> function.
+
Checks all the perl script files it can find for compilation errors.
It uses C<all_pl_files(@files)> to find the perl script files.
@@ -204,36 +169,22 @@
Returns true if all Perl script files are ok, or false if any fail.
-Module authors can include the following in a F<t/00_compile_scripts.t> file
-and have C<Test::Compile> automatically find and check all Perl script files
-in a module distribution:
-
- #!perl -w
- use strict;
- use warnings;
- use Test::More;
- eval "use Test::Compile";
- plan skip_all => "Test::Compile required for testing compilation"
- if $@;
- my $test = Test::Compile->new();
- $test->all_pl_files_ok();
- $test->done_testing();
-
=cut
sub all_pl_files_ok {
my @files = @_ ? @_ : all_pl_files();
$Test->skip_all("no pl files found") unless @files;
$Test->plan(tests => scalar @files);
- my $ok = 1;
- for (@files) {
- pl_file_ok($_) or undef $ok;
- }
- $ok;
+ $Test->all_pl_files_ok(@files);
}
=item C<pm_file_ok($filename, $testname)>
+B<This function is deprecated>. Please use
+L<Test::Compile::Internal/all_pm_files_ok(@dirs)> instead. It's pretty much
the
+same, except you can't specify a test name, and it can handle more than one
file at a
+time.
+
C<pm_file_ok()> will okay the test if $filename compiles as a perl module.
The optional second argument C<$testname> is the name of the test. If it is
@@ -255,6 +206,11 @@
=item C<pl_file_ok($filename, $testname)>
+B<This function is deprecated>. Please use
+L<Test::Compile::Internal/all_pl_files_ok(@dirs)> instead. It's pretty much
the
+same, except you can't specify a test name, and it can handle more than one
file at a
+time.
+
C<pl_file_ok()> will okay the test if $filename compiles as a perl script. You
need to give the path to the script relative to this distribution's base
directory. So if you put your scripts in a 'top-level' directory called script
@@ -293,10 +249,13 @@
=item C<all_pm_files(@dirs)>
+B<This function is deprecated>. Please use
+L<Test::Compile::Internal/all_pm_files(@dirs)> instead.
+
Returns a list of all the perl module files - that is, files ending in F<.pm>
- in I<@dirs> and in directories below. If no directories are passed, it
defaults to F<blib> if F<blib> exists, or else F<lib> if not. Skips any files
-in C<CVS>, C<.svn>, or C<.git> directories.
+in F<CVS>, F<.svn>, or F<.git> directories.
The order of the files returned is machine-dependent. If you want them
sorted, you'll have to sort them yourself.
@@ -309,13 +268,16 @@
=item C<all_pl_files(@dirs)>
+B<This function is deprecated>. Please use
+L<Test::Compile::Internal/all_pl_files(@dirs)> instead.
+
Returns a list of all the perl script files - that is, any files in C<@dirs>
that
either have a F<.pl> extension, or have no extension and have a perl shebang
line.
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 F<CVS>, F<.svn>, or F<.git> directories.
The order of the files returned is machine-dependent. If you want them
sorted, you'll have to sort them yourself.
@@ -328,6 +290,9 @@
=item C<all_files_ok(@dirs)>
+B<This function is deprecated>. Please use
+L<Test::Compile::Internal/all_files_ok(@dirs)> instead.
+
Checks all the perl files it can find for compilation errors.
If C<@dirs> is defined then it is taken as an array of directories to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/t/100-internal--find-files.t
new/Test-Compile-v2.3.0/t/100-internal--find-files.t
--- old/Test-Compile-v2.2.2/t/100-internal--find-files.t 2019-07-11
11:37:59.000000000 +0200
+++ new/Test-Compile-v2.3.0/t/100-internal--find-files.t 2019-10-09
00:23:20.000000000 +0200
@@ -16,6 +16,9 @@
@files = sort $internal->_find_files('IDoNotExist/');
is(scalar @files, 0 ,'Found no files in non existant directory');
+@files = sort $internal->_find_files('IDoNotExist.pm');
+is(scalar @files, 0 ,"Didn't find non existent file");
+
@files = sort $internal->_find_files('t/scripts/');
is(scalar @files, 11 ,'Found all the files in the scripts dir');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/t/100-internal--skip.t
new/Test-Compile-v2.3.0/t/100-internal--skip.t
--- old/Test-Compile-v2.2.2/t/100-internal--skip.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-Compile-v2.3.0/t/100-internal--skip.t 2019-10-09
00:23:20.000000000 +0200
@@ -0,0 +1,16 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Compile::Internal;
+
+my $internal = Test::Compile::Internal->new();
+
+# Without this line, this test file would fail
+$internal->skip_all('Skipping this test should test skip_all()');
+
+$internal->ok(0, "This is a failing test, but it shouldn't actually matter");
+$internal->done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/t/100-internal--test-methods.t
new/Test-Compile-v2.3.0/t/100-internal--test-methods.t
--- old/Test-Compile-v2.2.2/t/100-internal--test-methods.t 2019-07-11
11:37:59.000000000 +0200
+++ new/Test-Compile-v2.3.0/t/100-internal--test-methods.t 2019-10-09
00:23:20.000000000 +0200
@@ -8,8 +8,9 @@
my $internal = Test::Compile::Internal->new();
-$internal->plan(tests => 1);
+$internal->plan(tests => 2);
$internal->ok(1, "ok method issues succesful TAP");
+$internal->skip('Actually, skip this test');
$internal->diag("The diag method should display this message");
$internal->done_testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Compile-v2.2.2/t/100-internal-all-pm-files.t
new/Test-Compile-v2.3.0/t/100-internal-all-pm-files.t
--- old/Test-Compile-v2.2.2/t/100-internal-all-pm-files.t 2019-07-11
11:37:59.000000000 +0200
+++ new/Test-Compile-v2.3.0/t/100-internal-all-pm-files.t 2019-10-09
00:23:20.000000000 +0200
@@ -21,7 +21,7 @@
like($files[1],qr/t.scripts.Module.pm/,'Found module: Module.pm');
like($files[2],qr/t.scripts.Module2.pm/,'Found module: Module2.pm');
-# Try specifying som files rather than directories
+# Try specifying some files rather than directories
my @search = ('t/scripts/failure.pl', 't/scripts/Module.pm');
@files = sort $internal->all_pm_files($search[0]);