From 5a0b18feb8d75a6c17f6b3d73d61eb765b1ec987 Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 21 Feb 2023 19:55:12 +0000 Subject: [PATCH] Replace some concatenations with interpolation --- lib/PoorBooru.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/PoorBooru.pm b/lib/PoorBooru.pm index 2af4d6d..a803873 100644 --- a/lib/PoorBooru.pm +++ b/lib/PoorBooru.pm @@ -96,7 +96,7 @@ get "/tags" => sub { my @tags = map +{ name => $_->{name}, count => $_->{count}, - uri => uri_for("/tag/" . $_->{name}), + uri => uri_for("/tag/$_->{name}"), }, @{$data->{tags}}; template "tags" => { @@ -140,7 +140,7 @@ get "/media/:media_id" => sub { template "media" => { no_title => 1, title => $data->{id}, - image_src => "$POORBOORU_API/download/" . $data->{id}, + image_src => "$POORBOORU_API/download/$data->{id}", media_id => $data->{id}, media_filename => $data->{filename}, media_size => $data->{size}, @@ -154,7 +154,7 @@ get "/random/media" => sub { my $data = decode_json($res->{content}); # XXX body content. - redirect "/media/" . $data->{id}; + redirect "/media/$data->{id}"; }; get "/random/tag" => sub { @@ -163,7 +163,7 @@ get "/random/tag" => sub { my $data = decode_json($res->{content}); # XXX body content. - redirect "/tag/" . $data->{id}; + redirect "/tag/$data->{id}"; }; true;