<commit_before>package Octav::AdminWeb::Controller::Venue;
use Mojo::Base qw(Mojolicious::Controller);
use JSON::Types ();

sub list {
    my $self = shift;

    my $client = $self->client();
    my $venues = $client->list_venue();
    $self->stash(venues => $venues);
    $self->render(tx => "venue/list");
}

sub _lookup {
    my $self = shift;

    my $id = $self->param('id');
    if (!$id) {
        $log->debug("No 'id' available in query");
        $self->render(text => "not found", status => 404);
        return
    }

    my $client = $self->client;
    my $venue = $client->lookup_venue({id => $id, lang => "all"});
    if (! $venue) {
        $log->debug("No such venue '$id'");
        $self->render(text => "not found", status => 404);
        return
    }
    $self->stash(venue => $venue);
    $self->stash(api_key => $self->config->{googlemaps}->{api_key});
    return 1
}

sub lookup {<commit_msg>Declare $log<commit_after>package Octav::AdminWeb::Controller::Venue;
use Mojo::Base qw(Mojolicious::Controller);
use JSON::Types ();

sub list {
    my $self = shift;

    my $client = $self->client();
    my $venues = $client->list_venue();
    $self->stash(venues => $venues);
    $self->render(tx => "venue/list");
}

sub _lookup {
    my $self = shift;

    my $log = $self->app->log;
    my $id = $self->param('id');
    if (!$id) {
        $log->debug("No 'id' available in query");
        $self->render(text => "not found", status => 404);
        return
    }

    my $client = $self->client;
    my $venue = $client->lookup_venue({id => $id, lang => "all"});
    if (! $venue) {
        $log->debug("No such venue '$id'");
        $self->render(text => "not found", status => 404);
        return
    }
    $self->stash(venue => $venue);
    $self->stash(api_key => $self->config->{googlemaps}->{api_key});
    return 1
}

sub lookup {
{'fraction_non_alphanumeric': 0.20891514500537056, 'fraction_numerical': 0.007518796992481203, 'mean_word_length': 2.88125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3099182', 'n_tokens_mistral': 665, 'n_tokens_neox': 644, 'n_words': 148}