From f9f91368fd716bd684d89013b92b6995f29b24d5 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 8 Jul 2013 17:36:06 -0400 Subject: restore the behavior of suppressing warnings in loaded modules the only thing we care about is getting $VERSION out of the modules, we don't actually want to use them, so the warnings are just noise. --- lib/Dist/CheckConflicts.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/Dist/CheckConflicts.pm') diff --git a/lib/Dist/CheckConflicts.pm b/lib/Dist/CheckConflicts.pm index b1c78ef..6357b31 100644 --- a/lib/Dist/CheckConflicts.pm +++ b/lib/Dist/CheckConflicts.pm @@ -268,7 +268,10 @@ sub calculate_conflicts { CONFLICT: for my $conflict (keys %conflicts) { - my $success = eval { require_module($conflict) }; + my $success = do { + local $SIG{__WARN__} = sub {}; + eval { require_module($conflict) }; + }; my $error = $@; my $file = module_notional_filename($conflict); next if not $success and $error =~ /Can't locate \Q$file\E in \@INC/; -- cgit v1.2.3-54-g00ecf