Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: XML lite unblessed reference

by wind (Priest)
on Aug 05, 2011 at 02:07 UTC ( #918670=note: print w/replies, xml ) Need Help??


in reply to XML lite unblessed reference

The selectNodes returns an array reference, not an blessed object:
my $nodes = $doc->selectNodes('/perldata/hello'); print ref($nodes), "\n"; =prints ARRAY =cut

Replies are listed 'Best First'.
Re^2: XML lite unblessed reference
by Anonymous Monk on Aug 05, 2011 at 03:49 UTC
    What do you suppose this means?
    'attributes' => bless( [], 'XML::DOM::Lite::NodeList' ),
    XML::DOM::Lite::NodeList - blessed array ref for containing Node objects
Re^2: XML lite unblessed reference
by lfast (Initiate) on Aug 08, 2011 at 16:31 UTC
    Thanks. I thought I was getting a list of Nodes, not an array.

      Thanks. I thought I was getting a list of Nodes, not an array.

      Um, an array is a list of nodes, and you're supposed to be getting both (blessed array reference).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://918670]
help
Chatterbox?
[1nickt]: marioroy Yes, I am using it with MCE, as is Discipulus I believe. I was trying to work out how to make a cpanfile that would be smart enough to know which deps to require.
[1nickt]: See this code. (I expected to simply eval loading threads as a check, but weirdness happened with Perlbrew so it's a grep of -V ...)
[choroba]: Config might be better than grepping -V
[Corion]: Also see Config::V, which is less of that hackery, or that hackery hidden in a module ;)
[1nickt]: The problem was with Perlbrew
[Corion]: Whoops - Config::Perl::V

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2017-10-18 15:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (249 votes). Check out past polls.

    Notices?