App::Serializer::Scalar - A "serializer" which merely encodes and decodes scalars
use App; $context = App->context(); $serializer = $context->service("Serializer"); # or ... $serializer = $context->serializer(); $data = { an => 'arbitrary', collection => [ 'of', 'data', ], of => { arbitrary => 'depth', }, }; $perl = $serializer->serialize($data); $data = $serializer->deserialize($perl); print $serializer->dump($data), "\n";
The Scalar serializer encodes (with serialize()) and decodes with (deserialize()) a scalar. It might be used to encode a binary blob as a hex string and then decode it agains.
To install App::Context, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Context
CPAN shell
perl -MCPAN -e shell install App::Context
For more information on module installation, please visit the detailed CPAN module installation guide.