From af9ae5ee3646f52e141353e3f70e3b3d38d76090 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 12 Oct 2014 01:32:03 +0300 Subject: [PATCH] If the key is not provided, do not send an empty key --- lib/WWW/BackpackTF.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WWW/BackpackTF.pm b/lib/WWW/BackpackTF.pm index 5e33b57..0b6ac12 100644 --- a/lib/WWW/BackpackTF.pm +++ b/lib/WWW/BackpackTF.pm @@ -31,7 +31,7 @@ use WWW::BackpackTF::User; sub request { my ($self, $url, %params) = @_; - $params{key} = $self->{key}; + $params{key} = $self->{key} if $self->{key}; $url = $self->{base} . $url; $url .= "&$_=$params{$_}" for keys %params; my $response = decode_json(get $url)->{response}; -- 2.39.2