I asked this once before but looking back, I think there was a misunderstanding about the question.
While working on a tag that would call cURL to do a web api call (thread (https://exiftool.org/forum/index.php?topic=11940.msg64435#msg64435)), Alan pointed out that the tag is created and cURL is called even if the tag is not requested. So that would preclude the ability to add such code to the main .exiftool_config. That would slow down processing and possibly cause a large amount of unnecessary hits on the website API. That is especially a problem with another tag I'm working on with a website that only gives a couple of thousand free hits per month.
So is it possible to flag a user defined tag so that it is not generated unless specifically requested, similar to the way some of the Extra tags (such as CanonDR4, FileAttributes, or FileBlockSize) or the MacOS XAttr tags are not generated unless requested.
Sure. The "official" way to do this would be to call $self->GetRequstedTags() and look for the tag in the returned list, but accessing the private REQ_TAG_LOOKUP member would be faster:
ValueConv => q{
return undef unless $$self{REQ_TAG_LOOKUP}{lower_case_tag_name};
...
},
- Phil