develooper Front page | perl.perl5.porters | Postings from September 2011

[perl #92898] (*THEN) broken inside condition subpattern

Thread Previous | Thread Next
Father Chrysostomos via RT
September 21, 2011 07:08
[perl #92898] (*THEN) broken inside condition subpattern
Message ID:
On Wed Sep 21 02:17:32 2011, wrote:
> The fact that (*THEN)
> in these two examples behaves differently is, to me at least,
> counter-intuitive:
>    A (B (*THEN) C)
>    A (B (*THEN) C | D)
> In the first, Perl fails the match without any backtracking if C
> fails;
> in the second, it backtracks into A. Or that is what my experiments
> imply.

Oddly, I don’t find that counterintuitive at all.  Do we need three
versions of prune/then?

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About