07 Feb 2011 15:24:05 UTC
- Distribution: Data-Zipper
- Module version: 0.02
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (694 / 0 / 0)
- KwaliteeBus factor: 0
- 97.73% Coverage
- License: perl_5
- Activity24 month
- Download (11.66KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:1 non-PAUSE userCYCLES Oliver Charlesand 1 contributors
- Oliver Charles
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;
Get the value of the current point in the data structure being focused on (as navigated to by traverse)
Traverse deeper into the data structure under focus.
Move "up" a level from the current traversal. Has the effect of unwinding the last traversal.
Replace the value of the current node with a new value.
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.
Repeatedly moves back up the paths traversed, which has the effect of returning back to the same structure as the original input.
This software is copyright (c) 2011 by Oliver Charles <firstname.lastname@example.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.