Group
Extension

Matches 1

App-LJ ( S/SO/SONGMU/App-LJ-0.02.tar.gz, SONGMU, 2015; MetaCPAN )
App-LJ/lib/App/LJ.pm ( view source; MetaCPAN )
8001;
use strict;
use warnings;

our $VERSION = "0.02";

use JSON::XS ();
use JSON::Color ();

my $_coder;
sub _coder {
    $_coder ||= JSON::XS->new->pretty(1);
}

sub new_with_options {
    my ($cla
lf, $json) = @_;

    ($self->{printer} ||= do {
        !$self->{color} ? sub { chomp(my $l = $_coder->encode(shift)); $l} : sub { JSON::Color::encode_json(shift, {pretty => 1}) }
    })->($json);
}
 {
        my $pre = $`;
        my $maybe_json = $&;
        my $post = $';

        my $json;
        eval {
            $json = _coder->decode($maybe_json);
        };
        if (!$@) {
          

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