diff --git a/ChangeLog b/ChangeLog index 27692c8..653fa35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ needrestart (2.10) unstable; urgency=medium (github issue #46 by @jleroy @eigengrau) * Fixes: - [Core] Do not ignore processes if maps file could not be read. + - [Perl] Silence warnings of Module::ScanDeps for dynamic loaded modules. + (github issue #41 by @bxkx @r-lindner) -- Thomas Liske diff --git a/perl/lib/NeedRestart/Interp/Perl.pm b/perl/lib/NeedRestart/Interp/Perl.pm index c4fe997..3760bdf 100644 --- a/perl/lib/NeedRestart/Interp/Perl.pm +++ b/perl/lib/NeedRestart/Interp/Perl.pm @@ -155,10 +155,16 @@ sub files { } @Module::ScanDeps::IncludeLibs = (exists($opts{I}) ? ($opts{I}) : ()); - my $href = scan_deps( - files => [$src], - recurse => 1, - ); + my $href; + { + # Silence warnings of Module::ScanDeps for dynamic loaded modules (github issue #41) + local $SIG{__WARN__} = sub { }; + + $href = scan_deps( + files => [$src], + recurse => 1, + ); + } my %ret = map { my $stat = nr_stat($href->{$_}->{file});