Group
Extension

Matches 1

Data-Sah-Format ( P/PE/PERLANCAR/Data-Sah-Format-0.003.tar.gz, PERLANCAR, 2017; MetaCPAN )
Data-Sah-Format/lib/Data/Sah/FormatJS.pm ( view source; MetaCPAN )
 {
        require File::Temp;
        require JSON::MaybeXS;
        #require String::ShellQuote;

        my $data = shift;

        state $json = JSON::MaybeXS->new->allow_nonref;

        # code t
js
        my $src = "var formatter = $code;\n\n".
            "console.log(JSON.stringify(formatter(".
                $json->encode($data).")))";

        my ($jsh, $jsfn) = File::Temp::tempfile();
file $jsfn: $!";

        my $out = IPC::System::Options::readpipe($nodejs_path, $jsfn);
        $json->decode($out);
    };
}

1;
# ABSTRACT: Generate formatter code

__END__

=pod

=encoding UTF-8


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