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

Re: XML::LibXML::NodeList get_node

by tobyink (Abbot)
on Apr 09, 2014 at 11:21 UTC ( #1081635=note: print w/ replies, xml ) Need Help??

in reply to XML::LibXML::NodeList get_node

get_node is implemented much like this:

sub get_node { my ($self, $pos) = @_; $self->[$pos - 1]; }

So $nodelist->get_node(0) is the same as $arrayref->[-1].

I wouldn't rely on it if I were you though. It's undocumented behaviour that is merely an accident of the internal implementation of XML::LibXML::NodeList, and could theoretically change in the future.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Comment on Re: XML::LibXML::NodeList get_node
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2015-11-25 10:25 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (673 votes), past polls