Hello community, here is the log from the commit of package perl-Module-ScanDeps for openSUSE:Factory checked in at 2019-01-24 14:01:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Module-ScanDeps (Old) and /work/SRC/openSUSE:Factory/.perl-Module-ScanDeps.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Module-ScanDeps" Thu Jan 24 14:01:52 2019 rev:24 rq:666524 version:1.27 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Module-ScanDeps/perl-Module-ScanDeps.changes 2018-12-27 00:23:48.371936899 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Module-ScanDeps.new.28833/perl-Module-ScanDeps.changes 2019-01-24 14:01:53.400155897 +0100 @@ -1,0 +2,23 @@ +Wed Jan 16 06:19:04 UTC 2019 - Stephan Kulow <co...@suse.com> + +- updated to 1.27 + see /usr/share/doc/packages/perl-Module-ScanDeps/Changes + + 1.27 2019-01-15 + + - fixes by Shawn Laffan <shawnlaf...@gmail.com> + - Process lines like "{ package foo; use if 1, "warnings"; } (#8) + - Also handle 'do {use module; ...}' + + - some clean ups + - scandeps.pl: sort output by module name + - add_deps(): use _gettype() instead of inline code + - _compile_or_execute(): require DynaLoader _before_ accessing + its variables + - t/7-check-dynaloader.t: improve diagnostics + + - drop Cwd from the list of potential XS modules + + - suppress warnings in some ancient Perls + +------------------------------------------------------------------- Old: ---- Module-ScanDeps-1.26.tar.gz New: ---- Module-ScanDeps-1.27.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Module-ScanDeps.spec ++++++ --- /var/tmp/diff_new_pack.tSBkgl/_old 2019-01-24 14:01:53.920155304 +0100 +++ /var/tmp/diff_new_pack.tSBkgl/_new 2019-01-24 14:01:53.924155300 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-Module-ScanDeps # -# Copyright (c) 2018 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 @@ -17,7 +17,7 @@ Name: perl-Module-ScanDeps -Version: 1.26 +Version: 1.27 Release: 0 %define cpan_name Module-ScanDeps Summary: Recursively scan Perl code for dependencies ++++++ Module-ScanDeps-1.26.tar.gz -> Module-ScanDeps-1.27.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-ScanDeps-1.26/Changes new/Module-ScanDeps-1.27/Changes --- old/Module-ScanDeps-1.26/Changes 2018-12-12 18:29:53.000000000 +0100 +++ new/Module-ScanDeps-1.27/Changes 2019-01-15 21:02:01.000000000 +0100 @@ -1,3 +1,20 @@ +1.27 2019-01-15 + +- fixes by Shawn Laffan <shawnlaf...@gmail.com> + - Process lines like "{ package foo; use if 1, "warnings"; } (#8) + - Also handle 'do {use module; ...}' + +- some clean ups + - scandeps.pl: sort output by module name + - add_deps(): use _gettype() instead of inline code + - _compile_or_execute(): require DynaLoader _before_ accessing + its variables + - t/7-check-dynaloader.t: improve diagnostics + +- drop Cwd from the list of potential XS modules + +- suppress warnings in some ancient Perls + 1.26 2018-12-12 - Glue DLLs of XS modules should have type "shared" rather than "data" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-ScanDeps-1.26/META.json new/Module-ScanDeps-1.27/META.json --- old/Module-ScanDeps-1.26/META.json 2018-12-12 18:35:54.000000000 +0100 +++ new/Module-ScanDeps-1.27/META.json 2019-01-15 21:05:35.000000000 +0100 @@ -64,6 +64,6 @@ }, "x_MailingList" : "mailto:p...@perl.org" }, - "version" : "1.26", + "version" : "1.27", "x_serialization_backend" : "JSON::PP version 2.97001" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-ScanDeps-1.26/META.yml new/Module-ScanDeps-1.27/META.yml --- old/Module-ScanDeps-1.26/META.yml 2018-12-12 18:35:54.000000000 +0100 +++ new/Module-ScanDeps-1.27/META.yml 2019-01-15 21:05:35.000000000 +0100 @@ -34,5 +34,5 @@ MailingList: mailto:p...@perl.org bugtracker: https://rt.cpan.org/Dist/Display.html?Queue=Module-ScanDeps repository: git://github.com/rschupp/Module-ScanDeps.git -version: '1.26' +version: '1.27' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-ScanDeps-1.26/lib/Module/ScanDeps.pm new/Module-ScanDeps-1.27/lib/Module/ScanDeps.pm --- old/Module-ScanDeps-1.26/lib/Module/ScanDeps.pm 2018-12-12 18:22:12.000000000 +0100 +++ new/Module-ScanDeps-1.27/lib/Module/ScanDeps.pm 2019-01-15 20:55:20.000000000 +0100 @@ -4,7 +4,7 @@ use warnings; use vars qw( $VERSION @EXPORT @EXPORT_OK @ISA $CurrentPackage @IncludeLibs $ScanFileRE ); -$VERSION = '1.26'; +$VERSION = '1.27'; @EXPORT = qw( scan_deps scan_deps_runtime ); @EXPORT_OK = qw( scan_line scan_chunk add_deps scan_deps_runtime path_to_inc_name ); @@ -802,6 +802,9 @@ CHUNK: foreach (split(/;/, $line)) { s/^\s*//; + # handle single line blocks like 'do { package foo; use xx; }' + s/^(?:do\s*)?\{\s*//; + s/\}$//; if (/^package\s+(\w+)/) { $CurrentPackage = $1; @@ -915,6 +918,9 @@ my $module = eval { $_ = $chunk; s/^\s*//; + # handle single line blocks like 'do { package foo; use xx; }' + s/^(?:do\s*)?\{\s*//; + s/\}\s*$//; # TODO: There's many more of these "loader" type modules on CPAN! # scan for the typical module-loader modules @@ -1100,22 +1106,19 @@ next; } - my $type = _gettype($file); _add_info( rv => $rv, module => $module, file => $file, used_by => $used_by, - type => $type ); + type => _gettype($file) ); - if ($module =~ /(.*?([^\/]*))\.p[mh]$/i) { - my ($path, $basename) = ($1, $2); + if ((my $path = $module) =~ s/\.p[mh]$//i) { foreach (_glob_in_inc("auto/$path")) { - next if $_->{file} =~ m{\bauto/$path/.*/}; # weed out subdirs - next if $_->{name} =~ m{/(?:\.exists|\.packlist|\Q$Config{lib_ext}\E)$}; - $type = _gettype($_->{name}); + next if $_->{name} =~ m{^auto/$path/.*/}; # weed out subdirs + next if $_->{name} =~ m{/(?:\.exists|\.packlist)$|\Q$Config{lib_ext}\E$}; _add_info( rv => $rv, module => $_->{name}, file => $_->{file}, used_by => $module, - type => $type ); + type => _gettype($_->{name}) ); } ### Now, handle module and distribution share dirs @@ -1196,7 +1199,7 @@ my $dir = "$inc/$subdir"; next unless -d $dir; - opendir my $dh, $dir or next; + opendir(my $dh, $dir) or next; my @names = map { "$subdir/$_" } grep { -f "$dir/$_" } readdir $dh; closedir $dh; @@ -1346,16 +1349,18 @@ $execute ? "END\n" : "CHECK\n", <<'...'; { + require DynaLoader; + my @_dl_shared_objects = @DynaLoader::dl_shared_objects; + my @_dl_modules = @DynaLoader::dl_modules; + # save %INC etc so that requires below don't pollute them my %_INC = %INC; my @_INC = @INC; - my @_dl_shared_objects = @DynaLoader::dl_shared_objects; - my @_dl_modules = @DynaLoader::dl_modules; require Cwd; - require DynaLoader; require Data::Dumper; require Config; + my $dlext = $Config::Config{dlext}; while (my ($k, $v) = each %_INC) { @@ -1381,10 +1386,9 @@ # drop refs from @_INC @_INC = grep { !ref $_ } @_INC; - my $dlext = $Config{dlext}; my @dlls = grep { defined $_ && -e $_ } Module::ScanDeps::DataFeed::_dl_shared_objects(); my @shared_objects = @dlls; - push @shared_objects, grep { s/\Q.$dlext\E$/\.bs/ && -e $_ } @dlls; + push @shared_objects, grep { s/\.\Q$dlext\E$/.bs/ && -e $_ } @dlls; # write data file my $data_file = $ENV{MSD_DATA_FILE}; @@ -1421,8 +1425,8 @@ my $modpname = join('/', @modparts); foreach my $dir (@_INC) { - my $file = "$dir/auto/$modpname/$modfname.$Config{dlext}"; - return $file if -r $file; + my $file = "$dir/auto/$modpname/$modfname.$dlext"; + return $file if -e $file; } return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-ScanDeps-1.26/script/scandeps.pl new/Module-ScanDeps-1.27/script/scandeps.pl --- old/Module-ScanDeps-1.26/script/scandeps.pl 2016-12-21 19:40:38.000000000 +0100 +++ new/Module-ScanDeps-1.27/script/scandeps.pl 2019-01-15 20:55:20.000000000 +0100 @@ -105,13 +105,9 @@ $len += 2; -print "# Legend: [C]ore [X]ternal [S]ubmodule [?]NotOnCPAN\n" if $verbose; - -foreach my $mod (sort { - "@{$a->{used_by}}" cmp "@{$b->{used_by}}" or - $a->{key} cmp $b->{key} -} @todo) { +print "#\n# Legend: [C]ore [X]ternal [S]ubmodule [?]NotOnCPAN\n" if $verbose; +foreach my $mod (sort { $a->{name} cmp $b->{name} } @todo ) { my $version = MM->parse_version($mod->{file}); if (!$verbose) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-ScanDeps-1.26/t/16-scan_line.t new/Module-ScanDeps-1.27/t/16-scan_line.t --- old/Module-ScanDeps-1.26/t/16-scan_line.t 2017-07-03 20:18:47.000000000 +0200 +++ new/Module-ScanDeps-1.27/t/16-scan_line.t 2018-12-20 18:17:44.000000000 +0100 @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 11; use Module::ScanDeps qw/scan_line/; { @@ -65,3 +65,28 @@ is_deeply (\@expected, [sort @got], 'autouse pragma used in one-liner'); } + + +{ + my $chunk= "{ package foo; use if 1, 'warnings' }"; + my @array=sort(scan_line($chunk)); + is_deeply(\@array,[sort qw{if.pm warnings.pm}]); +} + +{ + my $chunk= "{ use if 1, 'warnings' }"; + my @array=sort(scan_line($chunk)); + is_deeply(\@array,[sort qw{if.pm warnings.pm}]); +} + +{ + my $chunk= " do { use if 1, 'warnings' }"; + my @array=sort(scan_line($chunk)); + is_deeply(\@array,[sort qw{if.pm warnings.pm}]); +} + +{ + my $chunk= " do { use foo }"; + my @array=sort(scan_line($chunk)); + is_deeply(\@array,[sort qw{foo.pm}]); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-ScanDeps-1.26/t/7-check-dynaloader.t new/Module-ScanDeps-1.27/t/7-check-dynaloader.t --- old/Module-ScanDeps-1.26/t/7-check-dynaloader.t 2017-07-03 19:41:05.000000000 +0200 +++ new/Module-ScanDeps-1.27/t/7-check-dynaloader.t 2019-01-15 20:55:20.000000000 +0100 @@ -12,14 +12,21 @@ plan skip_all => "No dynamic loading available in your version of perl" unless $Config::Config{usedl}; -my @try_mods = qw( Cwd File::Glob Data::Dumper List::Util Time::HiRes Compress::Raw::Zlib ); +my @try_mods = qw( File::Glob Data::Dumper List::Util Time::HiRes Compress::Raw::Zlib ); my @dyna_mods = grep { my $mod = $_; eval("require $mod; 1") && grep { $_ eq $mod } @DynaLoader::dl_modules } @try_mods; plan skip_all => "No dynamic module found (tried @try_mods)" unless @dyna_mods; + +my $extra_verbose = ($ENV{TEST_VERBOSE}||0) > 1; diag "dynamic modules used for test: @dyna_mods"; +if ($extra_verbose) +{ + diag "\@DynaLoader::dl_modules = @DynaLoader::dl_modules"; + diag "\@DynaLoader::dl_shared_objects = @DynaLoader::dl_shared_objects"; +} plan tests => 4 * 2 * @dyna_mods; @@ -30,7 +37,7 @@ my $modfname = defined &DynaLoader::mod2fname ? DynaLoader::mod2fname(\@modparts) : $modparts[-1]; my $auto_path = join('/', 'auto', @modparts, "$modfname.$Config::Config{dlext}"); - check_bundle_path($module, $auto_path, + check_bundle_path(static => $module, $auto_path, sub { scan_deps( files => [ $_[0] ], recurse => 0); @@ -40,7 +47,7 @@ 1; ... ); - check_bundle_path($module, $auto_path, + check_bundle_path(compile => $module, $auto_path, sub { scan_deps_runtime( files => [ $_[0] ], recurse => 0, @@ -52,7 +59,7 @@ 1; ... ); - check_bundle_path($module, $auto_path, + check_bundle_path(execute => $module, $auto_path, sub { scan_deps_runtime( files => [ $_[0] ], recurse => 0, @@ -65,7 +72,7 @@ exit(0); ... ); - check_bundle_path($module, $auto_path, + check_bundle_path(execute_with_args => $module, $auto_path, sub { scan_deps_runtime( files => [ $_[0] ], recurse => 0, @@ -84,24 +91,24 @@ # NOTE: check_bundle_path runs 2 tests sub check_bundle_path { - my ($module, $auto_path, $scan, $suffix, $source) = @_; + my ($tag, $module, $auto_path, $scan, $suffix, $source) = @_; my ($fh, $filename) = File::Temp::tempfile( UNLINK => 1, SUFFIX => $suffix ); print $fh $source, "\n" or die $!; close $fh; my $rv = $scan->($filename); - my $line = (caller())[2]; + diag("check_bundle_path:$tag for $module ..."); + diag(Dumper($rv)) if $extra_verbose; my ( $entry ) = grep { /^\Q$auto_path\E$/ } keys %$rv; ok($entry, - "check_bundle_path:$line: $module: ". - "found some key that looks like it pulled in its shared lib (auto_path=$auto_path)\n". - Dumper($rv)); + "check_bundle_path:$tag for $module: ". + "found some key that looks like it pulled in its shared lib (auto_path=$auto_path)"); # Actually we accept anything that ends with $auto_path. ok($rv->{$entry}{file} =~ m{/\Q$auto_path\E$}, - "check_bundle_path:$line: $module: ". + "check_bundle_path:$tag for $module: ". "the full bundle path we got \"$rv->{$entry}{file}\" looks legit"); }