On Fri, 7 May 2021, Loren Wilton wrote:
The only nitpick I'd offer is that I'd prefer that the capture tokens be at a
single level, like rule names. So you might get:
$pms->{captured_values}->{NAME} = $+{NAME};
Then use it in a rule:
body MATCHER /My name is ${NAME}/
The risk with that is rules from multiple sources using colliding
variable names.
body MATCHER /My name is ${FROM_NAME:NAME}/
...is explicit and doesn't carry that risk.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
[email protected] pgpk -a [email protected]
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Autocorrect is the work of the Devil, and whoever invented it
should go straight to hello. -- Windy Wilson
-----------------------------------------------------------------------
Tomorrow: the 76th anniversary of VE day