… | |
… | |
16 | $coder = CBOR::XS->new; |
16 | $coder = CBOR::XS->new; |
17 | #TODO |
17 | #TODO |
18 | |
18 | |
19 | =head1 DESCRIPTION |
19 | =head1 DESCRIPTION |
20 | |
20 | |
21 | WARNING! THIS IS A PRE-ALPHA RELEASE! IT WILL CRASH, CORRUPT YOUR DATA AND |
21 | WARNING! THIS IS A PRE-ALPHA RELEASE! IT WILL CRASH, CORRUPT YOUR DATA |
22 | EAT YOUR CHILDREN! |
22 | AND EAT YOUR CHILDREN! (Actually, apart from being untested and a bit |
|
|
23 | feature-limited, it might already be useful). |
23 | |
24 | |
24 | This module converts Perl data structures to CBOR and vice versa. Its |
25 | This module converts Perl data structures to the Concise Binary Object |
|
|
26 | Representation (CBOR) and vice versa. CBOR is a fast binary serialisation |
|
|
27 | format that aims to use a superset of the JSON data model, i.e. when you |
|
|
28 | can represent something in JSON, you should be able to represent it in |
|
|
29 | CBOR. |
|
|
30 | |
|
|
31 | This makes it a faster and more compact binary alternative to JSON. |
|
|
32 | |
25 | primary goal is to be I<correct> and its secondary goal is to be |
33 | The primary goal of this module is to be I<correct> and the secondary goal |
26 | I<fast>. To reach the latter goal it was written in C. |
34 | is to be I<fast>. To reach the latter goal it was written in C. |
27 | |
35 | |
28 | See MAPPING, below, on how CBOR::XS maps perl values to CBOR values and |
36 | See MAPPING, below, on how CBOR::XS maps perl values to CBOR values and |
29 | vice versa. |
37 | vice versa. |
30 | |
38 | |
31 | =cut |
39 | =cut |
32 | |
40 | |
33 | package CBOR::XS; |
41 | package CBOR::XS; |
34 | |
42 | |
35 | use common::sense; |
43 | use common::sense; |
36 | |
44 | |
37 | our $VERSION = 0.02; |
45 | our $VERSION = 0.03; |
38 | our @ISA = qw(Exporter); |
46 | our @ISA = qw(Exporter); |
39 | |
47 | |
40 | our @EXPORT = qw(encode_cbor decode_cbor); |
48 | our @EXPORT = qw(encode_cbor decode_cbor); |
41 | |
49 | |
42 | use Exporter; |
50 | use Exporter; |