On Sat, 8 May 2021, Henrik K wrote:

On Fri, May 07, 2021 at 02:44:48PM -0700, John Hardin wrote:
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.

I guess the risk is exactly the same as rulenames colliding.. better not
use very generic names and you can always prepend the rulename yourself. :-)

heh. True.

--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org                         pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
 Tomorrow: the 76th anniversary of VE day

Reply via email to