With regards to modifying the default Tie::Hash::NamedCapture semantics which mirror how named captures work in the perl5 engine I've come up with an implementation plan that's not as insane as it could be. In the case of qr// the package that the regex is being blessed into is part of the regex structure via engine callbacks, but since %+ and %- are globals you can't bind these lexically to a regex or have some comfortable way to associate them with a single regex. The workaround for this is to continue to bless %+ and %- into Tie::Hash::NamedCapture but alter the NamedCapture.pm routines so that they use the p5 semantics in the default case as they do now OR if a custom engine has been defined call engine->tie_pkg (or somesuch) which is the real Tied package to use, so for instance FETCH migh become something like: # pseudocode sub FETCH { if (my $pkg = re::tie_pkg($_[0]->{all})) { goto &{"$pkg\::FETCH"}; } return re::regname( ... ); } This solution seems pretty clean to me and wouldn't impose any penalty on $+{foo} lookups using a custom engine other than seeing if they need to be dispatching to a user-defined Tie::Hash package.Thread Previous | Thread Next