diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-07-22 17:14:51 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-07-22 17:14:51 -0500 |
commit | 130281f8e4978d56646cf7508cac1736dcbc4d8b (patch) | |
tree | e0d2f6b536a9674c229577e1b6f58a81567ca263 | |
parent | 4fb535c843c19862eb49bf196e32a37ff6aa84c9 (diff) | |
download | web-request-130281f8e4978d56646cf7508cac1736dcbc4d8b.tar.gz web-request-130281f8e4978d56646cf7508cac1736dcbc4d8b.zip |
just make env required
-rw-r--r-- | lib/Web/Request.pm | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Web/Request.pm b/lib/Web/Request.pm index e2173e9..84174f4 100644 --- a/lib/Web/Request.pm +++ b/lib/Web/Request.pm @@ -25,14 +25,11 @@ use URI::Escape (); =cut has env => ( - traits => ['Hash'], - is => 'ro', - isa => 'HashRef', - lazy => 1, - default => sub { - confess "Can't get the env if it wasn't provided during construction"; - }, - handles => { + traits => ['Hash'], + is => 'ro', + isa => 'HashRef', + required => 1, + handles => { address => [ get => 'REMOTE_ADDR' ], remote_host => [ get => 'REMOTE_HOST' ], protocol => [ get => 'SERVER_PROTOCOL' ], @@ -476,7 +473,7 @@ Create a new Web::Request object with named parameters. Valid parameters are: =item env -A L<PSGI> environment hashref. +A L<PSGI> environment hashref. Required. =item encoding |