package DTA::View::Web;
use parent 'Catalyst::View::TT';
use Template::Stash::XS;

use strict;
use warnings;

__PACKAGE__->config(
    STASH               => Template::Stash::XS->new(),
    COMPILE_DIR         => '/tmp/template_cache',
    COMPILE_EXT         => '.ttc',
    TEMPLATE_EXTENSION => '.tt',
    ENCODING           => 'utf-8',
    PRE_PROCESS        => 'macros.tt',
    WRAPPER            => 'web/wrapper.tt',
    EVAL_PERL          => 1,
    render_die         => 0,
);

$Template::Stash::SCALAR_OPS->{spacify} = sub {
    my $text = reverse $_[0];
    $text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1\x{202f}/g;
    return scalar reverse $text;
};

1;
__END__

=head1 NAME

DTA::View::Web - TT View for DTA website

=head1 DESCRIPTION

TT View for DTAQ.

=head1 SEE ALSO

L<DTAQ>

=head1 AUTHOR

Frank Wiegand

=head1 LICENSE

This library is free software. You can redistribute it and/or modify
it under the same terms as Perl itself.

=cut
