Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use the same example in the OO example, for easier comparison

  • Loading branch information...
commit 569a4c3c45406157e7e724d4c276f6f71f63076a 1 parent 02cd99a
@karenetheridge authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Plack/Middleware/Conditional.pm
View
6 lib/Plack/Middleware/Conditional.pm
@@ -32,15 +32,15 @@ Plack::Middleware::Conditional - Conditional wrapper for Plack middleware
use Plack::Builder;
builder {
- enable_if { $_[0]->{REMOTE_ADDR} eq '127.0.0.1' } 'StackTrace';
+ enable_if { $_[0]->{REMOTE_ADDR} eq '127.0.0.1' } 'StackTrace', force => 1;
$app;
};
# or using the OO interface:
$app = Plack::Middleware::Conditional->wrap(
$app,
- condition => sub { my $env = shift; $env->{HTTP_USER_AGENT} =~ /WebKit/ },
- builder => sub { Plack::Middleware::SuperAdminConsole->wrap($_[0], @args) },
+ condition => sub { $_[0]->{REMOTE_ADDR} eq '127.0.0.1' },
+ builder => sub { Plack::Middleware::StackTrace->wrap($_[0], force => 1) },
);
=head1 DESCRIPTION
Please sign in to comment.
Something went wrong with that request. Please try again.