From a2ce13749b09345ee6e18c8f09ff2242f0fa9078 Mon Sep 17 00:00:00 2001 From: trizen Date: Sun, 6 Sep 2020 11:18:24 +0300 Subject: Documented `--api=auto`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- lib/WWW/FairViewer.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/WWW') diff --git a/lib/WWW/FairViewer.pm b/lib/WWW/FairViewer.pm index 2f7314a..59307d5 100644 --- a/lib/WWW/FairViewer.pm +++ b/lib/WWW/FairViewer.pm @@ -495,6 +495,7 @@ sub _append_url_args { sub get_invidious_instances { my ($self) = @_; + require File::Spec; my $instances_file = File::Spec->catfile($self->get_config_dir, 'instances.json'); # Get the "instances.json" file when the local copy is too old or non-existent @@ -508,7 +509,7 @@ sub get_invidious_instances { $resp->is_success() or return; - my $json = $resp->decoded_content() // return; + my $json = $resp->decoded_content() || return; open(my $fh, '>', $instances_file) or return; print $fh $json; close $fh; -- cgit v1.2.3