summaryrefslogtreecommitdiffstats
path: root/t/warn.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-08 17:36:06 -0400
committerJesse Luehrs <doy@tozt.net>2013-07-08 17:36:27 -0400
commitf9f91368fd716bd684d89013b92b6995f29b24d5 (patch)
treee625e5451c889526f9b2570976fe67c607ad82dc /t/warn.t
parent04a6fd13f7ea3a45881d6e75ea1dffba38a999fd (diff)
downloaddist-checkconflicts-f9f91368fd716bd684d89013b92b6995f29b24d5.tar.gz
dist-checkconflicts-f9f91368fd716bd684d89013b92b6995f29b24d5.zip
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.
Diffstat (limited to 't/warn.t')
-rw-r--r--t/warn.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/warn.t b/t/warn.t
new file mode 100644
index 0000000..1058eb9
--- /dev/null
+++ b/t/warn.t
@@ -0,0 +1,16 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use lib 't/lib/warn';
+
+{
+ use_ok("Foo::Conflicts");
+
+ my $warning = '';
+ local $SIG{__WARN__} = sub { $warning .= $_[0] };
+ my $conflicts = Foo::Conflicts->calculate_conflicts;
+ is($warning, '', "we don't see warnings from loaded modules");
+}
+
+done_testing;