Hook registration now rejects registering the same once-only event twice and validates names as patterns
When a hook (custom code that runs on a specific event) is registered with on(event, ...), event names are now validated as patterns rather than plain names. Registering the same once-only event more than once now throws an error reading "registered twice." Error messages for hook registration also now refer to a 'pattern' instead of an 'event' in their wording.
This catches a mistake, accidentally registering the same one-time hook event twice, that previously could pass silently, and the wording change reflects that event names are now matched as patterns rather than exact strings.