Group
Extension

Matches 1

Template-Plugin-React ( F/FB/FBELTON/Template-Plugin-React-0.008.tar.gz, FBELTON, 2014; MetaCPAN )
Template-Plugin-React/lib/Template/Plugin/React.pm ( view source; MetaCPAN )

use base qw(Template::Plugin);
use Template::Plugin;

use Template::Plugin::React::RESimple;
use JSON;
use Encode;

sub from_file {
    my ($fname) = @_;

    my $out = '';
    open my $fh, '<:encodi
tes => $templates
    }, $class;
}

sub render {
    my ($self, $name, $data) = @_;

    my $json = to_json($data // {}, {utf8 => 1});
    my $built = from_file $self->{templates};

    my $res = $sel

$self->{prelude};
var React = global.React;

$built;
return React.renderComponentToString($name($json));

})();
    |);

    if($res) {
        return Encode::decode("utf8", $self->{ctx}->output());

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.