458e3ef20a
This is trickier than expected because ModuleLoaded hooks can (as any other hooks) use arbitrary regular expressions for their filter. Fixes #4841
11 lines
511 B
Plaintext
11 lines
511 B
Plaintext
provide-module foo %{ }
|
|
provide-module foobar %{ }
|
|
hook global ModuleLoaded foo %{ set-register a %reg{a} literal }
|
|
hook global ModuleLoaded f.* %{ set-register a %reg{a} regex }
|
|
hook -once global ModuleLoaded f.* %{ set-register a %reg{a} regex-once }
|
|
require-module foo
|
|
require-module foobar
|
|
hook global ModuleLoaded foo %{ set-register a %reg{a} literal-late }
|
|
hook global ModuleLoaded f.* %{ set-register a %reg{a} late-regex }
|
|
hook -once global ModuleLoaded f.* %{ set-register a %reg{a} late-regex-once }
|