Changes for Devel-Declare
+ - Avoid using Test::Warn, which has previously been a troublesome
+ dependency.
+
0.006010 - 07 Feb 2012
- Fix workaround for unexported core symbols to avoid breaking
compilation on non-threading builds of Perl 5.8.
configure_requires 'B::Hooks::OP::Check' => '0.19';
test_requires 'Test::More' => '0.88';
-test_requires 'Test::Warn';
repository 'git://github.com/rafl/devel-declare.git';
use strict;
use warnings;
-use Test::More tests => 4;
-use Test::Warn;
+use Test::More tests => 5;
use Devel::Declare::MethodInstaller::Simple;
BEGIN {
$_[0]->method
}
-use Test::Warn;
-
ok(main->can('foo'), 'foo() installed at runtime');
-warnings_like {
- method foo {
- $_[0]->method;
- }
-} qr/redefined/;
-
-warnings_are {
- method_quiet foo {
- $_[0]->method;
- }
-} [], 'no warnings';
+my @warnings;
+$SIG{__WARN__} = sub { push @warnings, $_[0] };
+
+@warnings = ();
+method foo {
+$_[0]->method;
+}
+is scalar(@warnings), 1;
+like $warnings[0], qr/redefined/;
+
+@warnings = ();
+method_quiet foo {
+$_[0]->method;
+}
+is_deeply \@warnings, [];