A note re Set::FA::Element
Hi Folks
Mark Rogaski, the author of Set::FA has kindly given me co-maint, so I can make some changes.
This post really concerns Set::FA::Element, which is what I'm using for the unreleased Graph::Easy::Marpa::Lexer module. The latter module is working (at home) on simple graphs.
Firstly, I'd like to add a method to return what's captured. This simplest patch is to change line 102 from:
my $regex = qr{$rule}; # precompile regex
to:
my $regex = qr{($rule)}; # precompile regex
I.e. To add capturing parentheses, and a method called match() to return the value. Since match($string) sets what matched, you can even fool the DFA via this method...
Because there is not currently any such capability, I'd like to think this doesn't affect too many users, if anyone. But if this does concern you, please comment this post.