line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: /mirror/coderepos/lang/perl/R-Writer/trunk/lib/R/Writer/Encoder.pm 43085 2008-03-01T12:28:42.888222Z daisuke $ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Copyright (c) 2008 Daisuke Maki |
4
|
|
|
|
|
|
|
# All rights reserved. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package R::Writer::Encoder; |
7
|
6
|
|
|
6
|
|
87
|
use strict; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
217
|
|
8
|
6
|
|
|
6
|
|
38
|
use warnings; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
173
|
|
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
7749
|
use JSON::XS (); # XXX - Remove this in the future? |
|
6
|
|
|
|
|
85771
|
|
|
6
|
|
|
|
|
669
|
|
11
|
|
|
|
|
|
|
our $CODER = JSON::XS->new->allow_nonref; |
12
|
|
|
|
|
|
|
|
13
|
5
|
|
|
5
|
1
|
104
|
sub new { bless \my $c, shift } |
14
|
0
|
|
|
0
|
1
|
|
sub encode { $CODER->encode($_[1]) } |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__END__ |