|Pathologically Eclectic Rubbish Lister|
Re: Hard time to make use of PPIby brian_d_foy (Abbot)
|on Apr 20, 2008 at 15:18 UTC||Need Help??|
Don't try to do it in one step. The find selects elements for the PDOM. Once you have the right elements, go through them to pull out the bit that you want.
The docs are fine. The find does the selection, but you're trying to force it to do everything else too. :)
Update: If you're just stealing snippets from the docs, then you are doing it wrong. I think you're talking about the snippet in the top-level PPI::Document docs, but you're assuming a lot about what it is saying. You need to read about the find method in PPI::Node, where the docs are quite clear. If a method doesn't do what you think it does, read the docs on that method. :)
Update 2: I've made the example in PPI::Document better.
brian d foy <firstname.lastname@example.org>
Subscribe to The Perl Review