NAME

Data::Type::Digger - digging types from data structures

SYNOPSIS

use Data::Type::Digger;

my $in_data = { ... };

my $out_data = dig( $in_data, do_scalar => { uc @_ }  );

DESCRIPTION

dig helps you to deal with deep data structores.

METHODS

dig

Perform recursive digging required types from data structure

my $out_data = dig( $in_data, %params );

in_data = source structure, required

Params: # all param keys are optional
    do_all        => coderef, function called for all nodes
    do_hash       => coderef, function called for all hashref nodes
    do_array      => coderef, function called for all arrayref nodes
    do_scalar     => coderef, function called for all scalar nodes
    do_type       => coderef, function called for all nodes with ref = 'type'
    unbless       => 0 || 1,  turn all blessed objects into simple hashrefs
    clone         => 1,       make all actions on cloned structure and save the source data
    max_deep      => -1, int  -1, undef (not limited) || int (limited to INT) depth of work
    max_deep_cut  => 0 || 1,  save or cut the data deeper then max_deep

coderef
    assumes two params:
        node - value of current node
        key  - name or index of parent_node (if parent node ref is hash or array)

    returns:
        new value of node

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the perldoc command.

perldoc Data::Type::Digger

You can also look for information at:

RT, CPAN's request tracker (report bugs here)
    http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-Type-Digger

AnnoCPAN, Annotated CPAN documentation
    http://annocpan.org/dist/Data-Type-Digger

CPAN Ratings
    http://cpanratings.perl.org/d/Data-Type-Digger

Search CPAN
    http://search.cpan.org/dist/Data-Type-Digger/

AUTHOR

<rolidk@yandex.ua>

LICENSE

This program is free software; you can redistribute it and/or modify it
under the terms of the the Artistic License (2.0). You may obtain a
copy of the full license at:

L<http://www.perlfoundation.org/artistic_license_2_0>

FUNCTIONS

dig($data, %param)

perform digging data and do some actions on values