From 72f329fe90d7d3aaee7400d639a332d55b30179f Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 12 Oct 2014 01:26:07 +0300 Subject: [PATCH] Fix "values/keys on reference is experimental" warnings --- lib/WWW/BackpackTF.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/WWW/BackpackTF.pm b/lib/WWW/BackpackTF.pm index 4e4ee15..5e33b57 100644 --- a/lib/WWW/BackpackTF.pm +++ b/lib/WWW/BackpackTF.pm @@ -48,20 +48,20 @@ sub new{ sub get_prices { my ($self, $appid, $raw) = @_; my $response = $self->request('IGetPrices/v4/?compress=1', maybe appid => $appid, maybe raw => $raw); - map { WWW::BackpackTF::Item->new($_, $response->{items}{$_}) } keys $response->{items} + map { WWW::BackpackTF::Item->new($_, $response->{items}{$_}) } keys %{$response->{items}} } sub get_users { my ($self, @users) = @_; my $response = $self->request('IGetUsers/v3/?compress=1', steamids => join ',', @users); - @users = map { WWW::BackpackTF::User->new($_) } values $response->{players}; + @users = map { WWW::BackpackTF::User->new($_) } values %{$response->{players}}; wantarray ? @users : $users[0] } sub get_currencies { my ($self, $appid) = @_; my $response = $self->request('IGetCurrencies/v1/?compress=1', maybe appid => $appid); - map { WWW::BackpackTF::Currency->new($_, $response->{currencies}{$_}) } keys $response->{currencies}; + map { WWW::BackpackTF::Currency->new($_, $response->{currencies}{$_}) } keys %{$response->{currencies}}; } 1; -- 2.39.2