Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-Module-ScanDeps for
openSUSE:Factory checked in at 2023-08-08 17:43:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Module-ScanDeps (Old)
and /work/SRC/openSUSE:Factory/.perl-Module-ScanDeps.new.22712 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Module-ScanDeps"
Tue Aug 8 17:43:27 2023 rev:31 rq:1102972 version:1.330.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Module-ScanDeps/perl-Module-ScanDeps.changes
2023-07-12 17:27:30.510568080 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Module-ScanDeps.new.22712/perl-Module-ScanDeps.changes
2023-08-08 17:43:29.577731200 +0200
@@ -1,0 +2,13 @@
+Sat Aug 5 03:07:50 UTC 2023 - Tina Müller <[email protected]>
+
+- updated to 1.33
+ see /usr/share/doc/packages/perl-Module-ScanDeps/Changes
+
+ 1.33 2023-08-04
+ - Recognize Moose/Moo/Mouse style inheritance ("extends")
+ or composition ("with") statements.
+ - Add %Preload entries for known dependants of XS::Parse::Keyword.
+ Note: XS::Parse::Keyword is loaded from XS code, grep.metacpan.org
+ for calls of boot_xs_parse_keyword() in *.xs files.
+
+-------------------------------------------------------------------
Old:
----
Module-ScanDeps-1.32.tar.gz
New:
----
Module-ScanDeps-1.33.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Module-ScanDeps.spec ++++++
--- /var/tmp/diff_new_pack.JPdChg/_old 2023-08-08 17:43:30.053734168 +0200
+++ /var/tmp/diff_new_pack.JPdChg/_new 2023-08-08 17:43:30.057734194 +0200
@@ -18,12 +18,13 @@
%define cpan_name Module-ScanDeps
Name: perl-Module-ScanDeps
-Version: 1.32
+Version: 1.330.0
Release: 0
+%define cpan_version 1.33
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Recursively scan Perl code for dependencies
URL: https://metacpan.org/release/%{cpan_name}
-Source0:
https://cpan.metacpan.org/authors/id/R/RS/RSCHUPP/%{cpan_name}-%{version}.tar.gz
+Source0:
https://cpan.metacpan.org/authors/id/R/RS/RSCHUPP/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
BuildRequires: perl
BuildRequires: perl-macros
@@ -32,6 +33,9 @@
BuildRequires: perl(version)
Requires: perl(Module::Metadata)
Requires: perl(version)
+Provides: perl(Module::ScanDeps) = 1.330.0
+Provides: perl(Module::ScanDeps::Cache)
+%define __perllib_provides /bin/true
%{perl_requires}
%description
@@ -63,7 +67,7 @@
returned by 'get_files'.
%prep
-%autosetup -n %{cpan_name}-%{version}
+%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
++++++ Module-ScanDeps-1.32.tar.gz -> Module-ScanDeps-1.33.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.32/Changes
new/Module-ScanDeps-1.33/Changes
--- old/Module-ScanDeps-1.32/Changes 2023-07-05 17:49:28.000000000 +0200
+++ new/Module-ScanDeps-1.33/Changes 2023-08-04 17:46:21.000000000 +0200
@@ -1,3 +1,13 @@
+1.33 2023-08-04
+
+- Recognize Moose/Moo/Mouse style inheritance ("extends")
+ or composition ("with") statements.
+
+- Add %Preload entries for known dependants of XS::Parse::Keyword.
+
+ Note: XS::Parse::Keyword is loaded from XS code, grep.metacpan.org
+ for calls of boot_xs_parse_keyword() in *.xs files.
+
1.32 2023-07-05
- Ensure $inc gets removed from the start of $File::Find::name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.32/META.json
new/Module-ScanDeps-1.33/META.json
--- old/Module-ScanDeps-1.32/META.json 2023-07-05 17:55:35.000000000 +0200
+++ new/Module-ScanDeps-1.33/META.json 2023-08-04 17:47:53.000000000 +0200
@@ -64,6 +64,6 @@
},
"x_MailingList" : "mailto:[email protected]"
},
- "version" : "1.32",
+ "version" : "1.33",
"x_serialization_backend" : "JSON::PP version 4.16"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.32/META.yml
new/Module-ScanDeps-1.33/META.yml
--- old/Module-ScanDeps-1.32/META.yml 2023-07-05 17:55:35.000000000 +0200
+++ new/Module-ScanDeps-1.33/META.yml 2023-08-04 17:47:53.000000000 +0200
@@ -34,5 +34,5 @@
MailingList: mailto:[email protected]
bugtracker: https://github.com/rschupp/Module-ScanDeps/issues
repository: git://github.com/rschupp/Module-ScanDeps.git
-version: '1.32'
+version: '1.33'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.32/lib/Module/ScanDeps.pm
new/Module-ScanDeps-1.33/lib/Module/ScanDeps.pm
--- old/Module-ScanDeps-1.32/lib/Module/ScanDeps.pm 2023-07-05
17:20:56.000000000 +0200
+++ new/Module-ScanDeps-1.33/lib/Module/ScanDeps.pm 2023-08-04
17:35:17.000000000 +0200
@@ -4,7 +4,7 @@
use warnings;
use vars qw( $VERSION @EXPORT @EXPORT_OK @ISA $CurrentPackage @IncludeLibs
$ScanFileRE );
-$VERSION = '1.32';
+$VERSION = '1.33';
@EXPORT = qw( scan_deps scan_deps_runtime );
@EXPORT_OK = qw( scan_line scan_chunk add_deps scan_deps_runtime
path_to_inc_name );
@@ -33,6 +33,7 @@
$ScanFileRE = qr/(?:^|\\|\/)(?:[^.]*|.*\.(?i:p[ml]|t|al))$/;
+
=head1 NAME
Module::ScanDeps - Recursively scan Perl code for dependencies
@@ -224,11 +225,28 @@
my $SeenTk;
my %SeenRuntimeLoader;
+# match "use LOADER LIST" chunks; sets $1 to LOADER and $2 to LIST
+my $LoaderRE =
+ qr/^ use \s+
+ ( asa
+ | base
+ | parent
+ | prefork
+ | POE
+ | encoding
+ | maybe
+ | only::matching
+ | Mojo::Base
+ | Catalyst
+ )(?!\:) \b \s* (.*)
+ /sx;
+
# Pre-loaded module dependencies {{{
my %Preload = (
'AnyDBM_File.pm' => [qw( SDBM_File.pm )],
'AnyEvent.pm' => 'sub',
'Authen/SASL.pm' => 'sub',
+
'B/Hooks/EndOfScope.pm' =>
[qw( B/Hooks/EndOfScope/PP.pm B/Hooks/EndOfScope/XS.pm )],
'Bio/AlignIO.pm' => 'sub',
@@ -254,6 +272,7 @@
'Bio/TreeIO.pm' => 'sub',
'Bio/LiveSeq/IO.pm' => 'sub',
'Bio/Variation/IO.pm' => 'sub',
+
'Catalyst.pm' => sub {
return ('Catalyst/Runtime.pm',
'Catalyst/Dispatcher.pm',
@@ -267,6 +286,7 @@
'Class/Load.pm' => [qw( Class/Load/PP.pm )],
'Class/MakeMethods.pm' => 'sub',
'Class/MethodMaker.pm' => 'sub',
+ 'Class/Plain.pm' => [qw( XS/Parse/Keyword.pm )],
'Config/Any.pm' =>'sub',
'Crypt/Random.pm' => sub {
_glob_in_inc('Crypt/Random/Provider', 1);
@@ -274,6 +294,7 @@
'Crypt/Random/Generator.pm' => sub {
_glob_in_inc('Crypt/Random/Provider', 1);
},
+
'Date/Manip.pm' =>
[qw( Date/Manip/DM5.pm Date/Manip/DM6.pm )],
'Date/Manip/Base.pm' => sub {
@@ -328,6 +349,7 @@
return 'pod/perldiag.pod';
},
+
'Email/Send.pm' => 'sub',
'Event.pm' => sub {
map "Event/$_.pm", qw( idle io signal timer var );
@@ -335,6 +357,7 @@
'ExtUtils/MakeMaker.pm' => sub {
grep /\bMM_/, _glob_in_inc('ExtUtils', 1);
},
+
'FFI/Platypus.pm' => 'sub',
'File/Basename.pm' => [qw( re.pm )],
'File/BOM.pm' => [qw( Encode/Unicode.pm )],
@@ -343,9 +366,14 @@
require File::Spec;
map { my $name = $_; $name =~ s!::!/!g; "$name.pm" } @File::Spec::ISA;
},
+ 'Future/AsyncAwait.pm' => [qw( XS/Parse/Keyword.pm )],
+ 'Future/AsyncAwait/Hooks.pm' => [qw( XS/Parse/Keyword.pm )],
+
'Gtk2.pm' => [qw( Cairo.pm )], # Gtk2.pm does:
eval "use Cairo;"
+
'HTTP/Entity/Parser.pm' => 'sub',
'HTTP/Message.pm' => [qw( URI/URL.pm URI.pm )],
+
'Image/ExifTool.pm' => sub {
return(
(map $_->{name}, _glob_in_inc('Image/ExifTool', 0)), # also *.pl
files
@@ -364,6 +392,7 @@
)],
'IO/Socket.pm' => [qw( IO/Socket/UNIX.pm )],
'IUP.pm' => 'sub',
+
'JSON.pm' => sub {
# add JSON/PP*.pm, JSON/PP/*.pm
# and ignore other JSON::* modules (e.g. JSON/Syck.pm, JSON/Any.pm);
@@ -373,6 +402,8 @@
'JSON/MaybeXS.pm' => [qw(
Cpanel/JSON/XS.pm JSON/XS.pm JSON/PP.pm
)],
+
+ 'List/Keywords.pm' => [qw( XS/Parse/Keyword.pm )],
'List/MoreUtils.pm' => 'sub',
'List/SomeUtils.pm' => 'sub',
'Locale/Maketext/Lexicon.pm' => 'sub',
@@ -397,6 +428,7 @@
_glob_in_inc("LWP/Protocol", 1),
);
},
+
'Mail/Audit.pm' => 'sub',
'Math/BigInt.pm' => 'sub',
'Math/BigFloat.pm' => 'sub',
@@ -430,12 +462,17 @@
'Mojo/IOLoop/TLS.pm' => sub { # server.{crt,key}
map { $_->{name} } _glob_in_inc('Mojo/IOLoop/resources', 0)
},
+
'Net/DNS/Resolver.pm' => 'sub',
'Net/DNS/RR.pm' => 'sub',
'Net/FTP.pm' => 'sub',
'Net/HTTPS.pm' => [qw( IO/Socket/SSL.pm Net/SSL.pm )],
'Net/Server.pm' => 'sub',
'Net/SSH/Perl.pm' => 'sub',
+
+ 'Object/Pad.pm' => [qw( XS/Parse/Keyword.pm )],
+ 'Object/Pad/Keyword/Accessor.pm' => [qw( XS/Parse/Keyword.pm )],
+
'Package/Stash.pm' => [qw( Package/Stash/PP.pm
Package/Stash/XS.pm )],
'Pango.pm' => [qw( Cairo.pm )], # Pango.pm does:
eval "use Cairo;"
'PAR/Repository.pm' => 'sub',
@@ -472,10 +509,12 @@
_glob_in_inc('auto/POSIX/SigRt', 0), # *.al files
},
'PPI.pm' => 'sub',
+
'Regexp/Common.pm' => 'sub',
'RPC/XML/ParserFactory.pm' => sub {
_glob_in_inc('RPC/XML/Parser', 1);
},
+
'SerialJunk.pm' => [qw(
termios.ph asm/termios.ph sys/termiox.ph sys/termios.ph sys/ttycom.ph
)],
@@ -499,6 +538,13 @@
_glob_in_inc('SVN', 1),
map { $_->{name} } _glob_in_inc('auto/SVN', 0), # *.so, *.bs files
},
+ 'Syntax/Keyword/Combine/Keys.pm' => [qw( XS/Parse/Keyword.pm )],
+ 'Syntax/Keyword/Defer.pm' => [qw( XS/Parse/Keyword.pm )],
+ 'Syntax/Keyword/Dynamically.pm' => [qw( XS/Parse/Keyword.pm )],
+ 'Syntax/Keyword/Inplace.pm' => [qw( XS/Parse/Keyword.pm )],
+ 'Syntax/Keyword/Match.pm' => [qw( XS/Parse/Keyword.pm )],
+ 'Syntax/Keyword/Try.pm' => [qw( XS/Parse/Keyword.pm )],
+
'Template.pm' => 'sub',
'Term/ReadLine.pm' => 'sub',
'Test/Deep.pm' => 'sub',
@@ -518,15 +564,18 @@
'Tk/FBox.pm' => [qw( Tk/folder.xpm Tk/file.xpm )],
'Tk/Getopt.pm' => [qw( Tk/openfolder.xpm Tk/win.xbm
)],
'Tk/Toplevel.pm' => [qw( Tk/Wm.pm )],
+
'Unicode/Normalize.pm' => \&_unicore,
'Unicode/UCD.pm' => \&_unicore,
'URI.pm' => sub { grep !/urn/,
_glob_in_inc('URI', 1) },
'utf8_heavy.pl' => \&_unicore,
+
'Win32/EventLog.pm' => [qw( Win32/IPC.pm )],
'Win32/Exe.pm' => 'sub',
'Win32/TieRegistry.pm' => [qw( Win32API/Registry.pm )],
'Win32/SystemInfo.pm' => [qw( Win32/cpuspd.dll )],
'Wx.pm' => [qw( attributes.pm )],
+
'XML/Parser.pm' => sub {
_glob_in_inc('XML/Parser/Style', 1),
_glob_in_inc('XML/Parser/Encodings', 1),
@@ -537,6 +586,8 @@
'XMLRPC/Lite.pm' => sub {
_glob_in_inc('XMLRPC/Transport', 1);
},
+ 'XS/Parse/Keyword/FromPerl.pm' => [qw( XS/Parse/Keyword.pm )],
+
'YAML.pm' => [qw( YAML/Loader.pm YAML/Dumper.pm
)],
'YAML/Any.pm' => sub {
# try to figure out what YAML::Any would have used
@@ -933,45 +984,23 @@
return sort keys %found;
}
-# short helpers for scan_chunk
-my %LoaderRegexp; # cache
-
-sub _check_loader {
- my ($chunk, $loaders, $prefix) = @_;
- $LoaderRegexp{$loaders} ||= _build_loader_regexp($loaders);
-
- if (my ($loader, $loadee) = $chunk =~ $LoaderRegexp{$loaders}) {
- return _extract_loader_dependency($loader, $loadee, $prefix);
- }
- return;
-}
-
-sub _build_loader_regexp {
- my ($loaders) = @_;
- my $alt = join('|', map { quotemeta($_) }
- split(/\s+/, $loaders));
- return qr/^\s* use \s+ ($alt)(?!\:) \b \s* (.*)/sx;
-}
-
-sub _extract_loader_dependency {
- my ($loader, $loadee, $prefix) = @_;
- $prefix = $prefix ? "${prefix}::" : "";
-
- return [
- _mod2pm($loader),
- map { _mod2pm("$prefix$_") }
- grep { length and !/^q[qw]?$/ and !/-/ }
- split /[^\w:-]+/, $loadee
- #should skip any module name that contains '-', not split it in two
- ];
-}
+# convert module name to file name
sub _mod2pm {
my $mod = shift;
$mod =~ s!::!/!g;
return "$mod.pm";
}
+# parse a comma-separated list of string literals and qw() lists
+sub _parse_list {
+ my $list = shift;
+
+ # split $list on anything that's not a word character or ":"
+ # and ignore "q", "qq" and "qw"
+ return grep { length and !/^:|^q[qw]?$/ } split(/[^\w:]+/, $list);
+}
+
sub scan_chunk {
my $chunk = shift;
@@ -990,32 +1019,41 @@
# analyze the string
s/^eval \s+ (?:['"]|qq?\s*\W) \s*//x;
+ # "use LOADER LIST"
# TODO: There's many more of these "loader" type modules on CPAN!
- # scan for the typical module-loader modules
- # grab pre-calculated regexp or re-build it (and cache it)
- if (my $mods = _check_loader(
- $_, "asa base parent prefork POE encoding maybe only::matching
Mojo::Base")) {
- return $mods;
- }
- if (my $mods = _check_loader(
- $_, "Catalyst", "Catalyst::Plugin")) {
- return $mods;
+ if (my ($loader, $list) = $_ =~ $LoaderRE) {
+ my @mods = _parse_list($list);
+
+ if ($loader eq "Catalyst") {
+ # "use Catalyst 'Foo'" looks for "Catalyst::Plugin::Foo",
+ # but "use Catalyst +Foo" looks for "Foo"
+ @mods = map {
+ ($list =~ /([+-])\Q$_\E(?:$|[^\w:])/)
+ ? ($1 eq "-"
+ ? () # "-Foo": it's a flag, eg. "-Debug", skip it
+ : $_) # "+Foo": look for "Foo"
+ : "Catalyst::Plugin::$_"
+ # "Foo": look for "Catalyst::Plugin::Foo"
+ } @mods;
+ }
+ return [ map { _mod2pm($_) } $loader, @mods ];
}
if (/^use \s+ Class::Autouse \b \s* (.*)/sx
or /^Class::Autouse \s* -> \s* autouse \s* (.*)/sx) {
- return [ 'Class/Autouse.pm',
- map { _mod2pm($_) }
- grep { length and !/^:|^q[qw]?$/ }
- split(/[^\w:]+/, $1) ];
+ return [ map { _mod2pm($_) } "Class::Autouse", _parse_list($1) ];
}
- return _mod2pm($1) if /^(?:use|no) \s+ ([\w:]+)/x; # bareword
+ # generic "use ..."
+ if (s/^(?:use|no) \s+//x) {
+ my ($mod) = _parse_list($_); # just the first word
+ return _mod2pm($mod);
+ }
if (s/^(require|do) [\s(]+//x) {
- return _mod2pm($1) # bareword ("require"
only)
- if $1 eq "require" && /^([\w:]+)/;
- return $_; # maybe string literal?
+ return ($1 eq "require" && /^([\w:]+)/)
+ ? _mod2pm($1) # bareword ("require"
only)
+ : $_; # maybe string literal?
}
if (/(<[^>]*[^\$\w>][^>]*>)/) {
@@ -1023,7 +1061,12 @@
return "File/Glob.pm" if $diamond =~ /[*?\[\]{}~\\]/;
}
- return "DBD/$1.pm" if /\b[Dd][Bb][Ii]:(\w+):/;
+ return "DBD/$1.pm" if /\bdbi:(\w+):/i;
+
+ # Moose/Moo/Mouse style inheritance or composition
+ if (s/^(with|extends)\s+//) {
+ return [ map { _mod2pm($_) } _parse_list($_) ];
+ }
# check for stuff like
# decode("klingon", ...)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-ScanDeps-1.32/t/14-scan_chunk.t
new/Module-ScanDeps-1.33/t/14-scan_chunk.t
--- old/Module-ScanDeps-1.32/t/14-scan_chunk.t 2022-07-10 23:34:58.000000000
+0200
+++ new/Module-ScanDeps-1.33/t/14-scan_chunk.t 2023-08-03 12:13:32.000000000
+0200
@@ -20,8 +20,20 @@
expected => 'parent.pm strict.pm',
},
{
- chunk => 'use parent::doesnotexists qw(strict);',
- expected => 'parent/doesnotexists.pm',
+ chunk => 'use parent "Foo::Bar"',
+ expected => 'parent.pm Foo/Bar.pm',
+ },
+ {
+ chunk => 'use parent qw(Fred Wilma);',
+ expected => 'parent.pm Fred.pm Wilma.pm',
+ },
+ {
+ chunk => 'use parent "Foo::Bar", qw(Fred Wilma);',
+ expected => 'parent.pm Foo/Bar.pm Fred.pm Wilma.pm',
+ },
+ {
+ chunk => 'use parent::doesnotexist qw(strict);',
+ expected => 'parent/doesnotexist.pm',
},
{
chunk => 'use Mojo::Base "strict";',
@@ -35,6 +47,18 @@
comment => '-Debug should be skipped',
},
{
+ chunk => 'use Catalyst qw/URI +My::Catalyst::Stuff/',
+ expected => 'Catalyst.pm Catalyst/Plugin/URI.pm My/Catalyst/Stuff.pm',
+ },
+ {
+ chunk => 'with "Some::Role1", "Some::Role2"',
+ expected => 'Some/Role1.pm Some/Role2.pm',
+ },
+ {
+ chunk => 'with qw(Some::Role1 Some::Role2)',
+ expected => 'Some/Role1.pm Some/Role2.pm',
+ },
+ {
chunk => 'use I18N::LangTags 0.30 ();',
expected => 'I18N/LangTags.pm',
},