]> git.vpit.fr Git - perl/modules/Acme-CPANAuthors-You-re_using.git/commitdiff
Only make fatal warnings that are reported while Acme::CPANAuthors requires our extension
authorVincent Pit <vince@profvince.com>
Sun, 3 Jan 2010 09:41:49 +0000 (10:41 +0100)
committerVincent Pit <vince@profvince.com>
Sun, 3 Jan 2010 09:41:49 +0000 (10:41 +0100)
t/10-base.t

index 01ca3ac9cd7358869cbde33b85e2b9c29c7ab716..39eff2314932c2248bd05af4c1b8f8906abfebee 100644 (file)
@@ -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");
 };