Ignore C3 warnings on 5.10 when testing ensure_class_loaded.
Florian Ragwitz [Mon, 1 Dec 2008 21:15:23 +0000 (21:15 +0000)]
t/unit_utils_load_class.t

index d23ca1c..4231ba7 100644 (file)
@@ -16,7 +16,10 @@ BEGIN { use_ok("Catalyst::Utils") };
 }
 
 my $warnings = 0;
-$SIG{__WARN__} = sub { $warnings++ };
+$SIG{__WARN__} = sub {
+    return if $_[0] =~ /Subroutine (?:un|re|)initialize redefined at .*C3\.pm/;
+    $warnings++;
+};
 
 ok( !Class::MOP::is_class_loaded("TestApp::View::Dump"), "component not yet loaded" );