in reply to Re: caching formats
in thread caching formats
Yes, because formats are (I presume ... without looking at the perlguts) associated with some kind of “formatting subroutine” that is constructed by format(), they do have their own namespace ... and that is why I suggested writing the code (using eval) to coin a unique name for each one. Then, associate whatever name you want to use, with whatever filestream you want to write() to, as previously described. The effect will be what the OP is looking to do ... it’s just that the way of referring to a format, is by name (a string), and there is then a particular (and somewhat curious) way to tell Perl when to use it.
As to whether-or-not I would actually use this technology now ... probably not. HTML-formatting is infinitely nicer than line-printer formatted reports, and HTML-rendering technology is easy to come by now, but it is all (these kids today ...) a fairly-recent invention. This program is likely to be much older than that. And still in service, still doing its job. (Young whippersnappers!) C’est la guerre.