|
Revision 7341, 491 bytes
(checked in by daisuke, 5 years ago)
|
|
- Restructure modules, internal structure
- Remove singleton-ness
- Add buncha docs
|
-
Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 | # $Id$ |
|---|
| 2 | # |
|---|
| 3 | # Copyright (c) 2008 Daisuke Maki <daisuke@endeworks.jp> |
|---|
| 4 | # All rights reserved. |
|---|
| 5 | |
|---|
| 6 | package R::Writer::Encoder; |
|---|
| 7 | use strict; |
|---|
| 8 | use warnings; |
|---|
| 9 | |
|---|
| 10 | use JSON::XS (); # XXX - Remove this in the future? |
|---|
| 11 | our $CODER = JSON::XS->new->allow_nonref; |
|---|
| 12 | |
|---|
| 13 | sub new { bless \my $c, shift } |
|---|
| 14 | sub encode { $CODER->encode($_[1]) } |
|---|
| 15 | |
|---|
| 16 | 1; |
|---|
| 17 | |
|---|
| 18 | __END__ |
|---|
| 19 | |
|---|
| 20 | =head1 NAME |
|---|
| 21 | |
|---|
| 22 | R::Writer::Encoder - Default Encoder |
|---|
| 23 | |
|---|
| 24 | =head1 SYNOPSIS |
|---|
| 25 | |
|---|
| 26 | use R::Writer::Encoder; |
|---|
| 27 | # Internal use only |
|---|
| 28 | |
|---|
| 29 | =head1 METHODS |
|---|
| 30 | |
|---|
| 31 | =head2 new |
|---|
| 32 | |
|---|
| 33 | =head2 encode |
|---|
| 34 | |
|---|
| 35 | =cut |
|---|