The cost of rewriting wheels to be found on CPAN I believe would be paid for by savings elsewhere in the project.
I'd like to lift this thought and make an example of it. I've just recently reimplemented parts of CGI.pm in LotusScript, Lotus-IBM's VB dialect, and it was mostly easy. Instead of having to hunt down a specification on what exceptions production quality would have to handle, I read perl's own escapeHTML and param functions. I've saved myself a number of steps by re-using the domain knowledge coded into the perl module but without actually using perl.
For this type of thing, CPAN is a great resource even when the actual code isn't going to be executed.