Skip to content

Commit

Permalink
Merge pull request #15 from masak/master
Browse files Browse the repository at this point in the history
fix a few Rakudo deprecations
  • Loading branch information
supernovus committed Aug 1, 2014
2 parents 2fd947b + 395d9e8 commit 147d332
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/HTTP/Easy.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ method connect (:$port=$.port, :$host=$.host)

method run
{
if %*ENV.exists('HTTP_EASY_DEBUG')
if %*ENV<HTTP_EASY_DEBUG> :exists
{
$!debug = ?%*ENV<HTTP_EASY_DEBUG>;
}
Expand Down Expand Up @@ -80,7 +80,7 @@ method run
next;
}
$!http-protocol = $protocol;
%!env = {}; ## Delete the previous hash.
%!env = (); ## Delete the previous hash.
my ($path, $query) = $uri.split('?', 2);
$query //= '';
## First, let's add our "known" headers.
Expand All @@ -99,7 +99,7 @@ method run
$key ~~ s:g/\-/_/;
$key .= uc;
$key = 'HTTP_' ~ $key unless $key eq any(<CONTENT_LENGTH CONTENT_TYPE>);
if %!env.exists($key) {
if %!env{$key} :exists {
%!env{$key} ~= ", $value";
}
else {
Expand All @@ -109,7 +109,7 @@ method run
}

$!body = Any;
if %.env.exists('CONTENT_LENGTH')
if %.env<CONTENT_LENGTH> :exists
{ ## Use CONTENT_LENGTH to determine the length of data to read.
if %.env<CONTENT_LENGTH>
{
Expand Down

0 comments on commit 147d332

Please sign in to comment.