Nicholas Perez > Data-Morph-1.113280 > Data::Morph::Backend::Raw

Download:
Data-Morph-1.113280.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 1.113280   Source   Latest Release: Data-Morph-1.140400

NAME ^

Data::Morph::Backend::Raw - Provides a backend that produces simple HashRefs

VERSION ^

version 1.113280

DESCRIPTION ^

Data::Morph::Backend::Raw is a backend for Data::Morph that deals with raw Perl hashes. Map directives are more complicated than the other shipped backends like Data::Morph::Backend::Object. The keys should be paths as defined by Data::DPath. Read and write operations can have rather complex dpaths defined for them to set or return values. There are two special cases: one for read directives and another for write directives. Read directives can accept alternations using pipe (eg. '|') as a delimiter. The rules for alternations are simple: first match wins. If an alternation is attempted in a write directive an exception will be thrown. The other special case is when the dpath for a write operation points to a non-existant piece: the substrate is created for you and the value deposited. One caveat is that the path must be dumb simple without fancy filtering. Hash and array access (using the syntax '*[1]') into the path is supported. Please see "SYNOPSIS" in Data::Morph for an exmaple of a map using the Raw backend.

PUBLIC_ATTRIBUTES ^

new_instance

    is: ro, isa: CodeRef

This attribute overrides "new_instance" in Data::Morph::Role::Backend and provides a default coderef that simply returns empty hash references

PUBLIC_METHODS ^

epilogue

Implements "epilogue" in Data::Morph::Role::Backend as a no-op

AUTHOR ^

Nicholas R. Perez <nperez@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 by Nicholas R. Perez <nperez@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: