You may also want to read up on Memoize. I saw it presented lately, and was pretty impressed w/ what it does. It might fit into your problem in a way you haven't thought of yet. It's trivially easy to implement, too.
Here's the summary:
'Memoizing' a function makes it faster by trading space for time. It does this by caching the return values of the function in a table. If you call the function again with the same arguments, memoize jumps in and gives you the value out of the table, instead of letting the function compute the value all over again.
Oh, and as to the module problem, if you have write access for the source that you've written, there's no reason why you can't lay down code that comes from CPAN too. After all, it's (usually) just Perl code, there's nothing magic about it.