From: Christian Hansen Date: Fri, 18 Nov 2005 01:00:52 +0000 (+0000) Subject: silence uninitialized warnings when restoring %ENV X-Git-Tag: v1.0~37 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FHTTP-Request-AsCGI.git;a=commitdiff_plain;h=cef1c068c25a533b17d22ae28e3432151534a5b5 silence uninitialized warnings when restoring %ENV --- diff --git a/Changes b/Changes index af932ab..3b4e73a 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ This file documents the revision history for Perl extension HTTP::Request::AsCGI. +0.3 2005-11-18 00:00:00 2005 + - silence uninitialized warnings when restoring %ENV + 0.2 2005-10-31 00:55:00 2005 - added test for response. diff --git a/lib/HTTP/Request/AsCGI.pm b/lib/HTTP/Request/AsCGI.pm index cd7394f..f9ff8a3 100644 --- a/lib/HTTP/Request/AsCGI.pm +++ b/lib/HTTP/Request/AsCGI.pm @@ -11,7 +11,7 @@ use IO::File; __PACKAGE__->mk_accessors(qw[ enviroment request stdin stdout stderr ]); -our $VERSION = 0.2; +our $VERSION = 0.3; sub new { my $class = shift; @@ -212,8 +212,11 @@ sub response { sub restore { my $self = shift; - - %ENV = %{ $self->{restore}->{enviroment} }; + + { + no warnings 'uninitialized'; + %ENV = %{ $self->{restore}->{enviroment} }; + } open( STDIN, '>&', $self->{restore}->{stdin} ) or croak("Can't restore stdin: $!");