File Coverage

blib/lib/Raisin/Encoder/YAML.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 4 0.0
total 24 28 85.7


line stmt bran cond sub pod time code
1             #!perl
2             #PODNAME: Raisin::Encoder::YAML
3             #ABSTRACT: YAML serialization plugin for Raisin.
4              
5 6     6   3170 use strict;
  6         12  
  6         203  
6 6     6   37 use warnings;
  6         12  
  6         325  
7              
8             package Raisin::Encoder::YAML;
9             $Raisin::Encoder::YAML::VERSION = '0.93';
10 6     6   37 use Encode qw(encode_utf8 decode_utf8);
  6         11  
  6         383  
11 6     6   617 use YAML qw(Dump Load);
  6         7433  
  6         1046  
12              
13 60     60 0 259 sub detectable_by { [qw(application/x-yaml application/yaml text/x-yaml text/yaml yaml)] }
14 26     26 0 592 sub content_type { 'application/x-yaml' }
15 26     26 0 180 sub serialize { encode_utf8( Dump($_[1]) ) }
16 8     8 0 355 sub deserialize { Load( decode_utf8($_[1]) ) }
17              
18             1;
19              
20             __END__