C.48.  $world->hookenabled


$world->hookenabled function: checks whether a HOOK is ENABLED

$result = $world->hookenabled( event ,
  name );
$result = $world->hookenabled( event ,
  number );

This function checks whether the specified hook exists and whether it is enabled.

The first argument is the name of the event. For the second, you can pass either a hook number or name. If the hook does not exist, this function returns undef, so you can distinguish the case of a non-existant hook from a disabled one.

If the hook exists, then the function returns 0 or 1 depending on whether it is enabled or not. If you pass a name, and there are several hooks with the same name, it returns a list with one value for each hook with that name, and each value is 0 or 1 depending on the state of the hook.