ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/CBOR-XS/XS.pm
(Generate patch)

Comparing CBOR-XS/XS.pm (file contents):
Revision 1.2 by root, Sat Oct 26 10:41:12 2013 UTC vs.
Revision 1.3 by root, Sat Oct 26 11:08:34 2013 UTC

32 32
33package CBOR::XS; 33package CBOR::XS;
34 34
35use common::sense; 35use common::sense;
36 36
37our $VERSION = 0.01; 37our $VERSION = 0.02;
38our @ISA = qw(Exporter); 38our @ISA = qw(Exporter);
39 39
40our @EXPORT = qw(encode_cbor decode_cbor); 40our @EXPORT = qw(encode_cbor decode_cbor);
41 41
42use Exporter; 42use Exporter;
43use XSLoader; 43use XSLoader;
44
45our $MAGIC = "\xd9\xd9\xf7";
44 46
45=head1 FUNCTIONAL INTERFACE 47=head1 FUNCTIONAL INTERFACE
46 48
47The following convenience methods are provided by this module. They are 49The following convenience methods are provided by this module. They are
48exported by default: 50exported by default:
259extensions to the floating point numbers of your platform, such as 261extensions to the floating point numbers of your platform, such as
260infinities or NaN's - these cannot be represented in CBOR, and it is an 262infinities or NaN's - these cannot be represented in CBOR, and it is an
261error to pass those in. 263error to pass those in.
262 264
263=back 265=back
266
267
268=head2 MAGIC HEADER
269
270There is no way to distinguish CBOR from other formats
271programmatically. To make it easier to distinguish CBOR from other
272formats, the CBOR specification has a special "magic string" that can be
273prepended to any CBOR string without changing it's meaning.
274
275This string is available as C<$CBOR::XS::MAGIC>. This module does not
276prepend this string tot he CBOR data it generates, but it will ignroe it
277if present, so users can prepend this string as a "file type" indicator as
278required.
264 279
265 280
266=head2 CBOR and JSON 281=head2 CBOR and JSON
267 282
268TODO 283TODO

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines