overloading: make qr fallback to "" better
With the re_eval jumbo fix, the behaviour of overloaded objects in
runtime patterns, such /^$overloaded/ has changed, such that the stringify
overload ("") no longer avoids the need for 'use re "eval"': for example,
use overload "" => sub { qr/(??{1})/ }
my $o = bless [];
"1" =~ /^$o/;
works in 5.16.0, but dies with "Eval-group not allowed" in blead.
Change this back to the former behaviour, such that if qr and concat
ops aren't overloaded, then use "" overloading, and if the return from
that is a qr object, extract any code blocks from it.
This is achieved by:
* moving the concat/stringify code ahead of the regex block extraction
code,
* making the overloaded stringify call be explicit (rather than
being invoked implicitly by sv_catsv()),
* looping to re-apply overloading to any object returned by "".
* applying those last two steps in the case of a single arg too
This is a partial fix for
[perl #113682] Bleadperl v5.17.0-424-gd24ca0c breaks
ABIGAIL/Regexp-Common-
2011121001.tar.gz