Hi Steinar,
Somebody just pointed out that the link you provided, is for the old 4.0 branch
of the documentation, not the current 4.1 or the upcoming 4.2 releases.
The corresponding version of that lua script for the 4.0 branch would be
https://github.com/PowerDNS/pdns/blob/rel/rec-4.0.x/pdns/p
In the PowerDS recursor documentation at
https://doc.powerdns.com/md/recursor/scripting/#writing-lua-powerdns-recursor-scripts
the link to "a sample script that showcases all functionality
described below":
https://github.com/PowerDNS/pdns/blob/master/pdns/powerdns-example-script.lua
gives me a