Plack-Middleware-Test-StashWarnings
view release on metacpan or search on metacpan
- improved documentation
- try harder to use $SIG{__WARN__} if it's there
0.04 2010-11-17
- add implied dep on Scalar::Util
0.03 2010-11-09
- fix failing test on 5.8
0.02 2010-10-19
- streaming API support (clkao++ for the assist)
0.01 2010-10-07
- original version
lib/Plack/Middleware/Test/StashWarnings.pm view on Meta::CPAN
if ($env->{PATH_INFO} eq '/__test_warnings') {
Carp::carp("Use a single process server like Standalone to run Test::StashWarnings middleware")
if $env->{'psgi.multiprocess'} && $self->{multiprocess_warn}++ == 0;
return [ 200, ["Content-Type", "application/x-storable"], [ $self->dump_warnings ] ];
}
my $ret = $self->_stash_warnings_for($self->app, $env);
# for the streaming API, we need to re-instate the dynamic sigwarn handler
# around the streaming callback
if (ref($ret) eq 'CODE') {
return sub { $self->_stash_warnings_for($ret, @_) };
}
return $ret;
}
sub _stash_warnings_for {
my $self = shift;
my $code = shift;
( run in 0.249 second using v1.01-cache-2.11-cpan-4d50c553e7e )