summary refs log tree commit diff
path: root/lib/Net/HTTP/Spore.pm
diff options
context:
space:
mode:
authorBrian Phillips <bphillips@cpan.org>2012-12-04 22:53:27 -0600
committerAsh Berlin <ash_github@firemirror.com>2013-04-18 14:48:30 +0100
commit55f68bf78836700f664fd44cfedcee537627ac4e (patch)
tree62d75475dfc0495f843b4a9dd1903cd212b12bf0 /lib/Net/HTTP/Spore.pm
parentChanges entry for adding PATCH support (Closes #13) (diff)
downloadnet-http-spore-55f68bf78836700f664fd44cfedcee537627ac4e.tar.gz
support for anonymous middlewares
Diffstat (limited to 'lib/Net/HTTP/Spore.pm')
-rw-r--r--lib/Net/HTTP/Spore.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Net/HTTP/Spore.pm b/lib/Net/HTTP/Spore.pm
index 38ba4f7..d4fd8af 100644
--- a/lib/Net/HTTP/Spore.pm
+++ b/lib/Net/HTTP/Spore.pm
@@ -192,6 +192,10 @@ or only on some path
 
     $client->enable_if(sub{$_->[0]->path =~ m!/path/to/json/stuff!}, 'Format::JSON');
 
+For very simple middlewares, you can simple pass in an anonymous function
+
+    $client->enable( sub { my $request = shift; ... } );
+
 =head2 METHODS
 
 =over 4