in reply to "Variable will not stay shared" warning

Wild guess: you are using Apache::Registry and your code looks like this:
my %Params; .... sub foo { .... $page->string($fn, 12, 150, $height, $Params{InvoiceID}); .... }
In general, this warning means you've created a closure and $Params{InvoiceID} will not change for the rest of the life of your program. That could be bad.