Permalink
Browse files

Support HTTP_EASY_DEBUG environment variable.

  • Loading branch information...
Timothy Totten
Timothy Totten committed Nov 6, 2012
1 parent e291ef6 commit 2e144dc0551e74889e94f8ee5821fe2d76d5f48b
Showing with 7 additions and 2 deletions.
  1. +5 −1 lib/HTTP/Easy.pm6
  2. +2 −1 lib/HTTP/Easy/PSGI.pm6
View
@@ -1,7 +1,7 @@
## A simple HTTP Daemon role. Inspired by HTTP::Server::Simple
## See HTTP::Easy::PSGI as the default daemon class implementation.
-role HTTP::Easy;
+role HTTP::Easy:ver<2.1.3>:auth<http://supernovus.github.com/>;
use HTTP::Status;
@@ -41,6 +41,10 @@ method connect (:$port=$.port, :$host=$.host)
method run
{
+ if %*ENV.exists('HTTP_EASY_DEBUG')
+ {
+ $!debug = ?%*ENV<HTTP_EASY_DEBUG>;
+ }
if ! $!listener { self.connect; }
message('Started HTTP server.');
self.pre-connection;
View
@@ -3,7 +3,8 @@
use HTTP::Easy;
-class HTTP::Easy::PSGI does HTTP::Easy;
+class HTTP::Easy::PSGI:ver<2.1.3>:auth<http://supernovus.github.com/>
+does HTTP::Easy;
use HTTP::Status;

0 comments on commit 2e144dc

Please sign in to comment.