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'