For databases, both DBIx::Class and Rose::DB support this sort of things in various ways. But, it's not expressed in this fashion, so you'll want to read through all the documentation to find it. Look for words like "prefetch".
My criteria for good software:
Does it work?
Can someone else come in, make a change, and be reasonably certain no bugs were introduced?