stash is now middleware
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / View / Dump / Env.pm
CommitLineData
e74b3d5c 1package TestApp::View::Dump::Env;
2
3use strict;
4use base qw[TestApp::View::Dump];
5
6sub process {
7 my ( $self, $c ) = @_;
faa02805 8 my $env = $c->stash->{env};
7b73c876 9 return $self->SUPER::process($c, {
10 map { ($_ => $env->{$_}) }
11 grep { $_ ne 'psgi.input' }
6561feae 12 grep { $_ !~/^Catalyst/ }
7b73c876 13 keys %{ $env },
14 });
e74b3d5c 15}
16
df1fa879 17## We override Data::Dumper here since its not reliably outputting
18## something that is roundtrip-able.
19
20sub dump {
21 my ( $self, $reference ) = @_;
22 use Data::Dump ();
23 return Data::Dump::dump($reference);
24}
25
e74b3d5c 261;
27