The normal way to do things is to run some code that generates data, and then pass that data to process(). It sounds like you didn't realize this when you structured your program. You can always put the data in a temporary place like $r->pnotes() if you don't want to restructure your code.