Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: XPath-like method for searching/editing structures

by tobyink (Abbot)
on Oct 09, 2012 at 20:40 UTC ( #998070=note: print w/replies, xml ) Need Help??


in reply to XPath-like method for searching/editing structures

There are a number of modules that offer XPath-like syntax for drilling down into nested Perl data structures. One is my own JSON::Path which implements the JsonPath specification which also has freely available PHP, Javascript and C# (.NET) implementations.

JSON::Path also has links to various other similar Perl modules that I found in its SEE ALSO section.

I do like that Data::Diver lvalue feature. I may have to steal that.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
  • Comment on Re: XPath-like method for searching/editing structures

Replies are listed 'Best First'.
Re^2: XPath-like method for searching/editing structures
by nglenn (Beadle) on Oct 09, 2012 at 21:12 UTC
    This basically what I am looking for, except that it only does searching and not editing. If you end up "stealing" the lvalue feature, I'd love to know about it. I'm actually asking quite a bit ahead of time of my needing this functionality.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998070]
help
Chatterbox?
[virtualsue]: I have made a post for the first time in ... years
[marto]: hey virtualsue!
Eily thought about Neko Case first, something might be wrong with my brain's wiring
[virtualsue]: I recommended dbic-migration even though I am having trouble with it this week. It might be my fault.
[ambrus]: wow! I haven't seen you here for a long time, virtualsue
virtualsue waves back
[Eily]: it would have been 2 years in 2 weeks actually. And welcome back virtualsue :)
[Corion]: I think I saw virtualsue more recently in person than online :-D
[virtualsue]: It's true that there was a bigger gap between the 2 yr old post and the one before it
[ambrus]: yes, I probably just didn't see you two years ago, because I'm not in perlmonks much

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (15)
As of 2017-09-26 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (295 votes). Check out past polls.

    Notices?