develooper Front page | perl.perl5.porters | Postings from November 2001

[PATCH] Re: Extra MakeMaker noise in lib/ExtUtils/Embed.t @12791

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
November 1, 2001 13:37
Subject:
[PATCH] Re: Extra MakeMaker noise in lib/ExtUtils/Embed.t @12791
Message ID:
20011101223550.A10849@rafael
On 2001.11.01 13:00 Nick Ing-Simmons wrote:
> 
> I agree noise should be silenced.

The patch below does.

(Perhaps it's more clever to make ExtUtils::Liblist use warnings::register,
so that all warnings issued by it can be disabled on demand)

(this latest suggestion is probably not useful for the makemaker packages, but
makes sense for modules like File::Find that test for $^W before issuing
warnings.)

--- lib/ExtUtils/Embed.t.orig	Mon Oct 29 16:56:03 2001
+++ lib/ExtUtils/Embed.t	Thu Nov  1 22:06:06 2001
@@ -42,7 +42,12 @@
 else {
     push(@cmd,"-L$lib",'-lperl');
 }
-push(@cmd,ldopts());
+{
+    local $SIG{__WARN__} = sub {
+	warn $_[0] unless $_[0] =~ /No library found for -lperl/
+    };
+    push(@cmd,ldopts());
+}
 
 if ($^O eq 'aix') { # AIX needs an explicit symbol export list.
     my ($perl_exp) = grep { -f } qw(perl.exp ../perl.exp);

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About