| 1 | package Zing::Encoder; | ||
| 2 | |||
| 3 | use 5.014; | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | use warnings; | ||
| 7 | |||
| 8 | use registry 'Zing::Types'; | ||
| 9 | use routines; | ||
| 10 | |||
| 11 | use Data::Object::Class; | ||
| 12 | |||
| 13 | our $VERSION = '0.26'; # VERSION | ||
| 14 | |||
| 15 | # METHODS | ||
| 16 | |||
| 17 | method decode(HashRef $data) { | ||
| 18 | return $data; | ||
| 19 | } | ||
| 20 | |||
| 21 | method encode(HashRef $data) { | ||
| 22 | return $data; | ||
| 23 | } | ||
| 24 | |||
| 25 | 1; | ||
| 26 | |||
| 27 | =encoding utf8 | ||
| 28 | |||
| 29 | =head1 NAME | ||
| 30 | |||
| 31 | Zing::Encoder - Serialization Abstraction | ||
| 32 | |||
| 33 | =cut | ||
| 34 | |||
| 35 | =head1 ABSTRACT | ||
| 36 | |||
| 37 | Data Serialization Abstraction | ||
| 38 | |||
| 39 | =cut | ||
| 40 | |||
| 41 | =head1 SYNOPSIS | ||
| 42 | |||
| 43 | use Zing::Encoder; | ||
| 44 | |||
| 45 | my $encoder = Zing::Encoder->new; | ||
| 46 | |||
| 47 | # $encoder->encode({ status => 'okay' }); | ||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | =head1 DESCRIPTION | ||
| 52 | |||
| 53 | This package provides a data serialization abstraction for use with | ||
| 54 | L<Zing::Store> stores. | ||
| 55 | |||
| 56 | =cut | ||
| 57 | |||
| 58 | =head1 LIBRARIES | ||
| 59 | |||
| 60 | This package uses type constraints from: | ||
| 61 | |||
| 62 | L<Zing::Types> | ||
| 63 | |||
| 64 | =cut | ||
| 65 | |||
| 66 | =head1 METHODS | ||
| 67 | |||
| 68 | This package implements the following methods: | ||
| 69 | |||
| 70 | =cut | ||
| 71 | |||
| 72 | =head2 decode | ||
| 73 | |||
| 74 | decode(HashRef $data) : HashRef | ||
| 75 | |||
| 76 | The decode method decodes the data provided. | ||
| 77 | |||
| 78 | =over 4 | ||
| 79 | |||
| 80 | =item decode example #1 | ||
| 81 | |||
| 82 | # given: synopsis | ||
| 83 | |||
| 84 | $encoder->decode({ status => 'okay' }); | ||
| 85 | |||
| 86 | =back | ||
| 87 | |||
| 88 | =cut | ||
| 89 | |||
| 90 | =head2 encode | ||
| 91 | |||
| 92 | encode(HashRef $data) : HashRef | ||
| 93 | |||
| 94 | The encode method encodes the data provided. | ||
| 95 | |||
| 96 | =over 4 | ||
| 97 | |||
| 98 | =item encode example #1 | ||
| 99 | |||
| 100 | # given: synopsis | ||
| 101 | |||
| 102 | $encoder->encode({ status => 'okay' }); | ||
| 103 | |||
| 104 | =back | ||
| 105 | |||
| 106 | =cut | ||
| 107 | |||
| 108 | =head1 AUTHOR | ||
| 109 | |||
| 110 | Al Newkirk, C<awncorp@cpan.org> | ||
| 111 | |||
| 112 | =head1 LICENSE | ||
| 113 | |||
| 114 | Copyright (C) 2011-2019, Al Newkirk, et al. | ||
| 115 | |||
| 116 | This is free software; you can redistribute it and/or modify it under the terms | ||
| 117 | of the The Apache License, Version 2.0, as elucidated in the L<"license | ||
| 118 | file"|https://github.com/iamalnewkirk/zing/blob/master/LICENSE>. | ||
| 119 | |||
| 120 | =head1 PROJECT | ||
| 121 | |||
| 122 | L<Wiki|https://github.com/iamalnewkirk/zing/wiki> | ||
| 123 | |||
| 124 | L<Project|https://github.com/iamalnewkirk/zing> | ||
| 125 | |||
| 126 | L<Initiatives|https://github.com/iamalnewkirk/zing/projects> | ||
| 127 | |||
| 128 | L<Milestones|https://github.com/iamalnewkirk/zing/milestones> | ||
| 129 | |||
| 130 | L<Contributing|https://github.com/iamalnewkirk/zing/blob/master/CONTRIBUTE.md> | ||
| 131 | |||
| 132 | L<Issues|https://github.com/iamalnewkirk/zing/issues> | ||
| 133 | |||
| 134 | =cut |