PP.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« PP/Tagged.pm ↑ Summary PP/X.pm »
1 package CBOR::PP;
2  
3 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =encoding utf-8
7  
8 =head1 NAME
9  
10 CBOR::PP - CBOR in pure Perl
11  
12 =head1 SYNOPSIS
13  
14 my $value = CBOR::PP::decode( $cbor );
15  
16 my $tagged = CBOR::PP::tag( 123, 'value' );
17  
18 my $cbor = CBOR::PP::encode( [ 'some', { data => $tagged } ] );
19  
20 # canonical encoding
21 $cbor = CBOR::PP::encode(
22 { aa => 'last', a => 'first', z => 'middle' },
23 { canonical => 1 },
24 );
25  
26 =head1 DESCRIPTION
27  
28 This library implements a L<CBOR|https://tools.ietf.org/html/rfc7049>
29 encoder and decoder in pure Perl.
30  
31 This module itself is a syntactic convenience. For details about what
32 CBOR::PP can and can’t do, see the underlying L<CBOR::PP::Encode> and
33 L<CBOR::PP::Decode> modules.
34  
35 =head1 STATUS
36  
37 This distribution is an experimental effort.
38  
39 That having been said, CBOR is a simple enough encoding that I
40 suspect—I hope!—that bugs here will be few and far between.
41  
42 Note that, because L<CBOR::Free> is so much faster,
43 there probably won’t be much further effort put into this pure-Perl code.
44  
45 Note that this distribution’s interface can still change. If you decide
46 to use CBOR::PP in your project, please always check the changelog before
47 upgrading.
48  
49 =head1 SEE ALSO
50  
51 L<CBOR::Free> is a B<much> faster, XS-based encoder/decoder.
52  
53 L<CBOR::XS> isn’t quite as fast as CBOR::Free but is older and
54 (as of this writing) more widely used. It’s also technically unsupported
55 on current Perl versions, though, and its GPL license makes it
56 useful only for open-source projects.
57  
58 =head1 AUTHOR
59  
60 L<Gasper Software Consulting|http://gaspersoftware.com> (FELIPE)
61  
62 =head1 LICENSE
63  
64 This code is licensed under the same license as Perl itself.
65  
66 =cut
67  
68 #----------------------------------------------------------------------
69  
70 5 our $VERSION = '0.01';
71  
72 5 ▶use CBOR::PP::Encode ();
Subroutine BEGIN: called CC=1 SCAR=0.0
73 5 ▶use CBOR::PP::Decode ();
Subroutine BEGIN: called CC=1 SCAR=0.0
74  
75 5 *encode = *CBOR::PP::Encode::encode;
76  
77 5 *decode = *CBOR::PP::Decode::decode;
78  
79 5 *tag = *CBOR::PP::Encode::tag;
80  
81 5 1;
« PP/Tagged.pm ↑ Summary PP/X.pm »