The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Crumbr::Default - Default renderer for Data::Crumbr

VERSION

version 0.1.1

DESCRIPTION

This is the default encoder implementation, and most probably the only oney you really need. And most probably, you really not need to directly use it.

INTERFACE

array_key

returns the encoded array key, optionally opening an array and keeping into account the prefix, the suffix and the encoder for the key

array_keys_iterator

returns an iterator sub starting from 0 up to the number of elements in the array

hash_key

returns the encoded hash key, optionally opening an hash and keeping into account the prefix, the suffix and the encoder for the key

hash_keys_iterator

returns an iterator sub that returns each key in the input hash, sorted lexicographically

leaf
array_leaf
hash_leaf
scalar_leaf

this method is called whenever an external iteration component hits a leaf and wants to push a new encoded record to the output

new
   my $enc = Data::Crumbr::Default->new(%args);

create a new encoder object

reset

reset the encoder, i.e. wipe out all the internal state to start a new encoding cycle.

result

get the outcome of the encoding. Not guaranteed to work.

AUTHOR

Flavio Poletti <polettix@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2015 by Flavio Poletti <polettix@cpan.org>

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.