From: Marius Gavrilescu Date: Sat, 11 Oct 2014 22:32:03 +0000 (+0300) Subject: If the key is not provided, do not send an empty key X-Git-Tag: 0.000_003~3 X-Git-Url: http://git.ieval.ro/?p=www-backpacktf.git;a=commitdiff_plain;h=af9ae5ee3646f52e141353e3f70e3b3d38d76090 If the key is not provided, do not send an empty key --- 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};