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. :-)