One of my pet peeves with some CFML tags is that they hardcode return value structure names. For example, creates a structure named CFFILE that contains the results of the file operation. And many others tags work this way too. What bugs me about this is that if you need to use a tag multiple times (maybe to process multiple file uploads, or to move or delete multiple files) then that structure is overwritten with each subsequent tag invocation, and it is up to you to extract and save any values if needed.
The good news is that Blackstone should fix this (I say “should” because Blackstone is still in beta and stuff could still change). The plan is that tags like will allow you to specify the name of the structure to be created (and will, of course, default to the current hardcoded name), which means that you could name each instance with a unique name, and problem solved.
Just another example of one of the many infrequently discussed goodies in the works.
Leave a Reply