This is syntactic sugar for wrapping the factory calls needed to declare and run hooks from within plugin. These keywords are provided to mimic the API of Dancer 2 so that plugin migration can be done more easily. A test is provided to demonstrate the patch.
Specifically the confusion is that "scalar" appears to be used where "not a (non-GLOB) reference" was intended.
Previously, if YAML could not load, it was reported that YAML was not present. This change reports the actual error.