From: Vincent Pit Date: Sun, 3 Jan 2010 09:41:49 +0000 (+0100) Subject: Only make fatal warnings that are reported while Acme::CPANAuthors requires our extension X-Git-Tag: v0.03~3 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FAcme-CPANAuthors-You-re_using.git;a=commitdiff_plain;h=27f259be3b5d89e23f7e6e882bd3d8310eaf9d3e Only make fatal warnings that are reported while Acme::CPANAuthors requires our extension --- diff --git a/t/10-base.t b/t/10-base.t index 01ca3ac..39eff23 100644 --- a/t/10-base.t +++ b/t/10-base.t @@ -8,7 +8,13 @@ use Test::More; use Acme::CPANAuthors; my $authors = eval { - local $SIG{__WARN__} = sub { die @_ }; + local $SIG{__WARN__} = sub { + my ($msg) = @_; + if ($msg =~ /^You're_using CPAN Authors are not registered yet: (.*)/s) { + die $1; + } + CORE::warn(@_); + }; Acme::CPANAuthors->new("You're_using"); };