PL/Perl can be used to write event trigger functions. In an
event trigger function, the hash reference $_TD contains information about the current
trigger event. $_TD is a global
variable, which gets a separate local value for each invocation
of the trigger. The fields of the $_TD
hash reference are:

$_TD->{event}

The name of the event the trigger is fired for.

$_TD->{tag}

The command tag for which the trigger is fired.

The return value of the trigger procedure is ignored.

Here is an example of an event trigger function, illustrating
some of the above:

Submit correction

If you see anything in the documentation that is not correct, does not match
your experience with the particular feature or requires further clarification,
please use
this form
to report a documentation issue.