Patch from the mailing list to clarify view warning
[catagits/Catalyst-Runtime.git] / t / lib / TestAppViewWarnings.pm
diff --git a/t/lib/TestAppViewWarnings.pm b/t/lib/TestAppViewWarnings.pm
new file mode 100644 (file)
index 0000000..3a9102c
--- /dev/null
@@ -0,0 +1,22 @@
+use strict;
+use warnings;
+
+package TestAppViewWarnings;
+
+use Catalyst;
+
+our @log_messages;
+
+__PACKAGE__->config( name => 'TestAppWarnings', root => '/some/dir', default_view => "DoesNotExist" );
+
+__PACKAGE__->log(TestAppViewWarnings::Log->new);
+
+__PACKAGE__->setup;
+
+package TestAppViewWarnings::Log;
+
+use base qw/Catalyst::Log/;
+sub warn { push(@TestAppViewWarnings::log_messages, @_[1..$#_]); }
+
+1;
+