-
-
07 Feb 2011 15:24:05 UTC
- Distribution: Data-Zipper
- Module version: 0.02
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (1)
- Testers (694 / 0 / 0)
- Kwalitee
Bus factor: 0- 97.73% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (11.66KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Data::Zipper::API
SYNOPSIS
package Person; use Moose; has name => ( is => 'ro' ); package MyApp; use Data::Zipper::MOP; my $person = Person->new( name => 'John' ) my $sally = Data::Zipper::MOP->new( focus => $person) ->traverse('name')->set('Sally') ->up ->focus;
ATTRIBUTES
focus
Get the value of the current point in the data structure being focused on (as navigated to by traverse)
METHODS
traverse
Traverse deeper into the data structure under focus.
up
Move "up" a level from the current traversal. Has the effect of unwinding the last traversal.
set
Replace the value of the current node with a new value.
set_via
Replace the value of the current node by executing a code reference.
$_
will be bound to the current value of the node during execution, and the code reference will also be passed this via the first argument.zip
Repeatedly moves back up the paths traversed, which has the effect of returning back to the same structure as the original input.
AUTHOR
Oliver Charles
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Oliver Charles <oliver.g.charles@googlemail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Data::Zipper, copy and paste the appropriate command in to your terminal.
cpanm Data::Zipper
perl -MCPAN -e shell install Data::Zipper
For more information on module installation, please visit the detailed CPAN module installation guide.