File Coverage

blib/lib/Data/Serializer/JSON/Syck.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 2 2 100.0
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Data::Serializer::JSON::Syck;
2 11     11   667 BEGIN { @Data::Serializer::JSON::Syck::ISA = qw(Data::Serializer) }
3              
4 11     11   87 use warnings;
  11         25  
  11         370  
5 11     11   75 use strict;
  11         24  
  11         289  
6 11     11   69 use JSON::Syck;
  11         22  
  11         706  
7 11     11   80 use vars qw($VERSION @ISA);
  11         38  
  11         1768  
8              
9             $VERSION = '0.02';
10              
11             sub serialize {
12 105     105 1 3950 return JSON::Syck::Dump($_[1]);
13             }
14              
15             sub deserialize {
16 105     105 1 3996 return JSON::Syck::Load($_[1]);
17             }
18              
19             1;
20             __END__
21              
22             =head1 NAME
23              
24             Data::Serializer::JSON::Syck - Creates bridge between Data::Serializer and JSON::Syck
25              
26             =head1 SYNOPSIS
27              
28             use Data::Serializer::JSON::Syck;
29              
30             =head1 DESCRIPTION
31              
32             Module is used internally to Data::Serializer
33              
34              
35             =over 4
36              
37             =item B<serialize> - Wrapper to normalize serializer method name
38              
39             =item B<deserialize> - Wrapper to normalize deserializer method name
40              
41             =back
42              
43             =head1 AUTHOR
44              
45             Naoya Ito <naoya@bloghackers.net>
46              
47             =head1 COPYRIGHT
48              
49             This program is free software; you can redistribute it
50             and/or modify it under the same terms as Perl itself.
51              
52             =head1 SEE ALSO
53              
54             perl(1), Data::Serializer(3), JSON::Syck(3).
55              
56             =cut
57