| 1 | use strict; | ||
| 2 | use warnings; | ||
| 3 | |||
| 4 | package Jifty::Plugin::TestServerWarnings::View; | ||
| 5 | use Jifty::View::Declare -base; | ||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | Jifty::Plugin::TestServerWarnings::View - Downloads test warnings | ||
| 10 | |||
| 11 | =head1 TEMPLATES | ||
| 12 | |||
| 13 | =head2 C<__jifty/test_warnings> | ||
| 14 | |||
| 15 | Outputs L<Jifty::Plugin::TestServerWarnings/encoded_warnings> to the | ||
| 16 | client. | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | template "/__jifty/test_warnings" => sub { | ||
| 21 | my $plugin = Jifty->find_plugin('Jifty::Plugin::TestServerWarnings'); | ||
| 22 | Jifty->web->response->content_type("application/x-perl"); | ||
| 23 | outs_raw($plugin->encoded_warnings); | ||
| 24 | }; | ||
| 25 | |||
| 26 | 1; | ||
| 27 |