Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
go ahead... be a heretic
 
PerlMonks  

Re^4: sub that finds ancestor elements

by tobyink (Prior)
on Sep 14, 2012 at 05:45 UTC ( #993652=note: print w/ replies, xml ) Need Help??


in reply to Re^3: sub that finds ancestor elements
in thread sub that finds ancestor elements

Replace this:

$node->findnodes("ancestor::*")->map(sub { $coolNodeName->($_) })

With this:

(map { $coolNodeName->($_) } $node->findnodes("ancestor::*"))

... and you should be able to use XML::LibXML 1.70.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re^4: sub that finds ancestor elements
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (17)
As of 2013-05-21 16:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (441 votes), past polls