File Coverage

blib/lib/Data/BISON.pm
Criterion Covered Total %
statement 21 29 72.4
branch n/a
condition 0 4 0.0
subroutine 7 9 77.7
pod 2 2 100.0
total 30 44 68.1


line stmt bran cond sub pod time code
1             package Data::BISON;
2              
3 1     1   20885 use warnings;
  1         2  
  1         31  
4 1     1   5 use strict;
  1         1  
  1         31  
5 1     1   5 use Carp;
  1         6  
  1         93  
6 1     1   613 use Data::BISON::Encoder;
  1         3  
  1         9  
7 1     1   627 use Data::BISON::Decoder;
  1         3  
  1         9  
8 1     1   7 use base qw(Exporter);
  1         3  
  1         88  
9              
10 1     1   5 use version; our $VERSION = qv( '0.0.3' );
  1         2  
  1         5  
11              
12             our @EXPORT_OK = qw( encode_bison decode_bison );
13              
14             sub encode_bison {
15 0     0 1   my $obj = shift;
16 0   0       my $args = shift || {};
17              
18 0           my $enc = Data::BISON::Encoder->new( $args );
19 0           return $enc->encode( $obj );
20             }
21              
22             sub decode_bison {
23 0     0 1   my $data = shift;
24 0   0       my $args = shift || {};
25              
26 0           my $dec = Data::BISON::Decoder->new( $args );
27 0           return $dec->decode( $data );
28             }
29              
30             1;
31             __END__