in reply to Is it a pragma or a module?

If I were in your shoes (writing a module to recursively scan modules and wanting to ignore some), I'd provide four modes of operation:
  1. "Ignore commonly used" - this is where you hardcode a list of modules/pragmata to exclude from your processing.
  2. "Ignore supplied list only" - allow the caller to replace the list of modules to ignore
  3. "Ignore commonly used list plus supplied list" - allow the caller to add to the list of modules to ignore.
  4. Process everything (a special case of 2 - where the ignore list is empty)
And you might want to make the "supplied list" accessible as part of your API too, so that calling code can make educated decisions about what to do.