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.77 by root, Fri Dec 4 02:57:14 2020 UTC vs.
Revision 1.78 by root, Tue Dec 8 08:29:44 2020 UTC

64 64
65package CBOR::XS; 65package CBOR::XS;
66 66
67use common::sense; 67use common::sense;
68 68
69our $VERSION = 1.82; 69our $VERSION = 1.83;
70our @ISA = qw(Exporter); 70our @ISA = qw(Exporter);
71 71
72our @EXPORT = qw(encode_cbor decode_cbor); 72our @EXPORT = qw(encode_cbor decode_cbor);
73 73
74use Exporter; 74use Exporter;
792sub CBOR::XS::as_bool ($) { $_[0] ? $Types::Serialiser::true : $Types::Serialiser::false } 792sub CBOR::XS::as_bool ($) { $_[0] ? $Types::Serialiser::true : $Types::Serialiser::false }
793 793
794sub CBOR::XS::as_map ($) { 794sub CBOR::XS::as_map ($) {
795 ARRAY:: eq ref $_[0] 795 ARRAY:: eq ref $_[0]
796 and $#{ $_[0] } & 1 796 and $#{ $_[0] } & 1
797 or do { require Carp; Carp::croak ("CBOR::XS::as_map only acepts array references with an even number of elements, found ") }; 797 or do { require Carp; Carp::croak ("CBOR::XS::as_map only acepts array references with an even number of elements, caught") };
798 798
799 bless [$_[0], 7, undef], CBOR::XS::Tagged:: 799 bless [$_[0], 7, undef], CBOR::XS::Tagged::
800} 800}
801 801
802=head2 OBJECT SERIALISATION 802=head2 OBJECT SERIALISATION

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines