#!perl *hook_plugin_fail = *hook_retry = *hook_reject = *hook_invalid_input = sub { call_hooks('beep'); undef; }; sub hook_abort($class, $cart, $reason, @) { return if not $reason or not @$reason; return if "@$reason" eq '^C'; call_hooks('beep'); undef; }