blib/lib/Dancer/Serializer/CBOR.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 100% 3 / 3 totaltotal 100% 37 / 37 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package Dancer::Serializer::CBOR;
4 # ABSTRACT: serializer for handling CBOR data
5  
6 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Dancer::Exception qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use CBOR::XS;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use base 'Dancer::Serializer::Abstract';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 our $VERSION = '0.101'; # VERSION
12  
13  
14  
15 5 ▶sub serialize {
Subroutine serialize: called CC=1 SCAR=0.0
Pod documented
16 5 my ($self, $entity) = @_;
17 5 CBOR::XS::encode_cbor($entity);
18 }
19  
20  
21 4 ▶sub deserialize {
Subroutine deserialize: called CC=1 SCAR=0.0
Pod documented
22 4 my ($self, $content) = @_;
23 4 CBOR::XS::decode_cbor($content);
24 }
25  
26  
27 5 ▶sub content_type {'application/cbor'}
Subroutine content_type: called CC=1 SCAR=0.0
Pod documented
28  
29  
30 2 1;
31  
32 __END__
↑ Summary