Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Manipulate deepest values in complex hash structures

by LanX (Canon)
on Apr 30, 2013 at 00:31 UTC ( #1031295=note: print w/ replies, xml ) Need Help??


in reply to Re: Manipulate deepest values in complex hash structures
in thread Manipulate deepest values in complex hash structures

IMHO Data::Leaf::Walker can't be used in this particular task of changing leave values.

Or can you see a possibility to pass an absolute key-path which selects only the deepest leaves?

And the each-method will only return copies which can't be manipulated.

OTOH generating an iterator is for sure an interesting alternative.

Cheers Rolf

( addicted to the Perl Programming Language)


Comment on Re^2: Manipulate deepest values in complex hash structures
Re^3: Manipulate deepest values in complex hash structures
by sundialsvc4 (Abbot) on Apr 30, 2013 at 18:07 UTC

    No arguments that it may or may not be appropriate in this case.   I mention it mainly to point out (as other Monks have, since) that “canned” walkers also exist, which might (or might not) be suitable.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031295]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2014-12-18 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (47 votes), past polls