<commit_before><commit_msg>master View handler for Text::Xslate templates<commit_after>package System::View::TemplateViewHandler;

use Moose;
use TExt::Xslate;

has template_root => (
    is       => 'ro',
    isa      => 'Str',
    required => 1,
);

has xslate => (
    is      => 'ro',
    isa     => 'Text::Xslate',
    lazy    => 1,
    default => sub {
        my $self = shift;
        return Text::Xslate->new(
            path     => [ $self->template_root ],
            function => {
                uri_for => sub {
                    my ($r, $spec) = @_;
                    return $r->uri_for($spec);
                },
            },
        );
    },
);

1;
{'fraction_non_alphanumeric': 0.1543026706231454, 'fraction_numerical': 0.004451038575667656, 'mean_word_length': 1.4907749077490775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, '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': '510563', 'n_tokens_mistral': 217, 'n_tokens_neox': 209, 'n_words': 45}