From 130281f8e4978d56646cf7508cac1736dcbc4d8b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 22 Jul 2012 17:14:51 -0500 Subject: just make env required --- lib/Web/Request.pm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'lib') 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 environment hashref. +A L environment hashref. Required. =item encoding -- cgit v1.2.3-54-g00ecf