in reply to building a dependency tree
Hi, I'll make this short because I just waisted 15 minutes trying to format something that simply desapeared (page has expired error !!!! grrr).
If you are going to act on the data structure, you might want to look at a "real" build sytem where you can hook in configuration management. I have a make replacement written in perl (including the syntax) it's functional and functioning (used in real life) but I'd like to work on some Configuration management support in the system. If you want to chat a bit about this subject, send me a mail to nadim@khemir.net (slides about the system can be found at the Nordic perl workshop)
If you go for a hand made solution you can use Data::TreeDumper to dump the tree in a "good" looking way.
Cheers, Nadim.